]> arthur.barton.de Git - netatalk.git/blobdiff - etc/spotlight/spotlight_rawquery_lexer.l
Move and rename Spotlight module
[netatalk.git] / etc / spotlight / spotlight_rawquery_lexer.l
diff --git a/etc/spotlight/spotlight_rawquery_lexer.l b/etc/spotlight/spotlight_rawquery_lexer.l
new file mode 100644 (file)
index 0000000..bbfcad5
--- /dev/null
@@ -0,0 +1,32 @@
+%top{
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+}
+
+%{
+#include <stdbool.h>
+#include <gio/gio.h>
+#include <atalk/talloc.h>
+#include <atalk/spotlight.h>
+#include "slmod_sparql_parser.h"
+%}
+
+%%
+InRange                               return FUNC_INRANGE;
+\$time\.iso                           return DATE_ISO;
+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 */
+%%