Package org.antlr.runtime

Examples of org.antlr.runtime.MismatchedSetException


          e.charPositionInLine, 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(
          DroolsParserExceptionFactory.MISMATCHED_SET_MESSAGE,
          e.line, e.charPositionInLine, getBetterToken(e.token),
          expected, formatParserLocation());
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)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFF') ) {
                              input.consume();

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


                          }
                          break;

                      default :
                          break loop7;
                        }
                    } while (true);

                    match('\"');

                    }
                    break;
                case 2 :
                    // src\\main\\antlr\\XPathEnhancer.g:337:5: '\\'' (~ '\\'' )* '\\''
                    {
                    match('\'');
                    // src\\main\\antlr\\XPathEnhancer.g:337:10: (~ '\\'' )*
                    loop8:
                    do {
                        int alt8=2;
                        int LA8_0 = input.LA(1);

                        if ( ((LA8_0>='\u0000' && LA8_0<='&')||(LA8_0>='(' && LA8_0<='\uFFFF')) ) {
                            alt8=1;
                        }


                        switch (alt8) {
                      case 1 :
                          // src\\main\\antlr\\XPathEnhancer.g:337:10: ~ '\\''
                          {
                          if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='\uFFFF') ) {
                              input.consume();

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


                          }
View Full Code Here

                  if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
                      input.consume();

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


                  }
View Full Code Here

                  if ( (input.LA(1)>=PATHSEP && input.LA(1)<=ABRPATH) ) {
                      input.consume();
                      state.errorRecovery=false;
                  }
                  else {
                      MismatchedSetException mse = new MismatchedSetException(null,input);
                      throw mse;
                  }

                  pushFollow(FOLLOW_step_in_relativeLocationPath597);
                  step();
View Full Code Here

            if ( input.LA(1)==DOT||input.LA(1)==DOTDOT ) {
                input.consume();
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }
View Full Code Here

                  if ( (input.LA(1)>=40 && input.LA(1)<=41) ) {
                      input.consume();
                      state.errorRecovery=false;
                  }
                  else {
                      MismatchedSetException mse = new MismatchedSetException(null,input);
                      throw mse;
                  }

                  pushFollow(FOLLOW_relationalExpr_in_equalityExpr992);
                  relationalExpr();
View Full Code Here

                  if ( (input.LA(1)>=LESS && input.LA(1)<=GE) ) {
                      input.consume();
                      state.errorRecovery=false;
                  }
                  else {
                      MismatchedSetException mse = new MismatchedSetException(null,input);
                      throw mse;
                  }

                  pushFollow(FOLLOW_additiveExpr_in_relationalExpr1072);
                  additiveExpr();
View Full Code Here

                  if ( (input.LA(1)>=MINUS && input.LA(1)<=PLUS) ) {
                      input.consume();
                      state.errorRecovery=false;
                  }
                  else {
                      MismatchedSetException mse = new MismatchedSetException(null,input);
                      throw mse;
                  }

                  pushFollow(FOLLOW_multiplicativeExpr_in_additiveExpr1132);
                  multiplicativeExpr();
View Full Code Here

                            if ( input.LA(1)==MUL||(input.LA(1)>=42 && input.LA(1)<=43) ) {
                                input.consume();
                                state.errorRecovery=false;
                            }
                            else {
                                MismatchedSetException mse = new MismatchedSetException(null,input);
                                throw mse;
                            }

                            pushFollow(FOLLOW_multiplicativeExpr_in_multiplicativeExpr1202);
                            multiplicativeExpr();

                            state._fsp--;


                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // src\\main\\antlr\\XPathEnhancer.g:254:5: '/' ( ( 'div' | 'mod' ) multiplicativeExpr )?
                    {
                    match(input,PATHSEP,FOLLOW_PATHSEP_in_multiplicativeExpr1213);
                    // src\\main\\antlr\\XPathEnhancer.g:255:3: ( ( 'div' | 'mod' ) multiplicativeExpr )?
                    int alt23=2;
                    int LA23_0 = input.LA(1);

                    if ( ((LA23_0>=42 && LA23_0<=43)) ) {
                        alt23=1;
                    }
                    switch (alt23) {
                        case 1 :
                            // src\\main\\antlr\\XPathEnhancer.g:256:5: ( 'div' | 'mod' ) multiplicativeExpr
                            {
                            if ( (input.LA(1)>=42 && input.LA(1)<=43) ) {
                                input.consume();
                                state.errorRecovery=false;
                            }
                            else {
                                MismatchedSetException mse = new MismatchedSetException(null,input);
                                throw mse;
                            }

                            pushFollow(FOLLOW_multiplicativeExpr_in_multiplicativeExpr1253);
                            multiplicativeExpr();
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.