1 2 /*3 * Copyright © 2002 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,4 * California 95054, U.S.A. All rights reserved. Sun Microsystems, Inc. has5 * intellectual property rights relating to technology embodied in the product6 * that is described in this document. In particular, and without limitation,7 * these intellectual property rights may include one or more of the U.S.8 * patents listed at http://www.sun.com/patents and one or more additional9 * patents or pending patent applications in the U.S. and in other countries.10 * U.S. Government Rights - Commercial software. Government users are subject11 * to the Sun Microsystems, Inc. standard license agreement and applicable12 * provisions of the FAR and its supplements. Use is subject to license terms.13 * Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered14 * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. This15 * product is covered and controlled by U.S. Export Control laws and may be16 * subject to the export or import laws in other countries. Nuclear, missile,17 * chemical biological weapons or nuclear maritime end uses or end users,18 * whether direct or indirect, are strictly prohibited. Export or reexport19 * to countries subject to U.S. embargo or to entities identified on U.S.20 * export exclusion lists, including, but not limited to, the denied persons21 * and specially designated nationals lists is strictly prohibited.22 */23 24 25 /* All AST nodes must implement this interface. It provides basic26 machinery for constructing the parent and child relationships27 between nodes. */28 29 public interface Node {30 31 /** This method is called after the node has been made the current32 node. It indicates that child nodes can now be added to it. */33 public void jjtOpen();34 35 /** This method is called after all the child nodes have been36 added. */37 public void jjtClose();38 39 /** This pair of methods are used to inform the node of its40 parent. */41 public void jjtSetParent(Node n);42 public Node jjtGetParent();43 44 /** This method tells the node to add its argument to the node's45 list of children. */46 public void jjtAddChild(Node n, int i);47 48 /** This method returns a child node. The children are numbered49 from zero, left to right. */50 public Node jjtGetChild(int i);51 52 /** Return the number of children the node has. */53 int jjtGetNumChildren();54 55 /************************* Added by Sreeni. *******************/56 57 /** Interpret method */58 public void interpret();59 }60