[comp.unix.questions] yacc and pointless violence

wpohl@hvrunix.UUCP (Walter E. Pohl) (07/02/88)

	I'm trying to learn the program yacc, and I decided the best way
would be to type in hoc1 from Kernighan and Pike's "The Unix Programming
Enviroment."  So, it compiles and all fine.  So, I run it, and it gives
me "illegal instruction - core dumped".
	Has anyone else tried using yacc on this particular piece of code?
(pg. 237-240 from K&P)  Can anyone tell me what may be going wrong?  I'm
running under System V on a 3b2.
	If no one can help me with this, I'm going to take red hot knitting
needles and plunging them into my eyes.

gwyn@brl-smoke.ARPA (Doug Gwyn ) (07/03/88)

In article <431@hvrunix.UUCP> wpohl@hvrunix.UUCP (Walter E. Pohl) writes:
>Has anyone else tried using yacc on this particular piece of code [hoc]?

Yes, "hoc" worked okay when I built it.  I also got the source directly
from BWK and there were only something like two tiny diffs between his
and the one I had typed in.  I don't recall if any of the diffs could
be significant.

The thing to do with a core dump is to run a debugger on it to see what
happened!

Give me a real network address, not a UUCP path, and I'll mail you the
version we're running.

	Gwyn@BRL.MIL

erict@flatline.UUCP (j eric townsend) (07/04/88)

In article <431@hvrunix.UUCP>, wpohl@hvrunix.UUCP (Walter E. Pohl) writes:
> 
> 	I'm trying to learn the program yacc, and I decided the best way
> would be to type in hoc1 from Kernighan and Pike's "The Unix Programming
> Enviroment."  So, it compiles and all fine.  So, I run it, and it gives
> me "illegal instruction - core dumped".


I'm currently trying the same thing (learning YACC).  I suggest:

_Introduction to Compiler Construction With UNIX_
Axel T. Schreiner, H. George Friedman, Jr.
Prentice-Hall, Inc.
Englewood Cliffs, NJ 07632
-- 
Skate UNIX or go home, boogie boy...
J. Eric Townsend ->uunet!nuchat!flatline!erict smail:511Parker#2,Hstn,Tx,77007
             ..!bellcore!tness1!/