diff options
| author | John Naylor <john.naylor@postgresql.org> | 2022-09-04 11:33:31 +0700 |
|---|---|---|
| committer | John Naylor <john.naylor@postgresql.org> | 2022-09-04 12:09:01 +0700 |
| commit | dac048f71ebbcf2f980d280711f8ff8001331c5d (patch) | |
| tree | 48311f22d4636b6fb12cf2bb43925622521e758a /src/bin/pgbench/exprscan.l | |
| parent | 80e8450a744b1f6fa75663f37f1db3388995dc67 (diff) | |
| download | postgresql-dac048f71ebbcf2f980d280711f8ff8001331c5d.tar.gz | |
Build all Flex files standalone
The proposed Meson build system will need a way to ignore certain
generated files in order to coexist with the autoconf build system,
and C files generated by Flex which are #include'd into .y files make
this more difficult. In similar vein to 72b1e3a21, arrange for all Flex
C files to compile to their own .o targets.
Reviewed by Andres Freund
Discussion: https://www.postgresql.org/message-id/20220810171935.7k5zgnjwqzalzmtm%40awork3.anarazel.de
Discussion: https://www.postgresql.org/message-id/CAFBsxsF8Gc2StS3haXofshHCzqNMRXiSxvQEYGwnFsTmsdwNeg@mail.gmail.com
Diffstat (limited to 'src/bin/pgbench/exprscan.l')
| -rw-r--r-- | src/bin/pgbench/exprscan.l | 12 |
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; |
