void closeGTNode(int num) { if (nodes.numElementsSinceLastMark() > num) { closeIndefiniteNode(); } else { nodes.removeLastMark(); node_created = false; } }
void closeDefiniteNode(int num) { Node n = currentNode(); n.jjtOpen(); for (JJTOqlParserNodeEnum e = nodes.elementsTop(num); e.hasMoreElements(); ) { Node c = (Node) e.nextElement(); c.jjtSetParent(n); n.jjtAddChild(c); } nodes.popTop(num); n.jjtClose(); nodes.push(n); node_created = true; }
void openGTNode(Node n) { current_nodes.push(n); nodes.mark(); }
void openIndefiniteNode(Node n) { current_nodes.push(n); nodes.mark(); }
/* Return the node currently on the top of the stack. */ Node peekNode() { return nodes.peek(); }
/* Return the node on the top of the stack, and remove it from the stack. */ Node popNode() { return nodes.pop(); }
/* Push a node on to the stack. */ void pushNode(Node n) { nodes.push(n); }
/* Return the root node of the AST. */ Node rootNode() { return nodes.elementAt(0); }
/* Call this to reinitialize the node stack. */ void reset() { nodes.empty(); current_nodes = new java.util.Stack(); }