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