summaryrefslogtreecommitdiff
path: root/src/bin/pgbench/exprscan.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pgbench/exprscan.l')
-rw-r--r--src/bin/pgbench/exprscan.l12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/bin/pgbench/exprscan.l b/src/bin/pgbench/exprscan.l
index 4f63818606..fe8e32838a 100644
--- a/src/bin/pgbench/exprscan.l
+++ b/src/bin/pgbench/exprscan.l
@@ -1,4 +1,4 @@
-%{
+%top{
/*-------------------------------------------------------------------------
*
* exprscan.l
@@ -22,9 +22,19 @@
*
*-------------------------------------------------------------------------
*/
+#include "postgres_fe.h"
+/*
+ * NB: include exprparse.h only AFTER including pgbench.h, because pgbench.h
+ * contains definitions needed for YYSTYPE. Likewise, pgbench.h must come after
+ * psqlscan_int.h for yyscan_t.
+ */
#include "fe_utils/psqlscan_int.h"
+#include "pgbench.h"
+#include "exprparse.h"
+}
+%{
/* context information for reporting errors in expressions */
static const char *expr_source = NULL;
static int expr_lineno = 0;