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)); } } }
public blockStatementAST(listStatementsAST l) { this.listStatements = l; }
public blockConStatementAST(listStatementsAST l) { this.listStatetment = l; }
public varStatementAST(listStatementsAST hh1, listStatementsAST hh2) { h1 = hh1; h2 = hh2; }