Package | org.antlr.runtime |
Class | public class RecognitionException |
Inheritance | RecognitionException Error |
Subclasses | EarlyExitException, FailedPredicateException, MismatchedRangeException, MismatchedSetException, MismatchedTokenException, MismatchedTreeNodeException, NoViableAltException |
Property | Defined by | ||
---|---|---|---|
approximateLineInfo : Boolean If you are parsing a tree node stream, you will encounter som
imaginary nodes w/o line/col info.
| RecognitionException | ||
c : int The current char when an error occurred.
| RecognitionException | ||
charPositionInLine : int | RecognitionException | ||
index : int What is index of token/char were we looking at when the error occurred?
| RecognitionException | ||
input : IntStream
What input stream did the error occur in?
| RecognitionException | ||
line : int Track the line at which the error occurred in case this is
generated from a lexer.
| RecognitionException | ||
node : Object If this is a tree parser exception, node is set to the node with
the problem.
| RecognitionException | ||
token : Token
The current Token when an error occurred.
| RecognitionException | ||
unexpectedType : int [read-only] Return the token type or char of the unexpected input element
| RecognitionException |
Method | Defined by | ||
---|---|---|---|
RecognitionException(input:IntStream = null)
| RecognitionException |
Method | Defined by | ||
---|---|---|---|
extractInformationFromTreeNodeStream(input:IntStream):void
| RecognitionException |
approximateLineInfo | property |
public var approximateLineInfo:Boolean
If you are parsing a tree node stream, you will encounter som imaginary nodes w/o line/col info. We now search backwards looking for most recent token with line/col info, but notify getErrorHeader() that info is approximate.
c | property |
public var c:int
The current char when an error occurred. For lexers.
charPositionInLine | property |
public var charPositionInLine:int
index | property |
public var index:int
What is index of token/char were we looking at when the error occurred?
input | property |
public var input:IntStream
What input stream did the error occur in?
line | property |
public var line:int
Track the line at which the error occurred in case this is generated from a lexer. We need to track this since the unexpected char doesn't carry the line info.
node | property |
public var node:Object
If this is a tree parser exception, node is set to the node with the problem.
token | property |
public var token:Token
The current Token when an error occurred. Since not all streams can retrieve the ith Token, we have to track the Token object. For parsers. Even when it's a tree parser, token might be set.
unexpectedType | property |
unexpectedType:int
[read-only]Return the token type or char of the unexpected input element
Implementation public function get unexpectedType():int
RecognitionException | () | constructor |
public function RecognitionException(input:IntStream = null)
Parameters
input:IntStream (default = null )
|
extractInformationFromTreeNodeStream | () | method |
protected function extractInformationFromTreeNodeStream(input:IntStream):void
Parameters
input:IntStream |