Re: C parser yielding syntax tree data structure?

Arndt Muehlenfeld <muehlenf@sbox.tugraz.at>
12 Apr 2006 22:48:59 -0400

          From comp.compilers

Related articles
C parser yielding syntax tree data structure? andrews@csd.uwo.ca ((Jamie Andrews)) (2006-04-08)
Re: C parser yielding syntax tree data structure? do_not_have@sorry.bitbuck.cmm (Rod Pemberton) (2006-04-09)
Re: C parser yielding syntax tree data structure? tmp123@menta.net (tmp123) (2006-04-09)
Re: C parser yielding syntax tree data structure? muehlenf@sbox.tugraz.at (Arndt Muehlenfeld) (2006-04-12)
Re: C parser yielding syntax tree data structure? idbaxter@semdesigns.com (Ira Baxter) (2006-04-12)
Re: C parser yielding syntax tree data structure? p.black@acm.org (Paul E. Black) (2006-04-14)
Re: C parser yielding syntax tree data structure? scared.of.any@reply.mail (Rod Pemberton) (2006-04-16)
Re: C parser yielding syntax tree data structure? robert.thorpe@antenova.com (2006-04-21)
| List of all articles for this month |

From: Arndt Muehlenfeld <muehlenf@sbox.tugraz.at>
Newsgroups: comp.software-eng,comp.compilers,comp.lang.c
Followup-To: comp.software-eng,comp.compilers,comp.lang.c
Date: 12 Apr 2006 22:48:59 -0400
Organization: TU Graz
References: 06-04-044
Keywords: C, parse

(Jamie Andrews) wrote:


> For a research project, we're looking for a reliable parser for C
> that will take an ANSI C program and yield a tree representation of
> the program (as a Java or C++ object). Of course a grammar e.g. in
> jflex/jbison that will yield the same thing is fine too. We have been
> able to find some grammars and parsers, of unknown reliability, that
> don't yield a syntax tree; we want to avoid starting with a flaky
> parser and/or adding the syntax tree code.


On my search for a C++ Parser that yields an AST, I tried two
parsers, that look fine for C, while not being able to parse all C++
constructs.


- C or C++ grammar for ANTLR (http://www.antlr.org/grammar/list)


- ELSA/Elkhound (http://www.cs.berkeley.edu/~smcpeak/elkhound/)


I am currently using ELSA, hoping the few remaining bugs
(resp. C++) are fixed some time.


Cheers,
Arndt


Post a followup to this message

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