Skip to content

Commit 959c623

Browse files
committed
Replace Grammar with Postgres Grammar
So much easier to add Cypher to Postgres rather than the other way
1 parent 6108f0a commit 959c623

16 files changed

+72991
-56
lines changed

Makefile

+12-11
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ OBJS = src/backend/postgraph.o \
4242
src/backend/optimizer/cypher_createplan.o \
4343
src/backend/optimizer/cypher_pathnode.o \
4444
src/backend/optimizer/cypher_paths.o \
45-
src/backend/parser/ag_scanner.o \
45+
src/backend/parser/scan.o \
4646
src/backend/parser/cypher_analyze.o \
4747
src/backend/parser/cypher_clause.o \
4848
src/backend/executor/cypher_delete.o \
4949
src/backend/parser/cypher_expr.o \
50-
src/backend/parser/cypher_gram.o \
50+
src/backend/parser/gram.o \
51+
src/backend/parser/parser.o \
5152
src/backend/parser/cypher_item.o \
5253
src/backend/parser/cypher_keywords.o \
5354
src/backend/parser/cypher_parse_agg.o \
5455
src/backend/parser/cypher_parse_node.o \
55-
src/backend/parser/cypher_parser.o \
5656
src/backend/parser/cypher_transform_entity.o \
5757
src/backend/utils/adt/queue.o \
5858
src/backend/utils/adt/gtype.o \
@@ -119,18 +119,19 @@ PG_CONFIG ?= pg_config
119119
PGXS := $(shell $(PG_CONFIG) --pgxs)
120120
include $(PGXS)
121121

122-
src/backend/parser/cypher_keywords.o: src/include/parser/cypher_kwlist_d.h
122+
src/backend/parser/keywords.o: src/include/parser/kwlist_d.h
123123

124-
src/include/parser/cypher_kwlist_d.h: src/include/parser/cypher_kwlist.h $(GEN_KEYWORDLIST_DEPS)
125-
$(GEN_KEYWORDLIST) --extern --varname CypherKeyword --output src/include/parser $<
124+
src/include/parser/kwlist_d.h: src/include/parser/kwlist.h $(GEN_KEYWORDLIST_DEPS)
125+
$(GEN_KEYWORDLIST) --extern --varname PG_KEYWORD --output src/include/parser $<
126126

127-
src/include/parser/cypher_gram_def.h: src/backend/parser/cypher_gram.c
128127

129-
src/backend/parser/cypher_gram.c: BISONFLAGS += --defines=src/include/parser/cypher_gram_def.h
128+
src/include/parser/gram_def.h: src/backend/parser/gram.c
130129

131-
src/backend/parser/cypher_parser.o: src/backend/parser/cypher_gram.c
132-
src/backend/parser/cypher_keywords.o: src/backend/parser/cypher_gram.c
130+
src/backend/parser/gram.c: BISONFLAGS += --defines=src/include/parser/gram_def.h
133131

134-
src/backend/parser/ag_scanner.c: FLEX_NO_BACKUP=yes
132+
src/backend/parser/parser.o: src/backend/parser/gram.c
133+
src/backend/parser/keywords.o: src/backend/parser/gram.c
134+
135+
src/backend/parser/scan.c: FLEX_NO_BACKUP=yes
135136

136137
installcheck: export LC_COLLATE=C
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)