Package xtc.parser

Examples of xtc.parser.Result


   * @throws IOException Signals an I/O error.
   */
  private Result pBlockComment$$Choice1(final int yyStart)
    throws IOException {

    Result     yyResult;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pDocComment(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

    yyResult = pBlockComment(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 3.

    yyResult = pCommentTag(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 4.

    yyResult = pBlockCommentData(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 5.

    yyResult = pNl(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

   * @throws IOException Signals an I/O error.
   */
  private Result pblockedCommentData(final int yyStart) throws IOException {
    int        yyC;
    int        yyIndex;
    Result     yyPredResult;
    boolean    yyPredMatched;
    int        yyRepetition1;
    boolean    yyRepeated1;
    String     yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

      yyPredMatched = false;

      yyPredResult = pblockedCommentData$$Choice1(yyRepetition1);
      if (yyPredResult.hasValue()) {

        yyPredMatched = true;
      }

      if (! yyPredMatched) {
View Full Code Here

  private Result pblockedCommentData$$Choice1(final int yyStart)
    throws IOException {

    int        yyC;
    int        yyIndex;
    Result     yyResult;
    int        yyRepetition1;
    boolean    yyRepeated1;
    Void       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyC = character(yyStart);
    if (-1 != yyC) {
      yyIndex = yyStart + 1;

      switch (yyC) {
      case '@':
        {
          yyRepetition1 = yyIndex;
          yyRepeated1   = false;
          while (true) {

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

              yyRepetition1 = yyResult.index;
              yyRepeated1   = true;
              continue;
            }
View Full Code Here

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

   * @throws IOException Signals an I/O error.
   */
  private Result pcommentTag(final int yyStart) throws IOException {
    int        yyC;
    int        yyIndex;
    Result     yyResult;
    int        yyRepetition1;
    boolean    yyRepeated1;
    String     yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

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

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

          yyRepetition1 = yyResult.index;
          yyRepeated1   = true;
          continue;
        }
View Full Code Here

   * @throws IOException Signals an I/O error.
   */
  private Result pN(final int yyStart) throws IOException {
    int        yyC;
    int        yyIndex;
    Result     yyResult;
    int        yyBase;
    int        yyRepetition1;
    int        yyRepetition2;
    boolean    yyRepeated2;
    Void       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyRepetition1 = yyStart;
    while (true) {

      final int yyChoice1 = yyRepetition1;

      // Nested alternative 1.

      yyRepetition2 = yyChoice1;
      yyRepeated2   = false;
      while (true) {

        final int yyChoice2 = yyRepetition2;

        // Nested alternative 1.

        yyC = character(yyChoice2);
        if (-1 != yyC) {
          yyIndex = yyChoice2 + 1;

          switch (yyC) {
          case ' ':
            {
              yyRepetition2 = yyIndex;
              yyRepeated2   = true;
              continue;
            }

          case '\f':
            {
              yyRepetition2 = yyIndex;
              yyRepeated2   = true;
              continue;
            }

          case '\t':
            {
              yyRepetition2 = yyIndex;
              yyRepeated2   = true;
              continue;
            }

          default:
            /* No match. */
          }
        }
        break;
      }

      if (yyRepeated2) {

        yyRepetition1 = yyRepetition2;
        continue;
      }

      // Nested alternative 2.

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

        yyRepetition1 = yyResult.index;
        continue;
      }

      // Nested alternative 3.

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

        yyRepetition1 = yyResult.index;
        continue;
      }

      // Nested alternative 4.

      yyBase = yyChoice1;
      yyC    = character(yyBase);
      if ('/' == yyC) {
        yyIndex = yyChoice1 + 1;

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

          yyRepetition2 = yyIndex;
          while (true) {

            yyC = character(yyRepetition2);
            if (-1 != yyC) {
              yyIndex = yyRepetition2 + 1;

              switch (yyC) {
              case '\n':
              case '\r':
                /* No match. */
                break;

              default:
                {
                  yyRepetition2 = yyIndex;
                  continue;
                }
              }
            }
            break;
          }

          yyRepetition1 = yyRepetition2;
          continue;
        } else {
          yyError = yyError.select("'//' expected", yyBase);
        }
      } else {
        yyError = yyError.select("'//' expected", yyBase);
      }
      break;
    }

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

      yyValue = null;

      return yyResult.createValue(yyValue, yyError);
    }

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

   * @throws IOException Signals an I/O error.
   */
  private Result pSKIP_TILL_N(final int yyStart) throws IOException {
    int        yyC;
    int        yyIndex;
    Result     yyResult;
    int        yyBase;
    int        yyRepetition1;
    int        yyRepetition2;
    boolean    yyRepeated2;
    int        yyRepetition3;
    boolean    yyRepeated3;
    Void       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyRepetition1 = yyStart;
    while (true) {

      yyRepetition2 = yyRepetition1;
      while (true) {

        final int yyChoice1 = yyRepetition2;

        // Nested alternative 1.

        yyRepetition3 = yyChoice1;
        yyRepeated3   = false;
        while (true) {

          final int yyChoice2 = yyRepetition3;

          // Nested alternative 1.

          yyC = character(yyChoice2);
          if (-1 != yyC) {
            yyIndex = yyChoice2 + 1;

            switch (yyC) {
            case ' ':
              {
                yyRepetition3 = yyIndex;
                yyRepeated3   = true;
                continue;
              }

            case '\f':
              {
                yyRepetition3 = yyIndex;
                yyRepeated3   = true;
                continue;
              }

            case '\t':
              {
                yyRepetition3 = yyIndex;
                yyRepeated3   = true;
                continue;
              }

            default:
              /* No match. */
            }
          }
          break;
        }

        if (yyRepeated3) {

          yyRepetition2 = yyRepetition3;
          continue;
        }

        // Nested alternative 2.

        yyResult = pDocComment(yyChoice1);
        yyError  = yyResult.select(yyError, yyRepetition2);
        if (yyResult.hasValue()) {

          yyRepetition2 = yyResult.index;
          continue;
        }

        // Nested alternative 3.

        yyResult = pBlockComment(yyChoice1);
        yyError  = yyResult.select(yyError, yyRepetition2);
        if (yyResult.hasValue()) {

          yyRepetition2 = yyResult.index;
          continue;
        }

        // Nested alternative 4.

        yyBase = yyChoice1;
        yyC    = character(yyBase);
        if ('/' == yyC) {
          yyIndex = yyChoice1 + 1;

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

            yyRepetition3 = yyIndex;
            while (true) {

              yyC = character(yyRepetition3);
              if (-1 != yyC) {
                yyIndex = yyRepetition3 + 1;

                switch (yyC) {
                case '\n':
                case '\r':
                  /* No match. */
                  break;

                default:
                  {
                    yyRepetition3 = yyIndex;
                    continue;
                  }
                }
              }
              break;
            }

            yyRepetition2 = yyRepetition3;
            continue;
          } else {
            yyError = yyError.select("'//' expected", yyBase);
          }
        } else {
          yyError = yyError.select("'//' expected", yyBase);
        }
        break;
      }

      yyRepeated2   = false;
      while (true) {

        yyResult = pn(yyRepetition2);
        yyError  = yyResult.select(yyError);
        if (yyResult.hasValue()) {

          yyRepetition2 = yyResult.index;
          yyRepeated2   = true;
          continue;
        }
View Full Code Here

   * @throws IOException Signals an I/O error.
   */
  private Result pSKIP_N(final int yyStart) throws IOException {
    int        yyC;
    int        yyIndex;
    Result     yyResult;
    int        yyRepetition1;
    int        yyRepetition2;
    boolean    yyRepeated2;
    Void       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyRepetition1 = yyStart;
    while (true) {

      final int yyChoice1 = yyRepetition1;

      // Nested alternative 1.

      yyRepetition2 = yyChoice1;
      yyRepeated2   = false;
      while (true) {

        final int yyChoice2 = yyRepetition2;

        // Nested alternative 1.

        yyC = character(yyChoice2);
        if (-1 != yyC) {
          yyIndex = yyChoice2 + 1;

          switch (yyC) {
          case ' ':
            {
              yyRepetition2 = yyIndex;
              yyRepeated2   = true;
              continue;
            }

          case '\f':
            {
              yyRepetition2 = yyIndex;
              yyRepeated2   = true;
              continue;
            }

          case '\t':
            {
              yyRepetition2 = yyIndex;
              yyRepeated2   = true;
              continue;
            }

          default:
            /* No match. */
          }
        }
        break;
      }

      if (yyRepeated2) {

        yyRepetition1 = yyRepetition2;
        continue;
      }

      // Nested alternative 2.

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

        yyRepetition1 = yyResult.index;
        continue;
      }

      // Nested alternative 3.

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

        yyRepetition1 = yyResult.index;
        continue;
      }

View Full Code Here

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

    // Alternative 1.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Done.
    return yyError;
  }
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.