summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_parser.y')
-rw-r--r--sapi/phpdbg/phpdbg_parser.y25
1 files changed, 12 insertions, 13 deletions
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"