Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Cannot get Marpa::R2 to prioritise one rule over another

by Discipulus (Canon)
on Jan 22, 2021 at 09:02 UTC ( [id://11127264]=note: print w/replies, xml ) Need Help??


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 (Cardinal) 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]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11127264]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-16 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found