Package org.antlr.runtime

Examples of org.antlr.runtime.MismatchedSetException


                    //
                    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

                    //
                    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

                    adaptor.create(set10),
                    root_0);
                state.errorRecovery = false;
              }
              else {
                final MismatchedSetException mse = new MismatchedSetException(
                    null,
                    input);
                throw mse;
              }
              pushFollow(FOLLOW_relationalExpression_in_equalityExpression160);
View Full Code Here

                    adaptor.create(set13),
                    root_0);
                state.errorRecovery = false;
              }
              else {
                final MismatchedSetException mse = new MismatchedSetException(
                    null,
                    input);
                throw mse;
              }
              pushFollow(FOLLOW_additiveExpression_in_relationalExpression215);
View Full Code Here

                    adaptor.create(set16),
                    root_0);
                state.errorRecovery = false;
              }
              else {
                final MismatchedSetException mse = new MismatchedSetException(
                    null,
                    input);
                throw mse;
              }
              pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression269);
View Full Code Here

                    adaptor.create(set19),
                    root_0);
                state.errorRecovery = false;
              }
              else {
                final MismatchedSetException mse = new MismatchedSetException(
                    null,
                    input);
                throw mse;
              }
              pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression312);
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

                    //
                    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

         {
            if ((input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'F') || (input.LA(1) >= 'a' && input.LA(1) <= 'f')) {
               input.consume();

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

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.