Package xtc.parser

Examples of xtc.parser.Result


   * @param yyStart The index.
   * @return The result.
   * @throws IOException Signals an I/O error.
   */
  private Result pVarDef(final int yyStart) throws IOException {
    Result     yyResult;
    int        yyBase;
    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("VarDef", v$g$1);
      yyValue.setLocation(location(yyStart));

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

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

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

            yyBase   = yyResult.index;
            yyResult = pkey(yyBase);
            if (yyResult.hasValue("_")) {
              String v$g$5 = "_";

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

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


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

    // Alternative 1.

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

      final int yyChoice1 = yyResult.index;

      // Nested alternative 1.

      yyOption1  = yyChoice1;
      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("=")) {

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

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

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

      // Nested alternative 2.

      yyOption1  = yyChoice1;

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

        yyOption1  = yyResult.index;
      }

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

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

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

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

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

    // Alternative 2.

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

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

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

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

            yyValue = GNode.create("ConstructorFunDef", v$g$5, v$g$6, v$g$7, v$g$8);
            yyValue.setLocation(location(yyStart));

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

View Full Code Here

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

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

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

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

    // Done.
View Full Code Here

   * @param yyStart The index.
   * @return The result.
   * @throws IOException Signals an I/O error.
   */
  private Result pObjectDef(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()) {
      Node v$g$1 = yyResult.semanticValue();

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

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

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

    // Done.
    return yyError;
View Full Code Here

    return yyColumn.chunk6.fClassTemplateOpt;
  }

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

    // Alternative 1.

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

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

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

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

    // Alternative 2.

    yyOption1  = yyStart;
    yyOpValue1 = null;

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

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

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

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

    // Alternative 3.

View Full Code Here

    return yyColumn.chunk2.fNotFunExpr;
  }

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

    // Alternative 1.

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

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

        yyResult = pENTER_NL_DISABLE(yyResult.index);
        yyError  = yyResult.select(yyError);
        if (yyResult.hasValue()) {

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

            yyResult = pEXIT_NL_DISABLE(yyResult.index);
            yyError  = yyResult.select(yyError);
            if (yyResult.hasValue()) {

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

                yyResult = p$$Shared2(yyResult.index);
                yyError  = yyResult.select(yyError);
                if (yyResult.hasValue()) {

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

                    yyOption1  = yyResult.index;
                    yyOpValue1 = null;

                    yyOption2  = yyOption1;

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

                      yyOption2  = yyResult.index;
                    }

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

                      yyResult = pExpr(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("'else' expected", yyBase);
                    }
                    { // Start scope for v$g$3.
                      Node v$g$3 = yyOpValue1;

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

                      return new SemanticValue(yyValue, yyOption1, yyError);
                    } // End scope for v$g$3.
                  }
                }
              } else {
                yyError = yyError.select("')' expected", yyBase);
              }
            }
          }
        }
      } else {
        yyError = yyError.select("'(' expected", yyBase);
      }
    }

    // Alternative 2.

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

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

        yyResult = pENTER_NL_DISABLE(yyResult.index);
        yyError  = yyResult.select(yyError);
        if (yyResult.hasValue()) {

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

            yyResult = pEXIT_NL_DISABLE(yyResult.index);
            yyError  = yyResult.select(yyError);
            if (yyResult.hasValue()) {

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

                yyResult = p$$Shared2(yyResult.index);
                yyError  = yyResult.select(yyError);
                if (yyResult.hasValue()) {

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

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

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

    // Alternative 3.

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

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

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

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

            yyOption1  = yyResult.index;
            yyOpValue1 = null;

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

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

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

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

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

              yyOpValue1 = null;

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

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

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

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

                return new SemanticValue(yyValue, yyOption1, yyError);
              } // End scope for v$g$8.
            } // End scope for v$g$7.
          } else {
            yyError = yyError.select("'}' expected", yyBase);
          }
        }
      } else {
        yyError = yyError.select("'{' expected", yyBase);
      }
    }

    // Alternative 4.

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

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

        yyOption1  = yyResult.index;

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

          yyOption1  = yyResult.index;
        }

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

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

            yyResult = pENTER_NL_DISABLE(yyResult.index);
            yyError  = yyResult.select(yyError);
            if (yyResult.hasValue()) {

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

                yyResult = pEXIT_NL_DISABLE(yyResult.index);
                yyError  = yyResult.select(yyError);
                if (yyResult.hasValue()) {

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

                    yyValue = GNode.create("DoExpr", v$g$9, v$g$10);
                    yyValue.setLocation(location(yyStart));

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

    // Alternative 5.

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

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

        yyResult = p$$Shared2(yyResult.index);
        yyError  = yyResult.select(yyError);
        if (yyResult.hasValue()) {

          yyOption1  = yyResult.index;

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

            yyOption1  = yyResult.index;
          } else {
            yyError = yyError.select("'yield' expected", yyBase);
          }

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

            yyValue = GNode.create("ForExpr", v$g$11, v$g$12);
            yyValue.setLocation(location(yyStart));

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

    // Alternative 6.

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

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

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

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

    // Alternative 7.

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

      yyOption1  = yyResult.index;
      yyOpValue1 = null;

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

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

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

        return new SemanticValue(yyValue, yyOption1, yyError);
      } // End scope for v$g$14.
    }

    // Alternative 8.

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

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

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

          yyValue = GNode.create("AssignmentExpr", v$g$15, v$g$16);
          yyValue.setLocation(location(yyStart));

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

    // Alternative 9.

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

      final int yyChoice1 = yyResult.index;

      // Nested alternative 1.

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

        yyValue = GNode.create("AscriptionExpr", v$g$17, v$g$18);
        yyValue.setLocation(location(yyStart));

        return yyResult.createValue(yyValue, yyError);
      }

      // Nested alternative 2.

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

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

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

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

              yyValue = GNode.create("MatchExpr", v$g$17, v$g$19);
              yyValue.setLocation(location(yyStart));

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

    return yyColumn.chunk2.f$$Shared2;
  }

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

    // Alternative 1.

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

      yyResult = p$$Shared2(yyResult.index);
      yyError  = yyResult.select(yyError);
      if (yyResult.hasValue()) {

        yyValue = null;

        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 pNotFunExpr$$Choice1(final int yyStart) throws IOException {
    Result     yyResult;
    int        yyBase;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

      yyResult = pEnumerators(yyResult.index);
      yyError  = yyResult.select(yyError);
      if (yyResult.hasValue()) {
        yyValue = yyResult.semanticValue();

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

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

    // Alternative 2.

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

      yyResult = pEnumerators(yyResult.index);
      yyError  = yyResult.select(yyError);
      if (yyResult.hasValue()) {
        yyValue = yyResult.semanticValue();

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

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

    return yyColumn.chunk2.fCompoundType;
  }

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

    // Alternative 1.

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

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

        yyOption1  = yyResult.index;
        yyOpValue1 = null;

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

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

          return new SemanticValue(yyValue, yyOption1, yyError);
        } // End scope for v$g$3.
      }
    }

    // Alternative 2.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

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

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

    // Alternative 1.

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

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

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

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

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

    // Alternative 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.