Example #1
0
 /* throws Exception */
 // Program ---
 // ClassDeclList cl;
 public IrProg visit(AstProgram n)
 {
     IrFuncList funcs = n.cl.accept(this);
     return new IrProg(funcs);
 }
Example #2
0
 // Program ---
 // ClassDeclList cl;
 public void visit(AstProgram n)
 {
     n.cl.accept(this);
     setupClassHierarchy(n.cl); // establish class hierarchy
 }
Example #3
0
        // ************************************************
        // * top level visit routine
        // ************************************************

        public void visit(AstProgram n) 
        {
            n.cl.accept(this);
        }
Example #4
0
 // -----------------------------------
 // Program    -> MainClass {ClassDecl}
 // -----------------------------------
 public AstProgram ParseProgram()
 {
     try
     {
         if (_astProgram == null)
         {
             _astProgram = MiniParser.Program();
             return _astProgram;
         }
         return _astProgram;
     }
     catch (Exception ex)
     {
         throw;
     }
     finally
     {
     }
 }