Move psql_state into sql-parser.h.
This commit is contained in:
1
exec.c
1
exec.c
@ -2,6 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "sql.tab.h"
|
||||
#include "sql-parser.h"
|
||||
|
||||
static const char *attr_names[] = {
|
||||
|
@ -1,8 +0,0 @@
|
||||
#ifndef __SQL_PARSER_STATE__
|
||||
#define __SQL_PARSER_STATE__
|
||||
|
||||
struct psql_state {
|
||||
yyscan_t scanner;
|
||||
};
|
||||
|
||||
#endif /* __SQL_PARSER_STATE__ */
|
@ -52,6 +52,10 @@ enum sqlp_date_intervals {
|
||||
SDI_HOUR_SECOND = 8,
|
||||
};
|
||||
|
||||
struct psql_state {
|
||||
yyscan_t scanner;
|
||||
};
|
||||
|
||||
extern void sqlp_alias(const char *alias);
|
||||
extern void sqlp_assign(const char *db_name, const char *name);
|
||||
extern void sqlp_assign_at(const char *name);
|
||||
|
2
sql.l
2
sql.l
@ -24,7 +24,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "sql.tab.h"
|
||||
#include "sql-parser-state.h"
|
||||
#include "sql-parser.h"
|
||||
|
||||
void yyerror(YYLTYPE *, struct psql_state *pstate, const char *s, ...);
|
||||
|
||||
|
Reference in New Issue
Block a user