Skip to content

Commit

Permalink
Remove ext/json parser files generated by bison
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petk committed Oct 24, 2018
1 parent 220a223 commit 22c2493
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2,066 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -156,6 +156,8 @@ php
# ------------------------------------------------------------------------------
# PHP parser files generated by bison during the build process
# ------------------------------------------------------------------------------
/ext/json/json_parser.tab.h
/ext/json/json_parser.tab.c
/sapi/phpdbg/phpdbg_parser.c
/sapi/phpdbg/phpdbg_parser.h
/sapi/phpdbg/phpdbg_parser.output
Expand Down
4 changes: 2 additions & 2 deletions ext/json/Makefile.frag
@@ -1,5 +1,5 @@
$(srcdir)/json_scanner.c: $(srcdir)/json_scanner.re
$(RE2C) $(RE2C_FLAGS) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $@ $(srcdir)/json_scanner.re
@$(RE2C) $(RE2C_FLAGS) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $@ $(srcdir)/json_scanner.re

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

0 comments on commit 22c2493

Please sign in to comment.