Package xtc.parser

Examples of xtc.parser.ParseError


    Result     yyResult;
    Result     yyPredResult;
    boolean    yyPredMatched;
    int        yyBase;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

      yyPredMatched = false;

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

        yyPredMatched = true;
      }

      if (! yyPredMatched) {

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

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

            yyPredMatched = false;

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

              yyPredMatched = true;
            }

            if (! yyPredMatched) {

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

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

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


    Result     yyResult;
    Result     yyPredResult;
    boolean    yyPredMatched;
    int        yyBase;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

      yyPredMatched = false;

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

        yyPredMatched = true;
      }

      if (! yyPredMatched) {

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

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

            yyPredMatched = false;

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

              yyPredMatched = true;
            }

            if (! yyPredMatched) {

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

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

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

    Result     yyResult;
    int        yyBase;
    int        yyOption1;
    String     yyOpValue1;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

      final int yyChoice1 = yyResult.index;

      // Nested alternative 1.

      yyOption1  = yyChoice1;
      yyOpValue1 = null;

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

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

        final int yyChoice2 = yyOption1;
View Full Code Here

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

   */
  private Result pNullLiteral(final int yyStart) throws IOException {
    int        yyC;
    int        yyIndex;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyC = character(yyStart);
    if ('n' == yyC) {
      yyIndex = yyStart + 1;

      yyC = character(yyIndex);
      if ('u' == yyC) {
        yyIndex = yyIndex + 1;

        yyC = character(yyIndex);
        if ('l' == yyC) {
          yyIndex = yyIndex + 1;

          yyC = character(yyIndex);
          if ('l' == yyC) {
            yyIndex = yyIndex + 1;
            String v$g$1 = "null";

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

            return new SemanticValue(yyValue, yyIndex, yyError);
          }
        }
      }
    }

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

  private Result pSEMI(final int yyStart) throws IOException {
    Result     yyResult;
    int        yyRepetition1;
    boolean    yyRepeated1;
    Void       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

      yyRepetition1 = yyResult.index;
      while (true) {

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

          yyRepetition1 = yyResult.index;
          continue;
        }
        break;
      }

      yyValue = null;

      return new SemanticValue(yyValue, yyRepetition1, yyError);
    }

    // Alternative 2.

    yyRepetition1 = yyStart;
    yyRepeated1   = false;
    while (true) {

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

        yyRepetition1 = yyResult.index;
        yyRepeated1   = true;
        continue;
      }
      break;
    }

    if (yyRepeated1) {

      yyValue = null;

      return new SemanticValue(yyValue, yyRepetition1, yyError);
    }

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

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

    // Alternative 1.

    yyResult = pId(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 = pId(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();
View Full Code Here

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

    // Alternative 1.

    yyResult = pId(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 = pId(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();
View Full Code Here

    Result     yyResult;
    int        yyBase;
    int        yyOption1;
    Node       yyOpValue1;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

    yyOption1  = yyStart;
    yyOpValue1 = null;

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

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

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

    Result     yyResult;
    int        yyBase;
    int        yyOption1;
    Node       yyOpValue1;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyOption1  = yyStart;
    yyOpValue1 = null;

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

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

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

      final int yyChoice1 = yyOption1;

      // Nested alternative 1.

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

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

          yyOption1  = yyResult.index;
          yyOpValue1 = null;

          yyBase = yyOption1;
          yyC    = character(yyBase);
          if ('.' == yyC) {
            yyIndex = yyOption1 + 1;

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

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

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

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

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

      // Nested alternative 2.

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

        yyOption1  = yyResult.index;
        yyOpValue1 = null;

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

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

          yyResult = pStableId$$Star2(yyOption1);
          yyError  = yyResult.select(yyError);
          if (yyResult.hasValue()) {
            Pair<Node> v$g$7 = yyResult.semanticValue();

            yyOption1  = yyResult.index;
            yyOpValue1 = null;

            yyBase = yyOption1;
            yyC    = character(yyBase);
            if ('.' == yyC) {
              yyIndex = yyOption1 + 1;

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

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

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

              yyValue = GNode.create("StableId", v$g$1, v$g$5, 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$6.
      }
    } // End scope for v$g$1.

    // Alternative 2.

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

      yyResult = pStableId$$Star3(yyResult.index);
      yyError  = yyResult.select(yyError);
      if (yyResult.hasValue()) {
        Pair<Node> v$g$10 = yyResult.semanticValue();

        yyOption1  = yyResult.index;
        yyOpValue1 = null;

        yyBase = yyOption1;
        yyC    = character(yyBase);
        if ('.' == yyC) {
          yyIndex = yyOption1 + 1;

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

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

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

          yyValue = GNode.create("StableId", v$g$9, v$g$10, v$g$11);
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.