Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Anonymous Monk
on Oct 07, 2016 at 15:09 UTC ( [id://1173486]=note: print w/replies, xml ) Need Help??


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

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1173486]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2025-04-30 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.