Package xtc.parser

Examples of xtc.parser.Result


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

    // Alternative 1.

    yyResult = pVarId(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      Node v$g$1 = 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$2 = yyResult.semanticValue();

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

          return yyResult.createValue(yyValue, yyError);
        }
      } else {
        yyError = yyError.select("':' expected", yyBase);
      }
    }

    // Alternative 2.

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

      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();

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

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


    return yyColumn.chunk6.fTmplDef;
  }

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

    // Alternative 1.

    yyOption1  = yyStart;
    yyOpValue1 = null;

    yyBase   = yyOption1;
    yyResult = pkey(yyBase);
    if (yyResult.hasValue("case")) {
      String v$el$1 = "case";

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

      final int yyChoice1 = yyOption1;

      // Nested alternative 1.

      yyBase   = yyChoice1;
      yyResult = pkey(yyBase);
      if (yyResult.hasValue("class")) {

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

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

          return yyResult.createValue(yyValue, yyError);
        }
      } else {
        yyError = yyError.select("'class' expected", yyBase);
      }

      // Nested alternative 2.

      yyBase   = yyChoice1;
      yyResult = pkey(yyBase);
      if (yyResult.hasValue("object")) {

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

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

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

    // Alternative 2.

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

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

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

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

    // Done.
    yyError = yyError.select("tmpl def expected", yyStart);
View Full Code Here

   * @param yyStart The index.
   * @return The result.
   * @throws IOException Signals an I/O error.
   */
  private Result pClassDef(final int yyStart) throws IOException {
    Result     yyResult;
    int        yyRepetition1;
    Pair<Node> yyRepValue1;
    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;

      yyResult = pTypeParamClause(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$2.
        Node v$g$2 = yyOpValue1;

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

          yyResult = pAnnotation(yyRepetition1);
          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;
          }
          break;
        }
        { // Start scope for v$g$3.
          Pair<Node> v$g$3 = yyRepValue1.reverse();

          yyOption1  = yyRepetition1;
          yyOpValue1 = null;

          yyResult = pAccessModifier(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$4.
            Node v$g$4 = yyOpValue1;

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

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

                yyValue = GNode.create("ClassDef", v$g$1, v$g$2, v$g$3, v$g$4, v$g$5, v$g$6);
                yyValue.setLocation(location(yyStart));

                return yyResult.createValue(yyValue, yyError);
              }
            }
          } // End scope for v$g$4.
        } // End scope for v$g$3.
      } // End scope for v$g$2.
View Full Code Here

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

    // Alternative 1.

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

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

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

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

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

    // Alternative 1.

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

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

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

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

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

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

    // Alternative 1.

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

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

        yyRepetition1 = yyResult.index;
        yyRepValue1   = new Pair<Node>(v$el$1, yyRepValue1);
        continue;
      }
      break;
    }
    { // Start scope for v$g$1.
      Pair<Node> v$g$1 = yyRepValue1.reverse();

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

        yyResult = pModifier(yyRepetition1);
        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;
        }
        break;
      }
      { // Start scope for v$g$2.
        Pair<Node> v$g$2 = yyRepValue1.reverse();

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

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

          return yyResult.createValue(yyValue, yyError);
        }
      } // End scope for v$g$2.
    } // End scope for v$g$1.

    // Done.
View Full Code Here

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

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

    // Alternative 1.

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

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

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

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

            yyRepetition1 = yyResult.index;
            yyRepValue1   = new Pair<Node>(v$el$1, yyRepValue1);
            continue;
          }
        } else {
          yyError = yyError.select("',' expected", yyBase);
        }
        break;
      }
      { // Start scope for v$g$2.
        Pair<Node> v$g$2 = yyRepValue1.reverse();

        yyOption1  = yyRepetition1;
        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$2 = yyResult.semanticValue();

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

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

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

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

              return yyResult.createValue(yyValue, yyError);
            }
          } else {
            yyError = yyError.select("'=' expected", yyBase);
          }
        } // End scope for v$g$3.
View Full Code Here

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

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

      yyResult = pTypeParamClause(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$2.
        Node v$g$2 = yyOpValue1;

        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$2 = yyResult.semanticValue();

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

          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$3 = yyResult.semanticValue();

              yyOption1  = yyResult.index;
              yyOpValue1 = v$el$3;
            }
          } else {
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.