]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/spotlight_rawquery_lexer.l
Better parsing
[netatalk.git] / etc / afpd / spotlight_rawquery_lexer.l
index 66f27d4c92c21233c7ae311e303303d3127999f6..b3b4bce2729e3842a1efc643a92ddb22b3956c57 100644 (file)
@@ -1,5 +1,6 @@
 %{
 #include <string.h>
+#include <stdbool.h>
 #include <gio/gio.h>
 #include <atalk/talloc.h>
 #include "spotlight.h"
@@ -11,13 +12,19 @@ InRange                               return FUNC_INRANGE;
 \$time\.iso                           return DATE_SPEC;
 ....-..-..T..:..:..Z                  {yylval.sval = talloc_strdup(ssp_slq, yytext); return DATE;}
 cwd                                   /* ignore case specifier */
-[a-zA-Z\*]+                           {yylval.sval = talloc_strdup(ssp_slq, yytext); return WORD;}
+cd                                    /* ignore */
+false                                 {yylval.bval = false; return BOOL;}
+true                                  {yylval.bval = true; return BOOL;}
+[a-zA-Z0-9\*]+                        {yylval.sval = talloc_strdup(ssp_slq, yytext); return WORD;}
 \"                                    return QUOTE;
 \(                                    return OBRACE;
 \)                                    return CBRACE;
 \&\&                                  return AND;
 \|\|                                  return OR;
 \=\=                                  return EQUAL;
+!\=                                   return UNEQUAL;
+\<                                    return LT;
+\>                                    return GT;
 \,                                    return COMMA;
 [ \t\n]                               /* ignore */
 %%