public static void initFirst() { envCounter = 0; newEnvs.add(envCounter, root); top = (Env) newEnvs.get(envCounter); put("printf", new Symb(Type.method(Type.voidtype(), Type.voidtype()), null, true)); put("scanf", new Symb(Type.method(Type.voidtype(), Type.voidtype()), null, true)); System.out.println(" " + top); }
public static void pop() { top = top.prev; envCounter++; newEnvs.add(envCounter, top); System.out.println(" " + top); }
static void push(Env e) { envCounter++; top = new Env(e); newEnvs.add(envCounter, top); System.out.println(" " + top); }