1	package antlr.collections;
2	
3	/** Minimal AST node interface used by ANTLR AST generation
4	 * and tree-walker.
5	 */
6	 
7	import antlr.Token;
8	
9	public interface AST {
10	
11	
12		/** Add a (rightmost) child to this node */
13		public void addChild(AST c);
14	public boolean equals(AST t);
15	public boolean equalsList(AST t);
16	public boolean equalsListPartial(AST t);
17	public boolean equalsTree(AST t);
18	public boolean equalsTreePartial(AST t);
19		public ASTEnumeration findAll(AST tree);
20		public ASTEnumeration findAllPartial(AST subtree);
21		/** Get the first child of this node; null if no children */
22		public AST getFirstChild();
23		/** Get	the next sibling in line after this one */
24		public AST getNextSibling();
25		/** Get the token text for this node */
26		public String getText();
27		/** Get the token type for this node */
28		public int getType();
29	public void initialize(int t, String txt);
30	public void initialize(AST t);
31		public void initialize(Token t);
32		/** Set the first child of a node. */
33		public void setFirstChild(AST c);
34		/** Set the next sibling after this one. */
35		public void setNextSibling(AST n);
36		/** Set the token text for this node */
37		public void setText(String text);
38		/** Set the token type for this node */
39		public void setType(int ttype);
40	public String toString();
41	public String toStringList();
42	public String toStringTree();
43	}
44