Provide friendly error messages when parsing errors occurred.
Constructor and description |
---|
DescriptiveErrorStrategy
(CharStream charStream) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected String |
createFailedPredicateErrorMessage(Parser recognizer, FailedPredicateException e) |
|
protected String |
createInputMismatchErrorMessage(Parser recognizer, InputMismatchException e) |
|
protected String |
createNoViableAlternativeErrorMessage(Parser recognizer, NoViableAltException e) |
|
void |
recover(Parser recognizer, RecognitionException e) |
|
Token |
recoverInline(Parser recognizer) |
|
protected void |
reportFailedPredicate(Parser recognizer, FailedPredicateException e) |
|
protected void |
reportInputMismatch(Parser recognizer, InputMismatchException e) |
|
protected void |
reportNoViableAlternative(Parser recognizer, NoViableAltException e) |
Methods inherited from class | Name |
---|---|
class BailErrorStrategy |
sync, recoverInline, recover, reset, reportError, reportMatch, inErrorRecoveryMode, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
class DefaultErrorStrategy |
reset, sync, reportError, reportMatch, recoverInline, recover, inErrorRecoveryMode, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Copyright © 2003-2018 The Apache Software Foundation. All rights reserved.