yacc

James Seymour jseymour at medar.com
Sat Apr 6 23:12:29 AEST 1991


In article <Apr.5.00.38.07.1991.2057 at romulus.rutgers.edu> mef at romulus.rutgers.edu (Marc E. Fiuczynski) writes:
>This is a desperate move.  I need a good example of a yacc grammar.

What you really need, IMHO, is a copy of "The UNIX Programming Environment"
by Kernighan and Pike.  There is a complete chapter on yacc (with lex also
covered briefly).  In that chapter is a complete example of a yacc program
that they call "hoc" (high order calculator).  In the example, hoc is
implemented in steps, starting with the simplest concepts and working up to
the more complex.  Each iteration of the program (there are, I think, five
or six) adds new concepts.  I recommend it highly.  Be warned, there are a
couple of design/coding snafus.  Boy, did I learn a lot about how that
program works from tracking those down :-).  On the other hand, these did
not bite me until I went on to "extending" the thing.

>Thanks in advance!
>-Marc
>-- 
>______________________________________________________________________________
>Marc E. Fiuczynski	\\  Home: (609) 683-4416	School: (908) 878-9388
>mef at remus.rutgers.edu  	//  UUCP: {backbone}!rutgers!remus.rutgers.edu!mef


-- 
Jim Seymour				| Medar, Inc.
...!uunet!medar!jseymour		| 38700 Grand River Ave.
jseymour at medar.com			| Farmington Hills, MI. 48331
CIS: 72730,1166  GEnie: jseymour	| FAX: (313)477-8897



More information about the Comp.lang.c mailing list