示例#1
0
 void closeGTNode(int num) {
   if (nodes.numElementsSinceLastMark() > num) {
     closeIndefiniteNode();
   } else {
     nodes.removeLastMark();
     node_created = false;
   }
 }
示例#2
0
 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;
 }
示例#3
0
 void openGTNode(Node n) {
   current_nodes.push(n);
   nodes.mark();
 }
示例#4
0
 void openIndefiniteNode(Node n) {
   current_nodes.push(n);
   nodes.mark();
 }
示例#5
0
 /* Return the node currently on the top of the stack. */
 Node peekNode() {
   return nodes.peek();
 }
示例#6
0
 /* Return the node on the top of the stack, and remove it from the
 stack.  */
 Node popNode() {
   return nodes.pop();
 }
示例#7
0
 /* Push a node on to the stack. */
 void pushNode(Node n) {
   nodes.push(n);
 }
示例#8
0
 /* Return the root node of the AST. */
 Node rootNode() {
   return nodes.elementAt(0);
 }
示例#9
0
 /* Call this to reinitialize the node stack.  */
 void reset() {
   nodes.empty();
   current_nodes = new java.util.Stack();
 }