diff options
Diffstat (limited to 'sapi')
44 files changed, 122 insertions, 4554 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 23eef816a8..283ec5722d 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -482,7 +482,9 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp zend_signal_startup(); sapi_startup(&apache2_sapi_module); - apache2_sapi_module.startup(&apache2_sapi_module); + if (apache2_sapi_module.startup(&apache2_sapi_module) != SUCCESS) { + return DONE; + } apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null); php_apache_add_version(pconf); diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index fb16f2b577..29f8c1a9b8 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -183,7 +183,7 @@ typedef struct _php_cgi_globals_struct { * Key for each cache entry is dirname(PATH_TRANSLATED). * * NOTE: Each cache entry config_hash contains the combination from all user ini files found in - * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point + * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point * storing per-file entries as it would not be possible to detect added / deleted entries * between separate files. */ @@ -244,13 +244,6 @@ static void fcgi_log(int type, const char *format, ...) { } #endif -static int print_module_info(zval *element) -{ - zend_module_entry *module = Z_PTR_P(element); - php_printf("%s\n", module->name); - return ZEND_HASH_APPLY_KEEP; -} - static int module_name_cmp(const void *a, const void *b) { Bucket *f = (Bucket *) a; @@ -263,11 +256,14 @@ static int module_name_cmp(const void *a, const void *b) static void print_modules(void) { HashTable sorted_registry; + zend_module_entry *module; zend_hash_init(&sorted_registry, 64, NULL, NULL, 1); zend_hash_copy(&sorted_registry, &module_registry, NULL); zend_hash_sort(&sorted_registry, module_name_cmp, 0); - zend_hash_apply(&sorted_registry, print_module_info); + ZEND_HASH_FOREACH_PTR(&sorted_registry, module) { + php_printf("%s\n", module->name); + } ZEND_HASH_FOREACH_END(); zend_hash_destroy(&sorted_registry); } @@ -2155,6 +2151,7 @@ consult the installation file that came with this distribution, or visit \n\ char *err_text = php_win32_error_to_msg(err); fprintf(stderr, "unable to get current command line: [0x%08lx]: %s\n", err, err_text); + php_win32_error_msg_free(err_text); goto parent_out; } @@ -2173,6 +2170,8 @@ consult the installation file that came with this distribution, or visit \n\ fprintf(stderr, "unable to create job object: [0x%08lx]: %s\n", err, err_text); + php_win32_error_msg_free(err_text); + goto parent_out; } @@ -2182,6 +2181,7 @@ consult the installation file that came with this distribution, or visit \n\ char *err_text = php_win32_error_to_msg(err); fprintf(stderr, "unable to configure job object: [0x%08lx]: %s\n", err, err_text); + php_win32_error_msg_free(err_text); } while (parent) { @@ -2228,6 +2228,7 @@ consult the installation file that came with this distribution, or visit \n\ char *err_text = php_win32_error_to_msg(err); fprintf(stderr, "unable to assign child process to job object: [0x%08lx]: %s\n", err, err_text); + php_win32_error_msg_free(err_text); } CloseHandle(pi.hThread); } else { @@ -2237,6 +2238,7 @@ consult the installation file that came with this distribution, or visit \n\ kid_cgi_ps[i] = NULL; fprintf(stderr, "unable to spawn: [0x%08lx]: %s\n", err, err_text); + php_win32_error_msg_free(err_text); } } diff --git a/sapi/cgi/tests/004.phpt b/sapi/cgi/tests/004.phpt index 93c48c9ff4..c41df11acc 100644 --- a/sapi/cgi/tests/004.phpt +++ b/sapi/cgi/tests/004.phpt @@ -16,8 +16,8 @@ $filename = dirname(__FILE__).'/004.test.php'; $code =' <?php -class test { - private $pri; +class test { + private $pri; } var_dump(test::$pri); diff --git a/sapi/tests/bug69487.phpt b/sapi/cgi/tests/bug69487.phpt index 3ac3796826..3ac3796826 100644 --- a/sapi/tests/bug69487.phpt +++ b/sapi/cgi/tests/bug69487.phpt diff --git a/sapi/cgi/tests/bug75574_utf8_win.phpt b/sapi/cgi/tests/bug75574_utf8.phpt index c6e33e54ed..650d4a75f1 100644 --- a/sapi/cgi/tests/bug75574_utf8_win.phpt +++ b/sapi/cgi/tests/bug75574_utf8.phpt @@ -2,10 +2,6 @@ Bug #75574 putenv does not work properly if parameter contains non-ASCII unicode character, UTF-8 --SKIPIF-- <?php - -if (substr(PHP_OS, 0, 3) != 'WIN') { - die("skip Valid only on Windows"); -} include "skipif.inc"; ?> --FILE-- diff --git a/sapi/cli/generate_mime_type_map.php b/sapi/cli/generate_mime_type_map.php index 0cea031e37..0cea031e37 100644..100755 --- a/sapi/cli/generate_mime_type_map.php +++ b/sapi/cli/generate_mime_type_map.php diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 3b053e223a..be0f11e431 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -182,14 +182,6 @@ const opt_struct OPTIONS[] = { {'-', 0, NULL} /* end of args */ }; -static int print_module_info(zval *element) /* {{{ */ -{ - zend_module_entry *module = (zend_module_entry*)Z_PTR_P(element); - php_printf("%s\n", module->name); - return ZEND_HASH_APPLY_KEEP; -} -/* }}} */ - static int module_name_cmp(const void *a, const void *b) /* {{{ */ { Bucket *f = (Bucket *) a; @@ -203,11 +195,14 @@ static int module_name_cmp(const void *a, const void *b) /* {{{ */ static void print_modules(void) /* {{{ */ { HashTable sorted_registry; + zend_module_entry *module; zend_hash_init(&sorted_registry, 50, NULL, NULL, 0); zend_hash_copy(&sorted_registry, &module_registry, NULL); zend_hash_sort(&sorted_registry, module_name_cmp, 0); - zend_hash_apply(&sorted_registry, print_module_info); + ZEND_HASH_FOREACH_PTR(&sorted_registry, module) { + php_printf("%s\n", module->name); + } ZEND_HASH_FOREACH_END(); zend_hash_destroy(&sorted_registry); } /* }}} */ diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 5386aa54c6..bcbbab3c01 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -37,10 +37,6 @@ #include <unixlib/local.h> #endif - -#if HAVE_TIME_H -#include <time.h> -#endif #if HAVE_SYS_TIME_H #include <sys/time.h> #endif diff --git a/sapi/cli/tests/002-win32.phpt b/sapi/cli/tests/002-unix.phpt index 2895d15211..2be668f188 100644 --- a/sapi/cli/tests/002-win32.phpt +++ b/sapi/cli/tests/002-unix.phpt @@ -3,8 +3,8 @@ running code with -r --SKIPIF-- <?php include "skipif.inc"; -if (substr(PHP_OS, 0, 3) != 'WIN') { - die ("skip only for Windows"); +if (substr(PHP_OS, 0, 3) == 'WIN') { + die ("skip not for Windows"); } ?> --FILE-- @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { $php = getenv('TEST_PHP_EXECUTABLE'); -var_dump(`$php -n -r "var_dump('hello');"`); +var_dump(`$php -n -r 'var_dump("hello");'`); echo "Done\n"; ?> diff --git a/sapi/cli/tests/002.phpt b/sapi/cli/tests/002.phpt index 2be668f188..9fb2465ee4 100644 --- a/sapi/cli/tests/002.phpt +++ b/sapi/cli/tests/002.phpt @@ -3,16 +3,13 @@ running code with -r --SKIPIF-- <?php include "skipif.inc"; -if (substr(PHP_OS, 0, 3) == 'WIN') { - die ("skip not for Windows"); -} ?> --FILE-- <?php $php = getenv('TEST_PHP_EXECUTABLE'); -var_dump(`$php -n -r 'var_dump("hello");'`); +var_dump(`$php -n -r "var_dump('hello');"`); echo "Done\n"; ?> diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt index 429254f4d6..d795c98879 100644 --- a/sapi/cli/tests/008.phpt +++ b/sapi/cli/tests/008.phpt @@ -16,8 +16,8 @@ $filename = dirname(__FILE__).'/008.test.php'; $code =' <?php -class test { - private $pri; +class test { + private $pri; } var_dump(test::$pri); diff --git a/sapi/cli/tests/argv_mb.phpt b/sapi/cli/tests/argv_mb.phpt index 2e14b1a192..3b7c6eac19 100644 --- a/sapi/cli/tests/argv_mb.phpt +++ b/sapi/cli/tests/argv_mb.phpt @@ -3,9 +3,6 @@ Test basic argv multibyte API integration --SKIPIF-- <?php include "skipif.inc"; -if (substr(PHP_OS, 0, 3) != 'WIN') { - die ("skip only for Windows"); -} ?> --FILE-- <?php diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index 44d842b285..77d10ae562 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -11,7 +11,7 @@ AC_DEFUN([AC_FPM_STDLIBS], AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(inet_addr, nsl) - AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h]) + AC_CHECK_HEADERS([fcntl.h unistd.h sys/uio.h]) AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/time.h]) AC_CHECK_HEADERS([arpa/inet.h netinet/in.h]) AC_CHECK_HEADERS([sysexits.h]) diff --git a/sapi/fpm/fpm/events/devpoll.c b/sapi/fpm/fpm/events/devpoll.c index e3f73bf126..b68047be8c 100644 --- a/sapi/fpm/fpm/events/devpoll.c +++ b/sapi/fpm/fpm/events/devpoll.c @@ -166,7 +166,7 @@ static int fpm_event_devpoll_wait(struct fpm_event_queue_s *queue, unsigned long } } - /* iterate throught triggered events */ + /* iterate through triggered events */ for (i = 0; i < ret; i++) { /* find the corresponding event */ @@ -200,7 +200,7 @@ static int fpm_event_devpoll_add(struct fpm_event_s *ev) /* {{{ */ { struct pollfd pollfd; - /* fill pollfd with event informations */ + /* fill pollfd with event information */ pollfd.fd = ev->fd; pollfd.events = POLLIN; pollfd.revents = 0; @@ -225,7 +225,7 @@ static int fpm_event_devpoll_remove(struct fpm_event_s *ev) /* {{{ */ { struct pollfd pollfd; - /* fill pollfd with the same informations as fpm_event_devpoll_add */ + /* fill pollfd with the same information as fpm_event_devpoll_add */ pollfd.fd = ev->fd; pollfd.events = POLLIN | POLLREMOVE; pollfd.revents = 0; diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index df848acf86..58f777541d 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -195,7 +195,7 @@ void fpm_children_bury() /* {{{ */ snprintf(buf, sizeof(buf), "with code %d", WEXITSTATUS(status)); /* if it's been killed because of dynamic process management - * don't restart it automaticaly + * don't restart it automatically */ if (child && child->idle_kill) { restart_child = 0; @@ -216,7 +216,7 @@ void fpm_children_bury() /* {{{ */ snprintf(buf, sizeof(buf), "on signal %d (%s%s)", WTERMSIG(status), signame, have_core); /* if it's been killed because of dynamic process management - * don't restart it automaticaly + * don't restart it automatically */ if (child && child->idle_kill && WTERMSIG(status) == SIGQUIT) { restart_child = 0; diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 483fabe9d8..e149eeb2ed 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -162,7 +162,7 @@ typedef struct _php_cgi_globals_struct { * Key for each cache entry is dirname(PATH_TRANSLATED). * * NOTE: Each cache entry config_hash contains the combination from all user ini files found in - * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point + * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point * storing per-file entries as it would not be possible to detect added / deleted entries * between separate files. */ @@ -188,14 +188,6 @@ static php_cgi_globals_struct php_cgi_globals; #define CGIG(v) (php_cgi_globals.v) #endif -static int print_module_info(zval *zv) /* {{{ */ -{ - zend_module_entry *module = Z_PTR_P(zv); - php_printf("%s\n", module->name); - return 0; -} -/* }}} */ - static int module_name_cmp(const void *a, const void *b) /* {{{ */ { Bucket *f = (Bucket *) a; @@ -209,11 +201,14 @@ static int module_name_cmp(const void *a, const void *b) /* {{{ */ static void print_modules(void) /* {{{ */ { HashTable sorted_registry; + zend_module_entry *module; zend_hash_init(&sorted_registry, 50, NULL, NULL, 1); zend_hash_copy(&sorted_registry, &module_registry, NULL); zend_hash_sort(&sorted_registry, module_name_cmp, 0); - zend_hash_apply(&sorted_registry, print_module_info); + ZEND_HASH_FOREACH_PTR(&sorted_registry, module) { + php_printf("%s\n", module->name); + } ZEND_HASH_FOREACH_END(); zend_hash_destroy(&sorted_registry); } /* }}} */ diff --git a/sapi/fpm/fpm/fpm_request.c b/sapi/fpm/fpm/fpm_request.c index 65f9c4ae44..372df4a82d 100644 --- a/sapi/fpm/fpm/fpm_request.c +++ b/sapi/fpm/fpm/fpm_request.c @@ -25,7 +25,7 @@ static const char *requests_stages[] = { [FPM_REQUEST_ACCEPTING] = "Idle", [FPM_REQUEST_READING_HEADERS] = "Reading headers", - [FPM_REQUEST_INFO] = "Getting request informations", + [FPM_REQUEST_INFO] = "Getting request information", [FPM_REQUEST_EXECUTING] = "Running", [FPM_REQUEST_END] = "Ending", [FPM_REQUEST_FINISHED] = "Finishing", diff --git a/sapi/fpm/php-fpm.service.in b/sapi/fpm/php-fpm.service.in index 8a541c0865..857cb0e8f1 100644 --- a/sapi/fpm/php-fpm.service.in +++ b/sapi/fpm/php-fpm.service.in @@ -11,7 +11,61 @@ Type=@php_fpm_systemd@ PIDFile=@EXPANDED_LOCALSTATEDIR@/run/php-fpm.pid ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf ExecReload=/bin/kill -USR2 $MAINPID + +# Set up a new file system namespace and mounts private /tmp and /var/tmp directories +# so this service cannot access the global directories and other processes cannot +# access this service's directories. PrivateTmp=true +# The directories /home, /root and /run/user are made inaccessible and empty for processes +# invoked by this unit. +ProtectHome=true + +# Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit. +ProtectSystem=full + +# Ensures that the service process and all its children can never gain new privileges +NoNewPrivileges=true + +# Sets up a new /dev namespace for the executed processes and only adds API pseudo devices +# such as /dev/null, /dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it, +# but no physical devices such as /dev/sda. +PrivateDevices=true + +# Required for dropping privileges and running as a different user +CapabilityBoundingSet=CAP_SETGID CAP_SETUID + +# Attempts to create memory mappings that are writable and executable at the same time, +# or to change existing memory mappings to become executable are prohibited. +MemoryDenyWriteExecute=true + +# Explicit module loading will be denied. This allows to turn off module load and unload +# operations on modular kernels. It is recommended to turn this on for most services that +# do not need special file systems or extra kernel modules to work. +ProtectKernelModules=true + +# Kernel variables accessible through /proc/sys, /sys, /proc/sysrq-trigger, /proc/latency_stats, +# /proc/acpi, /proc/timer_stats, /proc/fs and /proc/irq will be made read-only to all processes +# of the unit. Usually, tunable kernel variables should only be written at boot-time, with the +# sysctl.d(5) mechanism. Almost no services need to write to these at runtime; it is hence +# recommended to turn this on for most services. +ProtectKernelTunables=true + +# The Linux Control Groups (cgroups(7)) hierarchies accessible through /sys/fs/cgroup will be +# made read-only to all processes of the unit. Except for container managers no services should +# require write access to the control groups hierarchies; it is hence recommended to turn this on +# for most services +ProtectControlGroups=true + +# Any attempts to enable realtime scheduling in a process of the unit are refused. +RestrictRealtime=true + +# Restricts the set of socket address families accessible to the processes of this unit. +# Protects against vulnerabilities such as CVE-2016-8655 +RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX + +# Takes away the ability to create or manage any kind of namespace +RestrictNamespaces=true + [Install] WantedBy=multi-user.target diff --git a/sapi/fpm/tests/fcgi.inc b/sapi/fpm/tests/fcgi.inc index 07603a808e..7e3ad0514b 100644 --- a/sapi/fpm/tests/fcgi.inc +++ b/sapi/fpm/tests/fcgi.inc @@ -428,7 +428,7 @@ class Client } /** - * Get Informations on the FastCGI application + * Get Information on the FastCGI application * * @param array $requestedInfo information to retrieve * @return array diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index f572816eef..cde2f7bd7f 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -28,10 +28,7 @@ #include "lsapilib.h" #include <stdio.h> - -#if HAVE_STDLIB_H #include <stdlib.h> -#endif #if HAVE_UNISTD_H #include <unistd.h> @@ -65,7 +62,7 @@ /* Key for each cache entry is dirname(PATH_TRANSLATED). * * NOTE: Each cache entry config_hash contains the combination from all user ini files found in - * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point + * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point * storing per-file entries as it would not be possible to detect added / deleted entries * between separate files. */ diff --git a/sapi/litespeed/lscriu.c b/sapi/litespeed/lscriu.c index 1318214f58..03cda5238e 100644 --- a/sapi/litespeed/lscriu.c +++ b/sapi/litespeed/lscriu.c @@ -51,10 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "lsapilib.h" #include <stdio.h> - -#if HAVE_STDLIB_H #include <stdlib.h> -#endif #if HAVE_UNISTD_H #include <unistd.h> diff --git a/sapi/phpdbg/Changelog.md b/sapi/phpdbg/Changelog.md deleted file mode 100644 index c5d8b51514..0000000000 --- a/sapi/phpdbg/Changelog.md +++ /dev/null @@ -1,52 +0,0 @@ -ChangeLog for phpdbg -==================== - -Version 0.3.0 2013-00-00 ------------------------- - -1. Added ability to disable an enable a single breakpoint -2. Added ability to override SAPI name -3. Added extended conditional breakpoint support "break at" -4. Fix loading of zend extnsions with -z -5. Fix crash when loading .phpdbginit with command line switch -6. Fix crash on startup errors -7. Added init.d for remote console (redhat) -8. Added phpdbg_exec userland function -9. Added testing facilities -10. Added break on n-th opline support -11. Improved trace output - -Version 0.2.0 2013-11-31 ------------------------- - -1. Added "break delete <id>" command -2. Added "break opcode <opcode>" command -3. Added "set" command - control prompt and console colors -4. .phpdbginit now searched in (additional) ini dirs -5. Added source command - load additional .phpdbginit script during session -6. Added remote console mode -7. Added info memory command - -Version 0.1.0 2013-11-23 ------------------------- - -1. New commands: - - until (continue until the current line is executed) - - frame (switch to a frame in the current stack for inspection) - - info (quick access to useful information on the console) - - finish (continue until the current function has returned) - - leave (continue until the current function is returning) - - shell (shell a command) - - register (register a function for use as a command) -2. Added printers for class and method -3. Make uniform commands and aliases where possible -4. Include all alias information and sub-command information in help -5. Added signal handling to break execution (ctrl-c) -6. Fixed #13 (Output Buffering Control seems fail) -7. Fixed #14 (Fixed typo in Makefile.frag) - - -Version 0.0.1 2013-11-15 ------------------------- - -1. Initial features diff --git a/sapi/phpdbg/create-test.php b/sapi/phpdbg/create-test.php index 3388165d86..3388165d86 100644..100755 --- a/sapi/phpdbg/create-test.php +++ b/sapi/phpdbg/create-test.php diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 03aaf54431..7836f1e351 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -481,7 +481,7 @@ static zend_always_inline zend_bool phpdbg_is_ignored_opcode(zend_uchar opcode) return opcode == ZEND_NOP || opcode == ZEND_OP_DATA || opcode == ZEND_FE_FREE || opcode == ZEND_FREE || opcode == ZEND_ASSERT_CHECK || opcode == ZEND_VERIFY_RETURN_TYPE || opcode == ZEND_DECLARE_CONST || opcode == ZEND_DECLARE_CLASS || opcode == ZEND_DECLARE_INHERITED_CLASS || opcode == ZEND_DECLARE_FUNCTION - || opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED || opcode == ZEND_VERIFY_ABSTRACT_CLASS || opcode == ZEND_ADD_TRAIT || opcode == ZEND_BIND_TRAITS + || opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED || opcode == ZEND_DECLARE_ANON_CLASS || opcode == ZEND_DECLARE_ANON_INHERITED_CLASS || opcode == ZEND_FAST_RET || opcode == ZEND_TICKS || opcode == ZEND_EXT_STMT || opcode == ZEND_EXT_FCALL_BEGIN || opcode == ZEND_EXT_FCALL_END || opcode == ZEND_EXT_NOP || opcode == ZEND_BIND_GLOBAL ; @@ -2157,9 +2157,7 @@ phpdbg_out: zend_hash_destroy(&PHPDBG_G(file_sources)); - zend_try { - php_module_shutdown(); - } zend_end_try(); + php_module_shutdown(); #ifndef _WIN32 /* force override (no zend_signals) to prevent crashes due to signal recursion in SIGSEGV/SIGBUS handlers */ diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h index 6d78033b5c..fb384ee55b 100644 --- a/sapi/phpdbg/phpdbg.h +++ b/sapi/phpdbg/phpdbg.h @@ -104,7 +104,7 @@ #define PHPDBG_NAME "phpdbg" #define PHPDBG_AUTHORS "Felipe Pena, Joe Watkins and Bob Weinand" /* Ordered by last name */ #define PHPDBG_ISSUES "http://bugs.php.net/report.php" -#define PHPDBG_VERSION "0.5.0" +#define PHPDBG_VERSION PHP_VERSION #define PHPDBG_INIT_FILENAME ".phpdbginit" #define PHPDBG_DEFAULT_PROMPT "prompt>" /* }}} */ diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 0054e90cea..ac04717f0d 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -645,7 +645,7 @@ PHPDBG_API const phpdbg_command_t *phpdbg_stack_resolve(const phpdbg_command_t * } /* ", " separated matches */ - phpdbg_error("command", "type=\"ambiguous\" command=\"%s\" matches=\"%lu\" matched=\"%s\"", "The command \"%s\" is ambigious, matching %lu commands (%s)", name->str, matches, list); + phpdbg_error("command", "type=\"ambiguous\" command=\"%s\" matches=\"%lu\" matched=\"%s\"", "The command \"%s\" is ambiguous, matching %lu commands (%s)", name->str, matches, list); efree(list); return NULL; diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index e9caa18895..e0575009db 100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c @@ -924,7 +924,7 @@ phpdbg_help_text_t phpdbg_help_text[] = { " Enable refcount display when hitting watchpoints" CR CR " $P S b 4 off" CR -" Temporarily disable breakpoint 4. This can be subsequently reenabled by a **S b 4 on**." CR +" Temporarily disable breakpoint 4. This can be subsequently re-enabled by a **S b 4 on**." CR //*********** check oplog syntax }, diff --git a/sapi/phpdbg/phpdbg_lexer.c b/sapi/phpdbg/phpdbg_lexer.c deleted file mode 100644 index 2ab0b5ac67..0000000000 --- a/sapi/phpdbg/phpdbg_lexer.c +++ /dev/null @@ -1,2085 +0,0 @@ -/* Generated by re2c 1.0.3 */ -#line 1 "sapi/phpdbg/phpdbg_lexer.l" -/* - * phpdbg_lexer.l - */ - -#include "phpdbg.h" -#include "phpdbg_cmd.h" - -#include "phpdbg_parser.h" - -#define LEX(v) (PHPDBG_G(lexer).v) - -#define YYCTYPE unsigned char -#define YYSETCONDITION(x) LEX(state) = x; -#define YYGETCONDITION() LEX(state) -#define YYCURSOR LEX(cursor) -#define YYMARKER LEX(marker) -#define YYCTXMARKER LEX(ctxmarker) -#define yyleng LEX(len) -#define yytext ((char*) LEX(text)) -#undef YYDEBUG -#define YYDEBUG(a, b) -#define YYFILL(n) - -#define NORMAL 0 -#define PRE_RAW 1 -#define RAW 2 -#define INITIAL 3 - -ZEND_EXTERN_MODULE_GLOBALS(phpdbg) - -void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) { - PHPDBG_G(parser_stack) = stack; - - YYSETCONDITION(INITIAL); - - LEX(text) = YYCURSOR = (unsigned char *) input; - LEX(len) = strlen(input); -} - -static int unescape_string(char *s) { - switch (*s) { - case '\'': - case '\"': { - char start = *s; - size_t off = 1; - do { - if (s[off] == '\\') { - off++; - } - *s = s[off]; - } while ((++s)[off] != start); - return off + 1; - } - } - - return 0; -} - -int phpdbg_lex (phpdbg_param_t* yylval) { - -restart: - LEX(text) = YYCURSOR; - - -#line 68 "sapi/phpdbg/phpdbg_lexer.c" -{ - YYCTYPE yych; - unsigned int yyaccept = 0; - if (YYGETCONDITION() < 2) { - if (YYGETCONDITION() < 1) { - goto yyc_NORMAL; - } else { - goto yyc_PRE_RAW; - } - } else { - if (YYGETCONDITION() < 3) { - goto yyc_RAW; - } else { - goto yyc_INITIAL; - } - } -/* *********************************** */ -yyc_NORMAL: - { - static const unsigned char yybm[] = { - /* table 1 .. 8: 0 */ - 0, 62, 62, 62, 62, 62, 62, 62, - 62, 40, 0, 62, 62, 40, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 40, 62, 50, 40, 62, 62, 62, 14, - 62, 62, 62, 62, 62, 62, 63, 62, - 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 40, 62, 62, 62, 62, 62, - 62, 254, 254, 254, 254, 254, 254, 190, - 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 62, 2, 62, 62, 62, - 62, 254, 254, 254, 254, 254, 254, 190, - 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, - /* table 9 .. 10: 256 */ - 0, 64, 64, 64, 64, 64, 64, 64, - 64, 128, 0, 64, 64, 128, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 128, 64, 0, 0, 64, 64, 64, 0, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 0, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - }; - YYDEBUG(1, *YYCURSOR); - YYFILL(11); - yych = *YYCURSOR; - if (yybm[256+yych] & 128) { - goto yy8; - } - switch (yych) { - case 0x00: - case '\t': - case '\n': goto yy3; - case '"': goto yy11; - case '#': goto yy13; - case '\'': goto yy15; - case '-': goto yy16; - case '.': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy17; - case '0': goto yy20; - case ':': goto yy21; - case 'D': - case 'd': goto yy22; - case 'E': - case 'e': goto yy23; - case 'F': - case 'f': goto yy24; - case 'I': - case 'i': goto yy25; - case 'N': - case 'n': goto yy26; - case 'O': - case 'o': goto yy27; - case 'T': - case 't': goto yy28; - case 'Y': - case 'y': goto yy29; - case 'Z': goto yy30; - case 'z': goto yy31; - default: goto yy5; - } -yy3: - YYDEBUG(3, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(4, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 89 "sapi/phpdbg/phpdbg_lexer.l" - { - return 0; -} -#line 211 "sapi/phpdbg/phpdbg_lexer.c" -yy5: - YYDEBUG(5, *YYCURSOR); - yyaccept = 0; - YYMARKER = ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; -yy6: - YYDEBUG(6, *YYCURSOR); - if (yybm[256+yych] & 64) { - goto yy5; - } - if (yych <= ' ') goto yy7; - if (yych == '#') goto yy7; - if (yych <= '\'') goto yy32; - goto yy34; -yy7: - YYDEBUG(7, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 161 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, STR_PARAM); - yylval->str = estrndup(yytext, yyleng - unescape_string(yytext)); - yylval->len = yyleng; - return T_ID; -} -#line 237 "sapi/phpdbg/phpdbg_lexer.c" -yy8: - YYDEBUG(8, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(9, *YYCURSOR); - if (yybm[256+yych] & 128) { - goto yy8; - } - YYDEBUG(10, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 175 "sapi/phpdbg/phpdbg_lexer.l" - { - /* ignore whitespace */ - - goto restart; -} -#line 255 "sapi/phpdbg/phpdbg_lexer.c" -yy11: - YYDEBUG(11, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '"') goto yy32; - goto yy36; -yy12: - YYDEBUG(12, *YYCURSOR); - YYCURSOR = YYMARKER; - if (yyaccept <= 3) { - if (yyaccept <= 1) { - if (yyaccept == 0) { - goto yy7; - } else { - goto yy14; - } - } else { - if (yyaccept == 2) { - goto yy19; - } else { - goto yy83; - } - } - } else { - if (yyaccept <= 5) { - if (yyaccept == 4) { - goto yy86; - } else { - goto yy102; - } - } else { - goto yy119; - } - } -yy13: - YYDEBUG(13, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy14; - if (yych <= '-') { - YYCTXMARKER = YYCURSOR; - goto yy41; - } - YYCTXMARKER = YYCURSOR; - goto yy42; - } else { - if (yych <= '/') goto yy14; - if (yych <= '9') { - YYCTXMARKER = YYCURSOR; - goto yy42; - } - } -yy14: - YYDEBUG(14, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 110 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(INITIAL); - return T_SEPARATOR; -} -#line 316 "sapi/phpdbg/phpdbg_lexer.c" -yy15: - YYDEBUG(15, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\'') goto yy32; - goto yy46; -yy16: - YYDEBUG(16, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 1) { - goto yy17; - } - if (yych == 'r') goto yy51; - goto yy6; -yy17: - YYDEBUG(17, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - YYDEBUG(18, *YYCURSOR); - if (yybm[0+yych] & 1) { - goto yy17; - } - if (yych <= ' ') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy19; - if (yych <= 0x08) goto yy5; - } else { - if (yych == '\r') goto yy19; - if (yych <= 0x1F) goto yy5; - } - } else { - if (yych <= '&') { - if (yych <= '!') goto yy5; - if (yych <= '"') goto yy32; - if (yych >= '$') goto yy5; - } else { - if (yych <= '\'') goto yy32; - if (yych <= '/') goto yy5; - if (yych <= ':') goto yy34; - goto yy5; - } - } -yy19: - YYDEBUG(19, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 142 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, NUMERIC_PARAM); - yylval->num = atoi(yytext); - return T_DIGITS; -} -#line 370 "sapi/phpdbg/phpdbg_lexer.c" -yy20: - YYDEBUG(20, *YYCURSOR); - yyaccept = 2; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 1) { - goto yy17; - } - if (yych <= 0x1F) { - if (yych <= '\n') { - if (yych <= 0x00) goto yy19; - if (yych <= 0x08) goto yy6; - goto yy19; - } else { - if (yych == '\r') goto yy19; - goto yy6; - } - } else { - if (yych <= '#') { - if (yych <= ' ') goto yy19; - if (yych <= '"') goto yy6; - goto yy19; - } else { - if (yych == 'x') goto yy52; - goto yy6; - } - } -yy21: - YYDEBUG(21, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == ':') goto yy55; - if (yych == '\\') goto yy57; - goto yy53; -yy22: - YYDEBUG(22, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'I') goto yy59; - if (yych == 'i') goto yy59; - goto yy6; -yy23: - YYDEBUG(23, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'N') goto yy60; - if (yych == 'n') goto yy60; - goto yy6; -yy24: - YYDEBUG(24, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'A') goto yy61; - if (yych == 'a') goto yy61; - goto yy6; -yy25: - YYDEBUG(25, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'F') goto yy62; - if (yych == 'f') goto yy62; - goto yy6; -yy26: - YYDEBUG(26, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'O') goto yy63; - if (yych == 'o') goto yy63; - goto yy6; -yy27: - YYDEBUG(27, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych == 'F') goto yy64; - if (yych <= 'M') goto yy6; - goto yy65; - } else { - if (yych <= 'f') { - if (yych <= 'e') goto yy6; - goto yy64; - } else { - if (yych == 'n') goto yy65; - goto yy6; - } - } -yy28: - YYDEBUG(28, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'R') goto yy66; - if (yych == 'r') goto yy66; - goto yy6; -yy29: - YYDEBUG(29, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy67; - if (yych == 'e') goto yy67; - goto yy6; -yy30: - YYDEBUG(30, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy68; - goto yy6; -yy31: - YYDEBUG(31, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'e') goto yy69; - goto yy6; -yy32: - YYDEBUG(32, *YYCURSOR); - ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; -yy33: - YYDEBUG(33, *YYCURSOR); - if (yybm[0+yych] & 2) { - goto yy32; - } - if (yych <= '#') goto yy12; - goto yy70; -yy34: - YYDEBUG(34, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy71; - if (yych == '\\') goto yy57; - goto yy12; -yy35: - YYDEBUG(35, *YYCURSOR); - ++YYCURSOR; - YYFILL(4); - yych = *YYCURSOR; -yy36: - YYDEBUG(36, *YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy35; - } - if (yych <= ' ') { - if (yych <= 0x00) goto yy12; - if (yych == '\n') goto yy12; - } else { - if (yych <= '"') goto yy72; - if (yych <= '#') goto yy37; - if (yych <= ':') goto yy39; - goto yy40; - } -yy37: - YYDEBUG(37, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; -yy38: - YYDEBUG(38, *YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy37; - } - if (yych <= '\n') goto yy12; - if (yych <= '"') goto yy73; - goto yy74; -yy39: - YYDEBUG(39, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy75; - goto yy38; -yy40: - YYDEBUG(40, *YYCURSOR); - ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - if (yych <= ' ') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy12; - if (yych <= 0x08) goto yy32; - goto yy12; - } else { - if (yych == '\r') goto yy12; - if (yych <= 0x1F) goto yy32; - goto yy12; - } - } else { - if (yych <= '9') { - if (yych <= '!') goto yy32; - if (yych <= '"') goto yy35; - if (yych <= '#') goto yy12; - goto yy32; - } else { - if (yych <= ':') goto yy70; - if (yych == '\\') goto yy35; - goto yy32; - } - } -yy41: - YYDEBUG(41, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '.') goto yy42; - if (yych <= '/') goto yy12; - if (yych >= ':') goto yy12; -yy42: - YYDEBUG(42, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(43, *YYCURSOR); - if (yych == '.') goto yy42; - if (yych <= '/') goto yy44; - if (yych <= '9') goto yy42; -yy44: - YYDEBUG(44, *YYCURSOR); - YYCURSOR = YYCTXMARKER; - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 106 "sapi/phpdbg/phpdbg_lexer.l" - { - return T_POUND; -} -#line 586 "sapi/phpdbg/phpdbg_lexer.c" -yy45: - YYDEBUG(45, *YYCURSOR); - ++YYCURSOR; - YYFILL(4); - yych = *YYCURSOR; -yy46: - YYDEBUG(46, *YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy45; - } - if (yych <= '\n') { - if (yych <= 0x00) goto yy12; - if (yych >= '\n') goto yy12; - } else { - if (yych <= '#') goto yy47; - if (yych <= '\'') goto yy72; - if (yych <= ':') goto yy49; - goto yy50; - } -yy47: - YYDEBUG(47, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; -yy48: - YYDEBUG(48, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy47; - } - if (yych <= '\n') goto yy12; - if (yych <= '\'') goto yy73; - goto yy76; -yy49: - YYDEBUG(49, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy77; - goto yy48; -yy50: - YYDEBUG(50, *YYCURSOR); - ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - if (yych <= '"') { - if (yych <= '\f') { - if (yych <= 0x00) goto yy12; - if (yych <= 0x08) goto yy32; - if (yych <= '\n') goto yy12; - goto yy32; - } else { - if (yych <= '\r') goto yy12; - if (yych == ' ') goto yy12; - goto yy32; - } - } else { - if (yych <= '9') { - if (yych <= '#') goto yy12; - if (yych == '\'') goto yy45; - goto yy32; - } else { - if (yych <= ':') goto yy70; - if (yych == '\\') goto yy45; - goto yy32; - } - } -yy51: - YYDEBUG(51, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych <= '\f') { - if (yych == '\t') goto yy78; - goto yy6; - } else { - if (yych <= '\r') goto yy78; - if (yych <= 0x1F) goto yy6; - goto yy78; - } - } else { - if (yych <= '.') { - if (yych <= ',') goto yy6; - if (yych <= '-') goto yy80; - goto yy81; - } else { - if (yych <= '/') goto yy6; - if (yych <= '9') goto yy81; - goto yy6; - } - } -yy52: - YYDEBUG(52, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy84; - } - goto yy6; -yy53: - YYDEBUG(53, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(54, *YYCURSOR); - YYCURSOR -= 1; - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 119 "sapi/phpdbg/phpdbg_lexer.l" - { - return T_COLON; -} -#line 693 "sapi/phpdbg/phpdbg_lexer.c" -yy55: - YYDEBUG(55, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(56, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 115 "sapi/phpdbg/phpdbg_lexer.l" - { - return T_DCOLON; -} -#line 703 "sapi/phpdbg/phpdbg_lexer.c" -yy57: - YYDEBUG(57, *YYCURSOR); - yyaccept = 0; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(58, *YYCURSOR); - if (yych <= ' ') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy7; - if (yych <= 0x08) goto yy57; - goto yy7; - } else { - if (yych == '\r') goto yy7; - if (yych <= 0x1F) goto yy57; - goto yy7; - } - } else { - if (yych <= '&') { - if (yych <= '!') goto yy57; - if (yych <= '#') goto yy7; - goto yy57; - } else { - if (yych <= '\'') goto yy7; - if (yych == ':') goto yy87; - goto yy57; - } - } -yy59: - YYDEBUG(59, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy88; - if (yych == 's') goto yy88; - goto yy6; -yy60: - YYDEBUG(60, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'A') goto yy89; - if (yych == 'a') goto yy89; - goto yy6; -yy61: - YYDEBUG(61, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'L') goto yy90; - if (yych == 'l') goto yy90; - goto yy6; -yy62: - YYDEBUG(62, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '\f') { - if (yych == '\t') goto yy91; - goto yy6; - } else { - if (yych <= '\r') goto yy91; - if (yych == ' ') goto yy91; - goto yy6; - } -yy63: - YYDEBUG(63, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '\f') { - if (yych <= 0x00) goto yy94; - if (yych <= 0x08) goto yy6; - if (yych <= '\n') goto yy94; - goto yy6; - } else { - if (yych <= '\r') goto yy94; - if (yych == ' ') goto yy94; - goto yy6; - } -yy64: - YYDEBUG(64, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'F') goto yy63; - if (yych == 'f') goto yy63; - goto yy6; -yy65: - YYDEBUG(65, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '\f') { - if (yych <= 0x00) goto yy96; - if (yych <= 0x08) goto yy6; - if (yych <= '\n') goto yy96; - goto yy6; - } else { - if (yych <= '\r') goto yy96; - if (yych == ' ') goto yy96; - goto yy6; - } -yy66: - YYDEBUG(66, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy98; - if (yych == 'u') goto yy98; - goto yy6; -yy67: - YYDEBUG(67, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy65; - if (yych == 's') goto yy65; - goto yy6; -yy68: - YYDEBUG(68, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'N') goto yy99; - goto yy6; -yy69: - YYDEBUG(69, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'n') goto yy100; - goto yy6; -yy70: - YYDEBUG(70, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '/') goto yy12; -yy71: - YYDEBUG(71, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy101; - goto yy12; -yy72: - YYDEBUG(72, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '\r') { - if (yych <= 0x08) { - if (yych <= 0x00) goto yy7; - goto yy33; - } else { - if (yych <= '\n') goto yy7; - if (yych <= '\f') goto yy33; - goto yy7; - } - } else { - if (yych <= ' ') { - if (yych <= 0x1F) goto yy33; - goto yy7; - } else { - if (yych == '#') goto yy7; - goto yy33; - } - } -yy73: - YYDEBUG(73, *YYCURSOR); - ++YYCURSOR; - goto yy7; -yy74: - YYDEBUG(74, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych == '"') goto yy37; - if (yych == '\\') goto yy37; - goto yy12; -yy75: - YYDEBUG(75, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy103; - goto yy38; -yy76: - YYDEBUG(76, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych == '\'') goto yy47; - if (yych == '\\') goto yy47; - goto yy12; -yy77: - YYDEBUG(77, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy104; - goto yy48; -yy78: - YYDEBUG(78, *YYCURSOR); - ++YYCURSOR; - YYFILL(2); - yych = *YYCURSOR; - YYDEBUG(79, *YYCURSOR); - if (yych <= ' ') { - if (yych <= '\f') { - if (yych == '\t') goto yy78; - goto yy12; - } else { - if (yych <= '\r') goto yy78; - if (yych <= 0x1F) goto yy12; - goto yy78; - } - } else { - if (yych <= '.') { - if (yych <= ',') goto yy12; - if (yych <= '-') goto yy105; - goto yy106; - } else { - if (yych <= '/') goto yy12; - if (yych <= '9') goto yy106; - goto yy12; - } - } -yy80: - YYDEBUG(80, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy81; - if (yych <= '/') goto yy6; - if (yych >= ':') goto yy6; -yy81: - YYDEBUG(81, *YYCURSOR); - yyaccept = 3; - YYMARKER = ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - YYDEBUG(82, *YYCURSOR); - if (yych <= '"') { - if (yych <= '\f') { - if (yych <= 0x00) goto yy83; - if (yych <= 0x08) goto yy5; - if (yych >= '\v') goto yy5; - } else { - if (yych <= 0x1F) { - if (yych >= 0x0E) goto yy5; - } else { - if (yych <= ' ') goto yy83; - if (yych <= '!') goto yy5; - goto yy32; - } - } - } else { - if (yych <= '-') { - if (yych <= '#') goto yy83; - if (yych == '\'') goto yy32; - goto yy5; - } else { - if (yych <= '/') { - if (yych <= '.') goto yy81; - goto yy5; - } else { - if (yych <= '9') goto yy81; - if (yych <= ':') goto yy34; - goto yy5; - } - } - } -yy83: - YYDEBUG(83, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 93 "sapi/phpdbg/phpdbg_lexer.l" - { - char *text = yytext + 2; - while (*++text < '0'); - yylval->num = atoi(text); - return T_REQ_ID; -} -#line 967 "sapi/phpdbg/phpdbg_lexer.c" -yy84: - YYDEBUG(84, *YYCURSOR); - yyaccept = 4; - YYMARKER = ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - YYDEBUG(85, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy84; - } - if (yych <= ' ') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy86; - if (yych <= 0x08) goto yy5; - } else { - if (yych == '\r') goto yy86; - if (yych <= 0x1F) goto yy5; - } - } else { - if (yych <= '&') { - if (yych <= '!') goto yy5; - if (yych <= '"') goto yy32; - if (yych >= '$') goto yy5; - } else { - if (yych <= '\'') goto yy32; - if (yych <= '/') goto yy5; - if (yych <= ':') goto yy34; - goto yy5; - } - } -yy86: - YYDEBUG(86, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 148 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, ADDR_PARAM); - yylval->addr = strtoul(yytext, 0, 16); - return T_ADDR; -} -#line 1007 "sapi/phpdbg/phpdbg_lexer.c" -yy87: - YYDEBUG(87, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych == '\\') goto yy57; - goto yy12; -yy88: - YYDEBUG(88, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'A') goto yy108; - if (yych == 'a') goto yy108; - goto yy6; -yy89: - YYDEBUG(89, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'B') goto yy109; - if (yych == 'b') goto yy109; - goto yy6; -yy90: - YYDEBUG(90, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy110; - if (yych == 's') goto yy110; - goto yy6; -yy91: - YYDEBUG(91, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(92, *YYCURSOR); - if (yych <= '\f') { - if (yych == '\t') goto yy91; - } else { - if (yych <= '\r') goto yy91; - if (yych == ' ') goto yy91; - } - YYDEBUG(93, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 100 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(RAW); - phpdbg_init_param(yylval, EMPTY_PARAM); - return T_IF; -} -#line 1056 "sapi/phpdbg/phpdbg_lexer.c" -yy94: - YYDEBUG(94, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(95, *YYCURSOR); - YYCURSOR -= 1; - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 136 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, NUMERIC_PARAM); - yylval->num = 0; - return T_FALSY; -} -#line 1069 "sapi/phpdbg/phpdbg_lexer.c" -yy96: - YYDEBUG(96, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(97, *YYCURSOR); - YYCURSOR -= 1; - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 130 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, NUMERIC_PARAM); - yylval->num = 1; - return T_TRUTHY; -} -#line 1082 "sapi/phpdbg/phpdbg_lexer.c" -yy98: - YYDEBUG(98, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy65; - if (yych == 'e') goto yy65; - goto yy6; -yy99: - YYDEBUG(99, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy111; - goto yy6; -yy100: - YYDEBUG(100, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'd') goto yy111; - goto yy6; -yy101: - YYDEBUG(101, *YYCURSOR); - ++YYCURSOR; -yy102: - YYDEBUG(102, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 123 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, STR_PARAM); - yylval->str = estrndup(yytext, yyleng); - yylval->len = yyleng; - return T_PROTO; -} -#line 1115 "sapi/phpdbg/phpdbg_lexer.c" -yy103: - YYDEBUG(103, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x00) goto yy102; - if (yych == '\n') goto yy102; - goto yy38; -yy104: - YYDEBUG(104, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x00) goto yy102; - if (yych == '\n') goto yy102; - goto yy48; -yy105: - YYDEBUG(105, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '.') goto yy106; - if (yych <= '/') goto yy12; - if (yych >= ':') goto yy12; -yy106: - YYDEBUG(106, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(107, *YYCURSOR); - if (yych == '.') goto yy106; - if (yych <= '/') goto yy83; - if (yych <= '9') goto yy106; - goto yy83; -yy108: - YYDEBUG(108, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'B') goto yy112; - if (yych == 'b') goto yy112; - goto yy6; -yy109: - YYDEBUG(109, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'L') goto yy113; - if (yych == 'l') goto yy113; - goto yy6; -yy110: - YYDEBUG(110, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy63; - if (yych == 'e') goto yy63; - goto yy6; -yy111: - YYDEBUG(111, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '_') goto yy114; - goto yy6; -yy112: - YYDEBUG(112, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'L') goto yy115; - if (yych == 'l') goto yy115; - goto yy6; -yy113: - YYDEBUG(113, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy116; - if (yych == 'e') goto yy116; - goto yy6; -yy114: - YYDEBUG(114, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy117; - } - goto yy6; -yy115: - YYDEBUG(115, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy120; - if (yych == 'e') goto yy120; - goto yy6; -yy116: - YYDEBUG(116, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy65; - if (yych == 'd') goto yy65; - goto yy6; -yy117: - YYDEBUG(117, *YYCURSOR); - yyaccept = 6; - YYMARKER = ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - YYDEBUG(118, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy117; - } - if (yych <= ' ') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy119; - if (yych <= 0x08) goto yy5; - } else { - if (yych == '\r') goto yy119; - if (yych <= 0x1F) goto yy5; - } - } else { - if (yych <= '&') { - if (yych <= '!') goto yy5; - if (yych <= '"') goto yy32; - if (yych >= '$') goto yy5; - } else { - if (yych <= '\'') goto yy32; - if (yych == ':') goto yy34; - goto yy5; - } - } -yy119: - YYDEBUG(119, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 154 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, OP_PARAM); - yylval->str = estrndup(yytext, yyleng); - yylval->len = yyleng; - return T_OPCODE; -} -#line 1248 "sapi/phpdbg/phpdbg_lexer.c" -yy120: - YYDEBUG(120, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy63; - if (yych == 'd') goto yy63; - goto yy6; - } -/* *********************************** */ -yyc_PRE_RAW: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 64, 0, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 64, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 128, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - YYDEBUG(121, *YYCURSOR); - YYFILL(2); - yych = *YYCURSOR; - if (yych <= '\r') { - if (yych == '\t') goto yy125; - if (yych >= '\r') goto yy125; - } else { - if (yych <= ' ') { - if (yych >= ' ') goto yy126; - } else { - if (yych == '-') goto yy129; - } - } - YYDEBUG(123, *YYCURSOR); - ++YYCURSOR; -yy124: - YYDEBUG(124, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 199 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(RAW); - - YYCURSOR = LEX(text); - goto restart; -} -#line 1319 "sapi/phpdbg/phpdbg_lexer.c" -yy125: - YYDEBUG(125, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 64) { - goto yy126; - } - goto yy124; -yy126: - YYDEBUG(126, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(127, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy126; - } - YYDEBUG(128, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 175 "sapi/phpdbg/phpdbg_lexer.l" - { - /* ignore whitespace */ - - goto restart; -} -#line 1344 "sapi/phpdbg/phpdbg_lexer.c" -yy129: - YYDEBUG(129, *YYCURSOR); - yych = *(YYMARKER = ++YYCURSOR); - if (yych != 'r') goto yy124; -yy130: - YYDEBUG(130, *YYCURSOR); - ++YYCURSOR; - YYFILL(2); - yych = *YYCURSOR; - YYDEBUG(131, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy134; - } - if (yych <= '\r') { - if (yych == '\t') goto yy130; - if (yych >= '\r') goto yy130; - } else { - if (yych <= ' ') { - if (yych >= ' ') goto yy130; - } else { - if (yych == '-') goto yy133; - } - } -yy132: - YYDEBUG(132, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy124; -yy133: - YYDEBUG(133, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy134; - } - goto yy132; -yy134: - YYDEBUG(134, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(135, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy134; - } - YYDEBUG(136, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 93 "sapi/phpdbg/phpdbg_lexer.l" - { - char *text = yytext + 2; - while (*++text < '0'); - yylval->num = atoi(text); - return T_REQ_ID; -} -#line 1397 "sapi/phpdbg/phpdbg_lexer.c" - } -/* *********************************** */ -yyc_RAW: - { - static const unsigned char yybm[] = { - 0, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 0, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 64, 224, 232, 232, 232, 32, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 16, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, - }; - YYDEBUG(137, *YYCURSOR); - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 8) { - goto yy141; - } - if (yych <= '\n') goto yy139; - if (yych <= '"') goto yy144; - if (yych <= '#') goto yy146; - if (yych <= '\'') goto yy148; - goto yy149; -yy139: - YYDEBUG(139, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(140, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 89 "sapi/phpdbg/phpdbg_lexer.l" - { - return 0; -} -#line 1456 "sapi/phpdbg/phpdbg_lexer.c" -yy141: - YYDEBUG(141, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(142, *YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy141; - } - if (yych <= '\n') goto yy143; - if (yych <= '"') goto yy144; - if (yych <= '#') goto yy143; - if (yych <= '\'') goto yy148; - goto yy149; -yy143: - YYDEBUG(143, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 168 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, STR_PARAM); - yylval->str = estrdup(yytext); - yylval->len = yyleng; - return T_INPUT; -} -#line 1481 "sapi/phpdbg/phpdbg_lexer.c" -yy144: - YYDEBUG(144, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 32) { - goto yy151; - } - if (yych >= '#') goto yy153; -yy145: - YYDEBUG(145, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy143; -yy146: - YYDEBUG(146, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(147, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 110 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(INITIAL); - return T_SEPARATOR; -} -#line 1505 "sapi/phpdbg/phpdbg_lexer.c" -yy148: - YYDEBUG(148, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 64) { - goto yy155; - } - if (yych <= '\'') goto yy145; - goto yy157; -yy149: - YYDEBUG(149, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(150, *YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy149; - } - if (yych <= '!') { - if (yych <= 0x00) goto yy143; - if (yych == '\n') goto yy143; - goto yy141; - } else { - if (yych <= '"') goto yy159; - if (yych == '\'') goto yy160; - goto yy141; - } -yy151: - YYDEBUG(151, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(152, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy151; - } - if (yych <= '\n') goto yy145; - if (yych <= '"') goto yy141; -yy153: - YYDEBUG(153, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(154, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy151; - } - if (yych <= '\n') goto yy145; - if (yych <= '"') goto yy161; - goto yy153; -yy155: - YYDEBUG(155, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(156, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy155; - } - if (yych <= '\n') goto yy145; - if (yych <= '\'') goto yy141; -yy157: - YYDEBUG(157, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(158, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy155; - } - if (yych <= '\n') goto yy145; - if (yych <= '\'') goto yy163; - goto yy157; -yy159: - YYDEBUG(159, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych <= '"') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy143; - goto yy161; - } else { - if (yych <= '\n') goto yy143; - if (yych <= '!') goto yy161; - goto yy144; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy151; - if (yych <= '&') goto yy161; - goto yy165; - } else { - if (yych == '\\') goto yy166; - goto yy161; - } - } -yy160: - YYDEBUG(160, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych <= '"') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy143; - goto yy163; - } else { - if (yych <= '\n') goto yy143; - if (yych <= '!') goto yy163; - goto yy168; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy155; - if (yych <= '&') goto yy163; - goto yy148; - } else { - if (yych == '\\') goto yy169; - goto yy163; - } - } -yy161: - YYDEBUG(161, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(162, *YYCURSOR); - if (yych <= '"') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy143; - goto yy161; - } else { - if (yych <= '\n') goto yy143; - if (yych <= '!') goto yy161; - goto yy159; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy151; - if (yych <= '&') goto yy161; - goto yy165; - } else { - if (yych == '\\') goto yy166; - goto yy161; - } - } -yy163: - YYDEBUG(163, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(164, *YYCURSOR); - if (yych <= '"') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy143; - goto yy163; - } else { - if (yych <= '\n') goto yy143; - if (yych <= '!') goto yy163; - goto yy168; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy155; - if (yych <= '&') goto yy163; - goto yy160; - } else { - if (yych == '\\') goto yy169; - goto yy163; - } - } -yy165: - YYDEBUG(165, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy171; - } - if (yych <= '\n') goto yy145; - if (yych <= '"') goto yy163; - if (yych <= '\'') goto yy151; - goto yy173; -yy166: - YYDEBUG(166, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(167, *YYCURSOR); - if (yych <= '&') { - if (yych <= 0x00) goto yy143; - if (yych == '\n') goto yy143; - goto yy161; - } else { - if (yych <= '\'') goto yy175; - if (yych == '\\') goto yy166; - goto yy161; - } -yy168: - YYDEBUG(168, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy171; - } - if (yych <= '\n') goto yy145; - if (yych <= '"') goto yy155; - if (yych <= '\'') goto yy161; - goto yy173; -yy169: - YYDEBUG(169, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(170, *YYCURSOR); - if (yych <= '!') { - if (yych <= 0x00) goto yy143; - if (yych == '\n') goto yy143; - goto yy163; - } else { - if (yych <= '"') goto yy176; - if (yych == '\\') goto yy169; - goto yy163; - } -yy171: - YYDEBUG(171, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(172, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy171; - } - if (yych <= '\n') goto yy145; - if (yych <= '"') goto yy163; - if (yych <= '\'') goto yy161; -yy173: - YYDEBUG(173, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(174, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy171; - } - if (yych <= '\n') goto yy145; - if (yych <= '\'') goto yy177; - goto yy173; -yy175: - YYDEBUG(175, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych <= '"') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy143; - goto yy177; - } else { - if (yych <= '\n') goto yy143; - if (yych <= '!') goto yy177; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy171; - if (yych <= '&') goto yy177; - goto yy165; - } else { - if (yych == '\\') goto yy179; - goto yy177; - } - } -yy176: - YYDEBUG(176, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych <= '"') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy143; - } else { - if (yych <= '\n') goto yy143; - if (yych >= '"') goto yy168; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy171; - if (yych >= '\'') goto yy175; - } else { - if (yych == '\\') goto yy179; - } - } -yy177: - YYDEBUG(177, *YYCURSOR); - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(178, *YYCURSOR); - if (yych <= '"') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy143; - goto yy177; - } else { - if (yych <= '\n') goto yy143; - if (yych <= '!') goto yy177; - goto yy176; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy171; - if (yych <= '&') goto yy177; - goto yy175; - } else { - if (yych != '\\') goto yy177; - } - } -yy179: - YYDEBUG(179, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(180, *YYCURSOR); - if (yych <= '\n') { - if (yych <= 0x00) goto yy143; - if (yych <= '\t') goto yy177; - goto yy143; - } else { - if (yych == '\\') goto yy179; - goto yy177; - } - } -/* *********************************** */ -yyc_INITIAL: - { - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 128, 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - YYDEBUG(181, *YYCURSOR); - YYFILL(4); - yych = *YYCURSOR; - if (yych <= 'E') { - if (yych <= '\r') { - if (yych == '\t') goto yy185; - if (yych >= '\r') goto yy185; - } else { - if (yych == ' ') goto yy186; - if (yych >= 'E') goto yy189; - } - } else { - if (yych <= 'd') { - if (yych <= 'Q') goto yy183; - if (yych <= 'R') goto yy190; - if (yych <= 'S') goto yy191; - } else { - if (yych <= 'q') { - if (yych <= 'e') goto yy189; - } else { - if (yych <= 'r') goto yy192; - if (yych <= 's') goto yy191; - } - } - } -yy183: - YYDEBUG(183, *YYCURSOR); - ++YYCURSOR; -yy184: - YYDEBUG(184, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 206 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(NORMAL); - - YYCURSOR = LEX(text); - goto restart; -} -#line 1913 "sapi/phpdbg/phpdbg_lexer.c" -yy185: - YYDEBUG(185, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy186; - } - goto yy184; -yy186: - YYDEBUG(186, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(187, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy186; - } - YYDEBUG(188, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 175 "sapi/phpdbg/phpdbg_lexer.l" - { - /* ignore whitespace */ - - goto restart; -} -#line 1938 "sapi/phpdbg/phpdbg_lexer.c" -yy189: - YYDEBUG(189, *YYCURSOR); - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'V') goto yy193; - if (yych == 'v') goto yy193; - goto yy184; -yy190: - YYDEBUG(190, *YYCURSOR); - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy195; - if (yych == 'u') goto yy195; - goto yy184; -yy191: - YYDEBUG(191, *YYCURSOR); - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'H') goto yy196; - if (yych == 'h') goto yy196; - goto yy184; -yy192: - YYDEBUG(192, *YYCURSOR); - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x1F) { - if (yych <= '\t') { - if (yych <= 0x08) goto yy184; - goto yy197; - } else { - if (yych == '\r') goto yy197; - goto yy184; - } - } else { - if (yych <= 'U') { - if (yych <= ' ') goto yy197; - if (yych <= 'T') goto yy184; - goto yy195; - } else { - if (yych == 'u') goto yy195; - goto yy184; - } - } -yy193: - YYDEBUG(193, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\f') { - if (yych == '\t') goto yy200; - } else { - if (yych <= '\r') goto yy200; - if (yych == ' ') goto yy200; - } -yy194: - YYDEBUG(194, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy184; -yy195: - YYDEBUG(195, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy203; - if (yych == 'n') goto yy203; - goto yy194; -yy196: - YYDEBUG(196, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\f') { - if (yych == '\t') goto yy204; - goto yy194; - } else { - if (yych <= '\r') goto yy204; - if (yych == ' ') goto yy204; - goto yy194; - } -yy197: - YYDEBUG(197, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(198, *YYCURSOR); - if (yych <= '\f') { - if (yych == '\t') goto yy197; - } else { - if (yych <= '\r') goto yy197; - if (yych == ' ') goto yy197; - } - YYDEBUG(199, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 193 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(PRE_RAW); - phpdbg_init_param(yylval, EMPTY_PARAM); - return T_RUN; -} -#line 2028 "sapi/phpdbg/phpdbg_lexer.c" -yy200: - YYDEBUG(200, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(201, *YYCURSOR); - if (yych <= '\f') { - if (yych == '\t') goto yy200; - } else { - if (yych <= '\r') goto yy200; - if (yych == ' ') goto yy200; - } - YYDEBUG(202, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 181 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(PRE_RAW); - phpdbg_init_param(yylval, EMPTY_PARAM); - return T_EVAL; -} -#line 2049 "sapi/phpdbg/phpdbg_lexer.c" -yy203: - YYDEBUG(203, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\f') { - if (yych == '\t') goto yy197; - goto yy194; - } else { - if (yych <= '\r') goto yy197; - if (yych == ' ') goto yy197; - goto yy194; - } -yy204: - YYDEBUG(204, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(205, *YYCURSOR); - if (yych <= '\f') { - if (yych == '\t') goto yy204; - } else { - if (yych <= '\r') goto yy204; - if (yych == ' ') goto yy204; - } - YYDEBUG(206, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 187 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(PRE_RAW); - phpdbg_init_param(yylval, EMPTY_PARAM); - return T_SHELL; -} -#line 2081 "sapi/phpdbg/phpdbg_lexer.c" - } -} -#line 213 "sapi/phpdbg/phpdbg_lexer.l" - -} diff --git a/sapi/phpdbg/phpdbg_parser.c b/sapi/phpdbg/phpdbg_parser.c deleted file mode 100644 index ae7533abe4..0000000000 --- a/sapi/phpdbg/phpdbg_parser.c +++ /dev/null @@ -1,1953 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.7.12-4996" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - -/* Substitute the variable and function names. */ -#define yyparse phpdbg_parse -#define yylex phpdbg_lex -#define yyerror phpdbg_error -#define yylval phpdbg_lval -#define yychar phpdbg_char -#define yydebug phpdbg_debug -#define yynerrs phpdbg_nerrs - -/* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 1 "sapi/phpdbg/phpdbg_parser.y" - - -/* - * phpdbg_parser.y - * (from php-src root) - */ - -#include "phpdbg.h" -#include "phpdbg_cmd.h" -#include "phpdbg_utils.h" -#include "phpdbg_cmd.h" -#include "phpdbg_prompt.h" - -#define YYSTYPE phpdbg_param_t - -#include "phpdbg_parser.h" -#include "phpdbg_lexer.h" - -#undef yyerror -static int yyerror(const char *msg); - -ZEND_EXTERN_MODULE_GLOBALS(phpdbg) - -#ifdef _MSC_VER -#define YYMALLOC malloc -#define YYFREE free -#endif - - -/* Line 371 of yacc.c */ -#line 107 "sapi/phpdbg/phpdbg_parser.c" - -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "phpdbg_parser.h". */ -#ifndef YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED -# define YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int phpdbg_debug; -#endif -/* "%code requires" blocks. */ -/* Line 387 of yacc.c */ -#line 36 "sapi/phpdbg/phpdbg_parser.y" - -#include "phpdbg.h" -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - - -/* Line 387 of yacc.c */ -#line 148 "sapi/phpdbg/phpdbg_parser.c" - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_EVAL = 258, - T_RUN = 259, - T_SHELL = 260, - T_IF = 261, - T_TRUTHY = 262, - T_FALSY = 263, - T_STRING = 264, - T_COLON = 265, - T_DCOLON = 266, - T_POUND = 267, - T_SEPARATOR = 268, - T_PROTO = 269, - T_DIGITS = 270, - T_LITERAL = 271, - T_ADDR = 272, - T_OPCODE = 273, - T_ID = 274, - T_INPUT = 275, - T_UNEXPECTED = 276, - T_REQ_ID = 277 - }; -#endif -/* Tokens. */ -#define T_EVAL 258 -#define T_RUN 259 -#define T_SHELL 260 -#define T_IF 261 -#define T_TRUTHY 262 -#define T_FALSY 263 -#define T_STRING 264 -#define T_COLON 265 -#define T_DCOLON 266 -#define T_POUND 267 -#define T_SEPARATOR 268 -#define T_PROTO 269 -#define T_DIGITS 270 -#define T_LITERAL 271 -#define T_ADDR 272 -#define T_OPCODE 273 -#define T_ID 274 -#define T_INPUT 275 -#define T_UNEXPECTED 276 -#define T_REQ_ID 277 - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int phpdbg_parse (void *YYPARSE_PARAM); -#else -int phpdbg_parse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int phpdbg_parse (void); -#else -int phpdbg_parse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -/* Line 390 of yacc.c */ -#line 229 "sapi/phpdbg/phpdbg_parser.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 27 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 50 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 23 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 7 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 30 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 46 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 277 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 9, 10, 12, 14, 16, 19, - 22, 26, 31, 36, 42, 46, 52, 56, 59, 61, - 63, 65, 67, 69, 71, 73, 75, 76, 80, 84, - 87 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 24, 0, -1, 25, -1, 24, 13, 25, -1, -1, - 26, -1, 29, -1, 27, -1, 26, 27, -1, 26, - 28, -1, 19, 10, 15, -1, 19, 10, 12, 15, - -1, 14, 19, 10, 15, -1, 14, 19, 10, 12, - 15, -1, 19, 11, 19, -1, 19, 11, 19, 12, - 15, -1, 19, 12, 15, -1, 6, 20, -1, 18, - -1, 17, -1, 16, -1, 7, -1, 8, -1, 15, - -1, 19, -1, 22, -1, -1, 3, 28, 20, -1, - 5, 28, 20, -1, 4, 28, -1, 4, 28, 20, - -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = -{ - 0, 71, 71, 72, 73, 77, 78, 82, 83, 84, - 88, 93, 98, 108, 118, 123, 129, 135, 140, 141, - 142, 143, 144, 145, 146, 150, 151, 155, 160, 165, - 169 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "\"eval\"", "\"run\"", "\"shell\"", - "\"if (condition)\"", "\"truthy (true, on, yes or enabled)\"", - "\"falsy (false, off, no or disabled)\"", - "\"string (some input, perhaps)\"", "\": (colon)\"", - "\":: (double colon)\"", "\"# (pound sign followed by digits)\"", - "\"# (pound sign)\"", "\"protocol (file://)\"", "\"digits (numbers)\"", - "\"literal (string)\"", "\"address\"", "\"opcode\"", - "\"identifier (command or function name)\"", - "\"input (input string or data)\"", "\"input\"", - "\"request id (-r %d)\"", "$accept", "input", "command", "parameters", - "parameter", "req_id", "full_expression", YY_NULL -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 23, 24, 24, 24, 25, 25, 26, 26, 26, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 28, 28, 29, 29, 29, - 29 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 3, 0, 1, 1, 1, 2, 2, - 3, 4, 4, 5, 3, 5, 3, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 3, 3, 2, - 3 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 4, 26, 26, 26, 0, 21, 22, 0, 23, 20, - 19, 18, 24, 0, 2, 5, 7, 6, 25, 0, - 29, 0, 17, 0, 0, 0, 0, 1, 0, 8, - 9, 27, 30, 28, 0, 0, 10, 14, 16, 3, - 0, 12, 11, 0, 13, 15 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 13, 14, 15, 16, 19, 17 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -17 -static const yytype_int8 yypact[] = -{ - -3, -16, -16, -16, -10, -17, -17, 2, -17, -17, - -17, -17, 26, 9, -17, 11, -17, -17, -17, 3, - 4, 21, -17, 29, 19, 23, 25, -17, -3, -17, - -17, -17, -17, -17, 20, 28, -17, 32, -17, -17, - 30, -17, -17, 31, -17, -17 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -17, -17, 22, -17, 33, 5, -17 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = -{ - 1, 2, 3, 4, 5, 6, 18, 20, 21, 27, - 22, 7, 8, 9, 10, 11, 12, 4, 5, 6, - 30, 23, 28, 31, 32, 7, 8, 9, 10, 11, - 12, 35, 40, 18, 36, 41, 24, 25, 26, 34, - 38, 33, 37, 42, 43, 44, 45, 0, 29, 0, - 39 -}; - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-17))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - -static const yytype_int8 yycheck[] = -{ - 3, 4, 5, 6, 7, 8, 22, 2, 3, 0, - 20, 14, 15, 16, 17, 18, 19, 6, 7, 8, - 15, 19, 13, 20, 20, 14, 15, 16, 17, 18, - 19, 12, 12, 22, 15, 15, 10, 11, 12, 10, - 15, 20, 19, 15, 12, 15, 15, -1, 15, -1, - 28 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 3, 4, 5, 6, 7, 8, 14, 15, 16, - 17, 18, 19, 24, 25, 26, 27, 29, 22, 28, - 28, 28, 20, 19, 10, 11, 12, 0, 13, 27, - 28, 20, 20, 20, 10, 12, 15, 19, 15, 25, - 12, 15, 15, 12, 15, 15 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YYUSE (yytype); -} - - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -/* Line 1802 of yacc.c */ -#line 71 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (1)]); } - break; - - case 3: -/* Line 1802 of yacc.c */ -#line 72 "sapi/phpdbg/phpdbg_parser.y" - { phpdbg_stack_separate((yyvsp[(1) - (3)]).top); (yyval) = (yyvsp[(3) - (3)]); } - break; - - case 5: -/* Line 1802 of yacc.c */ -#line 77 "sapi/phpdbg/phpdbg_parser.y" - { (yyval).top = PHPDBG_G(parser_stack)->top; } - break; - - case 6: -/* Line 1802 of yacc.c */ -#line 78 "sapi/phpdbg/phpdbg_parser.y" - { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); (yyval).top = PHPDBG_G(parser_stack)->top; } - break; - - case 7: -/* Line 1802 of yacc.c */ -#line 82 "sapi/phpdbg/phpdbg_parser.y" - { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); (yyval).top = PHPDBG_G(parser_stack)->top; } - break; - - case 8: -/* Line 1802 of yacc.c */ -#line 83 "sapi/phpdbg/phpdbg_parser.y" - { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(2) - (2)])); (yyval).top = PHPDBG_G(parser_stack)->top; } - break; - - case 9: -/* Line 1802 of yacc.c */ -#line 84 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (2)]); } - break; - - case 10: -/* Line 1802 of yacc.c */ -#line 88 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = FILE_PARAM; - (yyval).file.name = (yyvsp[(2) - (3)]).str; - (yyval).file.line = (yyvsp[(3) - (3)]).num; - } - break; - - case 11: -/* Line 1802 of yacc.c */ -#line 93 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = NUMERIC_FILE_PARAM; - (yyval).file.name = (yyvsp[(1) - (4)]).str; - (yyval).file.line = (yyvsp[(4) - (4)]).num; - } - break; - - case 12: -/* Line 1802 of yacc.c */ -#line 98 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = FILE_PARAM; - (yyval).file.name = malloc((yyvsp[(1) - (4)]).len + (yyvsp[(2) - (4)]).len + 1); - if ((yyval).file.name) { - memcpy(&(yyval).file.name[0], (yyvsp[(1) - (4)]).str, (yyvsp[(1) - (4)]).len); - memcpy(&(yyval).file.name[(yyvsp[(1) - (4)]).len], (yyvsp[(2) - (4)]).str, (yyvsp[(2) - (4)]).len); - (yyval).file.name[(yyvsp[(1) - (4)]).len + (yyvsp[(2) - (4)]).len] = '\0'; - } - (yyval).file.line = (yyvsp[(4) - (4)]).num; - } - break; - - case 13: -/* Line 1802 of yacc.c */ -#line 108 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = NUMERIC_FILE_PARAM; - (yyval).file.name = malloc((yyvsp[(1) - (5)]).len + (yyvsp[(2) - (5)]).len + 1); - if ((yyval).file.name) { - memcpy(&(yyval).file.name[0], (yyvsp[(1) - (5)]).str, (yyvsp[(1) - (5)]).len); - memcpy(&(yyval).file.name[(yyvsp[(1) - (5)]).len], (yyvsp[(2) - (5)]).str, (yyvsp[(2) - (5)]).len); - (yyval).file.name[(yyvsp[(1) - (5)]).len + (yyvsp[(2) - (5)]).len] = '\0'; - } - (yyval).file.line = (yyvsp[(5) - (5)]).num; - } - break; - - case 14: -/* Line 1802 of yacc.c */ -#line 118 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = METHOD_PARAM; - (yyval).method.class = (yyvsp[(1) - (3)]).str; - (yyval).method.name = (yyvsp[(3) - (3)]).str; - } - break; - - case 15: -/* Line 1802 of yacc.c */ -#line 123 "sapi/phpdbg/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 16: -/* Line 1802 of yacc.c */ -#line 129 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = NUMERIC_FUNCTION_PARAM; - (yyval).str = (yyvsp[(1) - (3)]).str; - (yyval).len = (yyvsp[(1) - (3)]).len; - (yyval).num = (yyvsp[(3) - (3)]).num; - } - break; - - case 17: -/* Line 1802 of yacc.c */ -#line 135 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = COND_PARAM; - (yyval).str = (yyvsp[(2) - (2)]).str; - (yyval).len = (yyvsp[(2) - (2)]).len; - } - break; - - case 18: -/* Line 1802 of yacc.c */ -#line 140 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (1)]); } - break; - - case 19: -/* Line 1802 of yacc.c */ -#line 141 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (1)]); } - break; - - case 20: -/* Line 1802 of yacc.c */ -#line 142 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (1)]); } - break; - - case 21: -/* Line 1802 of yacc.c */ -#line 143 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (1)]); } - break; - - case 22: -/* Line 1802 of yacc.c */ -#line 144 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (1)]); } - break; - - case 23: -/* Line 1802 of yacc.c */ -#line 145 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (1)]); } - break; - - case 24: -/* Line 1802 of yacc.c */ -#line 146 "sapi/phpdbg/phpdbg_parser.y" - { (yyval) = (yyvsp[(1) - (1)]); } - break; - - case 25: -/* Line 1802 of yacc.c */ -#line 150 "sapi/phpdbg/phpdbg_parser.y" - { PHPDBG_G(req_id) = (yyvsp[(1) - (1)]).num; } - break; - - case 27: -/* Line 1802 of yacc.c */ -#line 155 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = EVAL_PARAM; - (yyval).str = (yyvsp[(3) - (3)]).str; - (yyval).len = (yyvsp[(3) - (3)]).len; - } - break; - - case 28: -/* Line 1802 of yacc.c */ -#line 160 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = SHELL_PARAM; - (yyval).str = (yyvsp[(3) - (3)]).str; - (yyval).len = (yyvsp[(3) - (3)]).len; - } - break; - - case 29: -/* Line 1802 of yacc.c */ -#line 165 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = RUN_PARAM; - (yyval).len = 0; - } - break; - - case 30: -/* Line 1802 of yacc.c */ -#line 169 "sapi/phpdbg/phpdbg_parser.y" - { - (yyval).type = RUN_PARAM; - (yyval).str = (yyvsp[(3) - (3)]).str; - (yyval).len = (yyvsp[(3) - (3)]).len; - } - break; - - -/* Line 1802 of yacc.c */ -#line 1694 "sapi/phpdbg/phpdbg_parser.c" - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - -/* Line 2050 of yacc.c */ -#line 176 "sapi/phpdbg/phpdbg_parser.y" - - -static int yyerror(const char *msg) { - phpdbg_error("command", "type=\"parseerror\" msg=\"%s\"", "Parse Error: %s", msg); - - { - const phpdbg_param_t *top = PHPDBG_G(parser_stack); - - while (top) { - phpdbg_param_debug(top, "--> "); - top = top->next; - } - } - return 0; -} - -int phpdbg_do_parse(phpdbg_param_t *stack, char *input) { - if (!*input) { - return 0; - } - - if (PHPDBG_G(cur_command)) { - free(PHPDBG_G(cur_command)); - } - PHPDBG_G(cur_command) = strdup(input); - - phpdbg_init_lexer(stack, input); - - return yyparse(); -} diff --git a/sapi/phpdbg/phpdbg_parser.h b/sapi/phpdbg/phpdbg_parser.h deleted file mode 100644 index 2a27a4e7df..0000000000 --- a/sapi/phpdbg/phpdbg_parser.h +++ /dev/null @@ -1,130 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED -# define YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int phpdbg_debug; -#endif -/* "%code requires" blocks. */ -/* Line 2060 of yacc.c */ -#line 36 "sapi/phpdbg/phpdbg_parser.y" - -#include "phpdbg.h" -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - - -/* Line 2060 of yacc.c */ -#line 55 "sapi/phpdbg/phpdbg_parser.h" - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_EVAL = 258, - T_RUN = 259, - T_SHELL = 260, - T_IF = 261, - T_TRUTHY = 262, - T_FALSY = 263, - T_STRING = 264, - T_COLON = 265, - T_DCOLON = 266, - T_POUND = 267, - T_SEPARATOR = 268, - T_PROTO = 269, - T_DIGITS = 270, - T_LITERAL = 271, - T_ADDR = 272, - T_OPCODE = 273, - T_ID = 274, - T_INPUT = 275, - T_UNEXPECTED = 276, - T_REQ_ID = 277 - }; -#endif -/* Tokens. */ -#define T_EVAL 258 -#define T_RUN 259 -#define T_SHELL 260 -#define T_IF 261 -#define T_TRUTHY 262 -#define T_FALSY 263 -#define T_STRING 264 -#define T_COLON 265 -#define T_DCOLON 266 -#define T_POUND 267 -#define T_SEPARATOR 268 -#define T_PROTO 269 -#define T_DIGITS 270 -#define T_LITERAL 271 -#define T_ADDR 272 -#define T_OPCODE 273 -#define T_ID 274 -#define T_INPUT 275 -#define T_UNEXPECTED 276 -#define T_REQ_ID 277 - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int phpdbg_parse (void *YYPARSE_PARAM); -#else -int phpdbg_parse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int phpdbg_parse (void); -#else -int phpdbg_parse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED */ diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y index b61c9c0a26..88baa010b2 100644 --- a/sapi/phpdbg/phpdbg_parser.y +++ b/sapi/phpdbg/phpdbg_parser.y @@ -39,9 +39,6 @@ typedef void* yyscan_t; #endif } -%output "sapi/phpdbg/phpdbg_parser.c" -%defines "sapi/phpdbg/phpdbg_parser.h" - %token T_EVAL "eval" %token T_RUN "run" %token T_SHELL "shell" @@ -68,7 +65,7 @@ typedef void* yyscan_t; input : command { $$ = $1; } | input T_SEPARATOR command { phpdbg_stack_separate($1.top); $$ = $3; } - | /* nothing */ + | /* empty */ ; command @@ -79,7 +76,7 @@ command parameters : parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); $$.top = PHPDBG_G(parser_stack)->top; } | parameters parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$2); $$.top = PHPDBG_G(parser_stack)->top; } - | parameters req_id { $$ = $1; } + | parameters T_REQ_ID { $$ = $1; PHPDBG_G(req_id) = $2.num; } ; parameter diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index f406810ab9..f4b5a11fef 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -81,7 +81,7 @@ const phpdbg_command_t phpdbg_prompt_commands[] = { PHPDBG_COMMAND_D(back, "show trace", 't', NULL, "|n", PHPDBG_ASYNC_SAFE), PHPDBG_COMMAND_D(frame, "switch to a frame", 'f', NULL, "|n", PHPDBG_ASYNC_SAFE), PHPDBG_COMMAND_D(list, "lists some code", 'l', phpdbg_list_commands, "*", PHPDBG_ASYNC_SAFE), - PHPDBG_COMMAND_D(info, "displays some informations", 'i', phpdbg_info_commands, "|s", PHPDBG_ASYNC_SAFE), + PHPDBG_COMMAND_D(info, "displays some information", 'i', phpdbg_info_commands, "|s", PHPDBG_ASYNC_SAFE), PHPDBG_COMMAND_D(clean, "clean the execution environment", 'X', NULL, 0, 0), PHPDBG_COMMAND_D(clear, "clear breakpoints", 'C', NULL, 0, 0), PHPDBG_COMMAND_D(help, "show help menu", 'h', phpdbg_help_commands, "|s", PHPDBG_ASYNC_SAFE), @@ -1311,7 +1311,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name) char *err = GET_DL_ERROR(); if (err && err[0]) { phpdbg_error("dl", "type=\"unknown\"", "%s", err); - LocalFree(err); + php_win32_error_msg_free(err); } else { phpdbg_error("dl", "type=\"unknown\"", "Unknown reason"); } diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index e10eb60d4a..a9b017ef56 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -660,8 +660,6 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) { int (*element_dump_func)(zval *zv, zend_string *key, zend_ulong num); zend_bool is_ref = 0; - int is_temp; - phpdbg_try_access { is_ref = Z_ISREF_P(zv) && GC_REFCOUNT(Z_COUNTED_P(zv)) > 1; ZVAL_DEREF(zv); @@ -696,10 +694,9 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) { } phpdbg_xml("<array refstatus=\"%s\" num=\"%d\">", COMMON, zend_hash_num_elements(myht)); element_dump_func = phpdbg_xml_array_element_dump; - is_temp = 0; goto head_done; case IS_OBJECT: - myht = Z_OBJDEBUG_P(zv, is_temp); + myht = zend_get_properties_for(zv, ZEND_PROP_PURPOSE_DEBUG); if (myht && GC_IS_RECURSIVE(myht)) { phpdbg_xml("<recursion />"); break; @@ -717,9 +714,8 @@ head_done: } ZEND_HASH_FOREACH_END(); zend_hash_apply_with_arguments(myht, (apply_func_args_t) element_dump_func, 0); GC_UNPROTECT_RECURSION(myht); - if (is_temp) { - zend_hash_destroy(myht); - efree(myht); + if (Z_TYPE_P(zv) == IS_OBJECT) { + zend_release_properties(myht); } } if (Z_TYPE_P(zv) == IS_ARRAY) { @@ -765,7 +761,7 @@ PHPDBG_API zend_bool phpdbg_check_caught_ex(zend_execute_data *execute_data, zen zend_class_entry *ce; if (!(ce = CACHED_PTR(cur->extended_value & ~ZEND_LAST_CATCH))) { - ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(cur, cur->op1)), RT_CONSTANT(cur, cur->op1) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD); + ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(cur, cur->op1)), Z_STR_P(RT_CONSTANT(cur, cur->op1) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD); CACHE_PTR(cur->extended_value & ~ZEND_LAST_CATCH, ce); } diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c index 1d7f33ff6f..488c0a3f07 100644 --- a/sapi/phpdbg/phpdbg_watch.c +++ b/sapi/phpdbg/phpdbg_watch.c @@ -31,7 +31,7 @@ * Watch elements are either simple, recursive or implicit (PHPDBG_WATCH_* flags) * Simple means that a particular watchpoint was explicitly defined * Recursive watch elements are created recursively (recursive root flag is to distinguish the root element easily from its children recursive elements) - * Implicit watch elements are implicitely created on all ancestors of simple or recursive watch elements + * Implicit watch elements are implicitly created on all ancestors of simple or recursive watch elements * Recursive and (simple or implicit) watch elements are mutually exclusive * Array/Object to distinguish watch elements on arrays * diff --git a/sapi/phpdbg/tests/print_001.phpt b/sapi/phpdbg/tests/print_001.phpt index 93a000528f..0025d5c071 100644 --- a/sapi/phpdbg/tests/print_001.phpt +++ b/sapi/phpdbg/tests/print_001.phpt @@ -30,19 +30,17 @@ L5-7 Foo\Bar::Foo() %s - %s + 5 ops L9-9 Foo\Bar::baz() %s - %s + 1 ops L9 #0 RETURN<-1> null prompt> [Not Executing!] -prompt> [Context %s (11 ops)] -L1-21 {main}() %s - %s + 11 ops - L4 #0 NOP - L14 #1 NOP - L18 #2 NEW "Foo\\Bar" @1 - L18 #3 DO_FCALL - L18 #4 INIT_METHOD_CALL<1> @1 "Foo" - L18 #5 SEND_VAL_EX "test" 1 - L18 #6 DO_FCALL - L19 #7 INIT_FCALL%s %d %s "foo" - L19 #8 SEND_VAL "test" 1 - L19 #9 DO_FCALL - L21 #10 RETURN<-1> 1 +prompt> [Context %s (9 ops)] +L1-21 {main}() %s - %s + 9 ops + L18 #0 NEW "Foo\\Bar" @0 + L18 #1 DO_FCALL + L18 #2 INIT_METHOD_CALL<1> @0 "Foo" + L18 #3 SEND_VAL_EX "test" 1 + L18 #4 DO_FCALL + L19 #5 INIT_FCALL%s %d %s "foo" + L19 #6 SEND_VAL "test" 1 + L19 #7 DO_FCALL + L21 #8 RETURN<-1> 1 prompt> --FILE-- <?php diff --git a/sapi/phpdbg/tests/stepping_001.phpt b/sapi/phpdbg/tests/stepping_001.phpt index 90b2e5573a..27084c6ef7 100644 --- a/sapi/phpdbg/tests/stepping_001.phpt +++ b/sapi/phpdbg/tests/stepping_001.phpt @@ -34,7 +34,7 @@ prompt> [L10 %s ECHO "ok" 00011: } finally { 00012: echo " ... ok"; prompt> ok -[L11 %s FAST_CALL J8 ~%d %s] +[L11 %s FAST_CALL J7 ~%d %s] >00011: } finally { 00012: echo " ... ok"; 00013: } @@ -44,7 +44,7 @@ prompt> [L12 %s ECHO " ... ok" 00014: prompt> ... ok [L12 %s FAST_RET ~%d %s] -[L11 %s JMP J10 %s] +[L11 %s JMP J9 %s] >00011: } finally { 00012: echo " ... ok"; 00013: } diff --git a/sapi/phpdbg/xml.md b/sapi/phpdbg/xml.md index c02f80f2ca..3fff8d2bc1 100644 --- a/sapi/phpdbg/xml.md +++ b/sapi/phpdbg/xml.md @@ -633,7 +633,7 @@ Other tags - <watchhit variable="" />: when ever a watched variable is changed, followed by a <watchdata> container - <watchdata> may contain - for watchpoints on variables: - - each of these <watch*> tags conatins a type attribute whose value is either "old" or "new") + - each of these <watch*> tags contains a type attribute whose value is either "old" or "new") - <watchvalue type="" inaccessible="inaccessible" />: old value is inaccessible - <watchvalue type=""> may contain a <stream> element which indicates the old/new (type attribute) value of the variable - <watchrefcount type="" refcount="" isref="" />: old/new (type attribute) refcount and isref, both numbers diff --git a/sapi/tests/test001.phpt b/sapi/tests/test001.phpt deleted file mode 100644 index 318ab7a90f..0000000000 --- a/sapi/tests/test001.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -IIS style CGI missing SCRIPT_FILENAME ---DESCRIPTION-- -This would be similar to what IIS produces for a simple query. ---ENV-- -return <<<END -PATH_TRANSLATED=$filename -PATH_INFO=$scriptname -SCRIPT_NAME=$scriptname -END; ---FILE-- -<?php - echo "HELLO"; -?> ---EXPECT-- -HELLO diff --git a/sapi/tests/test002.phpt b/sapi/tests/test002.phpt deleted file mode 100644 index 4afd8e276f..0000000000 --- a/sapi/tests/test002.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Apache style CGI ---DESCRIPTION-- -Apache likes to set SCRIPT_FILENAME to the php executable -if you use ScriptAlias configurations, and the proper -path is in PATH_TRANSLATED. SCRIPT_NAME in this is faked, -but that is ok, Apache sets SCRIPT_NAME to the ScriptAlias -of the executable. ---ENV-- -return <<<END -REDIRECT_URL=$scriptname -PATH_TRANSLATED=$filename -PATH_INFO=$scriptname -SCRIPT_NAME=/scriptalias/php -SCRIPT_FILENAME=$this->conf['TEST_PHP_EXECUTABLE'] -END; ---FILE-- -<?php - echo "HELLO"; -?> ---EXPECT-- -HELLO diff --git a/sapi/tests/test003.phpt b/sapi/tests/test003.phpt deleted file mode 100644 index 24abdbbf41..0000000000 --- a/sapi/tests/test003.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -IIS style CGI missing SCRIPT_FILENAME, has PATH_INFO ---DESCRIPTION-- -This would be similar to what IIS produces for a simple query -that also has PATH_INFO. ---REQUEST-- -return <<<END -PATH_INFO=/path/info -END; ---ENV-- -return <<<END -PATH_TRANSLATED=/path/bla -PATH_INFO=/path/info -SCRIPT_NAME=path -END; ---FILE-- -<?php - echo $_SERVER['PATH_INFO']; -?> ---EXPECT-- -/path/info diff --git a/sapi/tests/test004.phpt b/sapi/tests/test004.phpt deleted file mode 100644 index d1da1db6ed..0000000000 --- a/sapi/tests/test004.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Apache style CGI with PATH_INFO ---DESCRIPTION-- -Apache likes to set SCRIPT_FILENAME to the php executable -if you use ScriptAlias configurations, and the proper -path is in PATH_TRANSLATED. SCRIPT_NAME in this is faked, -but that is ok, Apache sets SCRIPT_NAME to the ScriptAlias -of the executable. ---REQUEST-- -return <<<END -PATH_INFO=/path/info -END; ---ENV-- -return <<<END -REDIRECT_URL=/path -PATH_TRANSLATED=/path/info/fpp -PATH_INFO=/path/info -SCRIPT_NAME=/scriptalias/php -SCRIPT_FILENAME=$this->conf['TEST_PHP_EXECUTABLE'] -END; ---FILE-- -<?php - echo $_SERVER['PATH_INFO']; -?> ---EXPECT-- -/path/info diff --git a/sapi/tests/test005.phpt b/sapi/tests/test005.phpt deleted file mode 100644 index 85143d5228..0000000000 --- a/sapi/tests/test005.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -QUERY_STRING Security Bug ---DESCRIPTION-- -This bug was present in PHP 4.3.0 only. -A failure should print HELLO. ---REQUEST-- -return <<<END -SCRIPT_NAME=/nothing.php -QUERY_STRING=$filename -END; ---ENV-- -return <<<END -REDIRECT_URL=$scriptname -PATH_TRANSLATED=c:\apache\1.3.27\htdocs\nothing.php -QUERY_STRING=$filename -PATH_INFO=/nothing.php -SCRIPT_NAME=/phpexe/php.exe/nothing.php -SCRIPT_FILENAME=c:\apache\1.3.27\htdocs\nothing.php -END; ---FILE-- -<?php - echo "HELLO"; -?> ---EXPECTHEADERS-- -Status: 404 Not Found ---EXPECT-- -No input file specified. diff --git a/sapi/tests/test006.phpt b/sapi/tests/test006.phpt deleted file mode 100644 index c43fe493c3..0000000000 --- a/sapi/tests/test006.phpt +++ /dev/null @@ -1,72 +0,0 @@ ---TEST-- -Multipart Form POST Data ---HEADERS-- -return <<<END -Content-Type=multipart/form-data; boundary=---------------------------240723202011929 -Content-Length=862 -END; ---ENV-- -return <<<END -CONTENT_TYPE=multipart/form-data; boundary=---------------------------240723202011929 -CONTENT_LENGTH=862 -END; ---POST-- ------------------------------240723202011929 -Content-Disposition: form-data; name="entry" - -entry box ------------------------------240723202011929 -Content-Disposition: form-data; name="password" - -password box ------------------------------240723202011929 -Content-Disposition: form-data; name="radio1" - -test 1 ------------------------------240723202011929 -Content-Disposition: form-data; name="checkbox1" - -test 1 ------------------------------240723202011929 -Content-Disposition: form-data; name="choices" - -Choice 1 ------------------------------240723202011929 -Content-Disposition: form-data; name="choices" - -Choice 2 ------------------------------240723202011929 -Content-Disposition: form-data; name="file"; filename="info.php" -Content-Type: application/octet-stream - -<?php -phpinfo(); -?> ------------------------------240723202011929-- ---FILE-- -<?php -error_reporting(0); -print_r($_POST); -print_r($_FILES); -?> ---EXPECTF-- -Array -( - [entry] => entry box - [password] => password box - [radio1] => test 1 - [checkbox1] => test 1 - [choices] => Choice 2 -) -Array -( - [file] => Array - ( - [name] => info.php - [type] => application/octet-stream - [tmp_name] => %s - [error] => 0 - [size] => 19 - ) - -) diff --git a/sapi/tests/test007.phpt b/sapi/tests/test007.phpt deleted file mode 100644 index 76fca8fcd6..0000000000 --- a/sapi/tests/test007.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -Multipart Form POST Data, incorrect content length ---HEADERS-- -return <<<END -Content-Type=multipart/form-data; boundary=---------------------------240723202011929 -Content-Length=100 -END; ---POST-- ------------------------------240723202011929 -Content-Disposition: form-data; name="entry" - -entry box ------------------------------240723202011929 -Content-Disposition: form-data; name="password" - -password box ------------------------------240723202011929 -Content-Disposition: form-data; name="radio1" - -test 1 ------------------------------240723202011929 -Content-Disposition: form-data; name="checkbox1" - -test 1 ------------------------------240723202011929 -Content-Disposition: form-data; name="choices" - -Choice 1 ------------------------------240723202011929 -Content-Disposition: form-data; name="choices" - -Choice 2 ------------------------------240723202011929 -Content-Disposition: form-data; name="file"; filename="info.php" -Content-Type: application/octet-stream - -<?php -phpinfo(); -?> ------------------------------240723202011929-- ---FILE-- -<?php -print @$_POST['choices']; -?> ---EXPECT-- |
