forked from jasder/antlr
V3 semantic predicate gate (=>) can only appear after a predicate {...}?, not an action {...}
This commit is contained in:
parent
3e91065824
commit
aace1ce399
|
@ -298,7 +298,7 @@ ARG_ACTION
|
|||
//
|
||||
ACTION
|
||||
: NESTED_ACTION
|
||||
('?' {$type = SEMPRED;} )?
|
||||
( '?' {$type = SEMPRED;}
|
||||
( '=>' // v3 gated sempred
|
||||
{
|
||||
Token t = new CommonToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex()-1);
|
||||
|
@ -308,6 +308,7 @@ ACTION
|
|||
grammarError(ErrorType.V3_GATED_SEMPRED, t);
|
||||
}
|
||||
)?
|
||||
)?
|
||||
;
|
||||
|
||||
// ----------------
|
||||
|
|
Loading…
Reference in New Issue