move method down in file

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9791]
This commit is contained in:
parrt 2012-01-03 11:05:40 -08:00
parent 2d9139ca4d
commit c716a87544
1 changed files with 12 additions and 12 deletions

View File

@ -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
* 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;
}
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) {
ParserRuleContext<Token> p = _ctx;
while ( p!=null ) {