Skip to content

Commit 22c2493

Browse files
committed
Remove ext/json parser files generated by bison
The parser files for ext/json are generated by bison from the *.y file. Parser files in Zend and sapi/phpdbg already follow such approach of these files being ignored from tracking in the Git repository and they are shipped via the release packages later on. This way the end users still don't need to have bison dependency installed to install PHP. The genfiles script was refactored to generate the ext/json parser and lexer files.
1 parent 220a223 commit 22c2493

File tree

5 files changed

+8
-2066
lines changed

5 files changed

+8
-2066
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ php
156156
# ------------------------------------------------------------------------------
157157
# PHP parser files generated by bison during the build process
158158
# ------------------------------------------------------------------------------
159+
/ext/json/json_parser.tab.h
160+
/ext/json/json_parser.tab.c
159161
/sapi/phpdbg/phpdbg_parser.c
160162
/sapi/phpdbg/phpdbg_parser.h
161163
/sapi/phpdbg/phpdbg_parser.output

ext/json/Makefile.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$(srcdir)/json_scanner.c: $(srcdir)/json_scanner.re
2-
$(RE2C) $(RE2C_FLAGS) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $@ $(srcdir)/json_scanner.re
2+
@$(RE2C) $(RE2C_FLAGS) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $@ $(srcdir)/json_scanner.re
33

44
$(srcdir)/json_parser.tab.c: $(srcdir)/json_parser.y
5-
$(YACC) --defines -l $(srcdir)/json_parser.y -o $@
5+
@$(YACC) --defines -l $(srcdir)/json_parser.y -o $@

0 commit comments

Comments
 (0)