[Types-sig] "Mobius2" -- high performance Python-extensible Python parser
by Jeff Epler other posts by this author
Apr 12 2001 12:45AM messages near this date
[Types-sig] Interesting reading
|
Re: [Types-sig] "Mobius2" -- high performance Python-extensible
Python parser
When the Types sig was just getting up to speed the last time, someone
expressed that there's no easy way to prototype language extensions.
I mentioned "mobius", which is a Python compiler based on a SPARK grammar.
Mobius had performance problems, and didn't ease the implementation of
the new grammar in core Python because it used a different syntax of
grammar.
Mobius2 exposes the Python parser and parser generator to Python code.
It means that you get all the speed of the builtin parser[1], its
reliability[2] and extensibility, and easy portability to core Python.
If any types-sig proposals include language extensions, I suggest that you
take a look at Mobius2.
http://sourceforge.net/projects/mobiuspython/
The portions of interest are the "mobius2" directory, and the demo/*2
directories (currently just two simple uses of mobius2).
Jeff
jepler@[...].com
jepler@[...].net
[1] Actually, it's about 15% faster, and I'm not sure why.
[2] A 159-case test suite covers all productions in the core Python 2.0
language. All cases are verified to produce the same results (ASTs)
as the builtin parser, which isn't terribly surprising.
Thread:
Jeff Epler
Michel Pelletier
Jeff Epler
Michel Pelletier
Jeff Epler
Paul Prescod
Jeff Epler
Paul Prescod
Jeff Epler
|