public class ParseNode
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
ParseNode() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
createString()
Creates the match string.
|
java.lang.Object |
getCustomNode()
Returns the custom node created by parser or rule handler, should there be one.
|
<T> T |
getCustomNode(java.lang.Class<T> aClass)
Returns the custom node as the given class type.
|
int |
getEnd()
Returns the match end.
|
Token |
getEndToken()
Returns the end token for this node.
|
int |
getLength()
Returns the match length.
|
int |
getLineIndex()
Returns the line index.
|
java.lang.String |
getName()
Returns the rule name.
|
Parser |
getParser()
Returns the parser.
|
java.lang.String |
getPattern()
Returns the rule pattern.
|
ParseRule |
getRule()
Returns the rule.
|
int |
getStart()
Returns the match start.
|
Token |
getStartToken()
Returns the start token for this node.
|
java.lang.String |
getString()
Returns the match string.
|
void |
init(Parser aParser,
ParseRule aRule,
Token aStartToken,
Token anEndToken)
Creates a new parse node
|
void |
setCustomNode(java.lang.Object anObj)
Sets the custom node created by parser or rule handler, should there be one.
|
java.lang.String |
toString()
Returns a string representation of node.
|
java.lang.String |
toStringSimple()
Returns a string representation of node (just .
|
public void init(Parser aParser, ParseRule aRule, Token aStartToken, Token anEndToken)
public Parser getParser()
public ParseRule getRule()
public java.lang.String getName()
public java.lang.String getPattern()
public Token getStartToken()
public Token getEndToken()
public int getStart()
public int getEnd()
public int getLength()
public int getLineIndex()
public java.lang.String getString()
protected java.lang.String createString()
public java.lang.Object getCustomNode()
public void setCustomNode(java.lang.Object anObj)
public <T> T getCustomNode(java.lang.Class<T> aClass)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringSimple()