Class ParseNode
java.lang.Object
com.inductiveautomation.snap.parse.ParseNode
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- ParseUtils.NestedParseNode
A parse node.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringCreates the match string.Returns the custom node created by parser or rule handler, should there be one.<T> TgetCustomNode(Class<T> aClass) Returns the custom node as the given class type.intgetEnd()Returns the match end.Returns the end token for this node.intReturns the match length.intReturns the line index.getName()Returns the rule name.Returns the parser.Returns the rule pattern.getRule()Returns the rule.intgetStart()Returns the match start.Returns the start token for this node.Returns the match string.voidCreates a new parse nodevoidsetCustomNode(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- 
ParseNodepublic ParseNode()
 
- 
- 
Method Details- 
initCreates a new parse node
- 
getParserReturns the parser.
- 
getRuleReturns the rule.
- 
getNameReturns the rule name.
- 
getPatternReturns the rule pattern.
- 
getStartTokenReturns the start token for this node.
- 
getEndTokenReturns the end token for this node.
- 
getStartpublic int getStart()Returns the match start.
- 
getEndpublic int getEnd()Returns the match end.
- 
getLengthpublic int getLength()Returns the match length.
- 
getLineIndexpublic int getLineIndex()Returns the line index.
- 
getStringReturns the match string.
- 
createStringCreates the match string.
- 
getCustomNodeReturns the custom node created by parser or rule handler, should there be one.
- 
setCustomNodeSets the custom node created by parser or rule handler, should there be one.
- 
getCustomNodeReturns the custom node as the given class type.
- 
toStringReturns a string representation of node.
- 
toStringSimpleReturns a string representation of node (just .
 
-