Bug in Berkeley yacc 1.8

John R. Levine <johnl@iecc.cambridge.ma.us>
Fri, 17 Apr 1992 22:29:22 GMT

          From comp.compilers

Related articles
Bug in Berkeley yacc 1.8 johnl@iecc.cambridge.ma.us (John R. Levine) (1992-04-17)
| List of all articles for this month |

Newsgroups: comp.compilers
From: John R. Levine <johnl@iecc.cambridge.ma.us>
Keywords: yacc, errors
Organization: Compilers Central
Date: Fri, 17 Apr 1992 22:29:22 GMT

I was surprised to find that Berkeley yacc does not complain about this
grammar:


%%
xlist: xlist 'X' ;


AT&T yacc notices that there are no finite length parses and says:


  fatal error: nonterminal xlist never derives any token string, line 3


It's not a horrible bug, but both for compatibility and debugging
reasons it'd be nice if it diagnosed this situation. (Yeah, I know
I have the source code, I should fix it. Later.)
--
Regards,
John Levine, johnl@iecc.cambridge.ma.us, {spdcc|ima|world}!iecc!johnl


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.