in reply to Re^2: Cannot get Marpa::R2 to prioritise one rule over another
in thread Cannot get Marpa::R2 to prioritise one rule over another

Hello choroba,

can you be so kind to explain me better your:

> Mixing the lexer and grammar rules is not a good idea, they're very different.

because I'm reading Marpa-R2 vocabulary and I am not able to strictly define them. Where my code mixes them?

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^4: Cannot get Marpa::R2 to prioritise one rule over another
by choroba (Archbishop) on Jan 22, 2021 at 09:14 UTC
    Lines 24 and 25 contain lexer rules (easily recognisable by the tilde), but line 27 contains a grammar rule again, followed by another lexer rule. But maybe that's how you like it. The more important question is whether you know what the difference between them is; separating them visually helped me to keep them separated in my head, too.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]