forked from jasder/antlr
commit
3ccb8279bf
|
@ -406,6 +406,10 @@ func (p *<parser.name>) <currentRule.name; format="cap">(<currentRule.args:{a |
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
<if(currentRule.hasLookaheadBlock)>
|
||||||
|
var _alt int
|
||||||
|
<endif>
|
||||||
|
|
||||||
<if(code)>
|
<if(code)>
|
||||||
<code>
|
<code>
|
||||||
|
|
||||||
|
@ -476,6 +480,10 @@ func (p *<parser.name>) <currentRule.name>(_p int<args:{a | , <a.name> <a.type>}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
<if(currentRule.hasLookaheadBlock)>
|
||||||
|
var _alt int
|
||||||
|
<endif>
|
||||||
|
|
||||||
<if(code)>
|
<if(code)>
|
||||||
<code>
|
<code>
|
||||||
|
|
||||||
|
@ -663,7 +671,7 @@ la_ := p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>,
|
||||||
StarBlock(choice, alts, Sync, iteration) ::= <<
|
StarBlock(choice, alts, Sync, iteration) ::= <<
|
||||||
p.SetState(<choice.stateNumber>)
|
p.SetState(<choice.stateNumber>)
|
||||||
p.GetErrorHandler().Sync(p)
|
p.GetErrorHandler().Sync(p)
|
||||||
_alt := p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext())
|
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext())
|
||||||
|
|
||||||
for _alt != <choice.exitAlt> && _alt != antlr.ATNInvalidAltNumber {
|
for _alt != <choice.exitAlt> && _alt != antlr.ATNInvalidAltNumber {
|
||||||
if _alt == 1<if(!choice.ast.greedy)>+1<endif> {
|
if _alt == 1<if(!choice.ast.greedy)>+1<endif> {
|
||||||
|
@ -683,7 +691,7 @@ for _alt != <choice.exitAlt> && _alt != antlr.ATNInvalidAltNumber {
|
||||||
PlusBlock(choice, alts, error) ::= <<
|
PlusBlock(choice, alts, error) ::= <<
|
||||||
p.SetState(<choice.blockStartStateNumber>)<! alt block decision !>
|
p.SetState(<choice.blockStartStateNumber>)<! alt block decision !>
|
||||||
p.GetErrorHandler().Sync(p)
|
p.GetErrorHandler().Sync(p)
|
||||||
_alt := 1<if(!choice.ast.greedy)>+1<endif>
|
_alt = 1<if(!choice.ast.greedy)>+1<endif>
|
||||||
for ok := true; ok; ok = _alt != <choice.exitAlt> && _alt != antlr.ATNInvalidAltNumber {
|
for ok := true; ok; ok = _alt != <choice.exitAlt> && _alt != antlr.ATNInvalidAltNumber {
|
||||||
switch _alt {
|
switch _alt {
|
||||||
<if(alts)>
|
<if(alts)>
|
||||||
|
|
Loading…
Reference in New Issue