[antlr-interest] Python 2.5 grammar uploaded

Frank Wierzbicki fwierzbicki at gmail.com
Fri Jan 18 20:33:41 PST 2008


I just uploaded an updated Python grammar that adds the new features
from Python 2.5.  I'm working on replacing Jython's current JavaCC
grammar with Antlr3.  Despite warnings in the comments I was unable to
resist mucking with the lexer :).  This is my first serious use of
Anltr3 so I'm guessing that there is room for improvement, so if
anyone here has critiques I'd love to hear them.  Also I have the same
grammar with AST production rules along with a walker in the Jython
sandbox, but these are probably not ready for anyone to look at
(especially the walker -- lots of rough edges).  In any case, thanks
for Antlr3 -- it is a joy to use.

By the way -- I have a typo in my description for the grammar -- 'as'
becomes a keyword in Python 2.6 not Python 2.5.

-Frank


More information about the antlr-interest mailing list