|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.antlr.runtime.BaseRecognizer
org.antlr.runtime.tree.TreeParser
jaitools.jiffle.parser.ErrorHandlingTreeParser
public abstract class ErrorHandlingTreeParser
A base class for Jiffle tree parsers that want to intercept ANTLR error and warning messages.
| Field Summary | |
|---|---|
protected ParsingErrorReporter |
errorReporter
Stores error and warning messages. |
| Fields inherited from class org.antlr.runtime.tree.TreeParser |
|---|
DOWN, input, UP |
| Fields inherited from class org.antlr.runtime.BaseRecognizer |
|---|
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state |
| Constructor Summary | |
|---|---|
ErrorHandlingTreeParser(org.antlr.runtime.tree.TreeNodeStream input)
Constructor. |
|
ErrorHandlingTreeParser(org.antlr.runtime.tree.TreeNodeStream input,
org.antlr.runtime.RecognizerSharedState state)
Constructor. |
|
| Method Summary | |
|---|---|
void |
emitErrorMessage(String msg)
Overrides the ANTLR parser method to capture an error message that would otherwise be sent to std err. |
ParsingErrorReporter |
getErrorReporter()
Gets the error reporter object. |
void |
setErrorReporter(ParsingErrorReporter er)
Sets the error reporter. |
| Methods inherited from class org.antlr.runtime.tree.TreeParser |
|---|
getCurrentInputSymbol, getErrorHeader, getErrorMessage, getMissingSymbol, getSourceName, getTreeNodeStream, matchAny, recoverFromMismatchedToken, reset, setTreeNodeStream, traceIn, traceOut |
| Methods inherited from class org.antlr.runtime.BaseRecognizer |
|---|
alreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, endResync, failed, getBacktrackingLevel, getGrammarFileName, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, reportError, setBacktrackingLevel, toStrings, traceIn, traceOut |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ParsingErrorReporter errorReporter
| Constructor Detail |
|---|
public ErrorHandlingTreeParser(org.antlr.runtime.tree.TreeNodeStream input)
input - AST node stream
public ErrorHandlingTreeParser(org.antlr.runtime.tree.TreeNodeStream input,
org.antlr.runtime.RecognizerSharedState state)
input - input AST node streamstate - recognizer state| Method Detail |
|---|
public void emitErrorMessage(String msg)
emitErrorMessage in class org.antlr.runtime.BaseRecognizermsg - the messagepublic ParsingErrorReporter getErrorReporter()
public void setErrorReporter(ParsingErrorReporter er)
er - the error reporter (may be null if message
interception is not required).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||