Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public static void pop() {
   top = top.prev;
   envCounter++;
   newEnvs.add(envCounter, top);
   System.out.println(" " + top);
 }
Esempio n. 3
0
 static void push(Env e) {
   envCounter++;
   top = new Env(e);
   newEnvs.add(envCounter, top);
   System.out.println(" " + top);
 }