forked from jasder/antlr
move method down in file
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9791]
This commit is contained in:
parent
2d9139ca4d
commit
c716a87544
|
@ -227,18 +227,6 @@ public abstract class Parser extends Recognizer<Token, v2ParserATNSimulator<Toke
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enterOuterAlt(ParserRuleContext<Token> localctx, int altNum) {
|
|
||||||
// if we have new localctx, make sure we replace existing ctx
|
|
||||||
// that is previous child of parse tree
|
|
||||||
if ( buildParseTrees && _ctx != localctx ) {
|
|
||||||
ParserRuleContext parent = (ParserRuleContext)_ctx.parent;
|
|
||||||
parent.removeLastChild();
|
|
||||||
if ( parent!=null ) parent.addChild(localctx);
|
|
||||||
}
|
|
||||||
_ctx = localctx;
|
|
||||||
_ctx.altNum = altNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Consume the current symbol and return it. E.g., given the following
|
/** Consume the current symbol and return it. E.g., given the following
|
||||||
* input with A being the current lookahead symbol:
|
* input with A being the current lookahead symbol:
|
||||||
*
|
*
|
||||||
|
@ -302,6 +290,18 @@ public abstract class Parser extends Recognizer<Token, v2ParserATNSimulator<Toke
|
||||||
_ctx = (ParserRuleContext<Token>)_ctx.parent;
|
_ctx = (ParserRuleContext<Token>)_ctx.parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void enterOuterAlt(ParserRuleContext<Token> localctx, int altNum) {
|
||||||
|
// if we have new localctx, make sure we replace existing ctx
|
||||||
|
// that is previous child of parse tree
|
||||||
|
if ( buildParseTrees && _ctx != localctx ) {
|
||||||
|
ParserRuleContext parent = (ParserRuleContext)_ctx.parent;
|
||||||
|
parent.removeLastChild();
|
||||||
|
if ( parent!=null ) parent.addChild(localctx);
|
||||||
|
}
|
||||||
|
_ctx = localctx;
|
||||||
|
_ctx.altNum = altNum;
|
||||||
|
}
|
||||||
|
|
||||||
public ParserRuleContext<Token> getInvokingContext(int ruleIndex) {
|
public ParserRuleContext<Token> getInvokingContext(int ruleIndex) {
|
||||||
ParserRuleContext<Token> p = _ctx;
|
ParserRuleContext<Token> p = _ctx;
|
||||||
while ( p!=null ) {
|
while ( p!=null ) {
|
||||||
|
|
Loading…
Reference in New Issue