I'm getting the following error:
Warning : *** Shift/Reduce conflict found in state #2
between ExitLoopStatement ::= EXITLOOP (*)
and VarAccess ::= (*) DOLLAR IDENTIFIER
under symbol DOLLAR
This is the grammar I use. Currently I have assignments and break (each break statement can specify the number of loop levels to exit from).
start with StatementList;
StatementList
::= Statement
|
StatementList Statement
;
Statement
::= AssignmentStatement
|
ExitLoopStatement
;
AssignmentStatement
::= VarAccess EQ_OP VarAccess
;
VarAccess
::= DOLLAR IDENTIFIER
;
ExitLoopStatement
::= EXITLOOP
|
EXITLOOP VarAccess
;
From what I understand, the problem is that after I've encountered EXITLOOP, the next token can be the start of an assignment or the number of levels to exit from.
Is there any way to solve this problem?
Thanks!