Package | Description |
---|---|
net.percederberg.grammatica.parser |
Modifier and Type | Class and Description |
---|---|
class |
Production
A production node.
|
class |
Token
A token node.
|
Modifier and Type | Method and Description |
---|---|
Node |
Analyzer.analyze(Node node)
Analyzes a parse tree node by traversing all it's child nodes.
|
protected Node |
Analyzer.exit(Node node)
Called when exiting a parse tree node.
|
Node |
Production.getChildAt(int index)
Returns the child node with the specified index.
|
Node |
Node.getChildAt(int index)
Returns the child node with the specified index.
|
protected Node |
Analyzer.getChildAt(Node node,
int pos)
Returns a child at the specified position.
|
protected Node |
Analyzer.getChildWithId(Node node,
int id)
Returns the first child with the specified id.
|
Node |
Node.getParent()
Returns the parent node.
|
Node |
Parser.parse()
Parses the token stream and returns a parse tree.
|
protected Node |
RecursiveDescentParser.parseStart()
Parses the input stream and creates a parse tree.
|
protected abstract Node |
Parser.parseStart()
Parses the token stream and returns a parse tree.
|
Modifier and Type | Method and Description |
---|---|
void |
Production.addChild(Node child)
Adds a child node.
|
Node |
Analyzer.analyze(Node node)
Analyzes a parse tree node by traversing all it's child nodes.
|
protected void |
Analyzer.child(Production node,
Node child)
Called when adding a child to a parse tree node.
|
protected void |
Analyzer.enter(Node node)
Called when entering a parse tree node.
|
protected Node |
Analyzer.exit(Node node)
Called when exiting a parse tree node.
|
protected Node |
Analyzer.getChildAt(Node node,
int pos)
Returns a child at the specified position.
|
protected java.util.ArrayList |
Analyzer.getChildValues(Node node)
Returns all the node values for all child nodes.
|
protected Node |
Analyzer.getChildWithId(Node node,
int id)
Returns the first child with the specified id.
|
protected int |
Analyzer.getIntValue(Node node,
int pos)
Returns the node integer value at the specified position.
|
protected java.lang.String |
Analyzer.getStringValue(Node node,
int pos)
Returns the node string value at the specified position.
|
protected java.lang.Object |
Analyzer.getValue(Node node,
int pos)
Returns the node value at the specified position.
|