summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_parser.y
diff options
context:
space:
mode:
authorSTANLEY SUFFICOOL <ssufficool@php.net>2014-10-24 20:00:48 -0700
committerSTANLEY SUFFICOOL <ssufficool@php.net>2014-10-24 20:00:48 -0700
commite33ba844e52c5dc8e2fb1658a51bec611e78f7ba (patch)
tree2e6f416aac4b0a5668976db500ada1bdcc2b399e /sapi/phpdbg/phpdbg_parser.y
parent5f91b0a3c717f109ffb7dc684d5a3fa8905b82ec (diff)
parent0a5b7d1316a778dc06a638869c8df8d4c989ddf0 (diff)
downloadphp-git-e33ba844e52c5dc8e2fb1658a51bec611e78f7ba.tar.gz
Merge branch 'master' of https://git.php.net/push/php-src
* 'master' of https://git.php.net/push/php-src: (164 commits) refix the broken place fix infinite loop fix datatype mismatch warnings fix datatype mismatches fix datatype mismatches fix datatype mismatches fix datatype mismatch warnings fix datatype mismatch warnings fix datatype mismatch warnings fix datatype mismatch warning fix datatype mismatches fix datatype mismatch warnings Re-add phpdbg to travis Added some NEWS Make xml valid (missing space between attrs) Fix info classes file name in xml Add note about <eval> tag for errors in xml.md Name the tag <eval> if the error id during ev cmd Do not print out xml as PHP print... Fix output to wrong function ...
Diffstat (limited to 'sapi/phpdbg/phpdbg_parser.y')
-rw-r--r--sapi/phpdbg/phpdbg_parser.y29
1 files changed, 18 insertions, 11 deletions
diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y
index 702bf78455..e4353976f3 100644
--- a/sapi/phpdbg/phpdbg_parser.y
+++ b/sapi/phpdbg/phpdbg_parser.y
@@ -59,6 +59,7 @@ typedef void* yyscan_t;
%token T_ID "identifier (command or function name)"
%token T_INPUT "input (input string or data)"
%token T_UNEXPECTED "input"
+%token T_REQ_ID "request id (-r %d)"
%% /* Rules */
@@ -71,6 +72,7 @@ input
parameters
: parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); }
| parameters parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$2); }
+ | parameters req_id { $$ = $1; }
;
parameter
@@ -135,32 +137,37 @@ parameter
| T_ID { $$ = $1; }
;
+req_id
+ : T_REQ_ID { PHPDBG_G(req_id) = $1.num; }
+ | /* empty */
+;
+
full_expression
- : T_EVAL T_INPUT {
+ : T_EVAL req_id T_INPUT {
$$.type = EVAL_PARAM;
- $$.str = $2.str;
- $$.len = $2.len;
+ $$.str = $3.str;
+ $$.len = $3.len;
}
- | T_SHELL T_INPUT {
+ | T_SHELL req_id T_INPUT {
$$.type = SHELL_PARAM;
- $$.str = $2.str;
- $$.len = $2.len;
+ $$.str = $3.str;
+ $$.len = $3.len;
}
- | T_RUN {
+ | T_RUN req_id {
$$.type = RUN_PARAM;
$$.len = 0;
}
- | T_RUN T_INPUT {
+ | T_RUN req_id T_INPUT {
$$.type = RUN_PARAM;
- $$.str = $2.str;
- $$.len = $2.len;
+ $$.str = $3.str;
+ $$.len = $3.len;
}
;
%%
static int yyerror(void ***tsrm_ls, const char *msg) {
- phpdbg_error("Parse Error: %s", msg);
+ phpdbg_error("command", "type=\"parseerror\" msg=\"%s\"", "Parse Error: %s", msg);
{
const phpdbg_param_t *top = PHPDBG_G(parser_stack);