]> arthur.barton.de Git - netatalk.git/blob - etc/spotlight/spotlight_rawquery_lexer.l
Fix an off by 8
[netatalk.git] / etc / spotlight / spotlight_rawquery_lexer.l
1 %top{
2 #ifdef HAVE_CONFIG_H
3 #include "config.h"
4 #endif /* HAVE_CONFIG_H */
5 }
6
7 %{
8 #include <stdbool.h>
9 #include <gio/gio.h>
10 #include <atalk/talloc.h>
11 #include <atalk/spotlight.h>
12 #include "slmod_sparql_parser.h"
13 %}
14
15 ASC     [a-zA-Z0-9_\*\:\-\.]
16 U       [\x80-\xbf]
17 U2      [\xc2-\xdf]
18 U3      [\xe0-\xef]
19 U4      [\xf0-\xf4]
20
21 UANY    {ASC}|{U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
22 UONLY   {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
23
24 %%
25 InRange                               return FUNC_INRANGE;
26 \$time\.iso                           return DATE_ISO;
27 false                                 {yylval.bval = false; return BOOL;}
28 true                                  {yylval.bval = true; return BOOL;}
29 \"                                    return QUOTE;
30 \(                                    return OBRACE;
31 \)                                    return CBRACE;
32 \&\&                                  return AND;
33 \|\|                                  return OR;
34 \=\=                                  return EQUAL;
35 \!\=                                  return UNEQUAL;
36 \<                                    return LT;
37 \>                                    return GT;
38 \,                                    return COMMA;
39 {UANY}+                               {yylval.sval = talloc_strdup(ssp_slq, yytext); return WORD;}
40 [ \t\n]                               /* ignore */
41 %%