YACC and parser design help
Dave Burton
daveb at laidbak.UUCP
Sat Jul 30 01:14:40 AEST 1988
In article <342 at marob.MASA.COM> daveh at marob.UUCP (Dave Hammond) writes:
|Can anyone suggest "novice level" reading material on the subjects:
|
| 1. Command parser design and implementation
| 2. YACC usage as it relates to #1 above.
When you say `command parser' I think shell. If this is what you're
after, you might try a book by Allen Holub called _On Command: Writing
a UNIX-like Shell for MSDOS_. I believe it's published by M&T Pub.,
the same folks who do Doctor Dobb's Journal. The book is (also) sold
through the magazine. _On Command_ is sold with complete sources for
a PC csh-like shell.
Another possibility, although much weaker, is Marc Rochkind's
_Advanced UNIX Programming_. He develops a very simplistic shell.
The benefit of this work is that it is very easy to understand and
comprehend.
If you're after more language oriented materials, but don't want
alot of heavy compiler theory, you can try - you should try - a book
by Arthur Pyster called _Compiler Design and Construction: Tools and
Techniques_. This book gives a good *practical* background in parser
design and construction. It has a section on YACC and lex, also.
A somewhat more obtuse book, but dealing only with YACC and lex is
one by Schreiner & Friedman called _Introduction to Compiler Construction
with UNIX_. It's usable, but the Pyster book is better if you can find it.
Since you requested novice level material, I assume you know of the
`standard' reference work on compilation, the so-called new dragon book
by Aho, Sethi and Ullman, whose exact title escapes me at present
(the word `compiler' does figure prominently).
Oops, I almost forgot. The book _The UNIX Programming Environment_ by
Kernighan and Pike has an excellent section on YACC and its usage in
the development (from scratch) of HOC, the High Order Calculator. It
also uses a syntax fairly close to yours. Even if you don't care about
parsers, IF YOU PROGRAM UNDER _UNIX_, YOU WANT THIS BOOK.
-- Dave Burton
* UNIX is a trademark of AT&T.
(I didn't Email because I thought this might be of benefit to others, too.)
--
Dave Burton | ``/* You are not expected to understand this. */''
ihnp4!laidbak!daveb |
(312) 505-9100 x325 | Disclaimer: I channel only for myself.
More information about the Comp.lang.c
mailing list