Related articles |
---|
Compiler type problem. bgates@rochgrp.com (g888) (1999-09-10) |
From: | g888 <bgates@rochgrp.com> |
Newsgroups: | comp.compilers |
Date: | 10 Sep 1999 00:05:49 -0400 |
Organization: | Deja.com - Share what you know. Learn what you don't. |
Keywords: | parse, question, comment |
I'm working to build a code analyzer of sorts. The problem is
relatively simple. Determine everything that is a variable or hard
reference to something. Determine all function calls and map the
scope of it all. O.k. so verbally it's easy enough to comprehend.
I've been looking through all the lex and yacc and flex and bison
references and tutorials. I know regular expressions and get the
basic ideas behind compiler construction. I think it's a similar
issue to building a full fledged compiler. I'm not sure where to go
now. I'm having trouble sort of jumping the gap between theory and
reality. Is there a c++ lexicon available somewhere that I could
use/look at. To see how it is that say the GNU compiler built it's
scanner? What do they look for? I've looked through the GNU source
for the latest GCC but it doesn't come with the lex files just the
resultant stuff....
Any help would be useful. I have the dragon book but I'm going to look
today and see if I can find anything else useful.
thanks muchly,
g888
(and yes people do joke about my name all the time)
[Last I checked they used a hand-coded scanner and a bison parser. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.