Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 cooling their heels in the Monastery: (13)
As of 2014-07-30 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (233 votes), past polls