Examples of ExpressionNode


Examples of at.ssw.coco.lib.model.atgAst.nodeTypes.ExpressionNode

 
  @Test
  public void testProductionNode2_Expression() {
    ProductionNode productionNode =
      root.getCompilerNode().getParserSpecNode().getProductionNodes().get(2);
    ExpressionNode expressionNode = productionNode.getExpressionNode();
    checkExpressionNode(expressionNode, 1098, 76, productionNode, 3);
   
    //t0
    TermNode t0 = expressionNode.getTermNodes().get(0);
    checkTermNode(t0, 1098, 39, expressionNode, 3, true);
   
      //t0_resolv
      ResolverNode t0_resolv = t0.getResolverNode();
      checkNode(t0_resolv, 1098, 21, t0);
   
      //t0_f0
      FactorNode t0_f0 = t0.getFactorNodes().get(0);
      checkFactorNode(t0_f0, 1120, 5, t0, FactorNode.Kind.SYMBOL);
     
        //t0_f0_sym
        SymbolNode t0_f0_sym = t0_f0.getSymbolNode();
        checkSymbolNode(t0_f0_sym, 1120, 5, t0_f0, SymbolNode.Kind.IDENT);
       
        //t0_f0_sym_ident
        IdentNode t0_f0_sym_ident = t0_f0_sym.getIdentNode();
        checkIdentNode(t0_f0_sym_ident, 1120, 5, t0_f0_sym, IdentNode.Kind.TOKEN, "ident");
       
      //t0_f1
      FactorNode t0_f1 = t0.getFactorNodes().get(1);
      checkFactorNode(t0_f1, 1126, 4, t0, FactorNode.Kind.SYMBOL);
     
        //t0_f1_sym
        SymbolNode t0_f1_sym = t0_f1.getSymbolNode();
        checkSymbolNode(t0_f1_sym, 1126, 4, t0_f1, SymbolNode.Kind.STRING, "==");
     
      //t0_f2
      FactorNode t0_f2 = t0.getFactorNodes().get(2);
      checkFactorNode(t0_f2, 1131, 6, t0, FactorNode.Kind.SYMBOL);

        //t0_f2_sym
        SymbolNode t0_f2_sym = t0_f2.getSymbolNode();
        checkSymbolNode(t0_f2_sym, 1131, 6, t0_f2, SymbolNode.Kind.IDENT);
       
        //t0_f2_sym_ident
        IdentNode t0_f2_sym_ident = t0_f2_sym.getIdentNode();
        checkIdentNode(t0_f2_sym_ident, 1131, 6, t0_f2_sym, IdentNode.Kind.TOKEN, "number");
       
    //t1
    TermNode t1 = expressionNode.getTermNodes().get(1);

      //t1_f0
      FactorNode t1_f0 = t1.getFactorNodes().get(0);
      checkFactorNode(t1_f0, 1142, 5, t1, FactorNode.Kind.SYMBOL);
     
        //t1_f0_sym
        SymbolNode t1_f0_sym = t1_f0.getSymbolNode();
        checkSymbolNode(t1_f0_sym, 1142, 5, t1_f0, SymbolNode.Kind.IDENT);
     
        //t1_f0_sym_ident
        IdentNode t1_f0_sym_ident = t1_f0_sym.getIdentNode();
        checkIdentNode(t1_f0_sym_ident, 1142, 5, t1_f0_sym, IdentNode.Kind.TOKEN, "ident");
     
      //t1_f1
      FactorNode t1_f1 = t1.getFactorNodes().get(1);
      checkFactorNode(t1_f1, 1148, 4, t1, FactorNode.Kind.SYMBOL);
     
        //t1_f1_sym
        SymbolNode t1_f1_sym = t1_f1.getSymbolNode();
        checkSymbolNode(t1_f1_sym, 1148, 4, t1_f1, SymbolNode.Kind.STRING, "==");
       
      //t1_f2
      FactorNode t1_f2 = t1.getFactorNodes().get(2);
      checkFactorNode(t1_f2, 1153, 5, t1, FactorNode.Kind.SYMBOL);
     
        //t1_f2_sym
        SymbolNode t1_f2_sym = t1_f2.getSymbolNode();
        checkSymbolNode(t1_f2_sym, 1153, 5, t1_f2, SymbolNode.Kind.IDENT);
     
        //t1_f2_sym_ident
        IdentNode t1_f2_sym_ident = t1_f2_sym.getIdentNode();
        checkIdentNode(t1_f2_sym_ident, 1153, 5, t1_f2_sym, IdentNode.Kind.TOKEN, "ident");

    //t2
    TermNode t2 = expressionNode.getTermNodes().get(2);
    checkTermNode(t2, 1163, 11, expressionNode, 1);
   
      //t2_f0
      FactorNode t2_f0 = t2.getFactorNodes().get(0);
      checkFactorNode(t2_f0, 1163, 11, t2, FactorNode.Kind.SYMBOL, false, true);
View Full Code Here

Examples of br.com.caelum.vraptor.panettone.parser.ast.ExpressionNode

  @Override
  public Node getNode(TextChunk chunk) {
    String chunkWithNoBegin = chunk.getText().trim().substring(2);
    String finalChunk = chunkWithNoBegin.substring(0, chunkWithNoBegin.length()-1);
    return new ExpressionNode(finalChunk.trim(), chunk.getBeginLine());
  }
View Full Code Here

Examples of cambridge.model.ExpressionNode

   }

   private ExpressionNode expression() throws TemplateParsingException {
      try {
         ExpressionToken tok = (ExpressionToken) currentToken;
         ExpressionNode node = new ExpressionNode(currentToken.value, expressionLanguage.parse(currentToken.value, currentToken.getLineNo(), currentToken.getColumn()), tok.isRawExpression());
         if (tok.getFilters() != null) {
            node.setFilters(tok.getFilters());
         }

         return node;
      } catch (ExpressionParsingException e) {
         throw new TemplateParsingException("Error parsing expression", e, currentToken.getLineNo(), currentToken.getColumn());
View Full Code Here

Examples of cambridge.model.ExpressionNode

                           Token attrToken = at.nextToken();
                           switch (attrToken.getType()) {
                              case EXPRESSION:
                                 ExpressionToken expTok = (ExpressionToken) attrToken;
                                 try {
                                    ExpressionNode expNode = new ExpressionNode(attrToken.value, expressionLanguage.parse(attrToken.value, attrToken.getLineNo(), attrToken.getColumn()), expTok.isRawExpression());

                                    if (expTok.getFilters() != null) {
                                       expNode.setFilters(expTok.getFilters());
                                    }
                                    fragments.add(expNode);
                                 } catch (ExpressionParsingException e1) {
                                    throw new TemplateParsingException("Error parsing expression", e1, currentToken.getLineNo(), currentToken.getColumn());
                                 }
View Full Code Here

Examples of cambridge.model.ExpressionNode

         assertEquals(1, c.getFragments().size());

         assertTrue(c.getFragments().get(0) instanceof ExpressionNode);

         ExpressionNode node = (ExpressionNode) c.getFragments().get(0);

         assertEquals("${class}", node.getSource());

         StringWriter builder = new StringWriter();

         FragmentList fragmentList = t.normalize();
View Full Code Here

Examples of cambridge.model.ExpressionNode

         assertTrue(c.getFragments().get(0) instanceof ExpressionNode);
         assertTrue(c.getFragments().get(1) instanceof StaticFragment);
         assertTrue(c.getFragments().get(2) instanceof StaticFragment);
         assertTrue(c.getFragments().get(3) instanceof ExpressionNode);

         ExpressionNode node1 = (ExpressionNode) c.getFragments().get(0);
         StaticFragment st = (StaticFragment) c.getFragments().get(1);
         StaticFragment st2 = (StaticFragment) c.getFragments().get(2);
         ExpressionNode node2 = (ExpressionNode) c.getFragments().get(3);

         assertEquals("${a}", node1.getSource());
         assertEquals(" ", st.toString());
         assertEquals("and ", st2.toString());
         assertEquals("${b}", node2.getSource());

         StringWriter builder = new StringWriter();

         FragmentList fragmentList = t.normalize();
View Full Code Here

Examples of cambridge.model.ExpressionNode

         assertEquals(1, c.getFragments().size());

         assertTrue(c.getFragments().get(0) instanceof ExpressionNode);

         ExpressionNode node1 = (ExpressionNode) c.getFragments().get(0);

         assertEquals("${style}", node1.getSource());

         StringWriter builder = new StringWriter();

         FragmentList fragmentList = t.normalize();
View Full Code Here

Examples of com.alvazan.orm.parser.antlr.ExpressionNode

    DirectCursor<IndexColumnInfo> cursor = getResultListImpl(alreadyJoinedViews, indexedColumn);
    return cursor;
  }
 
  public DirectCursor<IndexColumnInfo> getResultListImpl(Set<ViewInfo> alreadyJoinedViews, String indexedColumn) {
    ExpressionNode root = spiMeta.getASTTree();
    if(root == null) {
      ViewInfoImpl tableInfo = (ViewInfoImpl) spiMeta.getTargetViews().get(0);
      DboTableMeta tableMeta = tableInfo.getTableMeta();
      PartitionMeta partitionMeta = tableInfo.getPartition();
      DboColumnMeta partColMeta = null;
View Full Code Here

Examples of com.bazaarvoice.jless.ast.node.ExpressionNode

    /**
     * '(' Ws0 ExpressionPhrase Ws0 ')' Future: Operations
     * / Entity
     */
    Rule Expression() {
        return Sequence(Value(), push(new ExpressionNode(pop())));
    }
View Full Code Here

Examples of com.foundationdb.sql.optimizer.plan.ExpressionNode

        }
        else if (node instanceof FunctionCondition) {
            FunctionCondition condition = (FunctionCondition) node;
            if ("isNull".equals(condition.getFunction())) {
                if (condition.getOperands().size() == 1) {
                    ExpressionNode operand = condition.getOperands().get(0);
                    if (operand instanceof ColumnExpression) {
                        ColumnExpression operandColumn = (ColumnExpression) operand;
                        return new ColumnRanges(operandColumn, condition,
                                Collections.singletonList(RangeSegment.onlyNull(operandColumn)));
                    }
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.