我在yacc中使用了-v選項來生成y.output文件。在文件的頂部,它說這個yacc解析器中的衝突是什麼?
州98個矛盾:1個轉變/減少
在文件中再往下是:
state 98
30 selection_stmt: IF '(' expression ')' statement .
31 | IF '(' expression ')' statement . ELSE statement
ELSE shift, and go to state 101
ELSE [reduce using rule 30 (selection_stmt)]
$default reduce using rule 30 (selection_stmt)
什麼衝突,這怎麼能固定?
[如何在此yacc文件中找到移位/減少衝突?](http://stackoverflow.com/questions/1737460/how-to-find-shift-reduce-conflict-in-this-yacc -文件) – Flexo 2013-01-12 12:29:32