Need parser for C-like grammar
Robin Becker
robin at reportlab.com
Fri Jun 4 07:46:49 EDT 2004
Albert wrote:
> Hi group
>
> I need to develop a parser for a descriptor file which
> uses a c-like syntax.
>
> Is there any package available (preferably with examples
> of such c-like grammar) that allows me to define the grammar
> in an easy way and use this to parse the file into a tree of
> python objects?
>
> Thanks
> Albert
there was a thread recently about a C compiler written in Python.
It's alleged to use the visitor pattern for code generation so it might be
adaptable to your needs.
http://people.cs.uchicago.edu/~varmaa/mini_c/
--
Robin Becker
More information about the Python-list
mailing list