A: constant
| OPENINGBRACES B C
;
constant: INTEGER | REAL | CHARACTER ;
C: CLOSINGBRACES
| COMMA CLOSINGBRACES
;
B: A
| A COMMA B
;
这个语法正在产生移位/减少错误。使用 -v 选项运行它后,它显示状态 7 中的冲突..
**
state 7
8 B: A .
9 | A . COMMA B
COMMA shift, and go to state 10
COMMA [reduce using rule 8 (B)]
$default reduce using rule 8 (B)
**
规则 8 是
8 B:A