1*0c56280aSSorin Basca /* 2*0c56280aSSorin Basca * Licensed to the Apache Software Foundation (ASF) under one or more 3*0c56280aSSorin Basca * contributor license agreements. See the NOTICE file distributed with 4*0c56280aSSorin Basca * this work for additional information regarding copyright ownership. 5*0c56280aSSorin Basca * The ASF licenses this file to You under the Apache License, Version 2.0 6*0c56280aSSorin Basca * (the "License"); you may not use this file except in compliance with 7*0c56280aSSorin Basca * the License. You may obtain a copy of the License at 8*0c56280aSSorin Basca * 9*0c56280aSSorin Basca * http://www.apache.org/licenses/LICENSE-2.0 10*0c56280aSSorin Basca * 11*0c56280aSSorin Basca * Unless required by applicable law or agreed to in writing, software 12*0c56280aSSorin Basca * distributed under the License is distributed on an "AS IS" BASIS, 13*0c56280aSSorin Basca * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*0c56280aSSorin Basca * See the License for the specific language governing permissions and 15*0c56280aSSorin Basca * limitations under the License. 16*0c56280aSSorin Basca * 17*0c56280aSSorin Basca */ 18*0c56280aSSorin Basca /* Generated By:JJTree: Do not edit this line. Node.java */ 19*0c56280aSSorin Basca /* JJT: 0.3pre1 */ 20*0c56280aSSorin Basca 21*0c56280aSSorin Basca package Mini; 22*0c56280aSSorin Basca 23*0c56280aSSorin Basca /* All AST nodes must implement this interface. It provides basic 24*0c56280aSSorin Basca machinery for constructing the parent and child relationships 25*0c56280aSSorin Basca between nodes. */ 26*0c56280aSSorin Basca 27*0c56280aSSorin Basca public interface Node { 28*0c56280aSSorin Basca 29*0c56280aSSorin Basca /** This method is called after the node has been made the current 30*0c56280aSSorin Basca node. It indicates that child nodes can now be added to it. */ jjtOpen()31*0c56280aSSorin Basca public void jjtOpen(); 32*0c56280aSSorin Basca 33*0c56280aSSorin Basca /** This method is called after all the child nodes have been 34*0c56280aSSorin Basca added. */ jjtClose()35*0c56280aSSorin Basca public void jjtClose(); 36*0c56280aSSorin Basca 37*0c56280aSSorin Basca /** This pair of methods are used to inform the node of its 38*0c56280aSSorin Basca parent. */ jjtSetParent(Node n)39*0c56280aSSorin Basca public void jjtSetParent(Node n); jjtGetParent()40*0c56280aSSorin Basca public Node jjtGetParent(); 41*0c56280aSSorin Basca 42*0c56280aSSorin Basca /** This method tells the node to add its argument to the node's 43*0c56280aSSorin Basca list of children. */ jjtAddChild(Node n, int i)44*0c56280aSSorin Basca public void jjtAddChild(Node n, int i); 45*0c56280aSSorin Basca 46*0c56280aSSorin Basca /** This method returns a child node. The children are numbered 47*0c56280aSSorin Basca from zero, left to right. */ jjtGetChild(int i)48*0c56280aSSorin Basca public Node jjtGetChild(int i); 49*0c56280aSSorin Basca 50*0c56280aSSorin Basca /** Return the number of children the node has. */ jjtGetNumChildren()51*0c56280aSSorin Basca int jjtGetNumChildren(); 52*0c56280aSSorin Basca } 53