[comp.unix.questions] YACC help

news@udenva.cair.du.edu (netnews) (02/17/88)

This is a question that's been asked before no doubt, but I didn't
get to see the answer(s). So:

	Where can I find a good discussion of yacc? I don't mean an
exposition on the internals of yacc, but practical examples of how to
use it. Further, are there any PD versions floating about - I need to
port this to a PDP running RSX-11M (don't laugh, we have lex running so far).


		Thanks,

			Richard  Neitzel
			Rockwell International
			Computer Aided Manufacturing and Control
			Box 464 M/S T881A
			Golden, CO 80402
			303-966-7203

aburt@isis.UUCP (Andrew Burt) (02/18/88)

Look for yacc documentation in /usr/doc on eos or possibly /nike/usr/doc.
I don't recall where it is in there (it's all moved) but it should be in
one of the directories under this directory.  Look around, use "ls -R".

There is a PD version called "bison" from the people who made GNU emacs.
I have an older version on my PC, newer ones are available via anonymous
ftp from simtel20 and no doubt other sites as well.

-- 

Andrew Burt 				   			isis!aburt

              Fight Denver's pollution:  Don't Breathe and Drive.

steve@polyslo.UUCP (Steve DeJarnett) (02/19/88)

In article <9806@udenva.cair.du.edu> news@udenva.cair.du.edu (netnews) writes:
>	Where can I find a good discussion of yacc? I don't mean an
>exposition on the internals of yacc, but practical examples of how to
>use it. Further, are there any PD versions floating about - I need to
>port this to a PDP running RSX-11M (don't laugh, we have lex running so far).

	Try looking at Kernighan and Pike (The Unix Programming Environment).
There is (I believe -- I don't have my copy handy, and it's been a while since
I looked) a fairly longish tutorial on the uses of yacc.

	Hope this helps.

-------------------------------------------------------------------------------
| Steve DeJarnett		|    ...!ihnp4!csun!polyslo!steve	      |
| Computer Systems Lab		|    ...!{csustan,csun,sdsu}!polyslo!steve    |
| Cal Poly State Univ.		|    ...!ucbvax!voder!polyslo!steve	      |
| San Luis Obispo, CA  93407	|    					      |
-------------------------------------------------------------------------------
#include <std_disclaimer.h>

cwwj@ur-tut.UUCP (Clarence Wilkerson) (02/21/88)

The compiler book by Aho, etc has some YACC-LEX examples.

kent@tifsie.UUCP (Russell Kent) (02/24/88)

in article <9806@udenva.cair.du.edu>, news@udenva.cair.du.edu (netnews) says:
> 
> 	Where can I find a good discussion of yacc? I don't mean an
> exposition on the internals of yacc, but practical examples of how to
> use it. Further, are there any PD versions floating about - I need to
> port this to a PDP running RSX-11M (don't laugh, we have lex running so far).
> 
> 		Thanks,
> 			Richard  Neitzel

There exists a thorough discussion of YACC and LEX, as well as a useful
example of how to use them in a _real_ sense (not one of those trivial
examples we sometimes see) in a book recently published by Prentice-Hall.

Unfortunately, I do not have it in front of me, so the title is from memory:

    "Introduction to Compiler Construction Tools for UNIX"

It was stumbled upon at a B Dalton Bookstore down here.  I recommend it.
It even goes so far as to recommend changes to yacc.par.
For those of you who have yacc's that generate output without using
a yacc.par file (like Ultrix), I have a context diff which does the
same things.

-- 
Russell Kent                    Phone: +1 214 995 3501
Texas Instruments               UUCP address:
P.O. Box 655012   MS 3635       ...!convex!smu!tifsie!kent
Dallas, TX 75265                ...!ut-sally!im4u!ti-csl!tifsie!kent

wcs@ho95e.ATT.COM (Bill.Stewart) (02/25/88)

In article <296@tifsie.UUCP> kent@tifsie.UUCP (Russell Kent) writes:
:in article <9806@udenva.cair.du.edu>, news@udenva.cair.du.edu (netnews) says:
:> 	Where can I find a good discussion of yacc? I don't mean an
:> exposition on the internals of yacc, but practical examples of how to
:There exists a thorough discussion of YACC and LEX, as well as a useful
:example of how to use them in a _real_ sense (not one of those trivial
:examples we sometimes see) in a book recently published by Prentice-Hall.

	Introduction to Compiler Construction with  UNIX\(tm
	Axel T. Schreiner, H. George Friedman, Jr.
	Prentice-Hall 1985, ISBN 0-13-474396-2

:> use it. Further, are there any PD versions floating about - I need to
:> port this to a PDP running RSX-11M (don't laugh, we have lex running so far).
	There are occasionally things that claim to be PD, but they aren't;
	I think one was on an old DECUS tape, and has been stolen to a few
	other places.  There are similar tools that *are* PD, such as Bison
	(part of the GNU project).
-- 
#				Thanks;
# Bill Stewart, AT&T Bell Labs 2G218, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs