public class JoiningParserHelper extends java.lang.Object implements ExprParser.ParserHelper
Constructor and Description |
---|
JoiningParserHelper(Node[] pattern) |
Modifier and Type | Method and Description |
---|---|
protected Node |
combineNodes(Node parent,
java.util.List nodes)
Combine the nodes into a single Node, applying any Joining Text, and Node Type information.
|
protected boolean |
compareNodes(int index,
Node parsedNode,
Node pattenNode)
Performs the node comparison...
|
Node |
evaluateNode(Node parent,
Node current)
Parser Helper allows a subclass to extend the parser to create new
node types, or change the parse tree during parsing.
|
protected java.util.List |
fillPattern(Node parent,
Node current)
Fill an array of nodes, that match, in size, to the pattern that we are looking for.
|
protected java.lang.String |
getJoinText(int i,
Node first,
Node second)
Subclasses can override to add text between nodes when they are joined into a single node.
|
protected int |
getNodeType()
Subclasses can override to set the NOde Type on the returned node for this helper
|
protected boolean |
verifyPattern(java.util.List curPattern)
Verify that the pattern of Nodes that are looking for, matches the pattern of nodes that we have collected.
|
public JoiningParserHelper(Node[] pattern)
public Node evaluateNode(Node parent, Node current)
ExprParser.ParserHelper
evaluateNode
in interface ExprParser.ParserHelper
parent
- current parent Node (ie, Group, or Root node)current
- current node that was just created by the parser... BEFORE
it gets added to the parentprotected boolean verifyPattern(java.util.List curPattern)
curPattern
- protected boolean compareNodes(int index, Node parsedNode, Node pattenNode)
parsedNode
- Node from the current parse treepattenNode
- Node from the Patternprotected java.util.List fillPattern(Node parent, Node current)
parent
- current
- protected int getNodeType()
protected java.lang.String getJoinText(int i, Node first, Node second)