/* throws Exception */ // Program --- // ClassDeclList cl; public IrProg visit(AstProgram n) { IrFuncList funcs = n.cl.accept(this); return new IrProg(funcs); }
// Program --- // ClassDeclList cl; public void visit(AstProgram n) { n.cl.accept(this); setupClassHierarchy(n.cl); // establish class hierarchy }
// ************************************************ // * top level visit routine // ************************************************ public void visit(AstProgram n) { n.cl.accept(this); }
// ----------------------------------- // Program -> MainClass {ClassDecl} // ----------------------------------- public AstProgram ParseProgram() { try { if (_astProgram == null) { _astProgram = MiniParser.Program(); return _astProgram; } return _astProgram; } catch (Exception ex) { throw; } finally { } }