On Tue, 22 Sep 2009 17:07:33 +1200, greg wrote: >> What I want: a tokeniser generator which can take a lex-style grammar (not >> necessarily lex syntax, but a set of token specifications defined by >> REs, BNF, or whatever), generate a DFA, then run the DFA on sequences of >> bytes. It must allow the syntax to be defined at run-time. > > You might find my Plex package useful: > > http://www.cosc.canterbury.ac.nz/greg.ewing/python/Plex/
I haven't had time to play around with this yet, but it appears to be essentially what I'm looking for. -- http://mail.python.org/mailman/listinfo/python-list