Package org.antlr.runtime.tree
Class CommonErrorNode
- java.lang.Object
-
- org.antlr.runtime.tree.BaseTree
-
- org.antlr.runtime.tree.CommonTree
-
- org.antlr.runtime.tree.CommonErrorNode
-
- All Implemented Interfaces:
Tree
public class CommonErrorNode extends CommonTree
A node representing erroneous token range in token stream
-
-
Field Summary
Fields Modifier and Type Field Description IntStream
input
Token
start
Token
stop
RecognitionException
trappedException
-
Fields inherited from class org.antlr.runtime.tree.CommonTree
childIndex, parent, startIndex, stopIndex, token
-
Fields inherited from interface org.antlr.runtime.tree.Tree
INVALID_NODE
-
-
Constructor Summary
Constructors Constructor Description CommonErrorNode(TokenStream input, Token start, Token stop, RecognitionException e)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getText()
int
getType()
Return a token type; needed for tree parsingboolean
isNil()
Indicates the node is a nil node but may still have children, meaning the tree is a flat list.String
toString()
Override to say how a node (not a tree) should look as text-
Methods inherited from class org.antlr.runtime.tree.CommonTree
dupNode, getCharPositionInLine, getChildIndex, getLine, getParent, getToken, getTokenStartIndex, getTokenStopIndex, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries
-
Methods inherited from class org.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getChild, getChildCount, getChildren, getFirstChildWithType, hasAncestor, insertChild, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree
-
-
-
-
Field Detail
-
input
public IntStream input
-
start
public Token start
-
stop
public Token stop
-
trappedException
public RecognitionException trappedException
-
-
Constructor Detail
-
CommonErrorNode
public CommonErrorNode(TokenStream input, Token start, Token stop, RecognitionException e)
-
-
Method Detail
-
isNil
public boolean isNil()
Description copied from interface:Tree
Indicates the node is a nil node but may still have children, meaning the tree is a flat list.- Specified by:
isNil
in interfaceTree
- Overrides:
isNil
in classCommonTree
-
getType
public int getType()
Description copied from interface:Tree
Return a token type; needed for tree parsing- Specified by:
getType
in interfaceTree
- Overrides:
getType
in classCommonTree
-
getText
public String getText()
- Specified by:
getText
in interfaceTree
- Overrides:
getText
in classCommonTree
-
-