aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonpath_gram.y
diff options
context:
space:
mode:
authorJohn Naylor <john.naylor@postgresql.org>2022-09-04 11:33:31 +0700
committerJohn Naylor <john.naylor@postgresql.org>2022-09-04 12:09:01 +0700
commitdac048f71ebbcf2f980d280711f8ff8001331c5d (patch)
tree48311f22d4636b6fb12cf2bb43925622521e758a /src/backend/utils/adt/jsonpath_gram.y
parent80e8450a744b1f6fa75663f37f1db3388995dc67 (diff)
downloadpostgresql-dac048f71ebbcf2f980d280711f8ff8001331c5d.tar.gz
postgresql-dac048f71ebbcf2f980d280711f8ff8001331c5d.zip
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/backend/utils/adt/jsonpath_gram.y')
-rw-r--r--src/backend/utils/adt/jsonpath_gram.y27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/backend/utils/adt/jsonpath_gram.y b/src/backend/utils/adt/jsonpath_gram.y
index ce5d5af8916..35a79ca965e 100644
--- a/src/backend/utils/adt/jsonpath_gram.y
+++ b/src/backend/utils/adt/jsonpath_gram.y
@@ -18,26 +18,11 @@
#include "catalog/pg_collation.h"
#include "fmgr.h"
+#include "jsonpath_internal.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
#include "regex/regex.h"
#include "utils/builtins.h"
-#include "utils/jsonpath.h"
-
-/* struct JsonPathString is shared between scan and gram */
-typedef struct JsonPathString
-{
- char *val;
- int len;
- int total;
-} JsonPathString;
-
-union YYSTYPE;
-
-/* flex 2.5.4 doesn't bother with a decl for this */
-int jsonpath_yylex(union YYSTYPE *yylval_param);
-int jsonpath_yyparse(JsonPathParseResult **result);
-void jsonpath_yyerror(JsonPathParseResult **result, const char *message);
static JsonPathParseItem *makeItemType(JsonPathItemType type);
static JsonPathParseItem *makeItemString(JsonPathString *s);
@@ -593,13 +578,3 @@ jspConvertRegexFlags(uint32 xflags)
return cflags;
}
-
-/*
- * jsonpath_scan.l is compiled as part of jsonpath_gram.y. Currently, this is
- * unavoidable because jsonpath_gram does not create a .h file to export its
- * token symbols. If these files ever grow large enough to be worth compiling
- * separately, that could be fixed; but for now it seems like useless
- * complication.
- */
-
-#include "jsonpath_scan.c"