parser for C -> AST

  • Thread starter richard.melikson
  • Start date
R

richard.melikson

Hello,

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.

It doesn't have to be C99.

Thanks
 
R

Roberto Waltman

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.

Check LCC ( http://www.cs.princeton.edu/software/lcc/ ) and the C
grammars for PCCTS and ANTLR.

Roberto Waltman
..
 
R

Roberto Waltman

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.

Check LCC ( http://www.cs.princeton.edu/software/lcc/ ) and the C
grammars for PCCTS and ANTLR.

Roberto Waltman
 

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,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top