From: krakjoe Date: Tue, 18 Feb 2014 20:04:02 +0000 (+0000) Subject: ... X-Git-Tag: php-5.6.0beta2~1^2~37^2~20^2~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1952750af600c759648d32a3b9badcb61f542f14;p=php ... --- diff --git a/dev/phpdbg_parser.y b/dev/phpdbg_parser.y index 49925f6709..90e79f8b5a 100644 --- a/dev/phpdbg_parser.y +++ b/dev/phpdbg_parser.y @@ -11,6 +11,7 @@ #include "phpdbg.h" #include "phpdbg_cmd.h" #include "phpdbg_utils.h" +#include "phpdbg_cmd.h" #include "phpdbg_prompt.h" #define YYSTYPE phpdbg_param_t @@ -22,194 +23,17 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg); int yyerror(phpdbg_param_t *stack, yyscan_t scanner, const char *msg) { phpdbg_error("Parse Error: %s", msg); + { + const phpdbg_param_t *top = stack; + zend_ulong position = 0L; + + while (top) { + phpdbg_param_debug( + top, "--> "); + top = top->next; + } + } } - -void phpdbg_debug_param(const phpdbg_param_t *param, const char *msg) { - if (param && param->type) { - switch (param->type) { - case STR_PARAM: - fprintf(stderr, "%s STR_PARAM(%s=%d)\n", msg, param->str, param->len); - break; - - case ADDR_PARAM: - fprintf(stderr, "%s ADDR_PARAM(%lu)\n", msg, param->addr); - break; - - case FILE_PARAM: - fprintf(stderr, "%s FILE_PARAM(%s:%d)\n", msg, param->file.name, param->file.line); - break; - - case METHOD_PARAM: - fprintf(stderr, "%s METHOD_PARAM(%s::%s)\n", msg, param->method.class, param->method.name); - break; - - case NUMERIC_METHOD_PARAM: - fprintf(stderr, "%s NUMERIC_METHOD_PARAM(%s::%s)\n", msg, param->method.class, param->method.name); - break; - - case NUMERIC_FUNCTION_PARAM: - fprintf(stderr, "%s NUMERIC_FUNCTION_PARAM(%s::%s)\n", msg, param->str, param->num); - break; - - case NUMERIC_PARAM: - fprintf(stderr, "%s NUMERIC_PARAM(%ld)\n", msg, param->num); - break; - - case COND_PARAM: - fprintf(stderr, "%s COND_PARAM(%s=%d)\n", msg, param->str, param->len); - break; - } - } -} - -void phpdbg_stack_free(phpdbg_param_t *stack) { - if (stack && stack->next) { - phpdbg_param_t *remove = stack->next; - - while (remove) { - phpdbg_param_t *next = NULL; - - if (remove->next) - next = remove->next; - - switch (remove->type) { - case STR_PARAM: - if (remove->str) { - free(remove->str); - } - break; - - case FILE_PARAM: - if (remove->file.name) { - free(remove->file.name); - } - break; - } - - free(remove); - - if (next) - remove = next; - else break; - } - } -} - -static void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param) { - phpdbg_param_t *next = calloc(1, sizeof(phpdbg_param_t)); - - if (!next) - return; - - *(next) = *(param); - - if (stack->top == NULL) { - stack->top = next; - stack->next = next; - } else { - stack->top->next = next; - next->top = stack->top; - stack->top = next; - } - - stack->len++; -} - -phpdbg_command_t* phpdbg_stack_resolve(const phpdbg_command_t *commands, phpdbg_param_t **top, char **why) { - const phpdbg_command_t *command = commands; - phpdbg_param_t *name = *top; - phpdbg_command_t *matched[3] = {NULL, NULL, NULL}; - ulong matches = 0L; - - while (command && command->name && command->handler) { - if (command->name_len >= name->len) { - if (memcmp(command->name, name->str, name->len) == SUCCESS) { - if (matches < 3) { - matched[matches] = command; - matches++; - } else break; - } - } - command++; - } - - switch (matches) { - case 0: { - asprintf( - why, - "The command %s could not be found", - name->str); - } break; - - case 1: { - (*top) = (*top)->next; - if (matched[0]->subs && (*top) && ((*top)->type == STR_PARAM)) { - command = phpdbg_stack_resolve(matched[0]->subs, top, why); - if (command) { - return command; - } - } - - return matched[0]; - } break; - - default: { - asprintf( - why, - "The command %s is ambigious, matching %d commands", - name->str, matches); - } - } - - return NULL; -} - -int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) { - phpdbg_param_t *command = NULL, - *params = NULL; - phpdbg_command_t *handler = NULL; - - if (stack->type != STACK_PARAM) { - asprintf( - why, "the passed argument was not a stack !!"); - return FAILURE; - } - - if (!stack->len) { - asprintf( - why, "the stack contains nothing !!"); - return FAILURE; - } - - command = (phpdbg_param_t*) stack->next; - - switch (command->type) { - case EVAL_PARAM: - return PHPDBG_COMMAND_HANDLER(eval)(command, NULL TSRMLS_CC); - - case SHELL_PARAM: - return PHPDBG_COMMAND_HANDLER(shell)(command, NULL TSRMLS_CC); - - case STR_PARAM: { - handler = phpdbg_stack_resolve( - phpdbg_prompt_commands, &command, why); - - if (handler) { - return handler->handler(command, NULL TSRMLS_CC); - } else { - return FAILURE; - } - } break; - - default: - asprintf( - why, "the first parameter makes no sense !!"); - return FAILURE; - } - - return SUCCESS; -} - %} %code requires { diff --git a/phpdbg_cmd.c b/phpdbg_cmd.c index dde0c813fa..27b8e15de8 100644 --- a/phpdbg_cmd.c +++ b/phpdbg_cmd.c @@ -22,6 +22,7 @@ #include "phpdbg_cmd.h" #include "phpdbg_utils.h" #include "phpdbg_set.h" +#include "phpdbg_prompt.h" ZEND_EXTERN_MODULE_GLOBALS(phpdbg); @@ -376,6 +377,197 @@ PHPDBG_API zend_bool phpdbg_match_param(const phpdbg_param_t *l, const phpdbg_pa return 0; } /* }}} */ +/* {{{ */ +PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg) { + if (param && param->type) { + switch (param->type) { + case STR_PARAM: + fprintf(stderr, "%s STR_PARAM(%s=%d)\n", msg, param->str, param->len); + break; + + case ADDR_PARAM: + fprintf(stderr, "%s ADDR_PARAM(%lu)\n", msg, param->addr); + break; + + case FILE_PARAM: + fprintf(stderr, "%s FILE_PARAM(%s:%d)\n", msg, param->file.name, param->file.line); + break; + + case METHOD_PARAM: + fprintf(stderr, "%s METHOD_PARAM(%s::%s)\n", msg, param->method.class, param->method.name); + break; + + case NUMERIC_METHOD_PARAM: + fprintf(stderr, "%s NUMERIC_METHOD_PARAM(%s::%s)\n", msg, param->method.class, param->method.name); + break; + + case NUMERIC_FUNCTION_PARAM: + fprintf(stderr, "%s NUMERIC_FUNCTION_PARAM(%s::%s)\n", msg, param->str, param->num); + break; + + case NUMERIC_PARAM: + fprintf(stderr, "%s NUMERIC_PARAM(%ld)\n", msg, param->num); + break; + + case COND_PARAM: + fprintf(stderr, "%s COND_PARAM(%s=%d)\n", msg, param->str, param->len); + break; + } + } +} /* }}} */ + +/* {{{ */ +PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack) { + if (stack && stack->next) { + phpdbg_param_t *remove = stack->next; + + while (remove) { + phpdbg_param_t *next = NULL; + + if (remove->next) + next = remove->next; + + switch (remove->type) { + case STR_PARAM: + if (remove->str) { + free(remove->str); + } + break; + + case FILE_PARAM: + if (remove->file.name) { + free(remove->file.name); + } + break; + } + + free(remove); + + if (next) + remove = next; + else break; + } + } +} /* }}} */ + +/* {{{ */ +PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param) { + phpdbg_param_t *next = calloc(1, sizeof(phpdbg_param_t)); + + if (!next) + return; + + *(next) = *(param); + + if (stack->top == NULL) { + stack->top = next; + stack->next = next; + } else { + stack->top->next = next; + next->top = stack->top; + stack->top = next; + } + + stack->len++; +} /* }}} */ + +/* {{{ */ +PHPDBG_API phpdbg_command_t* phpdbg_stack_resolve(const phpdbg_command_t *commands, phpdbg_param_t **top, char **why) { + const phpdbg_command_t *command = commands; + phpdbg_param_t *name = *top; + phpdbg_command_t *matched[3] = {NULL, NULL, NULL}; + ulong matches = 0L; + + while (command && command->name && command->handler) { + if (command->name_len >= name->len) { + if (memcmp(command->name, name->str, name->len) == SUCCESS) { + if (matches < 3) { + matched[matches] = command; + matches++; + } else break; + } + } + command++; + } + + switch (matches) { + case 0: { + asprintf( + why, + "The command %s could not be found", + name->str); + } break; + + case 1: { + (*top) = (*top)->next; + if (matched[0]->subs && (*top) && ((*top)->type == STR_PARAM)) { + command = phpdbg_stack_resolve(matched[0]->subs, top, why); + if (command) { + return command; + } + } + + return matched[0]; + } break; + + default: { + asprintf( + why, + "The command %s is ambigious, matching %d commands", + name->str, matches); + } + } + + return NULL; +} /* }}} */ + +/* {{{ */ +PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) { + phpdbg_param_t *command = NULL, + *params = NULL; + phpdbg_command_t *handler = NULL; + + if (stack->type != STACK_PARAM) { + asprintf( + why, "the passed argument was not a stack !!"); + return FAILURE; + } + + if (!stack->len) { + asprintf( + why, "the stack contains nothing !!"); + return FAILURE; + } + + command = (phpdbg_param_t*) stack->next; + + switch (command->type) { + case EVAL_PARAM: + return PHPDBG_COMMAND_HANDLER(eval)(command, NULL TSRMLS_CC); + + case SHELL_PARAM: + return PHPDBG_COMMAND_HANDLER(shell)(command, NULL TSRMLS_CC); + + case STR_PARAM: { + handler = phpdbg_stack_resolve( + phpdbg_prompt_commands, &command, why); + + if (handler) { + return handler->handler(command, NULL TSRMLS_CC); + } else { + return FAILURE; + } + } break; + + default: + asprintf( + why, "the first parameter makes no sense !!"); + return FAILURE; + } + + return SUCCESS; +} /* }}} */ + PHPDBG_API char* phpdbg_read_input(char *buffered TSRMLS_DC) /* {{{ */ { char *cmd = NULL; diff --git a/phpdbg_cmd.h b/phpdbg_cmd.h index af24837d94..d22650c671 100644 --- a/phpdbg_cmd.h +++ b/phpdbg_cmd.h @@ -143,6 +143,14 @@ typedef struct { PHPDBG_API char* phpdbg_read_input(char *buffered TSRMLS_DC); PHPDBG_API void phpdbg_destroy_input(char** TSRMLS_DC); +/** + * Stack Management + */ +PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param); +PHPDBG_API phpdbg_command_t* phpdbg_stack_resolve(const phpdbg_command_t *commands, phpdbg_param_t **top, char **why); +PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, char **why); +PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack); + /* * Parameter Management */ @@ -153,6 +161,7 @@ PHPDBG_API zend_bool phpdbg_match_param(const phpdbg_param_t *, const phpdbg_par PHPDBG_API zend_ulong phpdbg_hash_param(const phpdbg_param_t * TSRMLS_DC); PHPDBG_API const char* phpdbg_get_param_type(const phpdbg_param_t* TSRMLS_DC); PHPDBG_API char* phpdbg_param_tostring(const phpdbg_param_t *param, char **pointer TSRMLS_DC); +PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg); /** * Command Declarators diff --git a/phpdbg_parser.c b/phpdbg_parser.c index ffc8de0b4a..37bd4d80bc 100644 --- a/phpdbg_parser.c +++ b/phpdbg_parser.c @@ -79,6 +79,7 @@ #include "phpdbg.h" #include "phpdbg_cmd.h" #include "phpdbg_utils.h" +#include "phpdbg_cmd.h" #include "phpdbg_prompt.h" #define YYSTYPE phpdbg_param_t @@ -90,198 +91,21 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg); int yyerror(phpdbg_param_t *stack, yyscan_t scanner, const char *msg) { phpdbg_error("Parse Error: %s", msg); + { + const phpdbg_param_t *top = stack; + zend_ulong position = 0L; + + while (top) { + phpdbg_param_debug( + top, "--> "); + top = top->next; + } + } } -void phpdbg_debug_param(const phpdbg_param_t *param, const char *msg) { - if (param && param->type) { - switch (param->type) { - case STR_PARAM: - fprintf(stderr, "%s STR_PARAM(%s=%d)\n", msg, param->str, param->len); - break; - - case ADDR_PARAM: - fprintf(stderr, "%s ADDR_PARAM(%lu)\n", msg, param->addr); - break; - - case FILE_PARAM: - fprintf(stderr, "%s FILE_PARAM(%s:%d)\n", msg, param->file.name, param->file.line); - break; - - case METHOD_PARAM: - fprintf(stderr, "%s METHOD_PARAM(%s::%s)\n", msg, param->method.class, param->method.name); - break; - - case NUMERIC_METHOD_PARAM: - fprintf(stderr, "%s NUMERIC_METHOD_PARAM(%s::%s)\n", msg, param->method.class, param->method.name); - break; - - case NUMERIC_FUNCTION_PARAM: - fprintf(stderr, "%s NUMERIC_FUNCTION_PARAM(%s::%s)\n", msg, param->str, param->num); - break; - - case NUMERIC_PARAM: - fprintf(stderr, "%s NUMERIC_PARAM(%ld)\n", msg, param->num); - break; - - case COND_PARAM: - fprintf(stderr, "%s COND_PARAM(%s=%d)\n", msg, param->str, param->len); - break; - } - } -} - -void phpdbg_stack_free(phpdbg_param_t *stack) { - if (stack && stack->next) { - phpdbg_param_t *remove = stack->next; - - while (remove) { - phpdbg_param_t *next = NULL; - - if (remove->next) - next = remove->next; - - switch (remove->type) { - case STR_PARAM: - if (remove->str) { - free(remove->str); - } - break; - - case FILE_PARAM: - if (remove->file.name) { - free(remove->file.name); - } - break; - } - - free(remove); - - if (next) - remove = next; - else break; - } - } -} - -static void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param) { - phpdbg_param_t *next = calloc(1, sizeof(phpdbg_param_t)); - - if (!next) - return; - - *(next) = *(param); - - if (stack->top == NULL) { - stack->top = next; - stack->next = next; - } else { - stack->top->next = next; - next->top = stack->top; - stack->top = next; - } - - stack->len++; -} - -phpdbg_command_t* phpdbg_stack_resolve(const phpdbg_command_t *commands, phpdbg_param_t **top, char **why) { - const phpdbg_command_t *command = commands; - phpdbg_param_t *name = *top; - phpdbg_command_t *matched[3] = {NULL, NULL, NULL}; - ulong matches = 0L; - - while (command && command->name && command->handler) { - if (command->name_len >= name->len) { - if (memcmp(command->name, name->str, name->len) == SUCCESS) { - if (matches < 3) { - matched[matches] = command; - matches++; - } else break; - } - } - command++; - } - - switch (matches) { - case 0: { - asprintf( - why, - "The command %s could not be found", - name->str); - } break; - - case 1: { - (*top) = (*top)->next; - if (matched[0]->subs && (*top) && ((*top)->type == STR_PARAM)) { - command = phpdbg_stack_resolve(matched[0]->subs, top, why); - if (command) { - return command; - } - } - - return matched[0]; - } break; - - default: { - asprintf( - why, - "The command %s is ambigious, matching %d commands", - name->str, matches); - } - } - - return NULL; -} - -int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) { - phpdbg_param_t *command = NULL, - *params = NULL; - phpdbg_command_t *handler = NULL; - - if (stack->type != STACK_PARAM) { - asprintf( - why, "the passed argument was not a stack !!"); - return FAILURE; - } - - if (!stack->len) { - asprintf( - why, "the stack contains nothing !!"); - return FAILURE; - } - - command = (phpdbg_param_t*) stack->next; - - switch (command->type) { - case EVAL_PARAM: - return PHPDBG_COMMAND_HANDLER(eval)(command, NULL TSRMLS_CC); - - case SHELL_PARAM: - return PHPDBG_COMMAND_HANDLER(shell)(command, NULL TSRMLS_CC); - - case STR_PARAM: { - handler = phpdbg_stack_resolve( - phpdbg_prompt_commands, &command, why); - - if (handler) { - return handler->handler(command, NULL TSRMLS_CC); - } else { - return FAILURE; - } - } break; - - default: - asprintf( - why, "the first parameter makes no sense !!"); - return FAILURE; - } - - return SUCCESS; -} - - /* Line 268 of yacc.c */ -#line 285 "sapi/phpdbg/phpdbg_parser.c" +#line 109 "sapi/phpdbg/phpdbg_parser.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -304,7 +128,7 @@ int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) { /* "%code requires" blocks. */ /* Line 288 of yacc.c */ -#line 215 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 39 "sapi/phpdbg/dev/phpdbg_parser.y" #include "phpdbg.h" #ifndef YY_TYPEDEF_YY_SCANNER_T @@ -315,7 +139,7 @@ typedef void* yyscan_t; /* Line 288 of yacc.c */ -#line 319 "sapi/phpdbg/phpdbg_parser.c" +#line 143 "sapi/phpdbg/phpdbg_parser.c" /* Tokens. */ #ifndef YYTOKENTYPE @@ -356,7 +180,7 @@ typedef int YYSTYPE; /* Line 343 of yacc.c */ -#line 360 "sapi/phpdbg/phpdbg_parser.c" +#line 184 "sapi/phpdbg/phpdbg_parser.c" #ifdef short # undef short @@ -648,11 +472,11 @@ static const yytype_int8 yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const yytype_uint8 yyrline[] = { - 0, 251, 251, 255, 256, 260, 261, 265, 266, 270, - 271, 275, 276, 280, 281, 282, 283, 284, 285, 286, - 287, 288, 289, 290, 294 + 0, 75, 75, 79, 80, 84, 85, 89, 90, 94, + 95, 99, 100, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 118 }; #endif @@ -1610,133 +1434,133 @@ yyreduce: case 3: /* Line 1806 of yacc.c */ -#line 255 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 79 "sapi/phpdbg/dev/phpdbg_parser.y" { phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); } break; case 4: /* Line 1806 of yacc.c */ -#line 256 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 80 "sapi/phpdbg/dev/phpdbg_parser.y" { phpdbg_stack_push(stack, &(yyvsp[(2) - (2)])); } break; case 7: /* Line 1806 of yacc.c */ -#line 265 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 89 "sapi/phpdbg/dev/phpdbg_parser.y" { phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); } break; case 8: /* Line 1806 of yacc.c */ -#line 266 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 90 "sapi/phpdbg/dev/phpdbg_parser.y" { phpdbg_stack_push(stack, &(yyvsp[(2) - (2)])); } break; case 9: /* Line 1806 of yacc.c */ -#line 270 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 94 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).type = EVAL_PARAM; } break; case 10: /* Line 1806 of yacc.c */ -#line 271 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 95 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).type = SHELL_PARAM; } break; case 12: /* Line 1806 of yacc.c */ -#line 276 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 100 "sapi/phpdbg/dev/phpdbg_parser.y" { phpdbg_stack_push(stack, &(yyvsp[(1) - (1)])); } break; case 13: /* Line 1806 of yacc.c */ -#line 280 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 104 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 14: /* Line 1806 of yacc.c */ -#line 281 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 105 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 15: /* Line 1806 of yacc.c */ -#line 282 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 106 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 16: /* Line 1806 of yacc.c */ -#line 283 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 107 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 17: /* Line 1806 of yacc.c */ -#line 284 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 108 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 18: /* Line 1806 of yacc.c */ -#line 285 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 109 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 19: /* Line 1806 of yacc.c */ -#line 286 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 110 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 20: /* Line 1806 of yacc.c */ -#line 287 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 111 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 21: /* Line 1806 of yacc.c */ -#line 288 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 112 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 22: /* Line 1806 of yacc.c */ -#line 289 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 113 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(1) - (1)]); } break; case 23: /* Line 1806 of yacc.c */ -#line 290 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 114 "sapi/phpdbg/dev/phpdbg_parser.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).type = COND_PARAM; } break; /* Line 1806 of yacc.c */ -#line 1740 "sapi/phpdbg/phpdbg_parser.c" +#line 1564 "sapi/phpdbg/phpdbg_parser.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1967,6 +1791,6 @@ yyreturn: /* Line 2067 of yacc.c */ -#line 296 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 120 "sapi/phpdbg/dev/phpdbg_parser.y" diff --git a/phpdbg_parser.h b/phpdbg_parser.h index b307843dec..5c0ac4819e 100644 --- a/phpdbg_parser.h +++ b/phpdbg_parser.h @@ -33,7 +33,7 @@ /* "%code requires" blocks. */ /* Line 2068 of yacc.c */ -#line 215 "sapi/phpdbg/dev/phpdbg_parser.y" +#line 39 "sapi/phpdbg/dev/phpdbg_parser.y" #include "phpdbg.h" #ifndef YY_TYPEDEF_YY_SCANNER_T diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 9a0946138c..6aff5dd0d1 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -965,8 +965,6 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */ input = phpdbg_read_input(NULL TSRMLS_CC); - printf("got input %s\n", input); - if (input) { do { yyscan_t scanner;