Along with a conversion tool that should help speed up the overall
process of converting a BNF grammar to Parse::RecDescent format. If you
want to use the tool, please note that the combined Python grammar
available on http://www.python.org/doc/current/ref/grammar.txt has a few
bugs that will cause the parser to not understand a few grammar terms.

Note that translation from BNF to Parse::RecDescent is -not- the final
aim of the transformation tool, but this should match most common
BNF-like grammars, and may even handle things like the official Ruby
EBNF grammar.

The BNF format it accepts looks as follows:

"name ::= production"

where "production" can contain:

"terminal after 'quoted terminal'"
"arbitrary|alternations"
"all+ the? standard* modifiers"
"(parenthetical expressions 'containing any'|of the above)"
"[optional term but this is nonstandard]"
"<comments within angle brackets but this is nonstandard>"
'"a"..."f"|"0"..."9" are character ranges'
"and \this is a weird literal"

Feel free to add different grammar styles, especially those of
compatible languages.

Let's not forget a Python grammar, automatically generated. The tool
won't remove left-recursiveness, but it should at least help jump-start
the implementation.

--
Jeff <[EMAIL PROTECTED]>

Reply via email to