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

Re: Lexing: how to define tokens based on "context" (Marpa)

by Anonymous Monk
on Oct 16, 2013 at 14:35 UTC ( #1058460=note: print w/ replies, xml ) Need Help??


in reply to Lexing: how to define tokens based on "context"

open to better names than "LINECONTINUER"...)

MULTIPASS MULTILINE?

Since the rule name can be any alphanumeric string including _ a simple "\w+" won't suffice.

Sure it will :) \w matches  [a-zA-Z0-9_]

...HOP:: ... HOP::...

See simple HOP::Parser usage , this is why I wouldn't recommend HOP -- I can't figure it out :)

See http://jeffreykegler.github.io/Ocean-of-Awareness-blog/metapages/annotated.html#TUTORIAL esp http://marpa-guide.github.io/ and Marpa DSL is EEBNF


Comment on Re: Lexing: how to define tokens based on "context" (Marpa)
Download Code
Re^2: Lexing: how to define tokens based on "context" (Marpa)
by marinersk (Chaplain) on Oct 17, 2013 at 13:45 UTC
    open to better names than "LINECONTINUER"

    "CONTINUATION_CHARACTER" ?

      APPEND_NEXT?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2014-11-23 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (134 votes), past polls