Package org.antlr.runtime

Examples of org.antlr.runtime.MismatchedSetException


        else if ( e instanceof org.antlr.runtime.MismatchedNotSetException ) {
          MismatchedNotSetException  mnse = (MismatchedNotSetException) e;
            return Messages.getString("Metrics.Calculate.Error.Antlr.mismatchedCharacter")+getCharErrorDisplay(e.c, tokens,processor)+Messages.getString("Metrics.Calculate.Error.Antlr.ExpectingSet")+mnse.expecting; //$NON-NLS-1$ //$NON-NLS-2$
        }
        else if ( e instanceof org.antlr.runtime.MismatchedSetException ) {
          MismatchedSetException mmse = (MismatchedSetException) e;
            return Messages.getString("Metrics.Calculate.Error.Antlr.mismatchedCharacter")+getCharErrorDisplay(e.c, tokens,processor)+Messages.getString("Metrics.Calculate.Error.Antlr.ExpectingSet")+mmse.expecting; //$NON-NLS-1$ //$NON-NLS-2$
        }
        else if ( e instanceof org.antlr.runtime.MismatchedRangeException ) {
          MismatchedRangeException mre = (MismatchedRangeException) e;
            return Messages.getString("Metrics.Calculate.Error.Antlr.mismatchedCharacter")+getCharErrorDisplay(e.c, tokens,processor)+Messages.getString("Metrics.Calculate.Error.Antlr.ExpectingSet")+ //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here


                    //
                    input.rewind();
                    mark = -1;
                    return;
                }
                reportError( new MismatchedSetException( follow,
                                                         input ) );
                input.consume();

                // Now here, because you are consuming some tokens, yu will probably want
                // to raise an error message such as "Spurious elements after the class member were discarded"
View Full Code Here

                     || (input.LA(1) >= 'A' && input.LA(1) <= 'Z')
                     || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) {
               input.consume();

            } else {
               MismatchedSetException mse = new MismatchedSetException(null, input);
               recover(mse);
               throw mse;
            }

            // D:\\gwt-test-utils\\gwt-test-utils-csv\\src\\main\\resources\\com\\googlecode\\gwt\\test\\csv\\runner\\XPath.g:74:43:
            // ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | ' ' ) )*
            loop1 : do {
               int alt1 = 2;
               int LA1_0 = input.LA(1);

               if ((LA1_0 == ' ' || (LA1_0 >= '0' && LA1_0 <= '9')
                        || (LA1_0 >= 'A' && LA1_0 <= 'Z') || LA1_0 == '_' || (LA1_0 >= 'a' && LA1_0 <= 'z'))) {
                  alt1 = 1;
               }

               switch (alt1) {
                  case 1:
                  // D:\\gwt-test-utils\\gwt-test-utils-csv\\src\\main\\resources\\com\\googlecode\\gwt\\test\\csv\\runner\\XPath.g:74:44:
                  // ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | ' ' )
                  {
                     if (input.LA(1) == ' ' || (input.LA(1) >= '0' && input.LA(1) <= '9')
                              || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_'
                              || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) {
                        input.consume();

                     } else {
                        MismatchedSetException mse = new MismatchedSetException(null, input);
                        recover(mse);
                        throw mse;
                     }

                  }
View Full Code Here

                     || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || input.LA(1) == '\u00E0'
                     || (input.LA(1) >= '\u00E8' && input.LA(1) <= '\u00EA')) {
               input.consume();

            } else {
               MismatchedSetException mse = new MismatchedSetException(null, input);
               recover(mse);
               throw mse;
            }

            // D:\\gwt-test-utils\\gwt-test-utils-csv\\src\\main\\resources\\com\\googlecode\\gwt\\test\\csv\\runner\\XPath.g:75:93:
            // ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '\\u00E0' | '\\u00E8'
            // |
            // '\\u00E9' | '\\u00EA' | '.' | '?' | '-' | ' ' | '_' ) )*
            loop2 : do {
               int alt2 = 2;
               int LA2_0 = input.LA(1);

               if ((LA2_0 == ' ' || (LA2_0 >= '-' && LA2_0 <= '.')
                        || (LA2_0 >= '0' && LA2_0 <= '9') || LA2_0 == '?'
                        || (LA2_0 >= 'A' && LA2_0 <= 'Z') || LA2_0 == '_'
                        || (LA2_0 >= 'a' && LA2_0 <= 'z') || LA2_0 == '\u00E0' || (LA2_0 >= '\u00E8' && LA2_0 <= '\u00EA'))) {
                  alt2 = 1;
               }

               switch (alt2) {
                  case 1:
                  // D:\\gwt-test-utils\\gwt-test-utils-csv\\src\\main\\resources\\com\\googlecode\\gwt\\test\\csv\\runner\\XPath.g:75:94:
                  // ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '\\u00E0' |
                  // '\\u00E8'
                  // | '\\u00E9' | '\\u00EA' | '.' | '?' | '-' | ' ' | '_' )
                  {
                     if (input.LA(1) == ' ' || (input.LA(1) >= '-' && input.LA(1) <= '.')
                              || (input.LA(1) >= '0' && input.LA(1) <= '9') || input.LA(1) == '?'
                              || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_'
                              || (input.LA(1) >= 'a' && input.LA(1) <= 'z')
                              || input.LA(1) == '\u00E0'
                              || (input.LA(1) >= '\u00E8' && input.LA(1) <= '\u00EA')) {
                        input.consume();

                     } else {
                        MismatchedSetException mse = new MismatchedSetException(null, input);
                        recover(mse);
                        throw mse;
                     }

                  }
View Full Code Here

            if (input.LA(1) == LABEL || input.LA(1) == VALUE) {
               input.consume();
               adaptor.addChild(root_0, adaptor.create(set17));
               state.errorRecovery = false;
            } else {
               MismatchedSetException mse = new MismatchedSetException(null, input);
               throw mse;
            }

         }
View Full Code Here

          e.charPositionInLine, getBetterToken(e.token),
          formatParserLocation());
      codeAndMessage.add(message);
      codeAndMessage.add("ERR 104");
    } else if (e instanceof MismatchedSetException) {
      MismatchedSetException mse = (MismatchedSetException) e;
      message = String.format(
          DroolsParserExceptionFactory.MISMATCHED_SET_MESSAGE,
          e.line, e.charPositionInLine, getBetterToken(e.token),
          mse.expecting, formatParserLocation());
      codeAndMessage.add(message);
View Full Code Here

                    //
                    input.rewind();
                    mark = -1;
                    return;
                }
                reportError( new MismatchedSetException( follow,
                                                         input ) );
                input.consume();

                // Now here, because you are consuming some tokens, yu will probably want
                // to raise an error message such as "Spurious elements after the class member were discarded"
View Full Code Here

                    //
                    input.rewind();
                    mark = -1;
                    return;
                }
                reportError( new MismatchedSetException( follow,
                                                         input ) );
                input.consume();

                // Now here, because you are consuming some tokens, yu will probably want
                // to raise an error message such as "Spurious elements after the class member were discarded"
View Full Code Here

                                     getBetterToken( e.token ),
                                     formatParserLocation() );
            codeAndMessage.add( message );
            codeAndMessage.add( "ERR 105" );
        } else if ( e instanceof MismatchedSetException ) {
            MismatchedSetException mse = (MismatchedSetException) e;
            String expected = expectedTokensAsString( mse.expecting );
            message = String.format(
                                     MISMATCHED_SET_MESSAGE,
                                     e.line,
                                     e.charPositionInLine,
                                     getBetterToken( e.token ),
                                     expected,
                                     formatParserLocation() );
            codeAndMessage.add( message );
            codeAndMessage.add( "ERR 107" );
        } else if ( e instanceof DroolsMismatchedSetException ) {
            DroolsMismatchedSetException mse = (DroolsMismatchedSetException) e;
            String expected = Arrays.asList( mse.getTokenText() ).toString();
            message = String.format(
                                     MISMATCHED_SET_MESSAGE,
                                     e.line,
                                     e.charPositionInLine,
                                     getBetterToken( e.token ),
View Full Code Here

          e.charPositionInLine, getBetterToken(e.token),
          formatParserLocation());
      codeAndMessage.add(message);
      codeAndMessage.add("ERR 105");
    } else if (e instanceof MismatchedSetException) {
      MismatchedSetException mse = (MismatchedSetException) e;
      message = String.format(
          DroolsParserExceptionFactory.MISMATCHED_SET_MESSAGE,
          e.line, e.charPositionInLine, getBetterToken(e.token),
          mse.expecting, formatParserLocation());
      codeAndMessage.add(message);
View Full Code Here

TOP

Related Classes of org.antlr.runtime.MismatchedSetException

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.