-
yacc: type clashes and useless nontermins
Hi
Im trying to write a simple compiler and I'm stuck at the parsing/yacc phase. I keep getting many of these errors and warnings:
- type clash on default action
- empty rule for typed nonterminal
- useless rule
Anyone have any advice on how to tackle these? I attached my lex and yacc output files too incase that helps any.
Thanks
-
If you get those errors, the rules described by your grammar are ambiguous and incomplete. You should try a progressive approach, by adding one rule at a time, check it works, and resume. Lex/yacc does not support all grammar classes, this is a complex topic and you have to either use a simple grammar or know well what you're doing...
Popular pages
Recent additions