]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/spotlight_rawquery_lexer.l
6ee3de527bfdb42e0cdf72f246a5a0eb68973e7a
[netatalk.git] / etc / afpd / spotlight_rawquery_lexer.l
1 %{
2 #include <string.h>
3 #include <stdbool.h>
4 #include <gio/gio.h>
5 #include <atalk/talloc.h>
6 #include "spotlight.h"
7 #include "spotlight_rawquery_parser.h"
8 %}
9
10 %%
11 InRange                               return FUNC_INRANGE;
12 \$time\.iso                           return DATE_ISO;
13 cwd                                   /* ignore case specifier */
14 cd                                    /* ignore */
15 false                                 {yylval.bval = false; return BOOL;}
16 true                                  {yylval.bval = true; return BOOL;}
17 [a-zA-Z0-9\*\:\-]+                    {yylval.sval = talloc_strdup(ssp_slq, yytext); return WORD;}
18 \"                                    return QUOTE;
19 \(                                    return OBRACE;
20 \)                                    return CBRACE;
21 \&\&                                  return AND;
22 \|\|                                  return OR;
23 \=\=                                  return EQUAL;
24 \!\=                                  return UNEQUAL;
25 \<                                    return LT;
26 \>                                    return GT;
27 \,                                    return COMMA;
28 [ \t\n]                               /* ignore */
29 %%