Package xtc.parser

Examples of xtc.parser.ParseError


    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;

      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$1.
        Node v$g$1 = yyOpValue1;

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

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

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

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

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

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

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

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

    // Alternative 2.

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

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

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

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

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

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

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

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

    // Done.
    yyError = yyError.select("fun type in case clause expected", yyStart);
    return yyError;
  }
View Full Code Here


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

    // Alternative 1.

    yyResult = pInfixType(yyStart);
    yyError  = yyResult.select(yyError);
View Full Code Here

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

    // Alternative 1.

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

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

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

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

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

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

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

              yyValue = GNode.create("ExistentialClause", 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$3.
        }
      } else {
        yyError = yyError.select("'{' expected", yyBase);
      }
    }

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

   * @throws IOException Signals an I/O error.
   */
  private Result pExistentialDcl(final int yyStart) throws IOException {
    Result     yyResult;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

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

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

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

    // Alternative 2.

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

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

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

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

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

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

    // Alternative 1.

    yyResult = pCompoundType(yyStart);
    yyError  = yyResult.select(yyError);
View Full Code Here

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

    // Alternative 1.

    yyResult = pInfixTypeRest(yyStart);
    yyError  = yyResult.select(yyError);
View Full Code Here

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

    // Alternative 1.

    yyResult = pId(yyStart);
    yyError  = yyResult.select(yyError);
View Full Code Here

  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);
View Full Code Here

  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")) {
View Full Code Here

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

    // Alternative 1.

    yyResult = p$$Shared1(yyStart);
    yyError  = yyResult.select(yyError);
View Full Code Here

TOP

Related Classes of xtc.parser.ParseError

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.