Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Convert Augmented BNF (ABNF) to Regexp::Grammars

by Anonymous Monk
on Mar 07, 2012 at 12:51 UTC ( #958271=note: print w/replies, xml ) Need Help??


in reply to Convert Augmented BNF (ABNF) to Regexp::Grammars

So yeah, they should all be  <token: not  <rule:

Replies are listed 'Best First'.
Re^2: Convert Augmented BNF (ABNF) to Regexp::Grammars
by Anonymous Monk on Oct 07, 2016 at 15:09 UTC

    I would like to share two bugs and fixes:

    In "Choice", add $ret = "(?:".$ret.")"; after the join. When combining a Choice with other values, the Choice values need to be separated from the other ones, because precedence for | is low.

    In "Repetition", there must not be space between the min and max values: $ret .= " (?: ". Value($$v{value}  , $dent+1)." ){$$v{min},$$v{max}} ";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://958271]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2017-10-19 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (257 votes). Check out past polls.

    Notices?