[GoLUG] A tad bit pricey!
David Billsbrough
kc4zvw at earthlink.net
Tue Dec 5 09:11:28 EST 2023
Original Message:
Once upon a time, Kyle Terrien <kyle... at g....com>:
> While we are on the topic of books, I located a historical source that you may find interesting:
> * Brian Kernighan & Robert Pike, "The Unix Programming Environment", Prentice Hall, 1984.
> This book may be hard to find, but if you can get a copy, take a look at chapter 8 (Program Development). This is a whirlwind guided tour on how
> to use lex and yacc to progressively develop a domain-specific language, in this case a four function calculator called hoc. It is an insight into how
> the Bell Labs research team iteratively developed a piece of software. For years, I have been desiring to carefully comb through this chapter and
> work through the examples, but I have never gotten around to it.
> Maybe this chapter has been published again by one of the authors or a friend of the authors. I don't know, but if you can find a copy,
> this looks very promising.
https://archive.org/details/UnixProgrammingEnviornment/page/n243/mode/2up
Starting at page 233
and from the footnotes:
A good description of the basic theory underlying 'yacc' and other parser generators may be found in Principles of Compiler Design,
by A. V. Aho and J. D. Ullman (Addison-Wesley, 1977). 'yacc' itself is described in Volume 2B of The UNIX Programmer' s Manual. That
section also presents a calculator comparable to hoc 2; you might find it instructive to make the comparison. 'lex' was originally written
by Mike Lesk.
Again, the theory is described by Aho and Ullman, and the 'lex' language itself is documented in The UNIX Programmer' s Manual.
'yacc', and to a lesser degree 'lex', have been used to implement many language processors, including the portable C compiler,
Pascal, FORTRAN 77, Ratfor, awk, be, eqn, and pic.
-=-=-=-=-
Digging through this stuff is the real history of why computers have become the usable machines we have today.
But 'awk' still makes my head hurt!
regards,
David
--
GoLUG mailing list
GoLUG at golug.org
http://golug.org/mailman/listinfo/golug_golug.org
More information about the GoLUG
mailing list