Object VisitUnStatementAST(unStatementAST 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 blockAST parseBlock() { listStatementsAST temp=null; listStatementsAST result=null; statementAST parS; accept(sym.COR_A, "{"); Boolean ind =false; while (currentToken.sym == sym.ID) { if (ind == false) { parS = parseStat(); temp = new unStatementAST(parS); ind = true; } else { parS = parseStat(); temp = new unStatementAST(parS); result = new varStatementAST(result,temp); } } accept(sym.COR_C, "}"); if (ind == false) { return new blockSinStatementAST(); } else { if (result == null) { return new blockConStatementAST(temp); } else return new blockConStatementAST(result); } }