Re: C parser

codeworker@free.fr (Cedric LEMAIRE)
10 Aug 2004 17:31:28 -0400

          From comp.compilers

Related articles
C parser sid@claudius.ics.uci.edu (Siddharth Choudhuri) (2004-07-28)
Re: C parser rajaram@acmet.com (Rajaram) (2004-08-04)
Re: C parser jacob@jacob.remcomp.fr (jacob navia) (2004-08-04)
Re: C parser danwang74@gmail.com (Daniel C. Wang) (2004-08-04)
Re: C parser tmk@netvision.net.il (2004-08-05)
C parser skyanhf@yahoo.com.cn (=?gb2312?q?sky=20yan?=) (2004-08-05)
Re: C parser codeworker@free.fr (2004-08-10)
Re: C parser sid@igor.ics.uci.edu (Siddharth Choudhuri) (2004-08-11)
C parser temple@deakin.edu.au (DAVID) (1997-07-16)
Re: C parser drh@microsoft.com (Dave Hanson) (1997-07-18)
Re: C parser cort@shay.ecn.purdue.edu (1997-07-22)
| List of all articles for this month |

From: codeworker@free.fr (Cedric LEMAIRE)
Newsgroups: comp.compilers
Date: 10 Aug 2004 17:31:28 -0400
Organization: http://groups.google.com
References: 04-07-079
Keywords: C, parse
Posted-Date: 10 Aug 2004 17:31:28 EDT

Siddharth Choudhuri <sid@claudius.ics.uci.edu> wrote
> I am looking for a C parser that can generate a list of all variable
> names, their type (int, char...) and scope (auto, static, ...) by reading
> a C source file.


I wrote a C parser, which is still incomplete for parsing, and which
doesn't take into account the preprocessing rigourously. It gives you
functions, statements, variable declarations, typedefs, structs,
unions and so on.


The C parser is implemented as a extended-BNF script in CodeWorker, a
parsing tool and a universal source code generator available at
"http://www.codeworker.org".
If you are interested, I could send you the C parser. It may not work
on every C file properly, and may need some adjustments or corrections
that I will do as soon as you will detect some mistakes.


Post a followup to this message

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