parsing C code

  • Thread starter MENON Jean-Francois
  • Start date
M

MENON Jean-Francois

hello,

I would like to parse C code with a (Gnu)Bison program. Can I find the
Bison definition of C somewhere, or do I have to start from scratch ?

thank you
jf
 
R

Richard Heathfield

MENON said:
hello,

I would like to parse C code with a (Gnu)Bison program. Can I find the
Bison definition of C somewhere, or do I have to start from scratch ?

K&R2 includes a C grammar which is almost Bison-ready.
 
R

Richard Heathfield

MENON said:
Thank you,
can I find this C grammar on the net ?

Did you try googling for C grammar?

The very first hit looked pretty useful to me.
 
M

MENON Jean-Francois

Richard said:
Well, the very first hit looked pretty Bison-ready to me.


My first thought is to get you to find the URL yourself, rather than
spoonfeed it to you.

Still, we could back-and-forth like this all day and get nowhere. Here:

http://www.lysator.liu.se/c/ANSI-C-grammar-y.html

--
Richard Heathfield : (e-mail address removed)
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton

thank you
 
E

EventHelix.com

Why reinvent the wheel. Did you look at doxygen and cc-doc type
tools. They parse C and C++ code.

Sandeep
 

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

No members online now.

Forum statistics

Threads
474,102
Messages
2,570,645
Members
47,247
Latest member
GabrieleL2

Latest Threads

Top