public declAST parseVarDecl() { typeAST type = parseType(); identListAST result = new unIdentAST(currentToken); accept(sym.ID); while (currentToken.sym == sym.COMA) { acceptIt(); unIdentAST temp = new unIdentAST(currentToken); result = new varIdentAST(result, temp); accept(sym.ID); } accept(sym.PYCOMA); return(new varDeclAST(type, result)); }
Object VisitUnIdentAST(unIdentAST var, object arg) { int numaux = ((Integer)arg).intValue(); printtab(numaux); System.out.println(c.getClass().getName()); if(c.- !=null) c.-.visit(this,new Integer(numaux+1)); else{printtab(numaux+1); Console.WriteLine(“NULL”);} return null; }
public declAST parseVarDecl() { typeAST type = parseType(); identListAST result= new unIdentAST(currentToken); accept(sym.ID); while (currentToken.sym == sym.COMA) { acceptIt(); unIdentAST temp = new unIdentAST(currentToken); result = new varIdentAST(result, temp); accept(sym.ID); } accept(sym.PYCOMA); return new varDeclAST(type,result); }