diff --git a/src/frontend/scanner.l b/src/frontend/scanner.l
index 948b6badf155e848c5182ad1ca38f8004a49eb3f..c0d167c00c0df1da371d8762098acd57c7ce5abc 100644 (file)
--- a/src/frontend/scanner.l
+++ b/src/frontend/scanner.l
%{
%{
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
#include "frontend/connection.h"
#include "frontend/parser.h"
#include "frontend/grammar.h"
#include "frontend/connection.h"
#include "frontend/parser.h"
#include "frontend/grammar.h"
csc_end \*\/
identifier ([A-Za-z_][A-Za-z_0-9$]*)
csc_end \*\/
identifier ([A-Za-z_][A-Za-z_0-9$]*)
+/* TODO: fully support SQL strings */
+string ('[^']*')
%%
%%
/* XXX */
if (! strcasecmp(yytext, "LIST"))
return LIST;
/* XXX */
if (! strcasecmp(yytext, "LIST"))
return LIST;
+ else if (! strcasecmp(yytext, "FETCH"))
+ return FETCH;
+ yylval->str = strdup(yytext);
return IDENTIFIER;
}
return IDENTIFIER;
}
+{string} {
+ yytext[yyleng - 1] = '\0';
+ yylval->str = strdup(yytext + 1);
+ return STRING;
+ }
. { /* do nothing for now */ }
. { /* do nothing for now */ }