Package org.jparsec
Class ParseTree
- java.lang.Object
-
- org.jparsec.ParseTree
-
public final class ParseTree extends java.lang.ObjectRepresents the syntactical structure of the input being parsed.- Since:
- 2.3
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBeginIndex()Returns the index in source where this node starts.java.util.List<ParseTree>getChildren()Returns the immutable list of child nodes that correspond tolabeledparsers syntactically enclosed inside parent parser.intgetEndIndex()Returns the index in source where this node ends.java.lang.StringgetName()Returns the node name, which is specified inParser.label(java.lang.String).java.lang.ObjectgetValue()Returns the parsed value of this node, ornullif it's a failed node.java.lang.StringtoString()
-
-
-
Field Detail
-
name
private final java.lang.String name
-
beginIndex
private final int beginIndex
-
endIndex
private final int endIndex
-
value
private final java.lang.Object value
-
children
private final java.util.List<ParseTree> children
-
-
Constructor Detail
-
ParseTree
ParseTree(java.lang.String name, int beginIndex, int endIndex, java.lang.Object value, java.util.List<ParseTree> children)
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the node name, which is specified inParser.label(java.lang.String).
-
getBeginIndex
public int getBeginIndex()
Returns the index in source where this node starts.
-
getEndIndex
public int getEndIndex()
Returns the index in source where this node ends.
-
getValue
public java.lang.Object getValue()
Returns the parsed value of this node, ornullif it's a failed node.
-
getChildren
public java.util.List<ParseTree> getChildren()
Returns the immutable list of child nodes that correspond tolabeledparsers syntactically enclosed inside parent parser.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-