Re: parser for C -> AST

Tom Copeland <tom@infoether.com>
Wed, 03 Oct 2007 09:40:11 -0400

          From comp.compilers

Related articles
parser for C -> AST richard.melikson@gmail.com (2007-10-01)
Re: parser for C -> AST adelantado@rwaltman.com (Roberto Waltman) (2007-10-01)
Re: parser for C -> AST sammyderoy@sympatico.ca (Sammy) (2007-10-01)
Re: parser for C -> AST paul@paulbmann.com (Paul B Mann) (2007-10-02)
Re: parser for C -> AST adelantado@rwaltman.com (Roberto Waltman) (2007-10-01)
Re: parser for C -> AST torbenm@app-4.diku.dk (2007-10-02)
Re: parser for C -> AST tom@infoether.com (Tom Copeland) (2007-10-03)
| List of all articles for this month |
From: Tom Copeland <tom@infoether.com>
Newsgroups: comp.compilers
Date: Wed, 03 Oct 2007 09:40:11 -0400
Organization: Compilers Central
References: 07-10-008
Keywords: C, parse
Posted-Date: 03 Oct 2007 13:19:34 EDT

On Mon, 2007-10-01 at 11:04 +0000, richard.melikson@gmail.com wrote:
> I have to do some analysis of C code. Is it possible to find online a
> free parser for C that will generate some kind of syntax tree / AST ?
> All I could find is bits and pieces of lex/yacc files that don't
> compile, and I tried to look at TCC but its parser is intergrated with
> the generator in a stack-based manner, so no AST.


And one more, for JavaCC:


https://javacc.dev.java.net/servlets/ProjectDocumentList?folderID=110&expandFolder=110&folderID=0


These are JavaCC grammars, but you can convert them to JJTree grammars
(which produce an AST) by just renaming them to C.jjt and twiddling the
start symbol to return the root AST node.


Yours,


Tom



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.