我有以下规则,当用野牛实施它们时,我得到 5 个班次/减少警告。
规则的一部分是:
Type----> BOOL
| INT
| CHAR
| DOUBLE
| ID
| INT '['']'
;
rule: VarDec rule
| VarDec
;
VarDec: Type ID ';'
;
并Parser.output
在这种状态下给我警告:
**state 25**
4 rule: VarDec . rule
5 | VarDec .
BOOL shift, and go to state 3
INT shift, and go to state 4
CHAR shift, and go to state 5
DOUBLE shift, and go to state 6
ID shift, and go to state 7
BOOL [reduce using rule 5 (rule)]
INT [reduce using rule 5 (rule)]
CHAR [reduce using rule 5 (rule)]
DOUBLE [reduce using rule 5 (rule)]
ID [reduce using rule 5 (rule)]
$default reduce using rule 5 (rule)
rule go to state 28
VarDec go to state 25
Type go to state 27
谁能帮我解决这个问题,我已经阅读了很多文章,但我无法弄清楚出了什么问题,并提前感谢每个人...... :)