forked from jasder/antlr
Remove the ParserRuleContext.altNum field (fixes #288)
This commit is contained in:
parent
0495e819fd
commit
f6bcbdba61
|
@ -59,8 +59,7 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
|
|||
@Override
|
||||
public void visitTerminal(TerminalNode node) {
|
||||
System.out.println("consume "+node.getSymbol()+" rule "+
|
||||
getRuleNames()[_ctx.getRuleIndex()]+
|
||||
" alt="+_ctx.altNum);
|
||||
getRuleNames()[_ctx.getRuleIndex()]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -561,7 +560,6 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
|
|||
}
|
||||
}
|
||||
_ctx = localctx;
|
||||
_ctx.altNum = altNum;
|
||||
}
|
||||
|
||||
public void enterRecursionRule(ParserRuleContext localctx, int ruleIndex) {
|
||||
|
|
|
@ -96,9 +96,6 @@ public class ParserRuleContext extends RuleContext {
|
|||
|
||||
public Token start, stop;
|
||||
|
||||
/** Set during parsing to identify which alt of rule parser is in. */
|
||||
public int altNum;
|
||||
|
||||
/**
|
||||
* The exception which forced this rule to return. If the rule successfully
|
||||
* completed, this is {@code null}.
|
||||
|
@ -288,8 +285,7 @@ public class ParserRuleContext extends RuleContext {
|
|||
List<String> rules = recognizer.getRuleInvocationStack(this);
|
||||
Collections.reverse(rules);
|
||||
return "ParserRuleContext"+rules+"{" +
|
||||
"altNum=" + altNum +
|
||||
", start=" + start +
|
||||
"start=" + start +
|
||||
", stop=" + stop +
|
||||
'}';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue