Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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
Replies are listed 'Best First'.
Re^2: Lexing: how to define tokens based on "context" (Marpa)
by marinersk (Curate) 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 perusing the Monastery: (12)
As of 2015-07-28 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (253 votes), past polls