public class Entry { public String spelling; public Node node; public int type; public int returntype; // This field is used only when the entry is a method public int level; public Entry prev; public Entry(String s, Node nd, int t, int l) { spelling = s; node = nd; type = t; level = l; } // this one is for methods, it also sets the return type public Entry(String s, Node nd, int t, int l, int rt) { spelling = s; node = nd; type = t; level = l; returntype = rt; } public String toString() { return spelling + " " + Type.spellingOf[type] + " " + new Integer(level).toString() + "\n"; } }