Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.unix.questions Subject: Re: Yacc neophyte vs inscrutable error message Message-ID: <702@sdrc.UUCP> Date: 14 Apr 89 21:44:59 GMT References: <255@sickkids.UUCP> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 22 In article <255@sickkids.UUCP>, mark@sickkids.UUCP (Mark Bartelt) writes: > OK, yaccers, here's a quickie question. I have a grammar that causes > UNIX yacc (on a VAX, running 4.3bsd) to choke. It bombs out with the > following error message: > > fatal error: default action causes potential type clash, line xxx > > Curiously, the very same grammar is accepted without complaint by MKS's > yacc for MS-DOS, which (as far as I can tell) produces code that does > what it's supposed to do. The problem is that the type of the right-hand side of the grammar rule is different than the type of the left-hand side of the grammar rule, thus the default action ($$ = $1;) contains a type clash of some sort. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@sdrc.UU.NET 2000 Eastman Dr. BIX: ltl Milford, OH 45150 AT&T: (513) 576-2070 "When all else fails, read the directions."