changing the Python grammar ?

Michele Simionato mis6 at pitt.edu
Wed Nov 20 10:59:11 EST 2002


Just <just at xs4all.nl> wrote in message news:<just-52D918.09381320112002 at news1.news.xs4all.nl>...
> Perhaps it's an idea for the OP to look at the compiler module? I have 
> no experience with it, but I would expect that experiments like this 
> would be more manageble with it.
> 
> Just

Thanks to everybody who answered. Actually, I don't want to change the
Python grammar, I simply wondered about this possibility. I gave a look
to the tokenize and parser module and I understood that they are pretty
nice. The documentations says that they are useful to parse Python programs,
but actually they do much more than that: with simple changes to the grammmar,
or no changes at all, they can parse a fair large class of programming 
languages. This is quite interesting to know (suppose you write a macro
language and use these modules to convert to another programming language...)
Thanks again,

                                  Michele



More information about the Python-list mailing list