]> granicus.if.org Git - php/commitdiff
...
authorkrakjoe <joe.watkins@live.co.uk>
Tue, 18 Feb 2014 20:04:02 +0000 (20:04 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Tue, 18 Feb 2014 20:04:02 +0000 (20:04 +0000)
dev/phpdbg_parser.y
phpdbg_cmd.c
phpdbg_cmd.h
phpdbg_parser.c
phpdbg_parser.h
phpdbg_prompt.c

index 49925f6709838559b67f96f8f415243fd450ec12..90e79f8b5a3dcde3286f44fd02c5317cc7536478 100644 (file)
@@ -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 {
index dde0c813fa8f0336aaa7de5be42f7303bebda1c9..27b8e15de896bc8123cb599bd7e93dced712a1ee 100644 (file)
@@ -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;
index af24837d946467bf1bd3db47d961397e65af71a0..d22650c67160b2e34040a993f40f2ecc48f7b4e4 100644 (file)
@@ -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
index ffc8de0b4a17a712ecbc314d6b4dd70732301160..37bd4d80bc3f45f328f83cf0dc3dae5a3d30f879 100644 (file)
@@ -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"
 
 
index b307843dec1cd0eb8b1db806ef18bc90fde3bbc0..5c0ac4819e7555e1d75ebd0f192363ca09702854 100644 (file)
@@ -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
index 9a0946138c47a5aa0e178e7c01c7e4312eb21966..6aff5dd0d1a8f29329fd6f487dcaa310d383b148 100644 (file)
@@ -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;