Examples of ExpressionNodeForOperator


Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForOperator

    }
    if (modified) {
      if (buildUp != null) {
        newArgs.add( new ExpressionNodeForConstantValue( buildUp.toString(), DataType.STRING ) );
      }
      final ExpressionNodeForOperator res = new ExpressionNodeForOperator( Operator.CONCAT, newArgs );
      res.setDataType( DataType.STRING );
      return res;
    }
    else {
      return _opNode;
    }
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForOperator

  }


  public ExprNode op( Operator _op, ExprNode... _args )
  {
    return new ExprNodeImpl( new ExpressionNodeForOperator( _op, nodesOf( _args ) ) );
  }
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForOperator

        return buildFilterByExample( _tableCol, (String) cst, _type );
      }
      else {
        final ExpressionNode critExpr = expressionOf( _criterion );
        if (critExpr instanceof ExpressionNodeForOperator) {
          ExpressionNodeForOperator op = (ExpressionNodeForOperator) critExpr;
          switch (op.getOperator()) {
            case CONCAT: {
              final Object cst0 = constantValueOf( op.argument( 0 ) );
              if (cst0 instanceof String) {
                final List<ExpressionNode> args = op.arguments();
                args.remove( 0 );
                return buildFilterByExample( _tableCol, (String) cst0, args, _criterion );
              }
            }
          }
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForOperator

         * was _not_ to cast C11 to string.
         */
        return buildComparison( comparison, _tableCol, _args.iterator().next() );
      }
      else {
        return buildComparison( comparison, _tableCol, new ExpressionNodeForOperator( Operator.CONCAT, _args ) );
      }
    }
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForOperator

  @Override
  protected TypedResult evaluateToNode( TypedResult... _args ) throws InterpreterException
  {
    final TypedResult result = super.evaluateToNode( _args );
    if (result instanceof ExpressionNodeForOperator) {
      ExpressionNodeForOperator opNode = (ExpressionNodeForOperator) result;
      if (opNode.getOperator() == Operator.CONCAT) {
        return concatConsecutiveConstArgsOf( opNode );
      }
    }
    return result;
  }
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForOperator

    else if (_node instanceof ExpressionNodeForArrayReference) {
      compileRef( (ExpressionNodeForArrayReference) _node );
    }

    else if (_node instanceof ExpressionNodeForOperator) {
      final ExpressionNodeForOperator node = (ExpressionNodeForOperator) _node;
      if (needsIf( node.getOperator() )) {
        compileIf( node, ExpressionBuilder.TRUE, ExpressionBuilder.FALSE );
      }
      else {
        compileOperator( node );
      }
    }

    else if (_node instanceof ExpressionNodeForFunction) {
      final ExpressionNodeForFunction node = (ExpressionNodeForFunction) _node;
      switch (node.getFunction()) {

        case IF:
          compileIf( node );
          break;
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForOperator

    }

    final void compileTest() throws CompilerException
    {
      if (this.node instanceof ExpressionNodeForOperator) {
        final ExpressionNodeForOperator opNode = (ExpressionNodeForOperator) this.node;
        final Operator operator = opNode.getOperator();

        switch (operator) {

          case EQUAL:
          case NOTEQUAL:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.