Making a C compiler with Flex and Bison
1 Oct 2000 00:07:06 -0400

          From comp.compilers

Related articles
Making a C compiler with Flex and Bison (2000-10-01)
Re: Making a C compiler with Flex and Bison (Hans-Bernhard Broeker) (2000-10-08)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 1 Oct 2000 00:07:06 -0400
Organization: Compilers Central
Keywords: question, comment

I need to create a list of identifiers in a c file, and also a list of
types. I read the comp.compilers faq which said to download flex & bison.
I then found a bison grammar file which is the ansi c grammar.

I can't work out what to do next though. Do I need to make a flex source
file as well, or could i just download that off the net somewhere?

In the end I just want my program to be able to read a c source file and
generate a tree of all function names, types, expression names & parameters
etc. Am I going the wrong way in trying to use flex & bison?

Thanks for any help, I'm not a newbie to c programming but i've never dealt
with compiler writing before.
[That's actually about half the work in writing a C compiler. I'd look
and see if you can fiddle an existing compilers like lcc or GCC to dump
out symbol information. -John]

Post a followup to this message

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