Parsing C

Sean Ross sross at connectmail.carleton.ca
Mon Mar 31 21:15:14 EST 2003


http://systems.cs.uchicago.edu/ply/

PLY (Python Lex-Yacc) comes with some example code that includes an
ansi C language parser and lexer.

Perhaps that will help,
Sean


"Daniel Timothy Bentley" <dbentley at stanford.edu> wrote in message
news:Pine.GSO.4.44.0303311743400.19083-100000 at amy4.Stanford.EDU...
> Hey,
> I find myself having to write a C interpreter in Jython.  Are there any
> useful C compilers that are open-source in python?
>
> Or compiler-compilers that have files for a C compiler available?
>
> Or, compiler-compiler-compilers that have files for a compiler-compiler
> that have files for a C compiler available available?
>
> Really, I'm looking for a way to get a C compiler and mildly painlessly
> build it to create the AST that my program will look for.
>
> Oh, and the lexer in addition to the parser would be nice, but I bet it's
> all easy and fully of re-goodness in {p|j}ython.
>
> Thanks in advance,
> Dan
>






More information about the Python-list mailing list