Package org.antlr.runtime

Examples of org.antlr.runtime.MismatchedSetException


                input.consume();
                errorRecovery=false;failed=false;
            }
            else {
                if (backtracking>0) {failed=true; return ;}
                MismatchedSetException mse =
                    new MismatchedSetException(null,input);
                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_booleanLiteral0);    throw mse;
            }


            }
View Full Code Here


                      input.consume();
                      errorRecovery=false;failed=false;
                  }
                  else {
                      if (backtracking>0) {failed=true; return ;}
                      MismatchedSetException mse =
                          new MismatchedSetException(null,input);
                      recoverFromMismatchedSet(input,mse,FOLLOW_set_in_equalityExpression3387);    throw mse;
                  }

                  pushFollow(FOLLOW_instanceOfExpression_in_equalityExpression3395);
                  instanceOfExpression();
View Full Code Here

                      input.consume();
                      errorRecovery=false;failed=false;
                  }
                  else {
                      if (backtracking>0) {failed=true; return ;}
                      MismatchedSetException mse =
                          new MismatchedSetException(null,input);
                      recoverFromMismatchedSet(input,mse,FOLLOW_set_in_additiveExpression3560);    throw mse;
                  }

                  pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression3568);
                  multiplicativeExpression();
View Full Code Here

                      input.consume();
                      errorRecovery=false;failed=false;
                  }
                  else {
                      if (backtracking>0) {failed=true; return ;}
                      MismatchedSetException mse =
                          new MismatchedSetException(null,input);
                      recoverFromMismatchedSet(input,mse,FOLLOW_set_in_multiplicativeExpression3591);    throw mse;
                  }

                  pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression3605);
                  unaryExpression();
View Full Code Here

                                input.consume();
                                errorRecovery=false;failed=false;
                            }
                            else {
                                if (backtracking>0) {failed=true; return ;}
                                MismatchedSetException mse =
                                    new MismatchedSetException(null,input);
                                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_unaryExpressionNotPlusMinus3728);    throw mse;
                            }


                            }
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"
                // using whatever your override of displayRecognitionError() routine does to record
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

    else if ( e instanceof MismatchedNotSetException ) {
      MismatchedNotSetException mse = (MismatchedNotSetException)e;
      msg = "mismatched character "+lexer.getCharErrorDisplay(e.c)+" expecting set "+mse.expecting;
    }
    else if ( e instanceof MismatchedSetException ) {
      MismatchedSetException mse = (MismatchedSetException)e;
      msg = "mismatched character "+lexer.getCharErrorDisplay(e.c)+" expecting set "+mse.expecting;
    }
    else if ( e instanceof MismatchedRangeException ) {
      MismatchedRangeException mre = (MismatchedRangeException)e;
      msg = "mismatched character "+lexer.getCharErrorDisplay(e.c)+" expecting set "+
View Full Code Here

      // for development, can add "(decision="+eee.decisionNumber+")"
      msg = "required (...)+ loop did not match anything at input "+
      parser.getTokenErrorDisplay(e.token);
    }
    else if ( e instanceof MismatchedSetException ) {
      MismatchedSetException mse = (MismatchedSetException)e;
      msg = "mismatched input "+parser.getTokenErrorDisplay(e.token)+
        " expecting set "+mse.expecting;
    }
    else if ( e instanceof MismatchedNotSetException ) {
      MismatchedNotSetException mse = (MismatchedNotSetException)e;
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.