나는 다음과 같은 규칙을 가지고 있고 바이슨과 함께 구현할 때 나는 5 개의 시프트/감소 경고를 얻는다. 규칙GnuWin32 Bison에서 Shift/Reduce 경고를 해결 하시겠습니까?
일부는 다음과 같습니다
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
이 사람이 나에게이 문제를 해결하는 방법에 도움이 될 수 있습니다, 나는 많은 기사를 읽었지 만 무엇이 잘못 되었는가를 알아낼 수 없었으며 모든 사람에게 미리 감사드립니다 ... :)