tweak
This commit is contained in:
parent
bab8d2cf40
commit
136e8a6286
|
@ -266,7 +266,7 @@ public class <parser.name> extends <superClass; null="Parser"> {
|
|||
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
|
||||
switch (ruleIndex) {
|
||||
<parser.sempredFuncs.values:{f|
|
||||
case <f.ruleIndex>:
|
||||
case <f.ruleIndex>:
|
||||
return <f.name>_sempred((<f.ctxType>)_localctx, predIndex);}; separator="\n">
|
||||
}
|
||||
return true;
|
||||
|
@ -324,9 +324,9 @@ dumpActions(recog, argFuncs, actionFuncs, sempredFuncs) ::= <<
|
|||
@Override
|
||||
public void action(RuleContext _localctx, int ruleIndex, int actionIndex) {
|
||||
switch (ruleIndex) {
|
||||
<recog.actionFuncs.values:{f|
|
||||
case <f.ruleIndex>:
|
||||
<f.name>_action((<f.ctxType>)_localctx, actionIndex);
|
||||
<recog.actionFuncs.values:{f|
|
||||
case <f.ruleIndex>:
|
||||
<f.name>_action((<f.ctxType>)_localctx, actionIndex);
|
||||
break;}; separator="\n">
|
||||
}
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ case <f.ruleIndex>:
|
|||
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
|
||||
switch (ruleIndex) {
|
||||
<recog.sempredFuncs.values:{f|
|
||||
case <f.ruleIndex>:
|
||||
case <f.ruleIndex>:
|
||||
return <f.name>_sempred((<f.ctxType>)_localctx, predIndex);}; separator="\n">
|
||||
}
|
||||
return true;
|
||||
|
@ -360,8 +360,8 @@ RuleActionFunction(r, actions) ::= <<
|
|||
private void <r.name>_action(<r.ctxType> _localctx, int actionIndex) {
|
||||
switch (actionIndex) {
|
||||
<actions:{index|
|
||||
case <index>:
|
||||
<actions.(index)>
|
||||
case <index>:
|
||||
<actions.(index)>
|
||||
break;}; separator="\n">
|
||||
}
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ RuleSempredFunction(r, actions) ::= <<
|
|||
private boolean <r.name>_sempred(<r.ctxType> _localctx, int predIndex) {
|
||||
switch (predIndex) {
|
||||
<actions:{index|
|
||||
case <index>:
|
||||
case <index>:
|
||||
return <actions.(index)>;}; separator="\n">
|
||||
}
|
||||
return true;
|
||||
|
@ -628,12 +628,12 @@ cases(ttypes) ::= <<
|
|||
>>
|
||||
|
||||
InvokeRule(r, argExprsChunks) ::= <<
|
||||
setState(<r.stateNumber>);
|
||||
setState(<r.stateNumber>);
|
||||
<if(r.labels)><r.labels:{l | <labelref(l)> = }><endif><r.name>(<if(r.ast.options.p)><r.ast.options.p><if(argExprsChunks)>,<endif><endif><argExprsChunks>);
|
||||
>>
|
||||
|
||||
MatchToken(m) ::= <<
|
||||
setState(<m.stateNumber>);
|
||||
setState(<m.stateNumber>);
|
||||
<if(m.labels)><m.labels:{l | <labelref(l)> = }><endif>match(<m.name>);
|
||||
>>
|
||||
|
||||
|
@ -647,7 +647,8 @@ setState(<m.stateNumber>);
|
|||
<capture>
|
||||
if ( <if(invert)><m.varName> \<= 0 || <else>!<endif>(<expr>) ) {
|
||||
<if(m.labels)><m.labels:{l | <labelref(l)> = (Token)}><endif>_errHandler.recoverInline(this);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
consume();
|
||||
}
|
||||
>>
|
||||
|
|
Loading…
Reference in New Issue