|Making a C compiler with Flex and Bison LegendLength@hotmail.com (2000-10-01)|
|Re: Making a C compiler with Flex and Bison firstname.lastname@example.org (Hans-Bernhard Broeker) (2000-10-08)|
|Date:||1 Oct 2000 00:07:06 -0400|
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]
Return to the
Search the comp.compilers archives again.