Fix for repeat declaration of la_

This commit is contained in:
Peter Boyer 2016-12-07 21:03:03 -05:00
parent 50646a6da8
commit 0cb32c0620
1 changed files with 3 additions and 6 deletions

View File

@ -644,10 +644,7 @@ p.GetErrorHandler().Sync(p)
<endif>
la_ := p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext())
switch la_ {
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext()) {
<if(alts)>
<alts:{alt | case <i>:
<alt>}; separator="\n\n">
@ -658,10 +655,10 @@ switch la_ {
OptionalBlock(choice, alts, error) ::= <<
p.SetState(<choice.stateNumber>)
p.GetErrorHandler().Sync(p)
la_ := p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext())
<if(alts)>
<alts:{alt | if la_ == <i><if(!choice.ast.greedy)>+1<endif> {
<alts:{alt | if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext()) == <i><if(!choice.ast.greedy)>+1<endif> {
<alt>
}; separator="} else ">
<endif>