Package xtc.parser

Examples of xtc.parser.Result


  /** Actually parse org.netbeans.modules.scala.core.rats.ParserScala.TemplateBody$$Star1. */
  private Result pTemplateBody$$Star1$1(final int yyStart)
    throws IOException {

    Result     yyResult;
    Pair<Node> yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pSEMI(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {

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

        yyResult = pTemplateBody$$Star1(yyResult.index);
        yyError  = yyResult.select(yyError);
        if (yyResult.hasValue()) {
          Pair<Node> v$3 = yyResult.semanticValue();

          yyValue = new Pair<Node>(v$el$2, v$3);

          return yyResult.createValue(yyValue, yyError);
        }
      }
    }

    // Alternative 2.
View Full Code Here


    return yyColumn.chunk5.fTemplateStat;
  }

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

    yyResult = p$$Shared1(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      Pair<Node> v$g$2 = yyResult.semanticValue();

      yyResult = p$$Shared3(yyResult.index);
      yyError  = yyResult.select(yyError);
      if (yyResult.hasValue()) {
        Pair<Node> v$g$3 = yyResult.semanticValue();

        final int yyChoice1 = yyResult.index;

        // Nested alternative 1.

        yyResult = pDef(yyChoice1);
        yyError  = yyResult.select(yyError);
        if (yyResult.hasValue()) {
          Node v$g$4 = yyResult.semanticValue();

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

          return yyResult.createValue(yyValue, yyError);
        }

        // Nested alternative 2.

        yyResult = pDcl(yyChoice1);
        yyError  = yyResult.select(yyError);
        if (yyResult.hasValue()) {
          Node v$g$5 = yyResult.semanticValue();

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

          return yyResult.createValue(yyValue, yyError);
        }
      }
    }

    // Alternative 3.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 4.

    yyValue = GNode.create("TemplateStat", false);
View Full Code Here

    return yyColumn.chunk5.fLocalModifier;
  }

  /** 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.
    yyError = yyError.select("local modifier expected", yyStart);
    return yyError;
View Full Code Here

   * @param yyStart The index.
   * @return The result.
   * @throws IOException Signals an I/O error.
   */
  private Result pAccessModifier(final int yyStart) throws IOException {
    Result     yyResult;
    int        yyOption1;
    Node       yyOpValue1;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pAccessModifier$$Choice1(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      String v$g$1 = yyResult.semanticValue();

      yyOption1  = yyResult.index;
      yyOpValue1 = null;

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

        yyOption1  = yyResult.index;
        yyOpValue1 = v$el$3;
      }
      { // Start scope for v$g$2.
View Full Code Here

   * @throws IOException Signals an I/O error.
   */
  private Result pAccessModifier$$Choice1(final int yyStart)
    throws IOException {

    Result     yyResult;
    String     yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pkey(yyStart);
    if (yyResult.hasValue("private")) {
      yyValue = "private";

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

    yyResult = pkey(yyStart);
    if (yyResult.hasValue("protected")) {
      yyValue = "protected";

      return yyResult.createValue(yyValue, yyError);
    }

    // Done.
    yyError = yyError.select("access modifier expected", yyStart);
    return yyError;
View Full Code Here

   * @param yyStart The index.
   * @return The result.
   * @throws IOException Signals an I/O error.
   */
  private Result pAccessQualifier(final int yyStart) throws IOException {
    Result     yyResult;
    int        yyBase;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

      yyResult = pAccessQualifier$$Choice1(yyResult.index);
      yyError  = yyResult.select(yyError);
      if (yyResult.hasValue()) {
        Node v$g$1 = yyResult.semanticValue();

        yyBase   = yyResult.index;
        yyResult = psep(yyBase);
        if (yyResult.hasValue("]")) {

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

          return yyResult.createValue(yyValue, yyError);
        } else {
          yyError = yyError.select("']' expected", yyBase);
        }
      }
    }
View Full Code Here

    return yyColumn.chunk6.f$$Shared3;
  }

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

    // Alternative 1.

    yyResult = pModifier(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      Node v$el$3 = yyResult.semanticValue();

      yyResult = p$$Shared3(yyResult.index);
      yyError  = yyResult.select(yyError);
      if (yyResult.hasValue()) {
        Pair<Node> v$4 = yyResult.semanticValue();

        yyValue = new Pair<Node>(v$el$3, v$4);

        return yyResult.createValue(yyValue, yyError);
      }
    }

    // Alternative 2.

View Full Code Here

   * @param yyStart The index.
   * @return The result.
   * @throws IOException Signals an I/O error.
   */
  private Result pSelfType(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;

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

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

          return yyResult.createValue(yyValue, yyError);
        } else {
          yyError = yyError.select("'=>' expected", yyBase);
        }
      } // End scope for v$g$2.
    }

    // Alternative 2.

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

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

        yyResult = pType(yyResult.index);
        yyError  = yyResult.select(yyError);
        if (yyResult.hasValue()) {
          Node v$g$4 = yyResult.semanticValue();

          yyBase   = yyResult.index;
          yyResult = pkey(yyBase);
          if (yyResult.hasValue("=>")) {

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

            return yyResult.createValue(yyValue, yyError);
          } else {
            yyError = yyError.select("'=>' expected", yyBase);
          }
        }
      } else {
View Full Code Here

   * @throws IOException Signals an I/O error.
   */
  private Result pAccessQualifier$$Choice1(final int yyStart)
    throws IOException {

    Result     yyResult;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pId(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

    yyResult = pThisKey(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Done.
    return yyError;
  }
View Full Code Here

    return yyColumn.chunk5.fAnnotation;
  }

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

    // Alternative 1.

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

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

        yyOption1  = yyResult.index;

        yyResult = pN(yyOption1);
        yyError  = yyResult.select(yyError, yyOption1);
        if (yyResult.hasValue()) {

          yyOption1  = yyResult.index;
        }

        yyValue = GNode.create("Annotation", v$g$1, v$g$2);
View Full Code Here

TOP

Related Classes of xtc.parser.Result

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.