Package org.pentaho.reporting.libraries.formula.lvalues

Examples of org.pentaho.reporting.libraries.formula.lvalues.Term


                                        final ContextLookup context = (ContextLookup) reportFunction.getChildValues()[0];
                                        name = context.getName();
                                    }
                                    else if (val instanceof Term)
                                    {
                                        final Term term = (Term) val;
                                        final ContextLookup context = (ContextLookup) term.getHeadValue().getChildValues()[0];
                                        name = context.getName();
                                    }
                                    break;
                                }
                            }
View Full Code Here


  public void testTermOperands() throws ParseException, EvaluationException
  {
    final Formula formula = new Formula("\"a\" & \"b\" & \"c\"");
    formula.initialize(new DefaultFormulaContext());
    Term term = (Term) formula.getRootReference();
    term.getOperands();
  }
View Full Code Here

       (token.beginLine, token.beginColumn, token.endLine, token.endColumn);
  }

  final public LValue getExpression() throws ParseException {
  LValue retval = null;
  Term term = null;
    retval = getLValue();
    switch (jj_nt.kind) {
    case PLUS:
    case MINUS:
    case MULT:
    case DIV:
    case POW:
    case EQUALS:
    case NOT_EQUALS:
    case LT_EQUALS:
    case GT_EQUALS:
    case LT:
    case GT:
    case CONCAT:
      term = startTail(new Term(retval));
      label_1:
      while (true) {
        switch (jj_nt.kind) {
        case PLUS:
        case MINUS:
View Full Code Here

  }

  final public Term startTail(LValue retval) throws ParseException {
  LValue val = null;
  InfixOperator op = null;
  Term ex = null;
    op = getInfixOperator();
    val = getLValue();
      if (retval instanceof Term)
      {
        ex = (Term) retval;
      }
      else
      {
        ex = new Term (retval);
      }
      ex.add (op, val);

      {if (true) return ex;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

      jj_consume_token(L_PAREN);
                  retval = getExpression ();
      jj_consume_token(R_PAREN);
      if (retval instanceof Term == false)
      {
        retval = new Term (retval);
      }
      break;
    default:
      jj_la1[3] = jj_gen;
      jj_consume_token(-1);
View Full Code Here

  private static void collectReferences(final LValue lval, final LinkedHashMap<String,Boolean> map)
  {
    if (lval instanceof Term)
    {
      final Term t = (Term) lval;
      final LValue[] childValues = t.getChildValues();
      for (int i = 0; i < childValues.length; i++)
      {
        final LValue childValue = childValues[i];
        collectReferences(childValue, map);
      }
View Full Code Here

                                        final ContextLookup context = (ContextLookup) reportFunction.getChildValues()[0];
                                        name = context.getName();
                                    }
                                    else if (val instanceof Term)
                                    {
                                        final Term term = (Term) val;
                                        final ContextLookup context = (ContextLookup) term.getHeadValue().getChildValues()[0];
                                        name = context.getName();
                                    }
                                    break;
                                }
                            }
View Full Code Here

       (token.beginLine, token.beginColumn, token.endLine, token.endColumn);
  }

  final public LValue getExpression() throws ParseException {
  LValue retval = null;
  Term term = null;
    retval = getLValue();
    switch (jj_nt.kind) {
    case PLUS:
    case MINUS:
    case MULT:
    case DIV:
    case POW:
    case EQUALS:
    case NOT_EQUALS:
    case LT_EQUALS:
    case GT_EQUALS:
    case LT:
    case GT:
    case CONCAT:
      term = startTail(new Term(retval));
      label_1:
      while (true) {
        switch (jj_nt.kind) {
        case PLUS:
        case MINUS:
View Full Code Here

  }

  final public Term startTail(LValue retval) throws ParseException {
  LValue val = null;
  InfixOperator op = null;
  Term ex = null;
    op = getInfixOperator();
    val = getLValue();
      if (retval instanceof Term)
      {
        ex = (Term) retval;
      }
      else
      {
        ex = new Term (retval);
      }
      ex.add (op, val);

      {if (true) return ex;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

      jj_consume_token(L_PAREN);
                  retval = getExpression ();
      jj_consume_token(R_PAREN);
      if (retval instanceof Term == false)
      {
        retval = new Term (retval);
      }
      break;
    default:
      jj_la1[3] = jj_gen;
      jj_consume_token(-1);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.formula.lvalues.Term

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.