parsing based on BNF?

D-Man dsh8290 at rit.edu
Sun Feb 25 22:03:23 EST 2001


On Sat, Feb 24, 2001 at 10:24:58PM +0000, Uche Ogbuji wrote:
| 
| I'm also curious to know if there is such a beast for Python or C/C++.
| 

If you want to get C code as the result, lex + yacc is a good
combination.  With lex (flex) you specify regexes that describe the
various tokens in your language.  With yacc (bison) you specify the BNF
in terms of the lex tokens and what actions the parser should take
when that expression is found.

-D





More information about the Python-list mailing list