#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int yyleng;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t yyleng;
extern FILE *yyin, *yyout;
#define unput(c) yyunput( c, (yytext_ptr) )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int yyleng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
void *yyalloc (yy_size_t );
void *yyrealloc (void *,yy_size_t );
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[48] =
+static yyconst flex_int16_t yy_accept[57] =
{ 0,
- 0, 0, 18, 17, 16, 17, 6, 17, 17, 7,
- 8, 5, 15, 13, 17, 14, 5, 5, 5, 17,
- 12, 0, 9, 5, 11, 5, 5, 5, 10, 0,
- 5, 5, 5, 0, 5, 5, 4, 0, 5, 3,
- 0, 5, 0, 1, 0, 2, 0
+ 0, 0, 18, 17, 16, 17, 5, 17, 17, 6,
+ 7, 15, 14, 12, 17, 13, 15, 15, 15, 17,
+ 17, 17, 17, 11, 0, 8, 15, 0, 0, 0,
+ 10, 15, 15, 15, 9, 0, 0, 0, 15, 15,
+ 15, 0, 0, 15, 15, 4, 0, 15, 3, 0,
+ 15, 0, 1, 0, 2, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
18, 19, 20, 9, 21, 9, 9, 22, 23, 24,
25, 9, 9, 26, 27, 28, 29, 9, 9, 9,
- 9, 9, 1, 30, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 9, 9, 1, 30, 1, 1, 1, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 1, 1, 32, 32, 32, 32, 32, 32, 32,
+
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 34,
+ 34, 34, 34, 34, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[31] =
+static yyconst flex_int32_t yy_meta[35] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
2, 1, 1, 1, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
+ 1, 2, 2, 2
} ;
-static yyconst flex_int16_t yy_base[49] =
+static yyconst flex_int16_t yy_base[58] =
{ 0,
- 0, 0, 57, 58, 58, 43, 58, 27, 48, 58,
- 58, 0, 58, 58, 40, 58, 28, 34, 24, 19,
- 58, 27, 58, 0, 58, 31, 24, 16, 58, 21,
- 26, 15, 23, 22, 15, 20, 0, 26, 16, 0,
- 14, 16, 6, 0, 7, 58, 58, 29
+ 0, 0, 91, 92, 92, 77, 92, 61, 82, 92,
+ 92, 3, 92, 92, 74, 92, 14, 25, 15, 56,
+ 54, 53, 52, 92, 61, 92, 57, 49, 48, 47,
+ 92, 27, 28, 16, 92, 46, 45, 52, 36, 30,
+ 37, 43, 55, 48, 38, 47, 59, 39, 45, 47,
+ 40, 40, 42, 40, 92, 92, 42
} ;
-static yyconst flex_int16_t yy_def[49] =
+static yyconst flex_int16_t yy_def[58] =
{ 0,
- 47, 1, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 48, 47, 47, 47, 47, 48, 48, 48, 47,
- 47, 47, 47, 48, 47, 48, 48, 48, 47, 47,
- 48, 48, 48, 47, 48, 48, 48, 47, 48, 48,
- 47, 48, 47, 48, 47, 47, 0, 47
+ 56, 1, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 57, 56, 56, 56, 56, 57, 17, 17, 56,
+ 56, 56, 56, 56, 56, 56, 17, 56, 56, 56,
+ 56, 17, 17, 17, 56, 56, 56, 56, 17, 17,
+ 17, 56, 56, 17, 17, 17, 56, 17, 17, 56,
+ 17, 56, 17, 56, 56, 0, 56
} ;
-static yyconst flex_int16_t yy_nxt[89] =
+static yyconst flex_int16_t yy_nxt[127] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
12, 14, 15, 16, 17, 12, 12, 12, 18, 12,
12, 12, 12, 12, 12, 12, 12, 19, 12, 20,
- 24, 46, 45, 44, 43, 42, 41, 40, 39, 38,
- 37, 36, 35, 34, 33, 32, 31, 30, 29, 28,
- 27, 26, 25, 23, 22, 21, 47, 3, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47
+ 4, 21, 22, 23, 28, 29, 30, 32, 27, 27,
+ 34, 33, 39, 27, 41, 28, 29, 30, 27, 40,
+ 27, 27, 44, 27, 46, 49, 45, 53, 51, 27,
+ 27, 27, 27, 27, 55, 27, 54, 52, 27, 50,
+ 27, 48, 47, 27, 43, 42, 27, 37, 36, 27,
+ 27, 38, 37, 36, 27, 35, 31, 26, 25, 24,
+ 56, 3, 56, 56, 56, 56, 56, 56, 56, 56,
+
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56
} ;
-static yyconst flex_int16_t yy_chk[89] =
+static yyconst flex_int16_t yy_chk[127] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 48, 45, 43, 42, 41, 39, 38, 36, 35, 34,
- 33, 32, 31, 30, 28, 27, 26, 22, 20, 19,
- 18, 17, 15, 9, 8, 6, 3, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47
+ 1, 1, 1, 1, 12, 12, 12, 17, 19, 34,
+ 19, 18, 32, 57, 34, 17, 17, 17, 18, 33,
+ 32, 33, 39, 40, 41, 45, 40, 51, 48, 39,
+ 41, 45, 48, 51, 54, 53, 52, 50, 49, 47,
+ 46, 44, 43, 42, 38, 37, 36, 30, 29, 28,
+ 27, 25, 23, 22, 21, 20, 15, 9, 8, 6,
+ 3, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56
} ;
static yy_state_type yy_last_accepting_state;
#include <gio/gio.h>
#include <atalk/talloc.h>
#include <atalk/spotlight.h>
-#include "slmod_sparql_parser.h"
-#line 492 "spotlight_rawquery_lexer.c"
+#ifdef HAVE_TRACKER
+#include "sparql_parser.h"
+#define SLQ_VAR ssp_slq
+#endif
+#line 510 "spotlight_rawquery_lexer.c"
#define INITIAL 0
void yyset_out (FILE * out_str );
-int yyget_leng (void );
+yy_size_t yyget_leng (void );
char *yyget_text (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 15 "spotlight_rawquery_lexer.l"
+#line 27 "spotlight_rawquery_lexer.l"
-#line 676 "spotlight_rawquery_lexer.c"
+#line 694 "spotlight_rawquery_lexer.c"
if ( !(yy_init) )
{
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 48 )
+ if ( yy_current_state >= 57 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 58 );
+ while ( yy_base[yy_current_state] != 92 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
case 1:
YY_RULE_SETUP
-#line 16 "spotlight_rawquery_lexer.l"
+#line 28 "spotlight_rawquery_lexer.l"
return FUNC_INRANGE;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 17 "spotlight_rawquery_lexer.l"
+#line 29 "spotlight_rawquery_lexer.l"
return DATE_ISO;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 18 "spotlight_rawquery_lexer.l"
+#line 30 "spotlight_rawquery_lexer.l"
{yylval.bval = false; return BOOL;}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 19 "spotlight_rawquery_lexer.l"
+#line 31 "spotlight_rawquery_lexer.l"
{yylval.bval = true; return BOOL;}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 20 "spotlight_rawquery_lexer.l"
-{yylval.sval = talloc_strdup(ssp_slq, yytext); return WORD;}
+#line 32 "spotlight_rawquery_lexer.l"
+return QUOTE;
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 21 "spotlight_rawquery_lexer.l"
-return QUOTE;
+#line 33 "spotlight_rawquery_lexer.l"
+return OBRACE;
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 22 "spotlight_rawquery_lexer.l"
-return OBRACE;
+#line 34 "spotlight_rawquery_lexer.l"
+return CBRACE;
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 23 "spotlight_rawquery_lexer.l"
-return CBRACE;
+#line 35 "spotlight_rawquery_lexer.l"
+return AND;
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 24 "spotlight_rawquery_lexer.l"
-return AND;
+#line 36 "spotlight_rawquery_lexer.l"
+return OR;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 25 "spotlight_rawquery_lexer.l"
-return OR;
+#line 37 "spotlight_rawquery_lexer.l"
+return EQUAL;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 26 "spotlight_rawquery_lexer.l"
-return EQUAL;
+#line 38 "spotlight_rawquery_lexer.l"
+return UNEQUAL;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 27 "spotlight_rawquery_lexer.l"
-return UNEQUAL;
+#line 39 "spotlight_rawquery_lexer.l"
+return LT;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 28 "spotlight_rawquery_lexer.l"
-return LT;
+#line 40 "spotlight_rawquery_lexer.l"
+return GT;
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 29 "spotlight_rawquery_lexer.l"
-return GT;
+#line 41 "spotlight_rawquery_lexer.l"
+return COMMA;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 30 "spotlight_rawquery_lexer.l"
-return COMMA;
+#line 42 "spotlight_rawquery_lexer.l"
+{yylval.sval = talloc_strdup(SLQ_VAR, yytext); return WORD;}
YY_BREAK
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
-#line 31 "spotlight_rawquery_lexer.l"
+#line 43 "spotlight_rawquery_lexer.l"
/* ignore */
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 32 "spotlight_rawquery_lexer.l"
+#line 44 "spotlight_rawquery_lexer.l"
ECHO;
YY_BREAK
-#line 845 "spotlight_rawquery_lexer.c"
+#line 863 "spotlight_rawquery_lexer.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
+ (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 48 )
+ if ( yy_current_state >= 57 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 48 )
+ if ( yy_current_state >= 57 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 47);
+ yy_is_jam = (yy_current_state == 56);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
static void yyunput (int c, register char * yy_bp )
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = (yy_n_chars) + 2;
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
yyfree((void *) b );
}
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
*/
static void yyensure_buffer_stack (void)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
/** Get the length of the current token.
*
*/
-int yyget_leng (void)
+yy_size_t yyget_leng (void)
{
return yyleng;
}
#define YYTABLES_NAME "yytables"
-#line 32 "spotlight_rawquery_lexer.l"
+#line 44 "spotlight_rawquery_lexer.l"