On Dec 13, 11:32 am, MartinRineh... at gmail.com wrote: > Is there a pythonic design I'm overlooking? Well, if using something like PLY ( http://www.dabeaz.com/ply/ ) is considered more Pythonic than writing your own parser and lexer... Python doesn't have all of life's answers unfortunately.