David Beazley has written up a pure-python Lex/YACC module called... [Python Lex/YACC][PLY] (or PLY). If you haven't worked with YACC-type parsers before, you might want to look at my [[implicit multiplication notes|yacc2dot]]. [PLY]: http://www.dabeaz.com/ply/ [[!tag tags/programming]] [[!tag tags/python]] [[!tag tags/tools]]