Class ParseNode
java.lang.Object
com.inductiveautomation.snap.parse.ParseNode
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ParseUtils.NestedParseNode
A parse node.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Creates the match string.Returns the custom node created by parser or rule handler, should there be one.<T> T
getCustomNode
(Class<T> aClass) Returns the custom node as the given class type.int
getEnd()
Returns the match end.Returns the end token for this node.int
Returns the match length.int
Returns the line index.getName()
Returns the rule name.Returns the parser.Returns the rule pattern.getRule()
Returns the rule.int
getStart()
Returns the match start.Returns the start token for this node.Returns the match string.void
Creates a new parse nodevoid
setCustomNode
(Object anObj) Sets the custom node created by parser or rule handler, should there be one.toString()
Returns a string representation of node.Returns a string representation of node (just .
-
Constructor Details
-
ParseNode
public ParseNode()
-
-
Method Details
-
init
Creates a new parse node -
getParser
Returns the parser. -
getRule
Returns the rule. -
getName
Returns the rule name. -
getPattern
Returns the rule pattern. -
getStartToken
Returns the start token for this node. -
getEndToken
Returns the end token for this node. -
getStart
public int getStart()Returns the match start. -
getEnd
public int getEnd()Returns the match end. -
getLength
public int getLength()Returns the match length. -
getLineIndex
public int getLineIndex()Returns the line index. -
getString
Returns the match string. -
createString
Creates the match string. -
getCustomNode
Returns the custom node created by parser or rule handler, should there be one. -
setCustomNode
Sets the custom node created by parser or rule handler, should there be one. -
getCustomNode
Returns the custom node as the given class type. -
toString
Returns a string representation of node. -
toStringSimple
Returns a string representation of node (just .
-