diff --git a/src/frontend/scanner.l b/src/frontend/scanner.l
index cd7ea8513109fd266437b10dfaf5a2428b55aec3..f300e46d73160d906f841dd3c421f125d3a93fcc 100644 (file)
--- a/src/frontend/scanner.l
+++ b/src/frontend/scanner.l
%{
%{
+#include "frontend/connection.h"
#include "frontend/parser.h"
#include "frontend/grammar.h"
#include "utils/error.h"
#include "frontend/parser.h"
#include "frontend/grammar.h"
#include "utils/error.h"
#include <string.h>
#include <string.h>
+#define YY_EXTRA_TYPE sdb_fe_yyextra_t *
+
void
sdb_fe_yyerror(YYLTYPE *lval, sdb_fe_yyscan_t scanner, const char *msg);
void
sdb_fe_yyerror(YYLTYPE *lval, sdb_fe_yyscan_t scanner, const char *msg);
%%
sdb_fe_yyscan_t
%%
sdb_fe_yyscan_t
-sdb_fe_scanner_init(const char *str)
+sdb_fe_scanner_init(const char *str, sdb_fe_yyextra_t *yyext)
{
yyscan_t scanner;
{
yyscan_t scanner;
return NULL;
}
return NULL;
}
+ sdb_fe_yyset_extra(yyext, scanner);
+
/* the newly allocated buffer state (YY_BUFFER_STATE) is stored inside the
* scanner and, thus, will be freed by yylex_destroy */
yy_scan_string(str, scanner);
/* the newly allocated buffer state (YY_BUFFER_STATE) is stored inside the
* scanner and, thus, will be freed by yylex_destroy */
yy_scan_string(str, scanner);