public condTermAST parseCndTerm() { listCondFactAST temp = null; listCondFactAST temp2 = null; listCondFactAST result = null; condFactAST cndT = null; condFactAST expr = null; //CondTerm= CondFact { "&&" CondFact } cndT = parseCndFac(); temp = new unCondFactAST(cndT); Boolean ind = false; while (currentToken.sym == sym.Y_Y) { acceptIt(); if (ind == false) { acceptIt(); expr = parseCndFac(); temp = new unCondFactAST(expr); result = new varCondFactAST(temp2, temp); ind = true; } else { acceptIt(); expr = parseCndFac(); temp2 = new unCondFactAST(expr); result = new varCondFactAST(result, temp2); } } if (result == null) { return(new condTermAST(temp)); } else { return(new condTermAST(result)); } }
public condTermAST(listCondFactAST lCndFact) { this.listCondFact = lCndFact; }
public varCondFactAST(listCondFactAST hh1, listCondFactAST hh2) { h1 = hh1; h2 = hh2; }