in stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterParser.java [547:671]
public final void where() throws RecognitionException {
QueryFilterParser.property_return property8 = null;
QueryFilterParser.operator_return operator9 = null;
QueryFilterParser.value_return value10 = null;
QueryFilterParser.second_value_return second_value11 = null;
QueryFilterParser.third_value_return third_value12 = null;
try {
// org/usergrid/persistence/query/QueryFilter.g:149:2: ( ( property operator value ( ( ',
// ' | 'of' ) second_value ( ',' third_value )? )? ) )
// org/usergrid/persistence/query/QueryFilter.g:149:4: ( property operator value ( ( ',
// ' | 'of' ) second_value ( ',' third_value )? )? )
{
// org/usergrid/persistence/query/QueryFilter.g:149:4: ( property operator value ( ( ',
// ' | 'of' ) second_value ( ',' third_value )? )? )
// org/usergrid/persistence/query/QueryFilter.g:149:5: property operator value ( ( ',
// ' | 'of' ) second_value ( ',' third_value )? )?
{
pushFollow( FOLLOW_property_in_where855 );
property8 = property();
state._fsp--;
pushFollow( FOLLOW_operator_in_where857 );
operator9 = operator();
state._fsp--;
pushFollow( FOLLOW_value_in_where859 );
value10 = value();
state._fsp--;
// org/usergrid/persistence/query/QueryFilter.g:149:29: ( ( ',' | 'of' ) second_value ( ',
// ' third_value )? )?
int alt4 = 2;
int LA4_0 = input.LA( 1 );
if ( ( ( LA4_0 >= 29 && LA4_0 <= 30 ) ) ) {
alt4 = 1;
}
switch ( alt4 ) {
case 1:
// org/usergrid/persistence/query/QueryFilter.g:149:30: ( ',' | 'of' ) second_value ( ',
// ' third_value )?
{
if ( ( input.LA( 1 ) >= 29 && input.LA( 1 ) <= 30 ) ) {
input.consume();
state.errorRecovery = false;
}
else {
MismatchedSetException mse = new MismatchedSetException( null, input );
throw mse;
}
pushFollow( FOLLOW_second_value_in_where870 );
second_value11 = second_value();
state._fsp--;
// org/usergrid/persistence/query/QueryFilter.g:149:56: ( ',' third_value )?
int alt3 = 2;
int LA3_0 = input.LA( 1 );
if ( ( LA3_0 == 29 ) ) {
alt3 = 1;
}
switch ( alt3 ) {
case 1:
// org/usergrid/persistence/query/QueryFilter.g:149:58: ',' third_value
{
match( input, 29, FOLLOW_29_in_where874 );
pushFollow( FOLLOW_third_value_in_where876 );
third_value12 = third_value();
state._fsp--;
}
break;
}
}
break;
}
String property = ( property8 != null ? input.toString( property8.start, property8.stop ) : null );
String operator = ( operator9 != null ? input.toString( operator9.start, operator9.stop ) : null );
String value = ( value10 != null ? input.toString( value10.start, value10.stop ) : null );
int value_type = ( value10 != null ? ( ( Token ) value10.start ) : null ) != null ?
( value10 != null ? ( ( Token ) value10.start ) : null ).getType() : 0;
String second_value =
( second_value11 != null ? input.toString( second_value11.start, second_value11.stop ) :
null );
int second_value_type =
( second_value11 != null ? ( ( Token ) second_value11.start ) : null ) != null ?
( second_value11 != null ? ( ( Token ) second_value11.start ) : null ).getType() : 0;
String third_value =
( third_value12 != null ? input.toString( third_value12.start, third_value12.stop ) :
null );
int third_value_type =
( third_value12 != null ? ( ( Token ) third_value12.start ) : null ) != null ?
( third_value12 != null ? ( ( Token ) third_value12.start ) : null ).getType() : 0;
FilterPredicate filter =
new FilterPredicate( property, operator, value, value_type, second_value, second_value_type,
third_value, third_value_type );
query.addFilter( filter );
//System.out.println("Parsed query filter: " + property + " " + operator + " " + value + " " +
// second_value);
}
}
}
catch ( RecognitionException re ) {
reportError( re );
recover( input, re );
}
finally {
}
return;
}