Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!dcatla!itwaf From: itwaf@dcatla.UUCP (Bill Fulton [Sys Admin]) Newsgroups: comp.unix.wizards Subject: Re: yacc reduce/reduce conflict question Message-ID: <23311@dcatla.UUCP> Date: 8 Sep 89 22:07:40 GMT References: <718@larry.sal.wisc.edu> <13030009@eecs.nwu.edu> Reply-To: dcatla!itwaf@gatech.edu (Bill Fulton [Sys Admin]) Organization: DCA Inc., Alpharetta, GA Lines: 21 To recap; erroneous yacc input was: cmd : MNEMONIC = MNEMONIC ; ^ Note missing quotes I also sent the original poster this fix; but I was very surprised at the way yacc handled the unquoted equals sign. Apparantly, when the '=' was not quoted, yacc just *ignored* everything from the '=' to the end of the line! This explains the conflict, but can anyone explain why yacc (apparantly) ignores the part of a rule from an unquoted '=' to the end of line??? Does it do this with other unquoted characters? Is an unquoted '=' special? That's scary (e.g. silently dropping the end of a rule). I tried different unquoted characters than a '=', and I got yacc errors, but NO error with the unquoted '='! Also, looking at the output of 'yacc -v', I noted that the rule for the input line with the unquoted '=' had, indeed, just truncated the rule, starting at the '='. waf (Saving the net millions of dollars by not having a .sig) (Oops - does this count?)