Package xtc.parser

Examples of xtc.parser.Result


    return yyColumn.chunk6.fPatVarDef;
  }

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

    // Alternative 1.

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

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

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

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

    // Alternative 2.

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

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

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

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

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


    return yyColumn.chunk6.fDef;
  }

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

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

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

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

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

    // Alternative 3.

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

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

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

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

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

    // Alternative 4.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

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

        yyValue = GNode.create("TraitTemplateOpt", 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("TraitTemplateOpt", 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.chunk6.fExtends;
  }

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

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

    // Alternative 1.

    yyOption1  = yyStart;
    yyOpValue1 = null;

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

      yyOption2  = yyResult.index;
      yyOpValue2 = null;

      yyResult = pEarlyDefs(yyOption2);
      yyError  = yyResult.select(yyError, yyOption2);
      if (yyResult.hasValue()) {
        Node v$el$2 = yyResult.semanticValue();

        yyOption2  = yyResult.index;
        yyOpValue2 = v$el$2;
      }
      { // Start scope for v$el$1.
        Node v$el$1 = yyOpValue2;

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

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

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

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

        yyOption1  = yyResult.index;
        yyOpValue1 = null;

        yyResult = pTemplateBody(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.
View Full Code Here

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

    // Alternative 1.

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

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

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

    // Alternative 2.

    yyOption1  = yyStart;

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

      yyOption1  = yyResult.index;
    }

    yyResult = pConstrBlock(yyOption1);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

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

    return yyColumn.chunk6.fTypeDef;
  }

  /** Actually parse org.netbeans.modules.scala.core.rats.ParserScala.TypeDef. */
  private Result pTypeDef$1(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;

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

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

            yyValue = GNode.create("TypeDef", 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.
View Full Code Here

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

    // Alternative 1.

    yyOption1  = yyStart;
    yyOpValue1 = null;

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

      yyOption2  = yyResult.index;
      yyOpValue2 = null;

      yyResult = pEarlyDefs(yyOption2);
      yyError  = yyResult.select(yyError, yyOption2);
      if (yyResult.hasValue()) {
        Node v$el$2 = yyResult.semanticValue();

        yyOption2  = yyResult.index;
        yyOpValue2 = v$el$2;
      }
      { // Start scope for v$el$1.
        Node v$el$1 = yyOpValue2;

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

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

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

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

        yyOption1  = yyResult.index;
        yyOpValue1 = null;

        yyResult = pTemplateBody(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.
View Full Code Here

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

    // Alternative 1.

    yyResult = pConstr(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 = pkey(yyBase);
        if (yyResult.hasValue("with")) {

          yyResult = pAnnotType(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 pTraitParents(final int yyStart) throws IOException {
    Result     yyResult;
    int        yyBase;
    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) {

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

          yyResult = pAnnotType(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

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.