diff options
Diffstat (limited to 'sapi')
| -rw-r--r-- | sapi/phpdbg/Makefile.frag | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_cmd.h | 4 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_parser.y | 25 |
3 files changed, 13 insertions, 18 deletions
diff --git a/sapi/phpdbg/Makefile.frag b/sapi/phpdbg/Makefile.frag index 448cc3676b..1572bfd9f0 100644 --- a/sapi/phpdbg/Makefile.frag +++ b/sapi/phpdbg/Makefile.frag @@ -18,7 +18,7 @@ $(srcdir)/phpdbg_lexer.c: $(srcdir)/phpdbg_lexer.l $(srcdir)/phpdbg_parser.h: $(srcdir)/phpdbg_parser.c $(srcdir)/phpdbg_parser.c: $(srcdir)/phpdbg_parser.y - @$(YACC) $(YFLAGS) -p phpdbg_ -v -d $(srcdir)/phpdbg_parser.y -o $@ + @$(YACC) $(YFLAGS) -v -d $(srcdir)/phpdbg_parser.y -o $@ install-phpdbg: $(BUILD_BINARY) @echo "Installing phpdbg binary: $(INSTALL_ROOT)$(bindir)/" diff --git a/sapi/phpdbg/phpdbg_cmd.h b/sapi/phpdbg/phpdbg_cmd.h index 56c8681c59..dd80e61db3 100644 --- a/sapi/phpdbg/phpdbg_cmd.h +++ b/sapi/phpdbg/phpdbg_cmd.h @@ -81,10 +81,6 @@ struct _phpdbg_param { (v)->top = NULL; \ } while(0) -#ifndef YYSTYPE -#define YYSTYPE phpdbg_param_t -#endif - #define PHPDBG_ASYNC_SAFE 1 typedef int (*phpdbg_command_handler_t)(const phpdbg_param_t*); diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y index 1384abe6fb..f776586810 100644 --- a/sapi/phpdbg/phpdbg_parser.y +++ b/sapi/phpdbg/phpdbg_parser.y @@ -1,19 +1,24 @@ %require "3.0" -%{ - /* * phpdbg_parser.y * (from php-src root) */ +%code requires { #include "phpdbg.h" +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif +} + +%code { + #include "phpdbg_cmd.h" #include "phpdbg_utils.h" #include "phpdbg_cmd.h" #include "phpdbg_prompt.h" -#define YYSTYPE phpdbg_param_t - #include "phpdbg_parser.h" #include "phpdbg_lexer.h" @@ -27,19 +32,13 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #define YYFREE free #endif -%} +} +%define api.prefix {phpdbg_} %define api.pure full +%define api.value.type {phpdbg_param_t} %define parse.error verbose -%code requires { -#include "phpdbg.h" -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif -} - %token T_EVAL "eval" %token T_RUN "run" %token T_SHELL "shell" |
