Examples of NumericLiteral


Examples of net.timewalker.ffmq3.common.message.selector.expression.literal.NumericLiteral

    private SelectorNode parseNumericConstant() throws InvalidSelectorException
    {
        String value = currentToken;
        readNextToken(); // skip numeric constant
        return new NumericLiteral(value);
    }
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.NumericLiteral

    int value = Integer.valueOf(decLit.getText()); // .getInteger(decLit.getText());
    if (minus != null) {
      value = -value;
      bounds[0] = ((CommonToken) minus).getStartIndex();
    }
    return new NumericLiteral(bounds[0], bounds[1], value);
  }
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.NumericLiteral

    int value = Integer.valueOf(decLit.getText()); // .getInteger(decLit.getText());
    if (minus != null) {
      value = -value;
      bounds[0] = ((CommonToken) minus).getStartIndex();
    }
    return new NumericLiteral(bounds[0], bounds[1], value);
  }
View Full Code Here

Examples of org.lilystudio.javascript.expression.NumericLiteral

    case Token.STRING:
      return new StringLiteral(node, root, scope);

    case Token.NUMBER:
      return new NumericLiteral(node, root, scope);

    case Token.REGEXP:
      return new RegexpLiteral(node, root, scope);

    case Token.ARRAYLIT:
View Full Code Here

Examples of prefuse.data.expression.NumericLiteral

      }
      e = UnaryExpression();
        if ( t.kind == SUB  && e instanceof NumericLiteral ) {
          Number n = (Number)e.get(null);
          if ( n instanceof Integer ) {
              {if (true) return new NumericLiteral(-1*n.intValue());}
          } if ( n instanceof Double ) {
              {if (true) return new NumericLiteral(-1*n.doubleValue());}
          } if ( n instanceof Long ) {
              {if (true) return new NumericLiteral(-1*n.longValue());}
          } if ( n instanceof Float ) {
              {if (true) return new NumericLiteral(-1*n.floatValue());}
          } else {
              {if (true) return new ArithmeticExpression(ArithmeticExpression.MUL,
                                              new NumericLiteral(-1), e);}
          }
        } else if ( t.kind == SUB ) {
          {if (true) return new ArithmeticExpression(ArithmeticExpression.MUL,
                                          new NumericLiteral(-1), e);}
        } else {
          {if (true) return e;}
        }
      break;
    case NOT:
View Full Code Here

Examples of prefuse.data.expression.NumericLiteral

  static final public Expression Literal() throws ParseException {
  Token t;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case INT:
      t = jj_consume_token(INT);
              {if (true) return new NumericLiteral(Integer.parseInt(t.image));}
      break;
    case LONG:
      t = jj_consume_token(LONG);
               {if (true) return new NumericLiteral(Long.parseLong(t.image.substring(0,t.image.length()-1)));}
      break;
    case FLOAT:
      t = jj_consume_token(FLOAT);
                {if (true) return new NumericLiteral(Float.parseFloat(t.image));}
      break;
    case DOUBLE:
      t = jj_consume_token(DOUBLE);
                 {if (true) return new NumericLiteral(Double.parseDouble(t.image));}
      break;
    case STRING:
      t = jj_consume_token(STRING);
                String s = unescape(t.image.substring(1, t.image.length()-1));
                {if (true) return new ObjectLiteral(s);}
View Full Code Here

Examples of prefuse.data.expression.NumericLiteral

        t.index(HEADERS[4]);
       
        // where id > 0 && dub > 1 && dub < 20
        ColumnExpression id = new ColumnExpression(HEADERS[0]);
        ColumnExpression dub = new ColumnExpression(HEADERS[4]);
        NumericLiteral x0 = new NumericLiteral(0);
        NumericLiteral xlo = new NumericLiteral(lo);
        NumericLiteral xhi1 = new NumericLiteral(hi-1.0);
        NumericLiteral xhi2 = new NumericLiteral(1.0f);
        Expression xhi = new ArithmeticExpression(
                ArithmeticExpression.ADD, xhi1, xhi2);

        ComparisonPredicate idCmp = new ComparisonPredicate(
                ComparisonPredicate.GTEQ, id, x0);
View Full Code Here

Examples of prefuse.data.expression.NumericLiteral

    public void testDerivedColumn() {
        String AVG = "average";
       
        Expression fc = new ColumnExpression(HEADERS[3]);
        Expression dc = new ColumnExpression(HEADERS[4]);
        Expression l2 = new NumericLiteral(2);
       
        Expression add = new ArithmeticExpression(
                ArithmeticExpression.ADD, fc, dc);
        Expression avg = new ArithmeticExpression(
                ArithmeticExpression.DIV, add, l2);
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.