Package xtc.tree

Examples of xtc.tree.Node


    while (true) {

      yyResult = pModifier(yyRepetition1);
      yyError  = yyResult.select(yyError, yyRepetition1);
      if (yyResult.hasValue()) {
        Node v$el$4 = yyResult.semanticValue();

        yyRepetition1 = yyResult.index;
        yyRepValue1   = new Pair<Node>(v$el$4, yyRepValue1);
        continue;
      }
View Full Code Here


    Result     yyResult;
    int        yyBase;
    int        yyRepetition1;
    Pair<Node> yyRepValue1;
    int        yyOption1;
    Node       yyOpValue1;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = psep(yyStart);
    if (yyResult.hasValue("(")) {

      yyOption1  = yyResult.index;
      yyOpValue1 = null;

      yyResult = pBinding(yyOption1);
      yyError  = yyResult.select(yyError, yyOption1);
      if (yyResult.hasValue()) {
        Node v$el$1 = yyResult.semanticValue();

        yyOption1  = yyResult.index;
        yyOpValue1 = v$el$1;
      }
      { // Start scope for v$g$1.
        Node v$g$1 = yyOpValue1;

        yyRepetition1 = yyOption1;
        yyRepValue1   = Pair.empty();
        while (true) {

          yyBase   = yyRepetition1;
          yyResult = psep(yyBase);
          if (yyResult.hasValue(",")) {

            yyResult = pBinding(yyResult.index);
            yyError  = yyResult.select(yyError, yyRepetition1);
            if (yyResult.hasValue()) {
              Node v$el$2 = yyResult.semanticValue();

              yyRepetition1 = yyResult.index;
              yyRepValue1   = new Pair<Node>(v$el$2, yyRepValue1);
              continue;
            }
View Full Code Here

   * @param t The type.
   * @param d The declarator value.
   * @return The variable declaration node.
   */
  private Node makeVarDec(String s, String t, Node d) { 
    Node decl = factory.fieldDecl(toType(t), d);
    //set the name
    decl.getGeneric(2).getGeneric(0).set(0, s);
    return decl;
  }
View Full Code Here

   */
  private Result pBinding(final int yyStart) throws IOException {
    Result     yyResult;
    int        yyBase;
    int        yyOption1;
    Node       yyOpValue1;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pId(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      Node v$g$1 = yyResult.semanticValue();

      yyOption1  = yyResult.index;
      yyOpValue1 = null;

      yyBase   = yyOption1;
      yyResult = pkey(yyBase);
      if (yyResult.hasValue(":")) {

        yyResult = pType(yyResult.index);
        yyError  = yyResult.select(yyError, yyOption1);
        if (yyResult.hasValue()) {
          Node v$el$1 = yyResult.semanticValue();

          yyOption1  = yyResult.index;
          yyOpValue1 = v$el$1;
        }
      } else {
        yyError = yyError.select("':' expected", yyBase);
      }
      { // Start scope for v$g$2.
        Node v$g$2 = yyOpValue1;

        yyValue = GNode.create("Binding", v$g$1, v$g$2);
        yyValue.setLocation(location(yyStart));

        return new SemanticValue(yyValue, yyOption1, yyError);
View Full Code Here

   * @param t The type node.
   * @param d The declarator value.
   * @return The variable declaration node.
   */
  private Node makeVarDec2(String s, Node t, Node d) { 
    Node decl = factory.fieldDecl(t, d);
    //set the name
    decl.getGeneric(2).getGeneric(0).set(0, s);
    return decl;
  }
View Full Code Here

  }

  /** Actually parse org.netbeans.modules.scala.core.rats.ParserScala.Modifier. */
  private Result pModifier$1(final int yyStart) throws IOException {
    Result     yyResult;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pLocalModifier(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      Node v$g$1 = yyResult.semanticValue();

      yyValue = GNode.create("Modifier", v$g$1);
      yyValue.setLocation(location(yyStart));

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

    yyResult = pAccessModifier(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      Node v$g$2 = yyResult.semanticValue();

      yyValue = GNode.create("Modifier", v$g$2);
      yyValue.setLocation(location(yyStart));

      return yyResult.createValue(yyValue, yyError);
View Full Code Here

   * @param d The declarator value.
   * @return The variable declaration node.
   */
  @SuppressWarnings ("unused")
  private Node makeStaticVarDec(String s, String t, Node d) { 
    Node decl = factory.staticFieldDecl(toType(t), d);
    //set the name
    decl.getGeneric(2).getGeneric(0).set(0, s);
    return decl;
  }
View Full Code Here

  }

  /** Actually parse org.netbeans.modules.scala.core.rats.ParserScala.LocalModifier. */
  private Result pLocalModifier$1(final int yyStart) throws IOException {
    Result     yyResult;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pkey(yyStart);
    if (yyResult.hasValue("abstract")) {
      String v$g$1 = "abstract";

      yyValue = GNode.create("LocalModifier", v$g$1);
      yyValue.setLocation(location(yyStart));

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

    yyResult = pkey(yyStart);
    if (yyResult.hasValue("final")) {
      String v$g$2 = "final";

      yyValue = GNode.create("LocalModifier", v$g$2);
      yyValue.setLocation(location(yyStart));

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 3.

    yyResult = pkey(yyStart);
    if (yyResult.hasValue("sealed")) {
      String v$g$3 = "sealed";

      yyValue = GNode.create("LocalModifier", v$g$3);
      yyValue.setLocation(location(yyStart));

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 4.

    yyResult = pkey(yyStart);
    if (yyResult.hasValue("implicit")) {
      String v$g$4 = "implicit";

      yyValue = GNode.create("LocalModifier", v$g$4);
      yyValue.setLocation(location(yyStart));

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 5.

    yyResult = pkey(yyStart);
    if (yyResult.hasValue("lazy")) {
      String v$g$5 = "lazy";

      yyValue = GNode.create("LocalModifier", v$g$5);
      yyValue.setLocation(location(yyStart));

      return yyResult.createValue(yyValue, yyError);
    }

    // Done.
View Full Code Here

   * @param t The type.
   * @param d The declarator value.
   * @return The variable declaration node.
   */
  private Node makeDec(String s, String t, Node d) { 
    Node decl = factory.fieldDecl1(toType(t), d);
    //set the name
    decl.getGeneric(2).getGeneric(0).set(0, s);
    return decl;
  }
View Full Code Here

   * @param fileName The importing file, XXXAnalyzer, XXXTypes or XXXSuppport
   */
  private void addImports(Node compUnit, Node n, String fileName) {

    setFlagVariables(n);
    Node importNode;
   
    if (isBigIntegerUsed) {
      importNode = GNode.create("ImportDeclaration", null,
        GNode.create("QualifiedIdentifier", "java", "math", "BigInteger"),
        null);
View Full Code Here

TOP

Related Classes of xtc.tree.Node

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.