Package org.btrplace.btrpsl.tree
Class ErrorTree
java.lang.Object
org.antlr.runtime.tree.BaseTree
org.antlr.runtime.tree.CommonTree
org.btrplace.btrpsl.tree.BtrPlaceTree
org.btrplace.btrpsl.tree.ErrorTree
- All Implemented Interfaces:
org.antlr.runtime.tree.Tree
public class ErrorTree extends BtrPlaceTree
Tree to handle errors returned by the lexer.
- Author:
- Fabien Hermenier
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ErrorTree(org.antlr.runtime.Token start, org.antlr.runtime.Token stop)
A tree signaling an error. -
Method Summary
Modifier and Type Method Description int
getCharPositionInLine()
int
getLine()
BtrpOperand
go(BtrPlaceTree parent)
Parse the root of the tree.Methods inherited from class org.btrplace.btrpsl.tree.BtrPlaceTree
append, getChild, ignoreError, ignoreError, ignoreError, ignoreErrors
Methods inherited from class org.antlr.runtime.tree.CommonTree
dupNode, getChildIndex, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString
Methods inherited from class org.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getChildCount, getChildren, getFirstChildWithType, hasAncestor, insertChild, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree
-
Constructor Details
-
ErrorTree
public ErrorTree(org.antlr.runtime.Token start, org.antlr.runtime.Token stop)A tree signaling an error.- Parameters:
start
- the first token signaling the errorstop
- the last token involved in the error
-
-
Method Details
-
getLine
public int getLine()- Specified by:
getLine
in interfaceorg.antlr.runtime.tree.Tree
- Overrides:
getLine
in classorg.antlr.runtime.tree.CommonTree
-
getCharPositionInLine
public int getCharPositionInLine()- Specified by:
getCharPositionInLine
in interfaceorg.antlr.runtime.tree.Tree
- Overrides:
getCharPositionInLine
in classorg.antlr.runtime.tree.CommonTree
-
go
Description copied from class:BtrPlaceTree
Parse the root of the tree.- Overrides:
go
in classBtrPlaceTree
- Parameters:
parent
- the parent of the root- Returns:
- a content
-