|O'Reilly Lex&Yacc Book email@example.com (Chris Kaltwasser) (1998-04-21)|
|Re: O'Reilly Lex&Yacc Book firstname.lastname@example.org (Michael J. Roseberry) (1998-04-29)|
|Re: O'Reilly Lex&Yacc Book email@example.com (1998-04-29)|
|From:||"Michael J. Roseberry" <firstname.lastname@example.org>|
|Date:||29 Apr 1998 00:57:55 -0400|
|Organization:||All USENET -- http://www.Supernews.com|
Chris (and group):
I've been having a bit of fun with the book, too. I'm creating a
scanner/parser for Ada95 to both check syntax of Ada source files in a
directory (or directories), and to build an intermediate file containing
the structure and dependency information between those files.
My tool will have a rich set of command-line switches and (hopefully)
answer the following kinds of questions: What is the minimum set of
files necessary to build any particular program unit? What library
units are withed by a particular unit, directly and/or indirectly? Who
withs particular library units? Who doesn't get withed (it happens)?
What subprogram calls are made from a particular unit? In what units
are calls made to a particular subprogram? What does the dependency
tree for a particular unit look like? Questions like that; reports
galore if you want 'em; a little or a lot. It's been on the back burner
for years and now (I just bought the book) I'm diving in.
As of present, I've got the lexer and parser working and debugged:
syntax errors (or lack of them) are correctly reported. I have chosen
to do most of the intermediate file construction from the lexer; I use
the parser to detect the closure of major programming structures (the
parser, I think, is the natural place place to do that). The
intermediate file I mentioned above is now well-formed (happened just
today) so the remaining work will be classical text processing and
cross-referencing type stuff (directed upon the intermediate file). If
it works as well as I hope, I'll make the tool available to any Ada
programmers who may desire to have it -- but I got a ways to go yet!
Is anyone else having fun as a newbie with lex and yacc? I've been
having a good time with it and would like to hear from others who may be
taking on (or have accomplished) similar endeavors. And oh yes, I
realize this is probably very boring prose to the accomplished in the
audience, but hey, can you remember when you were just getting the idea?
Lexing and Yaccing,
Michael J. Roseberry
Fort Worth, Texas, uSA
Chris Kaltwasser wrote:
> I am currently teaching myself lex and yacc by reading the lex & yacc
> book from O'Reilly & Associates. The 2nd edition is a great
> improvement over the 1st which I had tried several years ago. The
> O'Reilly web site says that John Levine manages this newsgroup so I was
> especially hopefull that I could have some additional information.
Return to the
Search the comp.compilers archives again.