public conditionAST parseCondition() { listCondTermAST temp = null; listCondTermAST temp2 = null; listCondTermAST result = null; condTermAST cndT = null; condTermAST expr = null; //Condition = CondTerm { "||" CondTerm } cndT = parseCndTerm(); temp = new unCondTermAST(cndT); Boolean ind = false; while (currentToken.sym == sym.O_O) { acceptIt(); if (ind == false) { acceptIt(); expr = parseCndTerm(); temp = new unCondTermAST(expr); result = new varCondTermAST(temp2, temp); ind = true; } else { acceptIt(); expr = parseCndTerm(); temp2 = new unCondTermAST(expr); result = new varCondTermAST(result, temp2); } } if (result == null) { return(new conditionAST(temp)); } else { return(new conditionAST(result)); } }
public varCondTermAST(listCondTermAST hh1, listCondTermAST hh2) { h1 = hh1; h2 = hh2; }
public conditionAST(listCondTermAST lCndTerm) { this.listCondTerm = lCndTerm; }
public conditionAST(listCondTermAST lCndTerm) { this.listCondTerm = lCndTerm; }