/** * This method is called to unwind the current statement without any reduction or further parsing. * * @param operator - * @return - */ private boolean unwindStatement(int operator) { ASTNode tk; switch (operator) { case AND: while ((tk = nextToken()) != null && !tk.isOperator(Operator.END_OF_STMT) && !tk.isOperator(Operator.OR)) { //nothing } break; default: while ((tk = nextToken()) != null && !tk.isOperator(Operator.END_OF_STMT)) { //nothing } } return tk == null; }
/** * This method is called to unwind the current statement without any reduction or further parsing. * * @param operator - * @return - */ private boolean unwindStatement(int operator) { ASTNode tk; switch (operator) { case AND: while ((tk = nextToken()) != null && !tk.isOperator(Operator.END_OF_STMT) && !tk.isOperator(Operator.OR)) { //nothing } break; default: while ((tk = nextToken()) != null && !tk.isOperator(Operator.END_OF_STMT)) { //nothing } } return tk == null; }
/** * This method is called to unwind the current statement without any reduction or further parsing. * * @param operator - * @return - */ private boolean unwindStatement(int operator) { ASTNode tk; switch (operator) { case AND: while ((tk = nextToken()) != null && !tk.isOperator(Operator.END_OF_STMT) && !tk.isOperator(Operator.OR)) { //nothing } break; default: while ((tk = nextToken()) != null && !tk.isOperator(Operator.END_OF_STMT)) { //nothing } } return tk == null; }
while ((tk = nextToken()) != null) { holdOverRegister = null; if (tk instanceof Substatement && (tk = nextToken()) != null) { if (isArithmeticOperator(operator = tk.getOperator())) { stk.push(nextToken().getReducedValue(ctx, ctx, variableFactory), operator); stk.push(nextToken().getReducedValue(ctx, ctx, variableFactory), operator);
while ((tk = nextToken()) != null) { holdOverRegister = null; if (tk instanceof Substatement && (tk = nextToken()) != null) { if (isArithmeticOperator(operator = tk.getOperator())) { stk.push(nextToken().getReducedValue(ctx, ctx, variableFactory), operator); stk.push(nextToken().getReducedValue(ctx, ctx, variableFactory), operator);
while ((tk = nextToken()) != null) { holdOverRegister = null; if (tk instanceof Substatement && (tk = nextToken()) != null) { if (isArithmeticOperator(operator = tk.getOperator())) { stk.push(nextToken().getReducedValue(ctx, ctx, variableFactory), operator); stk.push(nextToken().getReducedValue(ctx, ctx, variableFactory), operator);
if ((tk = nextToken()) == null || tk.isOperator(Operator.TERNARY_ELSE)) break;
if ((tk = nextToken()) == null || tk.isOperator(Operator.TERNARY_ELSE)) break;
while ((tk = nextToken()) != null && !tk.isOperator(Operator.TERNARY_ELSE)) {