diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg_parser.y')
| -rw-r--r-- | sapi/phpdbg/phpdbg_parser.y | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y index 3031ce5a80..f776586810 100644 --- a/sapi/phpdbg/phpdbg_parser.y +++ b/sapi/phpdbg/phpdbg_parser.y @@ -1,18 +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" @@ -26,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" @@ -65,7 +65,7 @@ typedef void* yyscan_t; input : command { $$ = $1; } | input T_SEPARATOR command { phpdbg_stack_separate($1.top); $$ = $3; } - | /* empty */ + | %empty ; command @@ -143,7 +143,7 @@ parameter req_id : T_REQ_ID { PHPDBG_G(req_id) = $1.num; } - | /* empty */ + | %empty ; full_expression |
