||ABNF to Regexp converter
||2002-10-11 06:41:42 GMT
||2007-11-09 11:28:14 GMT
(Projects of this owner)
This is a library to convert ABNF (Augmented Backus-Naur Form) to
Regexp (Regular Expression) written in Ruby.
It parses a description according to ABNF defined by RFC2234 and some variants.
Then the parsed grammar is transformed to recursion free.
Although the transformation is impossible in general,
the library transform left and right recursion.
The recursion free grammar can be printed as Regexp literal
which is suitable in Ruby script.
The literal is pretty readable because parentheses are minimized and
properly indented by the Wadler's pretty printing algebra.
It is also possible to use the Regexp just in place.