rm trace ATN state stuff. Will think about when we do debugging.

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9792]
This commit is contained in:
parrt 2012-01-03 11:07:49 -08:00
parent c716a87544
commit 5d60e85617
2 changed files with 13 additions and 13 deletions

View File

@ -132,13 +132,13 @@ public abstract class Parser extends Recognizer<Token, v2ParserATNSimulator<Toke
return buildParseTrees;
}
public void setTraceATNStates(boolean traceATNStates) {
this.traceATNStates = traceATNStates;
}
public boolean getTraceATNStates() {
return traceATNStates;
}
// public void setTraceATNStates(boolean traceATNStates) {
// this.traceATNStates = traceATNStates;
// }
//
// public boolean getTraceATNStates() {
// return traceATNStates;
// }
public ParseTreeListener<Token> getListener() {
return _listener;
@ -469,6 +469,6 @@ public abstract class Parser extends Recognizer<Token, v2ParserATNSimulator<Toke
public void setState(int atnState) {
// System.err.println("setState "+atnState);
_ctx.s = atnState;
if ( traceATNStates ) _ctx.trace(atnState);
// if ( traceATNStates ) _ctx.trace(atnState);
}
}

View File

@ -92,7 +92,7 @@ public class ParserRuleContext<Symbol> extends RuleContext {
*
* This does not trace states visited during prediction.
*/
public List<Integer> states;
// public List<Integer> states;
/** Current ATN state number we are executing.
*
@ -168,10 +168,10 @@ public class ParserRuleContext<Symbol> extends RuleContext {
}
}
public void trace(int s) {
if ( states==null ) states = new ArrayList<Integer>();
states.add(s);
}
// public void trace(int s) {
// if ( states==null ) states = new ArrayList<Integer>();
// states.add(s);
// }
public void addChild(Token matchedToken) {
TerminalNodeImpl<?> t = new TerminalNodeImpl<Token>(matchedToken);