Package xtc.parser

Examples of xtc.parser.ParseError


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

    // Alternative 1.

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


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

    // Alternative 1.

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

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

    // Alternative 1.

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

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

    // Alternative 1.

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

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

        yyOption1  = yyResult.index;
        yyOpValue1 = null;

        yyResult = pTypeArgs(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;

          yyOpValue1 = null;

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

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

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

    // Alternative 2.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 3.

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

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

      return yyResult.createValue(yyValue, yyError);
    }

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

    int        yyC;
    int        yyIndex;
    Result     yyResult;
    int        yyBase;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

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

      final int yyChoice1 = yyResult.index;

      // Nested alternative 1.

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

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

        return yyResult.createValue(yyValue, yyError);
      }

      // Nested alternative 2.

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

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

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

    // Alternative 2.

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

      yyBase = yyResult.index;
      yyC    = character(yyBase);
      if ('n' == yyC) {
        yyIndex = yyResult.index + 1;

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

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

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

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

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

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

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

   */
  private Result pErrorClassTemplateExpected(final int yyStart)
    throws IOException {

    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyValue = GNode.create("Error", "ClassTemplate expected");

View Full Code Here

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

    // Alternative 1.

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

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

    // Alternative 1.

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

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

    // Alternative 1.

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

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

        yyOption1  = yyResult.index;
        yyOpValue1 = null;

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

          yyOption2  = yyResult.index;

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

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

          yyOption1  = yyOption2;
          yyOpValue1 = v$el$1;
        }
        { // Start scope for v$g$1.
          Node v$g$1 = yyOpValue1;

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

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

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

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

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

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

    // Alternative 1.

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

      final int yyChoice1 = yyResult.index;

      // Nested alternative 1.

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

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

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

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

      // Nested alternative 2.

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

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

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

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

    // Done.
    yyError = yyError.select("block expr expected", yyStart);
    return 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.