From: eugene@wilbur.nas.nasa.gov (Eugene N. Miya)
Subject: Re: Lex/Yacc ref wanted
Organization: NAS, NASA Ames Research Center, Moffett Field, CA
Date: Fri, 17 Apr 92 00:24:49 GMT

>> In article <garzione.703361555@convex.convex.com>
>> garzione@convex.com (Michael Garzione) writes:
>> >Does anyone know of a good lex/yacc reference?  I've already got O'Reilly's;
>
>>   You know.  I doubt one exists.  I have been using these tools lately.
>
>Try taking a look at one of the last chapters of Kernighan and Pike
>"The Unix Programming Environment".  It tells you how to develop an
>interpreter with Lex and Yacc.  It is very nice.

I have.
In fact, I recommended it to the friend writing a YACC for physicists text.
This is a very good Unix intro book.
He gobbled it up: first, he changed hoc from handling real numbers
to complex numbers.  Then he added quaternions; he had me post this to
the net.  He really got into Unix because of it, and the last I saw he
had written a 1-D FFT in awk (250 lines, I didn't say it optimized,
but he was happy) and a relativistic graphics function based on
P.K. Hsiung's Pixel cover (also awk).  He does this on a PC.  I need to
get him a workstation.  He brings a different perspective beyond
compiler writing (which is what most CS prof use it for).  Good!
His comment was, "There needs to be a Schaum's Outline Series on yacc and
lex."  So he embarked on his YACC book.  He has a ways to go.  But then
he is also thinking about three other books as well.  (2 already published).

But I do not believe this is an adequate reference to yacc and lex.
Even the intro papers have problems.  Last evening, just thinking about
my learning of yacc and lex I wrote down three pages.  The key is how
to structure something which is useful: not flood the student, get/have
all the information so your scanning of y.output or source code is
minimal.  Good examples and problems are needed.  I have written several
of my own lex programs for personal use independent of class, on to my
own yacc/bison based tools.  Aho and Ullman provided a few key insights
(division of labor questions).
Frankly, it has gotten me wondering about PQCC [I have been
in touch with Bill Wulf about this, we both chuckle about it].
No, K&P is a nice Intro Unix text, but not the best way to learn yacc/lex.
What is nice about this book and Nutshell is that you can FTP the code,
I think from UUNET (where ever I got it).

I also have Pyster's book, and I could easily consider Charlie Fischer's
book.  No, enough books.  P.S. Computer Literacy Bookshop gave me my
copy of the Nutshell book for free.  Patronize them!  It was okay at
the time.

BTW: If you like K&P I recommend a paper published by John Mashey with
(I think) Ted Dolotta on using a Command Language as a Primary Programming
Language.  It was published in some book/conference proceedings on
command languages.  Bill (physicist above) was convinced that awk would
make a nice first programming language.  I told him that was a paper
given at Usenix about 10 years ago (UCB).  Oh well!

--eugene miya, NASA Ames Research Center, eugene@orville.nas.nasa.gov
  Resident Cynic, Rock of Ages Home for Retired Hackers
  {uunet,mailrus,other gateways}!ames!eugene
Why do people perceive 'a flame,' even when you place "Not a flame" in a note?
Ref: Mathematics and Plausible Reasoning, vol. 1, G. Polya