Parser building in Python

François Pinard pinard at iro.umontreal.ca
Fri Nov 29 10:47:09 EST 2002


[ml]

> I like to write a parser in Python.  The language itself is not LALR(1),
> but I could do some tricks to make it LALR(1).  What are the best tools
> to write lexers and parsers in Python?  Maybe sth. similar to ANTLR?

SPARK is a good bet, it accepts grammars which may deviate a bit from those
we are used to.  However, for big inputs, it might be slow.  For one of the
projects I work for, SPARK seems very acceptable to the team, and it will
likely go in real production in a few months from now.  Everybody seems to
agree that we saved weeks (or maybe months) of development by using SPARK.

But in the whole adventure, the real saver was switching to Python instead
of C, for a rather complex system formerly written in PL/I.  It was tinily
difficult convincing the management to do so, our prediction that we were
saving years of development and maintenance was a strong selling point.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list