Merge pull request #717 from sharwell/fix-701

Add Parser.isTrace()
This commit is contained in:
Terence Parr 2014-09-26 14:28:26 -07:00
commit 0d4a28eac9
1 changed files with 10 additions and 0 deletions

View File

@ -921,4 +921,14 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
addParseListener(_tracer); addParseListener(_tracer);
} }
} }
/**
* Gets whether a {@link TraceListener} is registered as a parse listener
* for the parser.
*
* @see #setTrace(boolean)
*/
public boolean isTrace() {
return _tracer != null;
}
} }