mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove phpdbg parser files generated by bison
The parser files for phpdbg are generated by bison from the *.y file. Parser files in Zend already follows such approach of these files being ignored from tracking in the Git repository and they are shipped via the release packages. This way the end user still don't need to have bison dependency installed to install PHP. The genfiles script was refactored to generate the phpdbg parser and lexer files. Empty comment in phpdbg parser y template file has been changed to the YACC compliant /* empty */ instead of custom one.
This commit is contained in:
parent
1362d8e103
commit
c0446d55a2
4 changed files with 6 additions and 1862 deletions
6
genfiles
6
genfiles
|
@ -9,10 +9,14 @@ if [ -z $RE2C ]; then
|
|||
RE2C="re2c"
|
||||
fi
|
||||
|
||||
# Generate Zend parser and lexer files
|
||||
STD="make -f Zend/Makefile.frag RE2C='$RE2C' RE2C_FLAGS='-i' YACC='$YACC' srcdir=Zend builddir=Zend top_srcdir=."
|
||||
|
||||
(eval "$STD Zend/zend_language_parser.c Zend/zend_language_scanner.c Zend/zend_ini_parser.c Zend/zend_ini_scanner.c")
|
||||
|
||||
# Generate phpdbg parser and lexer files
|
||||
STD="make -f sapi/phpdbg/Makefile.frag RE2C='$RE2C' RE2C_FLAGS='-i' YACC='$YACC' srcdir=sapi/phpdbg builddir=sapi/phpdbg top_srcdir=."
|
||||
(eval "$STD sapi/phpdbg/phpdbg_parser.c sapi/phpdbg/phpdbg_lexer.c")
|
||||
|
||||
set -x
|
||||
|
||||
CLEANUP_FILES=" \
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,92 +0,0 @@
|
|||
/* A Bison parser, made by GNU Bison 3.0.4. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
under terms of your choice, so long as that work isn't itself a
|
||||
parser generator using the skeleton or a modified version thereof
|
||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
||||
the parser skeleton itself, you may (at your option) remove this
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_YY_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
|
||||
# define YY_YY_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
/* "%code requires" blocks. */
|
||||
#line 34 "sapi/phpdbg/phpdbg_parser.y" /* yacc.c:1909 */
|
||||
|
||||
#include "phpdbg.h"
|
||||
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
||||
#define YY_TYPEDEF_YY_SCANNER_T
|
||||
typedef void* yyscan_t;
|
||||
#endif
|
||||
|
||||
#line 52 "sapi/phpdbg/phpdbg_parser.h" /* yacc.c:1909 */
|
||||
|
||||
/* Token type. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
{
|
||||
T_EVAL = 258,
|
||||
T_RUN = 259,
|
||||
T_SHELL = 260,
|
||||
T_IF = 261,
|
||||
T_TRUTHY = 262,
|
||||
T_FALSY = 263,
|
||||
T_STRING = 264,
|
||||
T_COLON = 265,
|
||||
T_DCOLON = 266,
|
||||
T_POUND = 267,
|
||||
T_SEPARATOR = 268,
|
||||
T_PROTO = 269,
|
||||
T_DIGITS = 270,
|
||||
T_LITERAL = 271,
|
||||
T_ADDR = 272,
|
||||
T_OPCODE = 273,
|
||||
T_ID = 274,
|
||||
T_INPUT = 275,
|
||||
T_UNEXPECTED = 276,
|
||||
T_REQ_ID = 277
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int yyparse (void);
|
||||
|
||||
#endif /* !YY_YY_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED */
|
|
@ -68,7 +68,7 @@ typedef void* yyscan_t;
|
|||
input
|
||||
: command { $$ = $1; }
|
||||
| input T_SEPARATOR command { phpdbg_stack_separate($1.top); $$ = $3; }
|
||||
| /* nothing */
|
||||
| /* empty */
|
||||
;
|
||||
|
||||
command
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue