Examples of SymbolNode


Examples of anvil.script.expression.SymbolNode

        jj_consume_token(-1);
        throw new ParseException();
      }
    }
    if (symbol != null) {
      push(new MappingNode(new SymbolNode(symbol.image), pop()));
    }
  }
View Full Code Here

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

    assertNull(tokenDeclNode.getSemTextNode());
  }
 
  @Test
  public void testTokenDeclNode0_Symbol() {
    SymbolNode symbolNode = root
              .getCompilerNode()
              .getScannerSpecNode()
              .getTokenDeclNodes()
              .get(0)
              .getSymbolNode();
    checkNode(symbolNode, 237, 5,
        root.getCompilerNode()
          .getScannerSpecNode()
          .getTokenDeclNodes()
          .get(0));

    //Children Nodes
    assertNotNull(symbolNode.getIdentNode());

    //Value
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());
  }
View Full Code Here

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

    TokenFactorNode tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 245, 6, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());
   
    //TokenFactor 0 Symbol
    SymbolNode symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 245, 6, tokenFactorNode);
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());

    //TokenFactor 0 Symbol Ident
    IdentNode identNode = symbolNode.getIdentNode();
    checkNode(identNode, 245, 6, symbolNode);
    assertTrue(identNode.getIdent().equals("letter"));
    assertEquals(IdentNode.Kind.CHARACTER_SET, identNode.getKind());
   
    //TokenFactor 1
    tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(1);
    checkNode(tokenFactorNode, 252, 16, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.ARBITRARY_OFTEN, tokenFactorNode.getKind());
   
    //TokenFactor 1 TokenExpr
    tokenExprNode = tokenFactorNode.getTokenExprNode();
    checkNode(tokenExprNode, 253, 14, tokenFactorNode);
    assertEquals(2, tokenExprNode.getTokenTermNodes().size());
   
    //TokenFactor 1 TokenExpr TokenTerm 0
    tokenTermNode = tokenExprNode.getTokenTermNodes().get(0);
    checkNode(tokenTermNode, 253, 6, tokenExprNode);

    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0
    tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 253, 6, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());

    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol
    symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 253, 6, tokenFactorNode);
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());
   
    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol Ident
    identNode = symbolNode.getIdentNode();
    checkNode(identNode, 253, 6, symbolNode);
    assertTrue(identNode.getIdent().equals("letter"));
    assertEquals(IdentNode.Kind.CHARACTER_SET, identNode.getKind());

    //TokenFactor 1 TokenExpr TokenTerm 1
    tokenTermNode = tokenExprNode.getTokenTermNodes().get(1);
    checkNode(tokenTermNode, 262, 5, tokenExprNode);

    //TokenFactor 1 TokenExpr TokenTerm 1 TokenFactor 0
    tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 262, 5, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());

    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol
    symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 262, 5, tokenFactorNode);
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());
   
    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol Ident
    identNode = symbolNode.getIdentNode();
    checkNode(identNode, 262, 5, symbolNode);
    assertTrue(identNode.getIdent().equals("digit"));
    assertEquals(IdentNode.Kind.CHARACTER_SET, identNode.getKind());
  }
View Full Code Here

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

    assertNull(tokenDeclNode.getSemTextNode());
  }

  @Test
  public void testTokenDeclNode1_Symbol() {
    SymbolNode symbolNode = root
              .getCompilerNode()
              .getScannerSpecNode()
              .getTokenDeclNodes()
              .get(1)
              .getSymbolNode();
    checkNode(symbolNode, 271, 6,
        root.getCompilerNode()
          .getScannerSpecNode()
          .getTokenDeclNodes()
          .get(1));

    //Children Nodes
    assertNotNull(symbolNode.getIdentNode());

    //Value
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());
  }
View Full Code Here

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

    TokenFactorNode tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 280, 5, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());
   
    //TokenFactor 0 Symbol
    SymbolNode symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 280, 5, tokenFactorNode);
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());

    //TokenFactor 0 Symbol Ident
    IdentNode identNode = symbolNode.getIdentNode();
    checkNode(identNode, 280, 5, symbolNode);
    assertTrue(identNode.getIdent().equals("digit"));
    assertEquals(IdentNode.Kind.CHARACTER_SET, identNode.getKind());
   
    //TokenFactor 1
    tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(1);
    checkNode(tokenFactorNode, 286, 7, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.ARBITRARY_OFTEN, tokenFactorNode.getKind());
   
    //TokenFactor 1 TokenExpr
    tokenExprNode = tokenFactorNode.getTokenExprNode();
    checkNode(tokenExprNode, 287, 5, tokenFactorNode);
    assertEquals(1, tokenExprNode.getTokenTermNodes().size());
   
    //TokenFactor 1 TokenExpr TokenTerm 0
    tokenTermNode = tokenExprNode.getTokenTermNodes().get(0);
    checkNode(tokenTermNode, 287, 5, tokenExprNode);

    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0
    tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 287, 5, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());

    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol
    symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 287, 5, tokenFactorNode);
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());
   
    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol Ident
    identNode = symbolNode.getIdentNode();
    checkNode(identNode, 287, 5, symbolNode);
    assertTrue(identNode.getIdent().equals("digit"));
    assertEquals(IdentNode.Kind.CHARACTER_SET, identNode.getKind());
  }
View Full Code Here

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

    assertNotNull(tokenDeclNode.getSemTextNode());
  }

  @Test
  public void testPragmaDeclNode0_Symbol() {
    SymbolNode symbolNode = root
              .getCompilerNode()
              .getScannerSpecNode()
              .getPragmaDeclNodes()
              .get(0)
              .getSymbolNode();
    checkNode(symbolNode, 305, 6,
        root.getCompilerNode()
          .getScannerSpecNode()
          .getPragmaDeclNodes()
          .get(0));

    //Children Nodes
    assertNotNull(symbolNode.getIdentNode());

    //Value
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());
  }
View Full Code Here

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

    TokenFactorNode tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 314, 3, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());
   
    //TokenFactor 0 Symbol
    SymbolNode symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 314, 3, tokenFactorNode);
    assertEquals(SymbolNode.Kind.CHAR, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals('$', symbolNode.getCharacter());
   
    //TokenFactor 1
    tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(1);
    checkNode(tokenFactorNode, 318, 18, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.ARBITRARY_OFTEN, tokenFactorNode.getKind());
   
    //TokenFactor 1 TokenExpr
    tokenExprNode = tokenFactorNode.getTokenExprNode();
    checkNode(tokenExprNode, 320, 14, tokenFactorNode);
    assertEquals(2, tokenExprNode.getTokenTermNodes().size());
   
    //TokenFactor 1 TokenExpr TokenTerm 0
    tokenTermNode = tokenExprNode.getTokenTermNodes().get(0);
    checkNode(tokenTermNode, 320, 5, tokenExprNode);

    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0
    tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 320, 5, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());

    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol
    symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 320, 5, tokenFactorNode);
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());
   
    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol Ident
    IdentNode identNode = symbolNode.getIdentNode();
    checkNode(identNode, 320, 5, symbolNode);
    assertTrue(identNode.getIdent().equals("digit"));
    assertEquals(IdentNode.Kind.CHARACTER_SET, identNode.getKind());


    //TokenFactor 1 TokenExpr TokenTerm 1
    tokenTermNode = tokenExprNode.getTokenTermNodes().get(1);
    checkNode(tokenTermNode, 328, 6, tokenExprNode);

    //TokenFactor 1 TokenExpr TokenTerm 1 TokenFactor 0
    tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 328, 6, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());

    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol
    symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 328, 6, tokenFactorNode);
    assertEquals(SymbolNode.Kind.IDENT, symbolNode.getKind());
    assertNull(symbolNode.getString());
    assertEquals(0, symbolNode.getCharacter());
   
    //TokenFactor 1 TokenExpr TokenTerm 0 TokenFactor 0 Symbol Ident
    identNode = symbolNode.getIdentNode();
    checkNode(identNode, 328, 6, symbolNode);
    assertTrue(identNode.getIdent().equals("letter"));
    assertEquals(IdentNode.Kind.CHARACTER_SET, identNode.getKind());

  }
View Full Code Here

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

    TokenFactorNode tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 388, 4, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());
   
    //TokenFactor 0 Symbol
    SymbolNode symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 388, 4, tokenFactorNode);
    assertEquals(SymbolNode.Kind.STRING, symbolNode.getKind());
    assertTrue(symbolNode.getString().equals("/*"));
  }
 
View Full Code Here

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

    TokenFactorNode tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 396, 4, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());
   
    //TokenFactor 0 Symbol
    SymbolNode symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 396, 4, tokenFactorNode);
    assertEquals(SymbolNode.Kind.STRING, symbolNode.getKind());
    assertTrue(symbolNode.getString().equals("*/"));
  }
 
View Full Code Here

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

    TokenFactorNode tokenFactorNode = tokenTermNode.getTokenFactorNodes().get(0);
    checkNode(tokenFactorNode, 422, 4, tokenTermNode);
    assertEquals(TokenFactorNode.Kind.SYMBOL, tokenFactorNode.getKind());
   
    //TokenFactor 0 Symbol
    SymbolNode symbolNode = tokenFactorNode.getSymbolNode();
    checkNode(symbolNode, 422, 4, tokenFactorNode);
    assertEquals(SymbolNode.Kind.STRING, symbolNode.getKind());
    assertTrue(symbolNode.getString().equals("//"));
  }
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.