forked from jasder/antlr
commit
8e8a2dc303
|
@ -534,7 +534,7 @@ StarBlock(choice, alts, sync, iteration) ::= <<
|
|||
setState(<choice.stateNumber>);
|
||||
_errHandler.sync(this);
|
||||
_alt = getInterpreter().adaptivePredict(_input,<choice.decision>,_ctx);
|
||||
while ( _alt!=<choice.exitAlt> && _alt!=-1 ) {
|
||||
while ( _alt!=<choice.exitAlt> && _alt!=ATN.INVALID_ALT_NUMBER ) {
|
||||
if ( _alt==1<if(!choice.ast.greedy)>+1<endif> ) {
|
||||
<iteration>
|
||||
<alts> <! should only be one !>
|
||||
|
@ -548,7 +548,7 @@ while ( _alt!=<choice.exitAlt> && _alt!=-1 ) {
|
|||
PlusBlock(choice, alts, error) ::= <<
|
||||
setState(<choice.blockStartStateNumber>); <! alt block decision !>
|
||||
_errHandler.sync(this);
|
||||
_alt = getInterpreter().adaptivePredict(_input,<choice.decision>,_ctx);
|
||||
_alt = 1<if(!choice.ast.greedy)>+1<endif>;
|
||||
do {
|
||||
switch (_alt) {
|
||||
<alts:{alt|
|
||||
|
@ -561,7 +561,7 @@ case <i><if(!choice.ast.greedy)>+1<endif>:
|
|||
setState(<choice.loopBackStateNumber>); <! loopback/exit decision !>
|
||||
_errHandler.sync(this);
|
||||
_alt = getInterpreter().adaptivePredict(_input,<choice.decision>,_ctx);
|
||||
} while ( _alt!=<choice.exitAlt> && _alt!=-1 );
|
||||
} while ( _alt!=<choice.exitAlt> && _alt!=ATN.INVALID_ALT_NUMBER );
|
||||
>>
|
||||
|
||||
Sync(s) ::= "sync(<s.expecting.name>);"
|
||||
|
|
Loading…
Reference in New Issue