mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
trim breaking commands
This commit is contained in:
parent
78e8690dee
commit
fde1e44d62
13 changed files with 346 additions and 386 deletions
|
@ -35,8 +35,9 @@ T_IF ?i:"if"
|
||||||
|
|
||||||
WS [ \r\n\t]+
|
WS [ \r\n\t]+
|
||||||
DIGITS [0-9\.]+
|
DIGITS [0-9\.]+
|
||||||
ID [^ \r\n\t:#]+
|
ID [^ \r\n\t:#~]+
|
||||||
OPLINE 0x[a-fA-F0-9]+
|
ADDR 0x[a-fA-F0-9]+
|
||||||
|
OPCODE ZEND_([A-Z])+
|
||||||
LITERAL \"(\\.|[^\\"])*\"
|
LITERAL \"(\\.|[^\\"])*\"
|
||||||
INPUT [^\n]+
|
INPUT [^\n]+
|
||||||
%%
|
%%
|
||||||
|
@ -45,7 +46,7 @@ INPUT [^\n]+
|
||||||
[#]{1} { return T_POUND; }
|
[#]{1} { return T_POUND; }
|
||||||
[:]{2} { return T_DCOLON; }
|
[:]{2} { return T_DCOLON; }
|
||||||
[:]{1} { return T_COLON; }
|
[:]{1} { return T_COLON; }
|
||||||
|
[~]{1} { return T_SQUIGGLE; }
|
||||||
{T_EVAL} {
|
{T_EVAL} {
|
||||||
BEGIN(RAW);
|
BEGIN(RAW);
|
||||||
phpdbg_init_param(yylval, EMPTY_PARAM);
|
phpdbg_init_param(yylval, EMPTY_PARAM);
|
||||||
|
@ -76,10 +77,16 @@ INPUT [^\n]+
|
||||||
yylval->num = atoi(yytext);
|
yylval->num = atoi(yytext);
|
||||||
return T_DIGITS;
|
return T_DIGITS;
|
||||||
}
|
}
|
||||||
{OPLINE} {
|
{ADDR} {
|
||||||
phpdbg_init_param(yylval, ADDR_PARAM);
|
phpdbg_init_param(yylval, ADDR_PARAM);
|
||||||
yylval->addr = strtoul(yytext, NULL, 10);
|
yylval->addr = strtoul(yytext, NULL, 10);
|
||||||
return T_OPLINE;
|
return T_ADDR;
|
||||||
|
}
|
||||||
|
{OPCODE} {
|
||||||
|
phpdbg_init_param(yylval, OP_PARAM);
|
||||||
|
yylval->str = strndup(yytext, yyleng);
|
||||||
|
yylval->len = yyleng;
|
||||||
|
return T_OPCODE;
|
||||||
}
|
}
|
||||||
{LITERAL} {
|
{LITERAL} {
|
||||||
phpdbg_init_param(yylval, STR_PARAM);
|
phpdbg_init_param(yylval, STR_PARAM);
|
||||||
|
|
|
@ -57,13 +57,15 @@ typedef void* yyscan_t;
|
||||||
%token T_TRUTHY "truthy (true, on, yes or enabled)"
|
%token T_TRUTHY "truthy (true, on, yes or enabled)"
|
||||||
%token T_FALSY "falsy (false, off, no or disabled)"
|
%token T_FALSY "falsy (false, off, no or disabled)"
|
||||||
%token T_STRING "string (some input, perhaps)"
|
%token T_STRING "string (some input, perhaps)"
|
||||||
|
%token T_SQUIGGLE "~ (squiggle)"
|
||||||
%token T_COLON ": (colon)"
|
%token T_COLON ": (colon)"
|
||||||
%token T_DCOLON ":: (double colon)"
|
%token T_DCOLON ":: (double colon)"
|
||||||
%token T_POUND "# (pound sign)"
|
%token T_POUND "# (pound sign)"
|
||||||
|
|
||||||
%token T_DIGITS "digits (numbers)"
|
%token T_DIGITS "digits (numbers)"
|
||||||
%token T_LITERAL "literal (string)"
|
%token T_LITERAL "literal (string)"
|
||||||
%token T_OPLINE "opline"
|
%token T_ADDR "address"
|
||||||
|
%token T_OPCODE "opcode"
|
||||||
%token T_ID "identifier (command or function name)"
|
%token T_ID "identifier (command or function name)"
|
||||||
%token T_INPUT "input (input string or data)"
|
%token T_INPUT "input (input string or data)"
|
||||||
%token T_UNEXPECTED "input"
|
%token T_UNEXPECTED "input"
|
||||||
|
@ -80,7 +82,11 @@ parameters
|
||||||
;
|
;
|
||||||
|
|
||||||
parameter
|
parameter
|
||||||
: T_ID T_COLON T_DIGITS {
|
: T_SQUIGGLE T_DIGITS {
|
||||||
|
$$.type = OPLINE_PARAM;
|
||||||
|
$$.num = $2.num;
|
||||||
|
}
|
||||||
|
| T_ID T_COLON T_DIGITS {
|
||||||
$$.type = FILE_PARAM;
|
$$.type = FILE_PARAM;
|
||||||
$$.file.name = $1.str;
|
$$.file.name = $1.str;
|
||||||
$$.file.line = $3.num;
|
$$.file.line = $3.num;
|
||||||
|
@ -117,7 +123,8 @@ parameter
|
||||||
$$.str = $2.str;
|
$$.str = $2.str;
|
||||||
$$.len = $2.len;
|
$$.len = $2.len;
|
||||||
}
|
}
|
||||||
| T_OPLINE { $$ = $1; }
|
| T_OPCODE { $$ = $1; }
|
||||||
|
| T_ADDR { $$ = $1; }
|
||||||
| T_LITERAL { $$ = $1; }
|
| T_LITERAL { $$ = $1; }
|
||||||
| T_TRUTHY { $$ = $1; }
|
| T_TRUTHY { $$ = $1; }
|
||||||
| T_FALSY { $$ = $1; }
|
| T_FALSY { $$ = $1; }
|
||||||
|
|
23
phpdbg.c
23
phpdbg.c
|
@ -268,28 +268,7 @@ static PHP_FUNCTION(phpdbg_break)
|
||||||
}
|
}
|
||||||
|
|
||||||
phpdbg_parse_param(expr, expr_len, ¶m TSRMLS_CC);
|
phpdbg_parse_param(expr, expr_len, ¶m TSRMLS_CC);
|
||||||
|
phpdbg_do_break(¶m TSRMLS_CC);
|
||||||
switch (type) {
|
|
||||||
case METHOD_PARAM:
|
|
||||||
phpdbg_do_break_method(¶m TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case FILE_PARAM:
|
|
||||||
phpdbg_do_break_file(¶m TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NUMERIC_PARAM:
|
|
||||||
phpdbg_do_break_lineno(¶m TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case STR_PARAM:
|
|
||||||
phpdbg_do_break_func(¶m TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: zend_error(
|
|
||||||
E_WARNING, "unrecognized parameter type %ld", type);
|
|
||||||
}
|
|
||||||
|
|
||||||
phpdbg_clear_param(¶m TSRMLS_CC);
|
phpdbg_clear_param(¶m TSRMLS_CC);
|
||||||
|
|
||||||
} else if (EG(current_execute_data) && EG(active_op_array)) {
|
} else if (EG(current_execute_data) && EG(active_op_array)) {
|
||||||
|
|
100
phpdbg_break.c
100
phpdbg_break.c
|
@ -35,64 +35,15 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
|
||||||
* Commands
|
* Commands
|
||||||
*/
|
*/
|
||||||
const phpdbg_command_t phpdbg_break_commands[] = {
|
const phpdbg_command_t phpdbg_break_commands[] = {
|
||||||
PHPDBG_BREAK_COMMAND_D(file, "specify breakpoint by file:line", 'F', break_file, NULL, "f"),
|
PHPDBG_BREAK_COMMAND_D(address, "specify breakpoint by address", 'a', break_address, NULL, "f"),
|
||||||
PHPDBG_BREAK_COMMAND_D(func, "specify breakpoint by global function name", 'f', break_func, NULL, "s"),
|
|
||||||
PHPDBG_BREAK_COMMAND_D(method, "specify breakpoint by class::method", 'm', break_method, NULL, "m"),
|
|
||||||
PHPDBG_BREAK_COMMAND_D(address, "specify breakpoint by address", 'a', break_address, NULL, "a"),
|
|
||||||
PHPDBG_BREAK_COMMAND_D(op, "specify breakpoint by opcode", 'o', break_op, NULL, "s"),
|
|
||||||
PHPDBG_BREAK_COMMAND_D(at, "specify breakpoint by location and condition", 'A', break_at, NULL, "*c"),
|
PHPDBG_BREAK_COMMAND_D(at, "specify breakpoint by location and condition", 'A', break_at, NULL, "*c"),
|
||||||
PHPDBG_BREAK_COMMAND_D(lineno, "specify breakpoint by line of currently executing file", 'l', break_lineno, NULL, "n"),
|
|
||||||
PHPDBG_BREAK_COMMAND_D(del, "delete breakpoint by identifier number", 'd', break_del, NULL, "n"),
|
PHPDBG_BREAK_COMMAND_D(del, "delete breakpoint by identifier number", 'd', break_del, NULL, "n"),
|
||||||
PHPDBG_END_COMMAND
|
PHPDBG_END_COMMAND
|
||||||
};
|
};
|
||||||
|
|
||||||
PHPDBG_BREAK(file) /* {{{ */
|
|
||||||
{
|
|
||||||
switch (param->type) {
|
|
||||||
case FILE_PARAM:
|
|
||||||
phpdbg_set_breakpoint_file(param->file.name, param->file.line TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
phpdbg_default_switch_case();
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
|
||||||
} /* }}} */
|
|
||||||
|
|
||||||
PHPDBG_BREAK(method) /* {{{ */
|
|
||||||
{
|
|
||||||
switch (param->type) {
|
|
||||||
case METHOD_PARAM:
|
|
||||||
phpdbg_set_breakpoint_method(param->method.class, param->method.name TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
phpdbg_default_switch_case();
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
|
||||||
} /* }}} */
|
|
||||||
|
|
||||||
PHPDBG_BREAK(address) /* {{{ */
|
PHPDBG_BREAK(address) /* {{{ */
|
||||||
{
|
{
|
||||||
switch (param->type) {
|
|
||||||
case ADDR_PARAM:
|
|
||||||
phpdbg_set_breakpoint_opline(param->addr TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NUMERIC_METHOD_PARAM:
|
|
||||||
phpdbg_set_breakpoint_method_opline(param->method.class, param->method.name, param->num TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NUMERIC_FUNCTION_PARAM:
|
|
||||||
phpdbg_set_breakpoint_function_opline(param->str, param->num TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case FILE_PARAM:
|
|
||||||
phpdbg_set_breakpoint_file_opline(param->file.name, param->file.line TSRMLS_CC);
|
phpdbg_set_breakpoint_file_opline(param->file.name, param->file.line TSRMLS_CC);
|
||||||
break;
|
|
||||||
|
|
||||||
phpdbg_default_switch_case();
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -104,58 +55,9 @@ PHPDBG_BREAK(at) /* {{{ */
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
PHPDBG_BREAK(lineno) /* {{{ */
|
|
||||||
{
|
|
||||||
switch (param->type) {
|
|
||||||
case NUMERIC_PARAM: {
|
|
||||||
if (PHPDBG_G(exec)) {
|
|
||||||
phpdbg_set_breakpoint_file(phpdbg_current_file(TSRMLS_C), param->num TSRMLS_CC);
|
|
||||||
} else {
|
|
||||||
phpdbg_error("Execution context not set!");
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
|
|
||||||
phpdbg_default_switch_case();
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
|
||||||
} /* }}} */
|
|
||||||
|
|
||||||
PHPDBG_BREAK(func) /* {{{ */
|
|
||||||
{
|
|
||||||
switch (param->type) {
|
|
||||||
case STR_PARAM:
|
|
||||||
phpdbg_set_breakpoint_symbol(param->str, param->len TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
phpdbg_default_switch_case();
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
|
||||||
} /* }}} */
|
|
||||||
|
|
||||||
PHPDBG_BREAK(op) /* {{{ */
|
|
||||||
{
|
|
||||||
switch (param->type) {
|
|
||||||
case STR_PARAM:
|
|
||||||
phpdbg_set_breakpoint_opcode(param->str, param->len TSRMLS_CC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
phpdbg_default_switch_case();
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
|
||||||
} /* }}} */
|
|
||||||
|
|
||||||
PHPDBG_BREAK(del) /* {{{ */
|
PHPDBG_BREAK(del) /* {{{ */
|
||||||
{
|
{
|
||||||
switch (param->type) {
|
|
||||||
case NUMERIC_PARAM: {
|
|
||||||
phpdbg_delete_breakpoint(param->num TSRMLS_CC);
|
phpdbg_delete_breakpoint(param->num TSRMLS_CC);
|
||||||
} break;
|
|
||||||
|
|
||||||
phpdbg_default_switch_case();
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
|
@ -29,13 +29,8 @@
|
||||||
/**
|
/**
|
||||||
* Printer Forward Declarations
|
* Printer Forward Declarations
|
||||||
*/
|
*/
|
||||||
PHPDBG_BREAK(file);
|
|
||||||
PHPDBG_BREAK(func);
|
|
||||||
PHPDBG_BREAK(method);
|
|
||||||
PHPDBG_BREAK(address);
|
PHPDBG_BREAK(address);
|
||||||
PHPDBG_BREAK(at);
|
PHPDBG_BREAK(at);
|
||||||
PHPDBG_BREAK(op);
|
|
||||||
PHPDBG_BREAK(lineno);
|
|
||||||
PHPDBG_BREAK(del);
|
PHPDBG_BREAK(del);
|
||||||
|
|
||||||
extern const phpdbg_command_t phpdbg_break_commands[];
|
extern const phpdbg_command_t phpdbg_break_commands[];
|
||||||
|
|
10
phpdbg_cmd.c
10
phpdbg_cmd.c
|
@ -442,6 +442,14 @@ PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg)
|
||||||
fprintf(stderr, "%s COND_PARAM(%s=%lu)\n", msg, param->str, param->len);
|
fprintf(stderr, "%s COND_PARAM(%s=%lu)\n", msg, param->str, param->len);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OP_PARAM:
|
||||||
|
fprintf(stderr, "%s OP_PARAM(%s=%lu)\n", msg, param->str, param->len);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPLINE_PARAM:
|
||||||
|
fprintf(stderr, "%s OPLINE_PARAM(%ld)\n", msg, param->num);
|
||||||
|
break;
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
/* not yet */
|
/* not yet */
|
||||||
}
|
}
|
||||||
|
@ -571,6 +579,8 @@ PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param
|
||||||
case 'a': verify_arg("address", top, ADDR_PARAM); break;
|
case 'a': verify_arg("address", top, ADDR_PARAM); break;
|
||||||
case 'f': verify_arg("file:line", top, FILE_PARAM); break;
|
case 'f': verify_arg("file:line", top, FILE_PARAM); break;
|
||||||
case 'c': verify_arg("condition", top, COND_PARAM); break;
|
case 'c': verify_arg("condition", top, COND_PARAM); break;
|
||||||
|
case 'o': verify_arg("opcode", top, OP_PARAM); break;
|
||||||
|
case 'O': verify_arg("opline", top, OPLINE_PARAM); break;
|
||||||
case 'b': verify_arg("boolean", top, NUMERIC_PARAM); break;
|
case 'b': verify_arg("boolean", top, NUMERIC_PARAM); break;
|
||||||
|
|
||||||
case '*': { /* do nothing */ } break;
|
case '*': { /* do nothing */ } break;
|
||||||
|
|
|
@ -43,6 +43,8 @@ typedef enum {
|
||||||
EVAL_PARAM,
|
EVAL_PARAM,
|
||||||
SHELL_PARAM,
|
SHELL_PARAM,
|
||||||
COND_PARAM,
|
COND_PARAM,
|
||||||
|
OP_PARAM,
|
||||||
|
OPLINE_PARAM,
|
||||||
ORIG_PARAM
|
ORIG_PARAM
|
||||||
} phpdbg_param_type;
|
} phpdbg_param_type;
|
||||||
|
|
||||||
|
|
|
@ -501,63 +501,48 @@ phpdbg_help_text_t phpdbg_help_text[] = {
|
||||||
"types:" CR CR
|
"types:" CR CR
|
||||||
|
|
||||||
" **Target** **Alias** **Purpose**" CR
|
" **Target** **Alias** **Purpose**" CR
|
||||||
" **file** **F** specify breakpoint by file:line" CR
|
|
||||||
" **lineno** **l** specify breakpoint by line of currently executing file" CR
|
|
||||||
" **func** **f** specify breakpoint by global function name" CR
|
|
||||||
" **method** **m** specify breakpoint by class::method" CR
|
|
||||||
" **address** **a** specify breakpoint by address" CR
|
" **address** **a** specify breakpoint by address" CR
|
||||||
" **op** **O** specify breakpoint by opcode" CR
|
|
||||||
" **at** **A** specify breakpoint by location and condition" CR
|
" **at** **A** specify breakpoint by location and condition" CR
|
||||||
" **del** **d** delete breakpoint by breakpoint identifier number" CR CR
|
" **del** **d** delete breakpoint by breakpoint identifier number" CR CR
|
||||||
|
|
||||||
"The syntax of the target argument is dependent on the target type and in the case of address, "
|
"**Break at** takes two arguments. The first is any valid target. The second "
|
||||||
"file, func, line and method targets the target keyword or alias is optional and can be omitted." CR CR
|
"is a valid PHP expression which will trigger the break in "
|
||||||
|
|
||||||
"**Break at** takes two arguments. The first is any valid target as per the file, lineno, func "
|
|
||||||
"and address types. The second is a valid PHP expression which will trigger the break in "
|
|
||||||
"execution, if evaluated as true in a boolean context at the specified target." CR CR
|
"execution, if evaluated as true in a boolean context at the specified target." CR CR
|
||||||
|
|
||||||
"Note that breakpoints can also be disabled and re-enabled by the **set break** command." CR CR
|
"Note that breakpoints can also be disabled and re-enabled by the **set break** command." CR CR
|
||||||
|
|
||||||
"**Examples**" CR CR
|
"**Examples**" CR CR
|
||||||
" $P break file test.php:100" CR
|
" $P break test.php:100" CR
|
||||||
" $P b F test.php:100" CR
|
|
||||||
" $P b test.php:100" CR
|
" $P b test.php:100" CR
|
||||||
" Break execution at line 100 of test.php" CR CR
|
" Break execution at line 100 of test.php" CR CR
|
||||||
|
|
||||||
" $P break lineno 200" CR
|
" $P break 200" CR
|
||||||
" $P b l 200" CR
|
|
||||||
" $P b 200" CR
|
" $P b 200" CR
|
||||||
" Break execution at line 200 of the currently PHP script file" CR CR
|
" Break execution at line 200 of the currently PHP script file" CR CR
|
||||||
|
|
||||||
" $P break func \\\\mynamespace\\\\my_function" CR
|
" $P break \\\\mynamespace\\\\my_function" CR
|
||||||
" $P b f \\\\mynamespace\\\\my_function" CR
|
|
||||||
" $P b \\\\mynamespace\\\\my_function" CR
|
" $P b \\\\mynamespace\\\\my_function" CR
|
||||||
" Break execution on entry to \\\\mynamespace\\\\my_function" CR CR
|
" Break execution on entry to \\\\mynamespace\\\\my_function" CR CR
|
||||||
|
|
||||||
" $P break method classX::method" CR
|
" $P break classX::method" CR
|
||||||
" $P b m classX::method" CR
|
|
||||||
" $P b classX::method" CR
|
" $P b classX::method" CR
|
||||||
" Break execution on entry to classX::method" CR CR
|
" Break execution on entry to classX::method" CR CR
|
||||||
|
|
||||||
" $P break address 0x7ff68f570e08" CR
|
" $P break 0x7ff68f570e08" CR
|
||||||
" $P b a 0x7ff68f570e08" CR
|
|
||||||
" $P b 0x7ff68f570e08" CR
|
" $P b 0x7ff68f570e08" CR
|
||||||
" Break at the opline at the address 0x7ff68f570e08" CR CR
|
" Break at the opline at the address 0x7ff68f570e08" CR CR
|
||||||
|
|
||||||
" $P break address my_function#14" CR
|
" $P break my_function#14" CR
|
||||||
" $P b a my_function#14" CR
|
|
||||||
" $P b my_function#14" CR
|
" $P b my_function#14" CR
|
||||||
" Break at the opline #14 of the function my_function" CR CR
|
" Break at the opline #14 of the function my_function" CR CR
|
||||||
|
|
||||||
" $P break address \\\\my\\\\class::method#2" CR
|
" $P break \\\\my\\\\class::method#2" CR
|
||||||
" $P b a \\\\my\\\\class::method#2" CR
|
|
||||||
" $P b \\\\my\\\\class::method#2" CR
|
" $P b \\\\my\\\\class::method#2" CR
|
||||||
" Break at the opline #2 of the method \\\\my\\\\class::method" CR CR
|
" Break at the opline #2 of the method \\\\my\\\\class::method" CR CR
|
||||||
|
|
||||||
" $P break address test.php#3" CR
|
" $P break address test.php:3" CR
|
||||||
" $P b a test.php#3" CR
|
" $P b a test.php:3" CR
|
||||||
" Break at the opline #3 of test.php" CR CR
|
" Break at the 3rd opline in test.php" CR CR
|
||||||
|
|
||||||
" $P break if $cnt > 10" CR
|
" $P break if $cnt > 10" CR
|
||||||
" $P b if $cnt > 10" CR
|
" $P b if $cnt > 10" CR
|
||||||
|
@ -569,8 +554,8 @@ phpdbg_help_text_t phpdbg_help_text[] = {
|
||||||
" $P break at test.php:20 if !isset($x)" CR
|
" $P break at test.php:20 if !isset($x)" CR
|
||||||
" Break at every opcode on line 20 of test.php when the condition evaluates to true" CR CR
|
" Break at every opcode on line 20 of test.php when the condition evaluates to true" CR CR
|
||||||
|
|
||||||
" $P break op ZEND_ADD" CR
|
" $P break ZEND_ADD" CR
|
||||||
" $P b o ZEND_ADD" CR
|
" $P b ZEND_ADD" CR
|
||||||
" Break on any occurence of the opcode ZEND_ADD" CR CR
|
" Break on any occurence of the opcode ZEND_ADD" CR CR
|
||||||
|
|
||||||
" $P break del 2" CR
|
" $P break del 2" CR
|
||||||
|
|
269
phpdbg_lexer.c
269
phpdbg_lexer.c
|
@ -349,8 +349,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
|
||||||
*yy_cp = '\0'; \
|
*yy_cp = '\0'; \
|
||||||
yyg->yy_c_buf_p = yy_cp;
|
yyg->yy_c_buf_p = yy_cp;
|
||||||
|
|
||||||
#define YY_NUM_RULES 15
|
#define YY_NUM_RULES 17
|
||||||
#define YY_END_OF_BUFFER 16
|
#define YY_END_OF_BUFFER 18
|
||||||
/* This struct is not used in this scanner,
|
/* This struct is not used in this scanner,
|
||||||
but its presence is necessary. */
|
but its presence is necessary. */
|
||||||
struct yy_trans_info
|
struct yy_trans_info
|
||||||
|
@ -358,16 +358,16 @@ struct yy_trans_info
|
||||||
flex_int32_t yy_verify;
|
flex_int32_t yy_verify;
|
||||||
flex_int32_t yy_nxt;
|
flex_int32_t yy_nxt;
|
||||||
};
|
};
|
||||||
static yyconst flex_int16_t yy_accept[73] =
|
static yyconst flex_int16_t yy_accept[80] =
|
||||||
{ 0,
|
{ 0,
|
||||||
0, 0, 0, 0, 16, 12, 14, 12, 1, 9,
|
0, 0, 0, 0, 18, 14, 16, 14, 1, 10,
|
||||||
9, 3, 12, 12, 12, 12, 12, 12, 12, 12,
|
10, 3, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||||
12, 13, 13, 12, 14, 12, 0, 11, 12, 9,
|
14, 14, 4, 15, 15, 14, 16, 14, 0, 13,
|
||||||
12, 2, 12, 12, 12, 12, 6, 8, 12, 7,
|
14, 10, 14, 2, 14, 14, 14, 14, 7, 9,
|
||||||
12, 12, 12, 13, 13, 11, 0, 10, 12, 12,
|
14, 8, 14, 14, 14, 14, 15, 15, 13, 0,
|
||||||
12, 12, 8, 12, 12, 7, 12, 12, 4, 12,
|
11, 14, 14, 14, 14, 9, 14, 14, 8, 14,
|
||||||
12, 7, 12, 12, 8, 5, 12, 12, 12, 7,
|
14, 14, 5, 14, 14, 8, 14, 14, 14, 9,
|
||||||
8, 0
|
6, 14, 14, 14, 12, 14, 8, 9, 0
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int32_t yy_ec[256] =
|
static yyconst flex_int32_t yy_ec[256] =
|
||||||
|
@ -379,13 +379,13 @@ static yyconst flex_int32_t yy_ec[256] =
|
||||||
1, 1, 1, 1, 1, 6, 1, 7, 8, 8,
|
1, 1, 1, 1, 1, 6, 1, 7, 8, 8,
|
||||||
8, 8, 8, 8, 8, 8, 8, 9, 1, 1,
|
8, 8, 8, 8, 8, 8, 8, 9, 1, 1,
|
||||||
1, 1, 1, 1, 10, 11, 12, 13, 14, 15,
|
1, 1, 1, 1, 10, 11, 12, 13, 14, 15,
|
||||||
1, 16, 17, 1, 1, 18, 1, 19, 20, 1,
|
16, 17, 18, 16, 16, 19, 16, 20, 21, 16,
|
||||||
1, 21, 22, 23, 24, 25, 1, 1, 26, 1,
|
16, 22, 23, 24, 25, 26, 16, 16, 27, 28,
|
||||||
1, 27, 1, 1, 1, 1, 28, 29, 12, 30,
|
1, 29, 1, 1, 30, 1, 31, 32, 33, 34,
|
||||||
|
|
||||||
31, 32, 1, 33, 34, 1, 1, 35, 1, 36,
|
35, 36, 1, 37, 38, 1, 1, 39, 1, 40,
|
||||||
37, 1, 1, 38, 39, 40, 41, 42, 1, 43,
|
41, 1, 1, 42, 43, 44, 45, 46, 1, 47,
|
||||||
44, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
48, 1, 1, 1, 1, 49, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
@ -402,97 +402,113 @@ static yyconst flex_int32_t yy_ec[256] =
|
||||||
1, 1, 1, 1, 1
|
1, 1, 1, 1, 1
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int32_t yy_meta[45] =
|
static yyconst flex_int32_t yy_meta[50] =
|
||||||
{ 0,
|
{ 0,
|
||||||
1, 2, 3, 1, 2, 1, 1, 1, 2, 1,
|
1, 2, 3, 1, 2, 1, 1, 1, 2, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1
|
1, 1, 1, 1, 1, 1, 1, 1, 2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_base[78] =
|
static yyconst flex_int16_t yy_base[85] =
|
||||||
{ 0,
|
{ 0,
|
||||||
0, 0, 43, 45, 135, 0, 47, 49, 187, 49,
|
0, 0, 48, 50, 139, 0, 52, 54, 246, 54,
|
||||||
53, 96, 45, 44, 54, 51, 47, 53, 54, 50,
|
58, 129, 49, 48, 59, 55, 51, 60, 56, 55,
|
||||||
59, 0, 72, 0, 75, 89, 77, 0, 97, 101,
|
64, 123, 246, 0, 79, 0, 82, 104, 72, 0,
|
||||||
110, 187, 73, 87, 91, 92, 0, 0, 96, 0,
|
109, 109, 152, 246, 79, 79, 88, 85, 0, 0,
|
||||||
99, 90, 104, 0, 130, 187, 100, 0, 119, 123,
|
105, 0, 107, 98, 102, 110, 0, 124, 246, 92,
|
||||||
118, 115, 0, 126, 131, 0, 135, 130, 0, 135,
|
0, 118, 118, 112, 109, 0, 115, 121, 0, 73,
|
||||||
132, 0, 133, 141, 0, 0, 142, 144, 145, 0,
|
125, 129, 0, 126, 136, 0, 49, 150, 156, 0,
|
||||||
0, 187, 175, 64, 178, 181, 183
|
0, 182, 176, 199, 0, 200, 0, 0, 246, 234,
|
||||||
|
70, 237, 240, 242
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_def[78] =
|
static yyconst flex_int16_t yy_def[85] =
|
||||||
{ 0,
|
{ 0,
|
||||||
72, 1, 73, 73, 72, 74, 72, 75, 72, 74,
|
79, 1, 80, 80, 79, 81, 79, 82, 79, 81,
|
||||||
74, 72, 74, 74, 74, 74, 74, 74, 74, 74,
|
81, 79, 81, 81, 81, 81, 81, 81, 81, 81,
|
||||||
74, 76, 76, 74, 72, 75, 77, 74, 75, 74,
|
81, 81, 79, 83, 83, 81, 79, 82, 84, 81,
|
||||||
74, 72, 74, 74, 74, 74, 74, 74, 74, 74,
|
82, 81, 81, 79, 81, 81, 81, 81, 81, 81,
|
||||||
74, 74, 74, 76, 76, 72, 77, 31, 74, 74,
|
81, 81, 81, 81, 81, 81, 83, 83, 79, 84,
|
||||||
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
|
33, 81, 81, 81, 81, 81, 81, 81, 81, 81,
|
||||||
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
|
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
|
||||||
74, 0, 72, 72, 72, 72, 72
|
81, 81, 81, 81, 72, 81, 81, 81, 0, 79,
|
||||||
|
79, 79, 79, 79
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_nxt[232] =
|
static yyconst flex_int16_t yy_nxt[296] =
|
||||||
{ 0,
|
{ 0,
|
||||||
6, 7, 7, 8, 9, 10, 11, 10, 12, 6,
|
6, 7, 7, 8, 9, 10, 11, 10, 12, 6,
|
||||||
6, 6, 13, 14, 15, 6, 16, 6, 17, 18,
|
6, 6, 13, 14, 15, 6, 6, 16, 6, 17,
|
||||||
6, 19, 20, 6, 6, 21, 6, 6, 6, 13,
|
18, 6, 19, 20, 6, 6, 21, 22, 6, 6,
|
||||||
14, 15, 6, 16, 6, 17, 18, 6, 19, 20,
|
6, 6, 6, 13, 14, 15, 6, 16, 6, 17,
|
||||||
6, 6, 6, 21, 23, 7, 23, 7, 25, 25,
|
18, 6, 19, 20, 6, 6, 6, 21, 23, 25,
|
||||||
27, 27, 28, 27, 30, 30, 30, 27, 30, 30,
|
7, 25, 7, 27, 27, 29, 29, 30, 29, 32,
|
||||||
30, 33, 34, 36, 24, 37, 38, 39, 35, 41,
|
32, 32, 29, 32, 32, 32, 35, 36, 38, 39,
|
||||||
42, 40, 43, 45, 25, 29, 25, 25, 33, 34,
|
26, 40, 43, 37, 41, 49, 44, 45, 72, 42,
|
||||||
46, 36, 37, 38, 39, 35, 41, 42, 40, 43,
|
48, 27, 31, 27, 27, 67, 35, 36, 53, 38,
|
||||||
27, 27, 28, 27, 49, 31, 50, 27, 27, 72,
|
39, 40, 43, 37, 79, 41, 44, 54, 45, 42,
|
||||||
|
|
||||||
51, 27, 72, 47, 32, 27, 30, 30, 30, 52,
|
50, 52, 29, 55, 33, 29, 29, 30, 29, 53,
|
||||||
53, 49, 54, 55, 50, 29, 48, 48, 51, 48,
|
29, 79, 29, 29, 32, 32, 32, 29, 54, 56,
|
||||||
48, 48, 48, 48, 48, 56, 52, 53, 57, 54,
|
57, 52, 58, 55, 59, 48, 27, 61, 62, 60,
|
||||||
55, 45, 25, 58, 72, 59, 60, 48, 48, 48,
|
63, 64, 31, 65, 66, 68, 46, 34, 79, 70,
|
||||||
48, 48, 56, 61, 62, 63, 57, 64, 65, 66,
|
56, 57, 58, 79, 59, 79, 79, 69, 61, 62,
|
||||||
67, 58, 59, 60, 68, 69, 70, 71, 72, 72,
|
63, 64, 29, 65, 71, 66, 68, 29, 51, 51,
|
||||||
61, 62, 72, 63, 64, 65, 66, 67, 72, 72,
|
70, 51, 51, 51, 51, 51, 51, 69, 73, 74,
|
||||||
72, 68, 69, 70, 71, 22, 22, 22, 26, 26,
|
79, 79, 79, 79, 71, 79, 79, 79, 79, 79,
|
||||||
26, 44, 44, 27, 27, 27, 5, 72, 72, 72,
|
79, 79, 51, 51, 51, 51, 51, 51, 73, 76,
|
||||||
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
74, 75, 75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
76, 77, 78, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 77, 78, 24, 24, 24, 28, 28, 28,
|
||||||
|
47, 47, 29, 29, 29, 5, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79
|
||||||
|
|
||||||
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
|
||||||
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
|
||||||
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
|
||||||
72
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_chk[232] =
|
static yyconst flex_int16_t yy_chk[296] =
|
||||||
{ 0,
|
{ 0,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 3, 3, 4, 4, 7, 7,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
|
||||||
8, 8, 8, 8, 10, 10, 10, 8, 11, 11,
|
3, 4, 4, 7, 7, 8, 8, 8, 8, 10,
|
||||||
11, 13, 14, 15, 74, 16, 17, 18, 14, 19,
|
10, 10, 8, 11, 11, 11, 13, 14, 15, 16,
|
||||||
20, 18, 21, 23, 23, 8, 25, 25, 13, 14,
|
81, 17, 19, 14, 18, 29, 20, 21, 67, 18,
|
||||||
27, 15, 16, 17, 18, 14, 19, 20, 18, 21,
|
25, 25, 8, 27, 27, 60, 13, 14, 36, 15,
|
||||||
26, 26, 26, 26, 33, 11, 34, 26, 29, 29,
|
16, 17, 19, 14, 50, 18, 20, 37, 21, 18,
|
||||||
|
|
||||||
35, 29, 47, 27, 12, 29, 30, 30, 30, 36,
|
29, 35, 8, 38, 11, 28, 28, 28, 28, 36,
|
||||||
39, 33, 41, 42, 34, 26, 31, 31, 35, 31,
|
31, 31, 28, 31, 32, 32, 32, 31, 37, 41,
|
||||||
31, 31, 31, 31, 31, 43, 36, 39, 49, 41,
|
43, 35, 44, 38, 45, 48, 48, 52, 53, 46,
|
||||||
42, 45, 45, 50, 5, 51, 52, 31, 31, 31,
|
54, 55, 28, 57, 58, 61, 22, 12, 5, 64,
|
||||||
31, 31, 43, 54, 55, 57, 49, 58, 60, 61,
|
41, 43, 44, 0, 45, 0, 0, 62, 52, 53,
|
||||||
63, 50, 51, 52, 64, 67, 68, 69, 0, 0,
|
54, 55, 28, 57, 65, 58, 61, 31, 33, 33,
|
||||||
54, 55, 0, 57, 58, 60, 61, 63, 0, 0,
|
64, 33, 33, 33, 33, 33, 33, 62, 68, 69,
|
||||||
0, 64, 67, 68, 69, 73, 73, 73, 75, 75,
|
0, 0, 0, 0, 65, 0, 0, 0, 0, 0,
|
||||||
75, 76, 76, 77, 77, 77, 72, 72, 72, 72,
|
0, 0, 33, 33, 33, 33, 33, 33, 68, 73,
|
||||||
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
69, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
||||||
|
|
||||||
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
||||||
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
73, 74, 76, 0, 0, 0, 0, 0, 0, 0,
|
||||||
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
72
|
0, 0, 74, 76, 80, 80, 80, 82, 82, 82,
|
||||||
|
83, 83, 84, 84, 84, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
||||||
|
79, 79, 79, 79, 79
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
/* The intent behind this definition is that it'll catch
|
/* The intent behind this definition is that it'll catch
|
||||||
|
@ -518,7 +534,7 @@ static yyconst flex_int16_t yy_chk[232] =
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define YY_NO_UNISTD_H 1
|
#define YY_NO_UNISTD_H 1
|
||||||
#line 522 "sapi/phpdbg/phpdbg_lexer.c"
|
#line 538 "sapi/phpdbg/phpdbg_lexer.c"
|
||||||
|
|
||||||
#define INITIAL 0
|
#define INITIAL 0
|
||||||
#define RAW 1
|
#define RAW 1
|
||||||
|
@ -756,9 +772,9 @@ YY_DECL
|
||||||
register int yy_act;
|
register int yy_act;
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
#line 42 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 43 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
|
|
||||||
#line 762 "sapi/phpdbg/phpdbg_lexer.c"
|
#line 778 "sapi/phpdbg/phpdbg_lexer.c"
|
||||||
|
|
||||||
yylval = yylval_param;
|
yylval = yylval_param;
|
||||||
|
|
||||||
|
@ -813,13 +829,13 @@ yy_match:
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 73 )
|
if ( yy_current_state >= 80 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
++yy_cp;
|
++yy_cp;
|
||||||
}
|
}
|
||||||
while ( yy_current_state != 72 );
|
while ( yy_current_state != 79 );
|
||||||
yy_cp = yyg->yy_last_accepting_cpos;
|
yy_cp = yyg->yy_last_accepting_cpos;
|
||||||
yy_current_state = yyg->yy_last_accepting_state;
|
yy_current_state = yyg->yy_last_accepting_state;
|
||||||
|
|
||||||
|
@ -841,86 +857,101 @@ do_action: /* This label is used only to access EOF actions. */
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 45 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 46 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{ return T_POUND; }
|
{ return T_POUND; }
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 2:
|
case 2:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 46 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 47 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{ return T_DCOLON; }
|
{ return T_DCOLON; }
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 3:
|
case 3:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 47 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 48 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{ return T_COLON; }
|
{ return T_COLON; }
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 4:
|
case 4:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 49 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 49 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
|
{ return T_SQUIGGLE; }
|
||||||
|
YY_BREAK
|
||||||
|
case 5:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 50 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
BEGIN(RAW);
|
BEGIN(RAW);
|
||||||
phpdbg_init_param(yylval, EMPTY_PARAM);
|
phpdbg_init_param(yylval, EMPTY_PARAM);
|
||||||
return T_EVAL;
|
return T_EVAL;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 5:
|
case 6:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 54 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 55 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
BEGIN(RAW);
|
BEGIN(RAW);
|
||||||
phpdbg_init_param(yylval, EMPTY_PARAM);
|
phpdbg_init_param(yylval, EMPTY_PARAM);
|
||||||
return T_SHELL;
|
return T_SHELL;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 6:
|
case 7:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 59 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 60 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
BEGIN(RAW);
|
BEGIN(RAW);
|
||||||
phpdbg_init_param(yylval, EMPTY_PARAM);
|
phpdbg_init_param(yylval, EMPTY_PARAM);
|
||||||
return T_IF;
|
return T_IF;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 7:
|
case 8:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 64 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 65 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
phpdbg_init_param(yylval, NUMERIC_PARAM);
|
phpdbg_init_param(yylval, NUMERIC_PARAM);
|
||||||
yylval->num = 1;
|
yylval->num = 1;
|
||||||
return T_TRUTHY;
|
return T_TRUTHY;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 8:
|
case 9:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 69 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 70 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
phpdbg_init_param(yylval, NUMERIC_PARAM);
|
phpdbg_init_param(yylval, NUMERIC_PARAM);
|
||||||
yylval->num = 0;
|
yylval->num = 0;
|
||||||
return T_FALSY;
|
return T_FALSY;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 9:
|
case 10:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 74 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 75 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
phpdbg_init_param(yylval, NUMERIC_PARAM);
|
phpdbg_init_param(yylval, NUMERIC_PARAM);
|
||||||
yylval->num = atoi(yytext);
|
yylval->num = atoi(yytext);
|
||||||
return T_DIGITS;
|
return T_DIGITS;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 10:
|
case 11:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 79 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 80 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
phpdbg_init_param(yylval, ADDR_PARAM);
|
phpdbg_init_param(yylval, ADDR_PARAM);
|
||||||
yylval->addr = strtoul(yytext, NULL, 10);
|
yylval->addr = strtoul(yytext, NULL, 10);
|
||||||
return T_OPLINE;
|
return T_ADDR;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 11:
|
case 12:
|
||||||
/* rule 11 can match eol */
|
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 84 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 85 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
|
{
|
||||||
|
phpdbg_init_param(yylval, OP_PARAM);
|
||||||
|
yylval->str = strndup(yytext, yyleng);
|
||||||
|
yylval->len = yyleng;
|
||||||
|
return T_OPCODE;
|
||||||
|
}
|
||||||
|
YY_BREAK
|
||||||
|
case 13:
|
||||||
|
/* rule 13 can match eol */
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 91 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
phpdbg_init_param(yylval, STR_PARAM);
|
phpdbg_init_param(yylval, STR_PARAM);
|
||||||
yylval->str = strndup(yytext, yyleng);
|
yylval->str = strndup(yytext, yyleng);
|
||||||
|
@ -928,9 +959,9 @@ YY_RULE_SETUP
|
||||||
return T_LITERAL;
|
return T_LITERAL;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 12:
|
case 14:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 90 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 97 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
phpdbg_init_param(yylval, STR_PARAM);
|
phpdbg_init_param(yylval, STR_PARAM);
|
||||||
yylval->str = strndup(yytext, yyleng);
|
yylval->str = strndup(yytext, yyleng);
|
||||||
|
@ -939,9 +970,9 @@ YY_RULE_SETUP
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
|
|
||||||
case 13:
|
case 15:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 97 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 104 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{
|
{
|
||||||
phpdbg_init_param(yylval, STR_PARAM);
|
phpdbg_init_param(yylval, STR_PARAM);
|
||||||
yylval->str = strndup(yytext, yyleng);
|
yylval->str = strndup(yytext, yyleng);
|
||||||
|
@ -950,18 +981,18 @@ YY_RULE_SETUP
|
||||||
return T_INPUT;
|
return T_INPUT;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 14:
|
case 16:
|
||||||
/* rule 14 can match eol */
|
/* rule 16 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 104 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 111 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
{ /* ignore whitespace */ }
|
{ /* ignore whitespace */ }
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 15:
|
case 17:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 105 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 112 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
YY_FATAL_ERROR( "flex scanner jammed" );
|
YY_FATAL_ERROR( "flex scanner jammed" );
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
#line 965 "sapi/phpdbg/phpdbg_lexer.c"
|
#line 996 "sapi/phpdbg/phpdbg_lexer.c"
|
||||||
case YY_STATE_EOF(INITIAL):
|
case YY_STATE_EOF(INITIAL):
|
||||||
case YY_STATE_EOF(RAW):
|
case YY_STATE_EOF(RAW):
|
||||||
yyterminate();
|
yyterminate();
|
||||||
|
@ -1257,7 +1288,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 73 )
|
if ( yy_current_state >= 80 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
|
@ -1286,11 +1317,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 73 )
|
if ( yy_current_state >= 80 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
yy_is_jam = (yy_current_state == 72);
|
yy_is_jam = (yy_current_state == 79);
|
||||||
|
|
||||||
return yy_is_jam ? 0 : yy_current_state;
|
return yy_is_jam ? 0 : yy_current_state;
|
||||||
}
|
}
|
||||||
|
@ -2126,7 +2157,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
|
||||||
|
|
||||||
#define YYTABLES_NAME "yytables"
|
#define YYTABLES_NAME "yytables"
|
||||||
|
|
||||||
#line 105 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 112 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -338,7 +338,7 @@ extern int yylex \
|
||||||
#undef YY_DECL
|
#undef YY_DECL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#line 105 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
#line 112 "sapi/phpdbg/dev/phpdbg_lexer.l"
|
||||||
|
|
||||||
|
|
||||||
#line 345 "sapi/phpdbg/phpdbg_lexer.h"
|
#line 345 "sapi/phpdbg/phpdbg_lexer.h"
|
||||||
|
|
217
phpdbg_parser.c
217
phpdbg_parser.c
|
@ -153,15 +153,17 @@ typedef void* yyscan_t;
|
||||||
T_TRUTHY = 261,
|
T_TRUTHY = 261,
|
||||||
T_FALSY = 262,
|
T_FALSY = 262,
|
||||||
T_STRING = 263,
|
T_STRING = 263,
|
||||||
T_COLON = 264,
|
T_SQUIGGLE = 264,
|
||||||
T_DCOLON = 265,
|
T_COLON = 265,
|
||||||
T_POUND = 266,
|
T_DCOLON = 266,
|
||||||
T_DIGITS = 267,
|
T_POUND = 267,
|
||||||
T_LITERAL = 268,
|
T_DIGITS = 268,
|
||||||
T_OPLINE = 269,
|
T_LITERAL = 269,
|
||||||
T_ID = 270,
|
T_ADDR = 270,
|
||||||
T_INPUT = 271,
|
T_OPCODE = 271,
|
||||||
T_UNEXPECTED = 272
|
T_ID = 272,
|
||||||
|
T_INPUT = 273,
|
||||||
|
T_UNEXPECTED = 274
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -179,7 +181,7 @@ typedef int YYSTYPE;
|
||||||
|
|
||||||
|
|
||||||
/* Line 343 of yacc.c */
|
/* Line 343 of yacc.c */
|
||||||
#line 183 "sapi/phpdbg/phpdbg_parser.c"
|
#line 185 "sapi/phpdbg/phpdbg_parser.c"
|
||||||
|
|
||||||
#ifdef short
|
#ifdef short
|
||||||
# undef short
|
# undef short
|
||||||
|
@ -396,22 +398,22 @@ union yyalloc
|
||||||
#endif /* !YYCOPY_NEEDED */
|
#endif /* !YYCOPY_NEEDED */
|
||||||
|
|
||||||
/* YYFINAL -- State number of the termination state. */
|
/* YYFINAL -- State number of the termination state. */
|
||||||
#define YYFINAL 19
|
#define YYFINAL 22
|
||||||
/* YYLAST -- Last index in YYTABLE. */
|
/* YYLAST -- Last index in YYTABLE. */
|
||||||
#define YYLAST 22
|
#define YYLAST 25
|
||||||
|
|
||||||
/* YYNTOKENS -- Number of terminals. */
|
/* YYNTOKENS -- Number of terminals. */
|
||||||
#define YYNTOKENS 18
|
#define YYNTOKENS 20
|
||||||
/* YYNNTS -- Number of nonterminals. */
|
/* YYNNTS -- Number of nonterminals. */
|
||||||
#define YYNNTS 4
|
#define YYNNTS 4
|
||||||
/* YYNRULES -- Number of rules. */
|
/* YYNRULES -- Number of rules. */
|
||||||
#define YYNRULES 18
|
#define YYNRULES 20
|
||||||
/* YYNRULES -- Number of states. */
|
/* YYNRULES -- Number of states. */
|
||||||
#define YYNSTATES 26
|
#define YYNSTATES 29
|
||||||
|
|
||||||
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
|
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
|
||||||
#define YYUNDEFTOK 2
|
#define YYUNDEFTOK 2
|
||||||
#define YYMAXUTOK 272
|
#define YYMAXUTOK 274
|
||||||
|
|
||||||
#define YYTRANSLATE(YYX) \
|
#define YYTRANSLATE(YYX) \
|
||||||
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
||||||
|
@ -446,7 +448,7 @@ static const yytype_uint8 yytranslate[] =
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
|
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
|
||||||
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||||
15, 16, 17
|
15, 16, 17, 18, 19
|
||||||
};
|
};
|
||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
|
@ -454,25 +456,28 @@ static const yytype_uint8 yytranslate[] =
|
||||||
YYRHS. */
|
YYRHS. */
|
||||||
static const yytype_uint8 yyprhs[] =
|
static const yytype_uint8 yyprhs[] =
|
||||||
{
|
{
|
||||||
0, 0, 3, 5, 6, 8, 11, 15, 19, 25,
|
0, 0, 3, 5, 6, 8, 11, 14, 18, 22,
|
||||||
29, 31, 33, 35, 37, 39, 41, 44, 47
|
28, 32, 35, 38, 41, 43, 45, 47, 49, 51,
|
||||||
|
53
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
||||||
static const yytype_int8 yyrhs[] =
|
static const yytype_int8 yyrhs[] =
|
||||||
{
|
{
|
||||||
19, 0, -1, 20, -1, -1, 21, -1, 20, 21,
|
21, 0, -1, 22, -1, -1, 23, -1, 22, 23,
|
||||||
-1, 15, 9, 12, -1, 15, 10, 15, -1, 15,
|
-1, 9, 13, -1, 17, 10, 13, -1, 17, 11,
|
||||||
10, 15, 11, 12, -1, 15, 11, 12, -1, 14,
|
17, -1, 17, 11, 17, 12, 13, -1, 17, 12,
|
||||||
-1, 13, -1, 6, -1, 7, -1, 12, -1, 15,
|
13, -1, 5, 18, -1, 3, 18, -1, 4, 18,
|
||||||
-1, 5, 16, -1, 3, 16, -1, 4, 16, -1
|
-1, 16, -1, 15, -1, 14, -1, 6, -1, 7,
|
||||||
|
-1, 13, -1, 17, -1
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
||||||
static const yytype_uint8 yyrline[] =
|
static const yytype_uint8 yyrline[] =
|
||||||
{
|
{
|
||||||
0, 73, 73, 74, 78, 79, 83, 88, 93, 99,
|
0, 75, 75, 76, 80, 81, 85, 89, 94, 99,
|
||||||
104, 105, 106, 107, 108, 109, 110, 111, 112
|
105, 111, 116, 121, 126, 127, 128, 129, 130, 131,
|
||||||
|
132
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -484,9 +489,9 @@ static const char *const yytname[] =
|
||||||
"$end", "error", "$undefined", "\"eval\"", "\"shell\"",
|
"$end", "error", "$undefined", "\"eval\"", "\"shell\"",
|
||||||
"\"if (condition)\"", "\"truthy (true, on, yes or enabled)\"",
|
"\"if (condition)\"", "\"truthy (true, on, yes or enabled)\"",
|
||||||
"\"falsy (false, off, no or disabled)\"",
|
"\"falsy (false, off, no or disabled)\"",
|
||||||
"\"string (some input, perhaps)\"", "\": (colon)\"",
|
"\"string (some input, perhaps)\"", "\"~ (squiggle)\"", "\": (colon)\"",
|
||||||
"\":: (double colon)\"", "\"# (pound sign)\"", "\"digits (numbers)\"",
|
"\":: (double colon)\"", "\"# (pound sign)\"", "\"digits (numbers)\"",
|
||||||
"\"literal (string)\"", "\"opline\"",
|
"\"literal (string)\"", "\"address\"", "\"opcode\"",
|
||||||
"\"identifier (command or function name)\"",
|
"\"identifier (command or function name)\"",
|
||||||
"\"input (input string or data)\"", "\"input\"", "$accept", "input",
|
"\"input (input string or data)\"", "\"input\"", "$accept", "input",
|
||||||
"parameters", "parameter", 0
|
"parameters", "parameter", 0
|
||||||
|
@ -499,22 +504,24 @@ static const char *const yytname[] =
|
||||||
static const yytype_uint16 yytoknum[] =
|
static const yytype_uint16 yytoknum[] =
|
||||||
{
|
{
|
||||||
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
||||||
265, 266, 267, 268, 269, 270, 271, 272
|
265, 266, 267, 268, 269, 270, 271, 272, 273, 274
|
||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
||||||
static const yytype_uint8 yyr1[] =
|
static const yytype_uint8 yyr1[] =
|
||||||
{
|
{
|
||||||
0, 18, 19, 19, 20, 20, 21, 21, 21, 21,
|
0, 20, 21, 21, 22, 22, 23, 23, 23, 23,
|
||||||
21, 21, 21, 21, 21, 21, 21, 21, 21
|
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
|
||||||
|
23
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
||||||
static const yytype_uint8 yyr2[] =
|
static const yytype_uint8 yyr2[] =
|
||||||
{
|
{
|
||||||
0, 2, 1, 0, 1, 2, 3, 3, 5, 3,
|
0, 2, 1, 0, 1, 2, 2, 3, 3, 5,
|
||||||
1, 1, 1, 1, 1, 1, 2, 2, 2
|
3, 2, 2, 2, 1, 1, 1, 1, 1, 1,
|
||||||
|
1
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
|
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
|
||||||
|
@ -522,31 +529,31 @@ static const yytype_uint8 yyr2[] =
|
||||||
means the default is an error. */
|
means the default is an error. */
|
||||||
static const yytype_uint8 yydefact[] =
|
static const yytype_uint8 yydefact[] =
|
||||||
{
|
{
|
||||||
3, 0, 0, 0, 12, 13, 14, 11, 10, 15,
|
3, 0, 0, 0, 17, 18, 0, 19, 16, 15,
|
||||||
0, 2, 4, 17, 18, 16, 0, 0, 0, 1,
|
14, 20, 0, 2, 4, 12, 13, 11, 6, 0,
|
||||||
5, 6, 7, 9, 0, 8
|
0, 0, 1, 5, 7, 8, 10, 0, 9
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYDEFGOTO[NTERM-NUM]. */
|
/* YYDEFGOTO[NTERM-NUM]. */
|
||||||
static const yytype_int8 yydefgoto[] =
|
static const yytype_int8 yydefgoto[] =
|
||||||
{
|
{
|
||||||
-1, 10, 11, 12
|
-1, 12, 13, 14
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
||||||
STATE-NUM. */
|
STATE-NUM. */
|
||||||
#define YYPACT_NINF -9
|
#define YYPACT_NINF -14
|
||||||
static const yytype_int8 yypact[] =
|
static const yytype_int8 yypact[] =
|
||||||
{
|
{
|
||||||
-3, -8, -2, -1, -9, -9, -9, -9, -9, -4,
|
-3, -13, -11, -10, -14, -14, -4, -14, -14, -14,
|
||||||
13, -3, -9, -9, -9, -9, 4, 2, 6, -9,
|
-14, 5, 18, -3, -14, -14, -14, -14, -14, 6,
|
||||||
-9, -9, 8, -9, 9, -9
|
3, 8, -14, -14, -14, 10, -14, 11, -14
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYPGOTO[NTERM-NUM]. */
|
/* YYPGOTO[NTERM-NUM]. */
|
||||||
static const yytype_int8 yypgoto[] =
|
static const yytype_int8 yypgoto[] =
|
||||||
{
|
{
|
||||||
-9, -9, -9, 11
|
-14, -14, -14, 12
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||||
|
@ -555,31 +562,31 @@ static const yytype_int8 yypgoto[] =
|
||||||
#define YYTABLE_NINF -1
|
#define YYTABLE_NINF -1
|
||||||
static const yytype_uint8 yytable[] =
|
static const yytype_uint8 yytable[] =
|
||||||
{
|
{
|
||||||
1, 2, 3, 4, 5, 16, 17, 18, 13, 6,
|
1, 2, 3, 4, 5, 15, 6, 16, 17, 18,
|
||||||
7, 8, 9, 19, 14, 15, 21, 22, 23, 24,
|
7, 8, 9, 10, 11, 19, 20, 21, 22, 24,
|
||||||
0, 25, 20
|
25, 26, 27, 0, 28, 23
|
||||||
};
|
};
|
||||||
|
|
||||||
#define yypact_value_is_default(yystate) \
|
#define yypact_value_is_default(yystate) \
|
||||||
((yystate) == (-9))
|
((yystate) == (-14))
|
||||||
|
|
||||||
#define yytable_value_is_error(yytable_value) \
|
#define yytable_value_is_error(yytable_value) \
|
||||||
YYID (0)
|
YYID (0)
|
||||||
|
|
||||||
static const yytype_int8 yycheck[] =
|
static const yytype_int8 yycheck[] =
|
||||||
{
|
{
|
||||||
3, 4, 5, 6, 7, 9, 10, 11, 16, 12,
|
3, 4, 5, 6, 7, 18, 9, 18, 18, 13,
|
||||||
13, 14, 15, 0, 16, 16, 12, 15, 12, 11,
|
13, 14, 15, 16, 17, 10, 11, 12, 0, 13,
|
||||||
-1, 12, 11
|
17, 13, 12, -1, 13, 13
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
||||||
symbol of state STATE-NUM. */
|
symbol of state STATE-NUM. */
|
||||||
static const yytype_uint8 yystos[] =
|
static const yytype_uint8 yystos[] =
|
||||||
{
|
{
|
||||||
0, 3, 4, 5, 6, 7, 12, 13, 14, 15,
|
0, 3, 4, 5, 6, 7, 9, 13, 14, 15,
|
||||||
19, 20, 21, 16, 16, 16, 9, 10, 11, 0,
|
16, 17, 21, 22, 23, 18, 18, 18, 13, 10,
|
||||||
21, 12, 15, 12, 11, 12
|
11, 12, 0, 23, 13, 17, 13, 12, 13
|
||||||
};
|
};
|
||||||
|
|
||||||
#define yyerrok (yyerrstatus = 0)
|
#define yyerrok (yyerrstatus = 0)
|
||||||
|
@ -1428,21 +1435,31 @@ yyreduce:
|
||||||
case 4:
|
case 4:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 78 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 80 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); }
|
{ phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 79 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 81 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ phpdbg_stack_push(stack, &(yyvsp[(2) - (2)])); }
|
{ phpdbg_stack_push(stack, &(yyvsp[(2) - (2)])); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 83 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 85 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
|
{
|
||||||
|
(yyval).type = OPLINE_PARAM;
|
||||||
|
(yyval).num = (yyvsp[(2) - (2)]).num;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
|
||||||
|
/* Line 1806 of yacc.c */
|
||||||
|
#line 89 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{
|
{
|
||||||
(yyval).type = FILE_PARAM;
|
(yyval).type = FILE_PARAM;
|
||||||
(yyval).file.name = (yyvsp[(1) - (3)]).str;
|
(yyval).file.name = (yyvsp[(1) - (3)]).str;
|
||||||
|
@ -1450,10 +1467,10 @@ yyreduce:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 8:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 88 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 94 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{
|
{
|
||||||
(yyval).type = METHOD_PARAM;
|
(yyval).type = METHOD_PARAM;
|
||||||
(yyval).method.class = (yyvsp[(1) - (3)]).str;
|
(yyval).method.class = (yyvsp[(1) - (3)]).str;
|
||||||
|
@ -1461,96 +1478,116 @@ yyreduce:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
|
||||||
#line 93 "sapi/phpdbg/dev/phpdbg_parser.y"
|
|
||||||
{
|
|
||||||
(yyval).type = NUMERIC_METHOD_PARAM;
|
|
||||||
(yyval).method.class = (yyvsp[(1) - (5)]).str;
|
|
||||||
(yyval).method.name = (yyvsp[(3) - (5)]).str;
|
|
||||||
(yyval).num = (yyvsp[(5) - (5)]).num;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 99 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 99 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{
|
{
|
||||||
(yyval).type = NUMERIC_FUNCTION_PARAM;
|
(yyval).type = NUMERIC_METHOD_PARAM;
|
||||||
(yyval).str = (yyvsp[(1) - (3)]).str;
|
(yyval).method.class = (yyvsp[(1) - (5)]).str;
|
||||||
(yyval).num = (yyvsp[(3) - (3)]).num;
|
(yyval).method.name = (yyvsp[(3) - (5)]).str;
|
||||||
|
(yyval).num = (yyvsp[(5) - (5)]).num;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 104 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 105 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(1) - (1)]); }
|
{
|
||||||
|
(yyval).type = NUMERIC_FUNCTION_PARAM;
|
||||||
|
(yyval).str = (yyvsp[(1) - (3)]).str;
|
||||||
|
(yyval).len = (yyvsp[(1) - (3)]).len;
|
||||||
|
(yyval).num = (yyvsp[(3) - (3)]).num;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 105 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 111 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(1) - (1)]); }
|
{
|
||||||
|
(yyval).type = COND_PARAM;
|
||||||
|
(yyval).str = (yyvsp[(2) - (2)]).str;
|
||||||
|
(yyval).len = (yyvsp[(2) - (2)]).len;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 106 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 116 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(1) - (1)]); }
|
{
|
||||||
|
(yyval).type = EVAL_PARAM;
|
||||||
|
(yyval).str = (yyvsp[(2) - (2)]).str;
|
||||||
|
(yyval).len = (yyvsp[(2) - (2)]).len;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 107 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 121 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(1) - (1)]); }
|
{
|
||||||
|
(yyval).type = SHELL_PARAM;
|
||||||
|
(yyval).str = (yyvsp[(2) - (2)]).str;
|
||||||
|
(yyval).len = (yyvsp[(2) - (2)]).len;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 14:
|
case 14:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 108 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 126 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(1) - (1)]); }
|
{ (yyval) = (yyvsp[(1) - (1)]); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 15:
|
case 15:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 109 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 127 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(1) - (1)]); }
|
{ (yyval) = (yyvsp[(1) - (1)]); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 110 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 128 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(2) - (2)]); (yyval).type = COND_PARAM; }
|
{ (yyval) = (yyvsp[(1) - (1)]); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 17:
|
case 17:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 111 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 129 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(2) - (2)]); (yyval).type = EVAL_PARAM; }
|
{ (yyval) = (yyvsp[(1) - (1)]); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18:
|
case 18:
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 112 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 130 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
{ (yyval) = (yyvsp[(2) - (2)]); (yyval).type = SHELL_PARAM; }
|
{ (yyval) = (yyvsp[(1) - (1)]); }
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 19:
|
||||||
|
|
||||||
|
/* Line 1806 of yacc.c */
|
||||||
|
#line 131 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
|
{ (yyval) = (yyvsp[(1) - (1)]); }
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 20:
|
||||||
|
|
||||||
|
/* Line 1806 of yacc.c */
|
||||||
|
#line 132 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
|
{ (yyval) = (yyvsp[(1) - (1)]); }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Line 1806 of yacc.c */
|
/* Line 1806 of yacc.c */
|
||||||
#line 1554 "sapi/phpdbg/phpdbg_parser.c"
|
#line 1591 "sapi/phpdbg/phpdbg_parser.c"
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
/* User semantic actions sometimes alter yychar, and that requires
|
/* User semantic actions sometimes alter yychar, and that requires
|
||||||
|
@ -1781,6 +1818,6 @@ yyreturn:
|
||||||
|
|
||||||
|
|
||||||
/* Line 2067 of yacc.c */
|
/* Line 2067 of yacc.c */
|
||||||
#line 115 "sapi/phpdbg/dev/phpdbg_parser.y"
|
#line 135 "sapi/phpdbg/dev/phpdbg_parser.y"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,15 +58,17 @@ typedef void* yyscan_t;
|
||||||
T_TRUTHY = 261,
|
T_TRUTHY = 261,
|
||||||
T_FALSY = 262,
|
T_FALSY = 262,
|
||||||
T_STRING = 263,
|
T_STRING = 263,
|
||||||
T_COLON = 264,
|
T_SQUIGGLE = 264,
|
||||||
T_DCOLON = 265,
|
T_COLON = 265,
|
||||||
T_POUND = 266,
|
T_DCOLON = 266,
|
||||||
T_DIGITS = 267,
|
T_POUND = 267,
|
||||||
T_LITERAL = 268,
|
T_DIGITS = 268,
|
||||||
T_OPLINE = 269,
|
T_LITERAL = 269,
|
||||||
T_ID = 270,
|
T_ADDR = 270,
|
||||||
T_INPUT = 271,
|
T_OPCODE = 271,
|
||||||
T_UNEXPECTED = 272
|
T_ID = 272,
|
||||||
|
T_INPUT = 273,
|
||||||
|
T_UNEXPECTED = 274
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -784,6 +784,9 @@ PHPDBG_COMMAND(break) /* {{{ */
|
||||||
case STR_PARAM:
|
case STR_PARAM:
|
||||||
phpdbg_set_breakpoint_symbol(param->str, param->len TSRMLS_CC);
|
phpdbg_set_breakpoint_symbol(param->str, param->len TSRMLS_CC);
|
||||||
break;
|
break;
|
||||||
|
case OP_PARAM:
|
||||||
|
phpdbg_set_breakpoint_opcode(param->str, param->len TSRMLS_CC);
|
||||||
|
break;
|
||||||
|
|
||||||
phpdbg_default_switch_case();
|
phpdbg_default_switch_case();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue