Need parser for C-like grammar

A

Albert

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
 
R

Robin Becker

Albert said:
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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top