@@ -246,7 +246,7 @@ RuleFunction(currentRule,args,code,locals,ruleCtx,altLabelCtxs,namedActions,fina
246
246
247
247
<currentRule.escapedName>(<currentRule.args:{a | <a.escapedName>}; separator=", ">) {
248
248
let localctx = new <currentRule.ctxType>(this, this._ctx, this.state<currentRule.args:{a | , <a.escapedName>}>);
249
- this.enterRule(localctx, <currentRule.startState>, <parser.name>.RULE_< currentRule.name >);
249
+ this.enterRule(localctx, <currentRule.startState>, <currentRule.index >);
250
250
<namedActions.init>
251
251
<locals; separator="\n">
252
252
try {
@@ -285,7 +285,7 @@ LeftRecursiveRuleFunction(currentRule,args,code,locals,ruleCtx,altLabelCtxs,
285
285
let localctx = new <currentRule.ctxType>(this, this._ctx, _parentState<args:{a | , <a.escapedName>}>);
286
286
let _prevctx = localctx;
287
287
const _startState = <currentRule.startState>;
288
- this.enterRecursionRule(localctx, <currentRule.startState>, <parser.name>.RULE_< currentRule.name >, _p);
288
+ this.enterRecursionRule(localctx, <currentRule.startState>, <currentRule.index >, _p);
289
289
<namedActions.init>
290
290
<locals; separator="\n">
291
291
try {
@@ -477,11 +477,11 @@ offsetShiftType(shiftAmount, offset) ::= <%
477
477
478
478
// produces more efficient bytecode when bits.ttypes contains at most two items
479
479
bitsetInlineComparison(s, bits) ::= <%
480
- <bits.ttypes:{ttype | <s.varName>===<parser.name>.< ttype>}; separator=" || ">
480
+ <bits.ttypes:{ttype | <s.varName>===<ttype>}; separator=" || ">
481
481
%>
482
482
483
483
cases(ttypes) ::= <<
484
- <ttypes:{t | case <parser.name>.< t>:}; separator="\n">
484
+ <ttypes:{t | case <t>:}; separator="\n">
485
485
>>
486
486
487
487
InvokeRule(r, argExprsChunks) ::= <<
@@ -491,7 +491,7 @@ this.state = <r.stateNumber>;
491
491
492
492
MatchToken(m) ::= <<
493
493
this.state = <m.stateNumber>;
494
- <if(m.labels)><m.labels:{l | <labelref(l)> = }><endif>this.match(<parser.name>.<m.name >);
494
+ <if(m.labels)><m.labels:{l | <labelref(l)> = }><endif>this.match(<m.ttype >);
495
495
>>
496
496
497
497
MatchSet(m, expr, capture) ::= "<CommonSetStuff(m, expr, capture, false)>"
0 commit comments