mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
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
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user