summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2019-03-20 11:09:07 +0300
committerAlexander Korotkov <akorotkov@postgresql.org>2019-03-20 11:13:34 +0300
commit550b9d26f80fa3048f2d5883f0779ed29465960a (patch)
tree39d0ba7912641a7a26c56608b065cc4f6342ad6e /src/include
parent641fde25233ef3ecc3b8101fe287eea9fceba6fd (diff)
Get rid of jsonpath_gram.h and jsonpath_scanner.h
Jsonpath grammar and scanner are both quite small. It doesn't worth complexity to compile them separately. This commit makes grammar and scanner be compiled at once. Therefore, jsonpath_gram.h and jsonpath_gram.h are no longer needed. This commit also does some reorganization of code in jsonpath_gram.y. Discussion: https://postgr.es/m/d47b2023-3ecb-5f04-d253-d557547cf74f%402ndQuadrant.com
Diffstat (limited to 'src/include')
-rw-r--r--src/include/Makefile4
-rw-r--r--src/include/utils/.gitignore1
-rw-r--r--src/include/utils/jsonpath_scanner.h32
3 files changed, 2 insertions, 35 deletions
diff --git a/src/include/Makefile b/src/include/Makefile
index 652f6dc6cc3..c557375ae31 100644
--- a/src/include/Makefile
+++ b/src/include/Makefile
@@ -54,7 +54,7 @@ install: all installdirs
cp $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir/ || exit; \
done
ifeq ($(vpath_build),yes)
- for file in catalog/schemapg.h catalog/pg_*_d.h parser/gram.h storage/lwlocknames.h utils/probes.h utils/jsonpath_gram.h; do \
+ for file in catalog/schemapg.h catalog/pg_*_d.h parser/gram.h storage/lwlocknames.h utils/probes.h; do \
cp $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \
done
endif
@@ -78,7 +78,7 @@ uninstall:
clean:
rm -f utils/fmgroids.h utils/fmgrprotos.h utils/errcodes.h utils/header-stamp
- rm -f parser/gram.h storage/lwlocknames.h utils/probes.h utils/jsonpath_gram.h
+ rm -f parser/gram.h storage/lwlocknames.h utils/probes.h
rm -f catalog/schemapg.h catalog/pg_*_d.h catalog/header-stamp
distclean maintainer-clean: clean
diff --git a/src/include/utils/.gitignore b/src/include/utils/.gitignore
index e0705e1aa70..05cfa7a8d6c 100644
--- a/src/include/utils/.gitignore
+++ b/src/include/utils/.gitignore
@@ -3,4 +3,3 @@
/probes.h
/errcodes.h
/header-stamp
-/jsonpath_gram.h
diff --git a/src/include/utils/jsonpath_scanner.h b/src/include/utils/jsonpath_scanner.h
deleted file mode 100644
index 1c567717e84..00000000000
--- a/src/include/utils/jsonpath_scanner.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * jsonpath_scanner.h
- * Definitions for jsonpath scanner & parser
- *
- * Portions Copyright (c) 2019, PostgreSQL Global Development Group
- *
- * src/include/utils/jsonpath_scanner.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef JSONPATH_SCANNER_H
-#define JSONPATH_SCANNER_H
-
-/* struct JsonPathString is shared between scan and gram */
-typedef struct JsonPathString
-{
- char *val;
- int len;
- int total;
-} JsonPathString;
-
-#include "utils/jsonpath.h"
-#include "utils/jsonpath_gram.h"
-
-/* flex 2.5.4 doesn't bother with a decl for this */
-extern int jsonpath_yylex(YYSTYPE *yylval_param);
-extern int jsonpath_yyparse(JsonPathParseResult **result);
-extern void jsonpath_yyerror(JsonPathParseResult **result, const char *message);
-
-#endif