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() );
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(
DroolsParserExceptionFactory.MISMATCHED_SET_MESSAGE,
e.line,
e.charPositionInLine,
getBetterToken( e.token ),