diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:35:28 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:35:28 -0400 |
| commit | ba50031707469046407a35b77a3cd81351e951b3 (patch) | |
| tree | 5c03e723bdbfabae09d41a3ab1253dff41eeed4a /Zend | |
| parent | 0a36161e13484a99ccf69bb38f206462d27cc6d6 (diff) | |
| download | php-upstream/5.1.5.tar.gz | |
Imported Upstream version 5.1.5upstream/5.1.5
Diffstat (limited to 'Zend')
43 files changed, 2419 insertions, 1317 deletions
diff --git a/Zend/bench.php b/Zend/bench.php index 9f3f9c205..f22704a7a 100644 --- a/Zend/bench.php +++ b/Zend/bench.php @@ -179,7 +179,7 @@ function fibo($n) { /****/ -function hash($n) { +function hash1($n) { for ($i = 1; $i <= $n; $i++) { $X[dechex($i)] = $i; } @@ -401,8 +401,8 @@ ary3(2000); $t = end_test($t, "ary3(2000)"); fibo(30); $t = end_test($t, "fibo(30)"); -hash(50000); -$t = end_test($t, "hash(50000)"); +hash1(50000); +$t = end_test($t, "hash1(50000)"); hash2(500); $t = end_test($t, "hash2(500)"); heapsort(20000); diff --git a/Zend/tests/bug29210.phpt b/Zend/tests/bug29210.phpt index d9a931fda..c0f0460fb 100644 --- a/Zend/tests/bug29210.phpt +++ b/Zend/tests/bug29210.phpt @@ -92,11 +92,7 @@ $object->test(); --EXPECTF--
test_func1
test_func2
-
-Strict Standards: Non-static method test_class::test_func3() cannot be called statically, assuming $this from compatible context test_class in %sbug29210.php on line %d
test_func3
-
-Strict Standards: Non-static method test_class::test_func4() cannot be called statically, assuming $this from compatible context test_class in %sbug29210.php on line %d
test_func4
test_func1 isn't callable from outside
test_func2 isn't callable from outside
@@ -104,9 +100,5 @@ test_func3 isn't callable from outside test_func4 isn't callable from outside
test_func1 isn't callable from child
test_func2
-
-Strict Standards: Non-static method test_class::test_func3() cannot be called statically, assuming $this from compatible context foo in %sbug29210.php on line %d
test_func3 isn't callable from child
-
-Strict Standards: Non-static method test_class::test_func4() cannot be called statically, assuming $this from compatible context foo in %sbug29210.php on line %d
test_func4
diff --git a/Zend/tests/bug36006.phpt b/Zend/tests/bug36006.phpt new file mode 100755 index 000000000..79f9897d1 --- /dev/null +++ b/Zend/tests/bug36006.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #36006 (Problem with $this in __destruct()) +--FILE-- +<?php + +class Person { + public $dad; + public function __destruct() { + $this->dad = null; /* no segfault if this is commented out */ + } +} + +class Dad extends Person { + public $son; + public function __construct() { + $this->son = new Person; + $this->son->dad = $this; /* no segfault if this is commented out */ + } + public function __destruct() { + $this->son = null; + parent::__destruct(); /* segfault here */ + } +} + +$o = new Dad; +unset($o); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/Zend/tests/bug36037.phpt b/Zend/tests/bug36037.phpt new file mode 100755 index 000000000..3ccebf652 --- /dev/null +++ b/Zend/tests/bug36037.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #36037 (heredoc adds extra line number) +--FILE-- +<?php +echo __LINE__, "\n"; +$x=<<<XXX +123 +YYY; +XXX; +echo __LINE__, "\n"; +?> +--EXPECT-- +2 +7 diff --git a/Zend/tests/bug36071.phpt b/Zend/tests/bug36071.phpt new file mode 100755 index 000000000..72ef78f6d --- /dev/null +++ b/Zend/tests/bug36071.phpt @@ -0,0 +1,13 @@ +--TEST--
+Bug #36071 (Engine Crash related with 'clone')
+--INI--
+error_reporting=4095
+--FILE--
+<?php
+$a = clone 0;
+$a[0]->b = 0;
+echo "ok\n";
+?>
+--EXPECTF--
+Warning: __clone method called on non-object in %sbug36071.php on line 2
+ok
\ No newline at end of file diff --git a/Zend/tests/bug36268.phpt b/Zend/tests/bug36268.phpt new file mode 100755 index 000000000..5276d50d4 --- /dev/null +++ b/Zend/tests/bug36268.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #36268 (Object destructors called even after fatal errors) +--FILE-- +<?php +class Foo { + function __destruct() { + echo "Ha!\n"; + } +} +$x = new Foo(); +bar(); +?> +--EXPECTF-- +Fatal error: Call to undefined function bar() in %sbug36268.php on line 8 diff --git a/Zend/tests/bug36303.phpt b/Zend/tests/bug36303.phpt new file mode 100755 index 000000000..13c21b7c5 --- /dev/null +++ b/Zend/tests/bug36303.phpt @@ -0,0 +1,12 @@ +--TEST--
+Bug #36303 (foreach on error_zval produces segfault)
+--FILE--
+<?php
+$x="test";
+foreach($x->a->b as &$v) {
+}
+echo "ok\n";
+?>
+--EXPECTF--
+Warning: Invalid argument supplied for foreach() in %sbug36303.php on line 3
+ok
diff --git a/Zend/tests/bug36568.phpt b/Zend/tests/bug36568.phpt new file mode 100755 index 000000000..0401d1e01 --- /dev/null +++ b/Zend/tests/bug36568.phpt @@ -0,0 +1,15 @@ +--TEST--
+Bug #36568 (memory_limit has no effect)
+--SKIPIF--
+<?php
+ if (!function_exists('memory_get_usage')) die('skip PHP is configured without memory_limit');
+?>
+--INI--
+memory_limit=16M
+--FILE--
+<?php
+ini_set("memory_limit", "32M");
+echo ini_get("memory_limit");
+?>
+--EXPECT--
+32M
diff --git a/Zend/tests/zend_strtod.phpt b/Zend/tests/zend_strtod.phpt new file mode 100644 index 000000000..1b11be038 --- /dev/null +++ b/Zend/tests/zend_strtod.phpt @@ -0,0 +1,19 @@ +--TEST-- +zend_strtod() leaks on big doubles +--INI-- +precision=14 +--FILE-- +<?php +var_dump("1139932690.21688500" - "1139932790.21688500"); +var_dump("1139932690000.21688500" - "331139932790.21688500"); +var_dump("339932690.21688500" - "4564645646456463461139932790.21688500"); +var_dump("123123139932690.21688500" - "11399327900000000.21688500"); + +echo "Done\n"; +?> +--EXPECTF-- +float(-100) +float(808792757210) +float(-4.5646456464565E+27) +float(-11276204760067000) +Done diff --git a/Zend/zend.c b/Zend/zend.c index 8ba0f2b49..c83e482cb 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.308.2.7 2006/01/04 23:53:03 andi Exp $ */ +/* $Id: zend.c,v 1.308.2.12 2006/03/30 21:39:01 tony2001 Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -237,11 +237,19 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop } else { if(Z_OBJ_HANDLER_P(expr, get)) { zval *z = Z_OBJ_HANDLER_P(expr, get)(expr TSRMLS_CC); + + z->refcount++; if(Z_TYPE_P(z) != IS_OBJECT) { zend_make_printable_zval(z, expr_copy, use_copy); - FREE_ZVAL(z); + if (*use_copy) { + zval_ptr_dtor(&z); + } else { + ZVAL_ZVAL(expr_copy, z, 0, 1); + *use_copy = 1; + } return; } + zval_ptr_dtor(&z); } } if (EG(exception)) { @@ -869,7 +877,7 @@ static int exec_done_cb(zend_module_entry *module TSRMLS_DC) void zend_post_deactivate_modules(TSRMLS_D) { zend_hash_apply(&module_registry, (apply_func_t) exec_done_cb TSRMLS_CC); - zend_hash_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC); + zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC); } @@ -1017,7 +1025,7 @@ ZEND_API void zend_error(int type, const char *format, ...) } zval_ptr_dtor(&retval); } - } else { + } else if (!EG(exception)) { /* The user error handler failed, use built-in error handler */ zend_error_cb(type, error_filename, error_lineno, format, args); } @@ -1046,7 +1054,7 @@ ZEND_API void zend_error(int type, const char *format, ...) } } -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn)); #endif diff --git a/Zend/zend.h b/Zend/zend.h index e99898d07..d8d5022d6 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.293.2.9 2006/01/04 23:53:03 andi Exp $ */ +/* $Id: zend.h,v 1.293.2.11 2006/03/30 21:39:01 tony2001 Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -91,7 +91,7 @@ const char *zend_mh_bundle_error(void); #endif /* HAVE_MACH_O_DYLD_H */ -#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H) +#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H) && !defined(ZEND_WIN32) # ifndef RTLD_LAZY # define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */ @@ -250,7 +250,7 @@ char *alloca (); #define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC #define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) # define ZEND_VM_ALWAYS_INLINE __attribute__ ((always_inline)) void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((noreturn)); #else diff --git a/Zend/zend_API.c b/Zend/zend_API.c index b7b6aeafe..ece2ede82 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.296.2.16 2006/01/06 20:55:14 tony2001 Exp $ */ +/* $Id: zend_API.c,v 1.296.2.26 2006/03/23 13:14:55 helly Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -271,7 +271,7 @@ ZEND_API int zend_get_object_classname(zval *object, char **class_name, zend_uin } -static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC) +static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **spec TSRMLS_DC) { char *spec_walk = *spec; char c = *spec_walk++; @@ -445,6 +445,21 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC) } break; + case 'h': + { + HashTable **p = va_arg(*va, HashTable **); + if (Z_TYPE_PP(arg) != IS_ARRAY) { + if (Z_TYPE_PP(arg) == IS_NULL && return_null) { + *p = NULL; + } else { + return "array"; + } + } else { + *p = Z_ARRVAL_PP(arg); + } + } + break; + case 'o': { zval **p = va_arg(*va, zval **); @@ -477,6 +492,41 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC) } break; + case 'C': + { + zend_class_entry **lookup, **pce = va_arg(*va, zend_class_entry **); + zend_class_entry *ce_base = *pce; + + convert_to_string_ex(arg); + if (zend_lookup_class(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &lookup TSRMLS_CC) == FAILURE) { + *pce = NULL; + } else { + *pce = *lookup; + } + if (ce_base) { + if ((!*pce || !instanceof_function(*pce, ce_base TSRMLS_CC)) && !return_null) { + char *space; + char *class_name = get_active_class_name(&space TSRMLS_CC); + zend_error(E_WARNING, "%s%s%s() expects parameter %d to be a class name derived from %s, '%s' given", + class_name, space, get_active_function_name(TSRMLS_C), + arg_num, ce_base->name, Z_STRVAL_PP(arg)); + *pce = NULL; + return ""; + } + } + if (!*pce && !return_null) { + char *space; + char *class_name = get_active_class_name(&space TSRMLS_CC); + zend_error(E_WARNING, "%s%s%s() expects parameter %d to be a valid class name, '%s' given", + class_name, space, get_active_function_name(TSRMLS_C), + arg_num, Z_STRVAL_PP(arg)); + return ""; + } + break; + + } + break; + case 'z': { zval **p = va_arg(*va, zval **); @@ -510,7 +560,7 @@ static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int { char *expected_type = NULL; - expected_type = zend_parse_arg_impl(arg, va, spec TSRMLS_CC); + expected_type = zend_parse_arg_impl(arg_num, arg, va, spec TSRMLS_CC); if (expected_type) { if (!quiet) { char *space; @@ -545,6 +595,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl case 'r': case 'a': case 'o': case 'O': case 'z': case 'Z': + case 'C': case 'h': max_num_args++; break; @@ -760,6 +811,7 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC zend_class_entry *old_scope = *scope; *scope = class_type; + zend_hash_apply_with_argument(&class_type->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC); zend_hash_apply_with_argument(&class_type->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC); if (!CE_STATIC_MEMBERS(class_type)) { @@ -1494,8 +1546,8 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL; char *lowercase_name; int fname_len; - char *lc_class_name; - int class_name_len; + char *lc_class_name = NULL; + int class_name_len = 0; if (type==MODULE_PERSISTENT) { error_type = E_CORE_WARNING; @@ -1538,8 +1590,10 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr } if (ptr->flags) { if (!(ptr->flags & ZEND_ACC_PPP_MASK)) { - zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of public, protected or private", scope ? scope->name : "", scope ? "::" : "", ptr->fname); - internal_function->fn_flags = ZEND_ACC_PUBLIC; + if (ptr->flags != ZEND_ACC_DEPRECATED || scope) { + zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of public, protected or private", scope ? scope->name : "", scope ? "::" : "", ptr->fname); + } + internal_function->fn_flags = ZEND_ACC_PUBLIC | ptr->flags; } else { internal_function->fn_flags = ptr->flags; } @@ -1801,11 +1855,7 @@ int module_registry_cleanup(zend_module_entry *module TSRMLS_DC) int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC) { - switch (module->type) { - case MODULE_TEMPORARY: - return 1; - } - return 0; + return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP; } @@ -1974,7 +2024,7 @@ ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_ return 1; } -static int zend_is_callable_check_func(int check_flags, zval **zobj_ptr, zend_class_entry *ce_org, zval *callable, zend_class_entry **ce_ptr, zend_function **fptr_ptr TSRMLS_DC) +static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, zend_class_entry *ce_org, zval *callable, zend_class_entry **ce_ptr, zend_function **fptr_ptr TSRMLS_DC) { int retval; char *lcname, *lmname, *colon; @@ -2023,23 +2073,28 @@ static int zend_is_callable_check_func(int check_flags, zval **zobj_ptr, zend_cl retval = zend_hash_find(ftable, lmname, mlen+1, (void**)&fptr) == SUCCESS ? 1 : 0; if (!retval) { - if (zobj_ptr && *ce_ptr && (*ce_ptr)->__call != 0) { + if (*zobj_ptr_ptr && *ce_ptr && (*ce_ptr)->__call != 0) { retval = (*ce_ptr)->__call != NULL; *fptr_ptr = (*ce_ptr)->__call; } } else { *fptr_ptr = fptr; if (*ce_ptr) { - if (!zobj_ptr && !(fptr->common.fn_flags & ZEND_ACC_STATIC)) { + if (!*zobj_ptr_ptr && !(fptr->common.fn_flags & ZEND_ACC_STATIC)) { if ((check_flags & IS_CALLABLE_CHECK_IS_STATIC) != 0) { retval = 0; } else { - zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically", (*ce_ptr)->name, fptr->common.function_name); + if (EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), *ce_ptr TSRMLS_CC)) { + *zobj_ptr_ptr = &EG(This); + zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically, assuming $this from compatible context %s", (*ce_ptr)->name, fptr->common.function_name, Z_OBJCE_P(EG(This))->name); + } else { + zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically", (*ce_ptr)->name, fptr->common.function_name); + } } } if (retval && (check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0) { if (fptr->op_array.fn_flags & ZEND_ACC_PRIVATE) { - if (!zend_check_private(fptr, zobj_ptr ? Z_OBJCE_PP(zobj_ptr) : EG(scope), lmname, mlen TSRMLS_CC)) { + if (!zend_check_private(fptr, *zobj_ptr_ptr ? Z_OBJCE_PP(*zobj_ptr_ptr) : EG(scope), lmname, mlen TSRMLS_CC)) { retval = 0; } } else if ((fptr->common.fn_flags & ZEND_ACC_PROTECTED)) { @@ -2063,6 +2118,9 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char ** zend_function *fptr_local; zval **zobj_ptr_local; + if (callable_name) { + *callable_name = NULL; + } if (callable_name_len == NULL) { callable_name_len = &callable_name_len_local; } @@ -2089,7 +2147,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char ** return 1; } - retval = zend_is_callable_check_func(check_flags|IS_CALLABLE_CHECK_IS_STATIC, NULL, NULL, callable, ce_ptr, fptr_ptr TSRMLS_CC); + retval = zend_is_callable_check_func(check_flags|IS_CALLABLE_CHECK_IS_STATIC, zobj_ptr_ptr, NULL, callable, ce_ptr, fptr_ptr TSRMLS_CC); break; case IS_ARRAY: @@ -2132,12 +2190,6 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char ** } efree(lcname); } - if (EG(This)) { - if (instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { - *zobj_ptr_ptr = &EG(This); - zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically, assuming $this from compatible context %s", ce->name, Z_STRVAL_PP(method), Z_OBJCE_P(EG(This))->name); - } - } } else { ce = Z_OBJCE_PP(obj); /* TBFixed: what if it's overloaded? */ @@ -2162,7 +2214,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char ** } if (ce) { - retval = zend_is_callable_check_func(check_flags, *zobj_ptr_ptr, ce, *method, ce_ptr, fptr_ptr TSRMLS_CC); + retval = zend_is_callable_check_func(check_flags, zobj_ptr_ptr, ce, *method, ce_ptr, fptr_ptr TSRMLS_CC); } } else if (callable_name) { *callable_name = estrndup("Array", sizeof("Array")-1); @@ -2395,6 +2447,20 @@ ZEND_API int zend_declare_class_constant(zend_class_entry *ce, char *name, size_ return zend_hash_update(&ce->constants_table, name, name_length+1, &value, sizeof(zval *), NULL); } +ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, size_t name_length TSRMLS_DC) +{ + zval *constant; + + if (ce->type & ZEND_INTERNAL_CLASS) { + constant = malloc(sizeof(zval)); + } else { + ALLOC_ZVAL(constant); + } + ZVAL_NULL(constant); + INIT_PZVAL(constant); + return zend_declare_class_constant(ce, name, name_length, constant TSRMLS_CC); +} + ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, size_t name_length, long value TSRMLS_DC) { zval *constant; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 7daaf3c41..c0d580546 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.207.2.6 2006/01/04 23:53:03 andi Exp $ */ +/* $Id: zend_API.h,v 1.207.2.8 2006/03/05 16:12:24 helly Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -50,7 +50,9 @@ typedef struct _zend_function_entry { #define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_FENTRY(zend_name, name, arg_info, 0) #define ZEND_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0) +#define ZEND_DEP_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED) #define ZEND_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, 0) +#define ZEND_DEP_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED) #define ZEND_ME(classname, name, arg_info, flags) ZEND_FENTRY(name, ZEND_FN(classname##_##name), arg_info, flags) #define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT) #define ZEND_MALIAS(classname, name, alias, arg_info, flags) \ @@ -221,6 +223,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type TSRMLS_DC); ZEND_API int zend_declare_class_constant(zend_class_entry *ce, char *name, size_t name_length, zval *value TSRMLS_DC); +ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, size_t name_length TSRMLS_DC); ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, size_t name_length, long value TSRMLS_DC); ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, char *name, size_t name_length, zend_bool value TSRMLS_DC); ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, char *name, size_t name_length, double value TSRMLS_DC); diff --git a/Zend/zend_arg_defs.c b/Zend/zend_arg_defs.c index 53dbfaf13..9a128fee2 100644 --- a/Zend/zend_arg_defs.c +++ b/Zend/zend_arg_defs.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_arg_defs.c,v 1.2.2.1 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_arg_defs.c,v 1.2.2.2 2006/04/06 21:10:45 andrei Exp $ */ ZEND_BEGIN_ARG_INFO(first_arg_force_ref, 0) ZEND_ARG_PASS_INFO(1) @@ -40,6 +40,14 @@ ZEND_BEGIN_ARG_INFO(fourth_arg_force_ref, 0) ZEND_ARG_PASS_INFO(1) ZEND_END_ARG_INFO(); +ZEND_BEGIN_ARG_INFO(fifth_arg_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) +ZEND_END_ARG_INFO(); + ZEND_BEGIN_ARG_INFO(all_args_by_ref, 1) ZEND_END_ARG_INFO(); diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index fd2e1b343..ea8e7b111 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.277.2.8 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.277.2.12 2006/04/05 11:36:13 tony2001 Exp $ */ #include "zend.h" #include "zend_API.h" @@ -314,6 +314,12 @@ ZEND_FUNCTION(strncmp) convert_to_string_ex(s1); convert_to_string_ex(s2); convert_to_long_ex(s3); + + if (Z_LVAL_PP(s3) < 0) { + zend_error(E_WARNING, "Length must be greater than or equal to 0"); + RETURN_FALSE; + } + RETURN_LONG(zend_binary_zval_strncmp(*s1, *s2, *s3)); } /* }}} */ @@ -347,6 +353,12 @@ ZEND_FUNCTION(strncasecmp) convert_to_string_ex(s1); convert_to_string_ex(s2); convert_to_long_ex(s3); + + if (Z_LVAL_PP(s3) < 0) { + zend_error(E_WARNING, "Length must be greater than or equal to 0"); + RETURN_FALSE; + } + RETURN_LONG(zend_binary_zval_strncasecmp(*s1, *s2, *s3)); } /* }}} */ @@ -768,11 +780,16 @@ ZEND_FUNCTION(get_object_vars) RETURN_FALSE; } + properties = Z_OBJ_HT_PP(obj)->get_properties(*obj TSRMLS_CC); + + if (properties == NULL) { + RETURN_FALSE; + } + instanceof = EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), Z_OBJCE_PP(obj) TSRMLS_CC); array_init(return_value); - properties = Z_OBJ_HT_PP(obj)->get_properties(*obj TSRMLS_CC); zend_hash_internal_pointer_reset_ex(properties, &pos); while (zend_hash_get_current_data_ex(properties, (void **) &value, &pos) == SUCCESS) { @@ -1693,8 +1710,6 @@ ZEND_FUNCTION(debug_print_backtrace) } } - array_init(return_value); - while (ptr) { char *free_class_name = NULL; @@ -1801,7 +1816,11 @@ ZEND_FUNCTION(debug_print_backtrace) debug_print_backtrace_args(arg_array TSRMLS_CC); zval_ptr_dtor(&arg_array); } - zend_printf(") called at [%s:%d]\n", filename, lineno); + if (filename) { + zend_printf(") called at [%s:%d]\n", filename, lineno); + } else { + ZEND_PUTS(")\n"); + } include_filename = filename; ptr = skip->prev_execute_data; ++indent; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 50e1ba836..52382c2d1 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.647.2.21 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.25 2006/03/27 08:09:18 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -2940,13 +2940,7 @@ void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC) } ALLOC_ZVAL(property); - - if (value) { - *property = value->u.constant; - } else { - INIT_PZVAL(property); - property->type = IS_NULL; - } + *property = value->u.constant; if (zend_hash_add(&CG(active_class_entry)->constants_table, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL)==FAILURE) { FREE_ZVAL(property); @@ -3095,6 +3089,33 @@ void zend_do_end_new_object(znode *result, znode *new_token, znode *argument_lis *result = CG(active_op_array)->opcodes[new_token->u.opline_num].result; } +static int zend_constant_ct_subst(znode *result, zval *const_name TSRMLS_DC) +{ + zend_constant *c = NULL; + + if (zend_hash_find(EG(zend_constants), Z_STRVAL_P(const_name), Z_STRLEN_P(const_name)+1, (void **) &c) == FAILURE) { + char *lookup_name = zend_str_tolower_dup(Z_STRVAL_P(const_name), Z_STRLEN_P(const_name)); + + if (zend_hash_find(EG(zend_constants), lookup_name, Z_STRLEN_P(const_name)+1, (void **) &c)==SUCCESS) { + if ((c->flags & CONST_CS) && memcmp(c->name, Z_STRVAL_P(const_name), Z_STRLEN_P(const_name))!=0) { + c = NULL; + } + } else { + c = NULL; + } + efree(lookup_name); + } + if (c && (c->flags & CONST_CT_SUBST)) { + zval_dtor(const_name); + result->op_type = IS_CONST; + result->u.constant = c->value; + zval_copy_ctor(&result->u.constant); + INIT_PZVAL(&result->u.constant); + return 1; + } + return 0; +} + void zend_do_fetch_constant(znode *result, znode *constant_container, znode *constant_name, int mode TSRMLS_DC) { switch (mode) { @@ -3102,13 +3123,15 @@ void zend_do_fetch_constant(znode *result, znode *constant_container, znode *con if (constant_container) { zend_do_fetch_class_name(NULL, constant_container, constant_name TSRMLS_CC); *result = *constant_container; - } else { + result->u.constant.type = IS_CONSTANT; + } else if (!zend_constant_ct_subst(result, &constant_name->u.constant TSRMLS_CC)) { *result = *constant_name; + result->u.constant.type = IS_CONSTANT; } - result->u.constant.type = IS_CONSTANT; break; case ZEND_RT: - { + if (constant_container || + !zend_constant_ct_subst(result, &constant_name->u.constant TSRMLS_CC)) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_FETCH_CONSTANT; @@ -3227,6 +3250,9 @@ void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr) case IS_DOUBLE: zend_hash_index_update(result->u.constant.value.ht, (long)offset->u.constant.value.dval, &element, sizeof(zval *), NULL); break; + case IS_CONSTANT_ARRAY: + zend_error(E_ERROR, "Illegal offset type"); + break; } } else { zend_hash_next_index_insert(result->u.constant.value.ht, &element, sizeof(zval *), NULL); @@ -3755,6 +3781,8 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) } efree(val->u.constant.value.str.val); #endif /* ZEND_MULTIBYTE */ + } else { + zval_dtor(&val->u.constant); } zval_dtor(&var->u.constant); } diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index ae273a644..2488bea83 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.316.2.6 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_compile.h,v 1.316.2.8 2006/03/13 11:13:42 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -136,6 +136,9 @@ typedef struct _zend_try_catch_element { /* shadow of parent's private method/property */ #define ZEND_ACC_SHADOW 0x20000 +/* deprecation flag */ +#define ZEND_ACC_DEPRECATED 0x40000 + char *zend_visibility_string(zend_uint fn_flags); @@ -514,6 +517,7 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC); ZEND_API void zend_file_handle_dtor(zend_file_handle *fh); ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC); ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC); +ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC); ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC); ZEND_API void zend_function_dtor(zend_function *function); diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h index 61d07b083..0576f2cbc 100644 --- a/Zend/zend_config.w32.h +++ b/Zend/zend_config.w32.h @@ -5,7 +5,7 @@ | Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -17,14 +17,15 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_config.w32.h,v 1.39.2.1 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_config.w32.h,v 1.39.2.2 2006/03/14 14:19:00 dmitry Exp $ */ #ifndef ZEND_CONFIG_W32_H #define ZEND_CONFIG_W32_H #define USE_ZEND_ALLOC 1 -#define HAVE_ALLOCA 1 -#define HAVE_LIMITS_H 1 + +#include <../main/config.w32.h> + #define _CRTDBG_MAP_ALLOC #include <malloc.h> @@ -44,19 +45,9 @@ typedef unsigned long ulong; typedef unsigned int uint; -#undef HAVE_KILL -#define HAVE_GETPID 1 -/* #define HAVE_ALLOCA_H 1 */ -#define HAVE_MEMCPY 1 -#define HAVE_STRDUP 1 -#define HAVE_SYS_TYPES_H 1 #define HAVE_STDIOSTR_H 1 #define HAVE_CLASS_ISTDIOSTREAM #define istdiostream stdiostream -#define HAVE_STDARG_H 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_STRCOLL 1 #define snprintf _snprintf #define vsnprintf _vsnprintf @@ -87,7 +78,7 @@ typedef unsigned int uint; #define ZEND_DLEXPORT __declspec(dllexport) #define ZEND_DLIMPORT __declspec(dllimport) -/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT +/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT * (and requires _WIN32_WINNT to be defined, which prevents the resulting executable * from running under Windows 9x * Windows 9x should silently ignore it, so it's being used here directly diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index eda2ab0f8..5703c3661 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_constants.c,v 1.71.2.1 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_constants.c,v 1.71.2.5 2006/03/15 14:12:26 dmitry Exp $ */ #include "zend.h" #include "zend_constants.h" @@ -55,11 +55,13 @@ void zend_copy_constants(HashTable *target, HashTable *source) static int clean_non_persistent_constant(zend_constant *c TSRMLS_DC) { - if (c->flags & CONST_PERSISTENT) { - return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP; - } else { - return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE; - } + return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; +} + + +static int clean_non_persistent_constant_full(zend_constant *c TSRMLS_DC) +{ + return (c->flags & CONST_PERSISTENT) ? 0 : 1; } @@ -112,8 +114,7 @@ void zend_register_standard_constants(TSRMLS_D) { zend_constant c; - c.value.type = IS_BOOL; - c.flags = CONST_PERSISTENT; + c.flags = CONST_PERSISTENT | CONST_CT_SUBST; c.module_number = 0; c.name = zend_strndup(ZEND_STRL("TRUE")); @@ -128,16 +129,18 @@ void zend_register_standard_constants(TSRMLS_D) c.value.type = IS_BOOL; zend_register_constant(&c TSRMLS_CC); + c.name = zend_strndup(ZEND_STRL("NULL")); + c.name_len = sizeof("NULL"); + c.value.type = IS_NULL; + zend_register_constant(&c TSRMLS_CC); + + c.flags = CONST_PERSISTENT; + c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE")); c.name_len = sizeof("ZEND_THREAD_SAFE"); c.value.value.lval = ZTS_V; c.value.type = IS_BOOL; zend_register_constant(&c TSRMLS_CC); - - c.name = zend_strndup(ZEND_STRL("NULL")); - c.name_len = sizeof("NULL"); - c.value.type = IS_NULL; - zend_register_constant(&c TSRMLS_CC); } } @@ -153,7 +156,7 @@ int zend_shutdown_constants(TSRMLS_D) void clean_non_persistent_constants(TSRMLS_D) { if (EG(full_tables_cleanup)) { - zend_hash_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant TSRMLS_CC); + zend_hash_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant_full TSRMLS_CC); } else { zend_hash_reverse_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant TSRMLS_CC); } @@ -309,8 +312,8 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC) if (!(c->flags & CONST_CS)) { /* keep in mind that c->name_len already contains the '\0' */ - lowercase_name = estrndup(c->name, c->name_len); - zend_str_tolower(lowercase_name, c->name_len); + lowercase_name = estrndup(c->name, c->name_len-1); + zend_str_tolower(lowercase_name, c->name_len-1); name = lowercase_name; } else { name = c->name; diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index c02e4c531..36814f1ef 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_constants.h,v 1.31.2.1 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_constants.h,v 1.31.2.2 2006/03/15 09:04:36 dmitry Exp $ */ #ifndef ZEND_CONSTANTS_H #define ZEND_CONSTANTS_H @@ -26,6 +26,7 @@ #define CONST_CS (1<<0) /* Case Sensitive */ #define CONST_PERSISTENT (1<<1) /* Persistent */ +#define CONST_CT_SUBST (2<<1) /* Allow compile-time substitution */ #define PHP_USER_CONSTANT INT_MAX /* a constant defined in user space */ diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 8dfa0065d..c7aac2f1a 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.716.2.10 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_execute.c,v 1.716.2.12 2006/02/26 10:53:38 helly Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -177,8 +177,8 @@ static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_ should_free->var = ptr; if (T->str_offset.str->type != IS_STRING - || ((int)T->str_offset.offset<0) - || (T->str_offset.str->value.str.len <= T->str_offset.offset)) { + || ((int)T->str_offset.offset < 0) + || (T->str_offset.str->value.str.len <= (int)T->str_offset.offset)) { zend_error(E_NOTICE, "Uninitialized string offset: %d", T->str_offset.offset); ptr->value.str.val = STR_EMPTY_ALLOC(); ptr->value.str.len = 0; @@ -545,6 +545,16 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R); zval **retval = &T(result->u.var).var.ptr; + if (*object_ptr == EG(error_zval_ptr)) { + FREE_OP(free_op2); + if (!RETURN_VALUE_UNUSED(result)) { + *retval = EG(uninitialized_zval_ptr); + PZVAL_LOCK(*retval); + } + FREE_OP(free_value); + return; + } + make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */ object = *object_ptr; @@ -648,7 +658,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 zend_error(E_WARNING, "Illegal string offset: %d", T->str_offset.offset); break; } - if (T->str_offset.offset >= T->str_offset.str->value.str.len) { + if ((int)T->str_offset.offset >= T->str_offset.str->value.str.len) { zend_uint i; if (T->str_offset.str->value.str.len==0) { diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index c7f6c960a..b3e54cf18 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.331.2.11 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_execute_API.c,v 1.331.2.19 2006/03/17 08:47:41 dmitry Exp $ */ #include <stdio.h> #include <signal.h> @@ -51,7 +51,7 @@ static DWORD timeout_thread_id; static int timeout_thread_initialized=0; #endif -#if ZEND_DEBUG +#if 0&&ZEND_DEBUG static void (*original_sigsegv_handler)(int); static void zend_handle_sigsegv(int dummy) { @@ -95,23 +95,27 @@ static void zend_extension_deactivator(zend_extension *extension TSRMLS_DC) } -static int is_not_internal_function(zend_function *function TSRMLS_DC) +static int clean_non_persistent_function(zend_function *function TSRMLS_DC) { - if (function->type == ZEND_INTERNAL_FUNCTION) { - return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP; - } else { - return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE; - } + return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; } -static int is_not_internal_class(zend_class_entry **ce TSRMLS_DC) +static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) { - if ((*ce)->type == ZEND_INTERNAL_CLASS) { - return EG(full_tables_cleanup) ? 0 : ZEND_HASH_APPLY_STOP; - } else { - return EG(full_tables_cleanup) ? 1 : ZEND_HASH_APPLY_REMOVE; - } + return (function->type != ZEND_INTERNAL_FUNCTION); +} + + +static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) +{ + return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; +} + + +static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) +{ + return ((*ce)->type != ZEND_INTERNAL_CLASS); } @@ -251,18 +255,22 @@ void shutdown_executor(TSRMLS_D) So we want first of all to clean up all data and then move to tables destruction. Note that only run-time accessed data need to be cleaned up, pre-defined data can not contain objects and thus are not probelmatic */ - zend_hash_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data TSRMLS_CC); + if (EG(full_tables_cleanup)) { + zend_hash_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC); + } else { + zend_hash_reverse_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data TSRMLS_CC); + } zend_hash_apply(EG(class_table), (apply_func_t) zend_cleanup_class_data TSRMLS_CC); zend_ptr_stack_destroy(&EG(argument_stack)); /* Destroy all op arrays */ if (EG(full_tables_cleanup)) { - zend_hash_apply(EG(function_table), (apply_func_t) is_not_internal_function TSRMLS_CC); - zend_hash_apply(EG(class_table), (apply_func_t) is_not_internal_class TSRMLS_CC); + zend_hash_apply(EG(function_table), (apply_func_t) clean_non_persistent_function_full TSRMLS_CC); + zend_hash_apply(EG(class_table), (apply_func_t) clean_non_persistent_class_full TSRMLS_CC); } else { - zend_hash_reverse_apply(EG(function_table), (apply_func_t) is_not_internal_function TSRMLS_CC); - zend_hash_reverse_apply(EG(class_table), (apply_func_t) is_not_internal_class TSRMLS_CC); + zend_hash_reverse_apply(EG(function_table), (apply_func_t) clean_non_persistent_function TSRMLS_CC); + zend_hash_reverse_apply(EG(class_table), (apply_func_t) clean_non_persistent_class TSRMLS_CC); } while (EG(symtable_cache_ptr)>=EG(symtable_cache)) { @@ -278,7 +286,7 @@ void shutdown_executor(TSRMLS_D) } zend_end_try(); zend_try { -#if ZEND_DEBUG +#if 0&&ZEND_DEBUG signal(SIGSEGV, original_sigsegv_handler); #endif @@ -482,7 +490,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) continue; } - if (const_value.type == IS_STRING && const_value.value.str.len == str_index_len-1 && + if (const_value.type == IS_STRING && const_value.value.str.len == (int)str_index_len-1 && !strncmp(const_value.value.str.val, str_index, str_index_len)) { /* constant value is the same as its name */ zval_dtor(&const_value); @@ -582,6 +590,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS zend_op **original_opline_ptr; zend_class_entry *current_scope; zend_class_entry *calling_scope = NULL; + zend_class_entry *check_scope_or_static = NULL; zval *current_this; zend_execute_data execute_data; zval *method_name; @@ -607,6 +616,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS execute_data = *EG(current_execute_data); EX(op_array) = NULL; EX(opline) = NULL; + EX(object) = NULL; } else { /* This only happens when we're called outside any execute()'s * It shouldn't be strictly necessary to NULL execute_data out, @@ -662,6 +672,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS ce = &(EG(active_op_array)->scope); found = (*ce != NULL?SUCCESS:FAILURE); fci->object_pp = EG(This)?&EG(This):NULL; + EX(object) = EG(This); } else if (strcmp(Z_STRVAL_PP(fci->object_pp), "parent") == 0 && EG(active_op_array)) { if (!EG(active_op_array)->scope) { @@ -673,6 +684,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS ce = &(EG(active_op_array)->scope->parent); found = (*ce != NULL?SUCCESS:FAILURE); fci->object_pp = EG(This)?&EG(This):NULL; + EX(object) = EG(This); } else { zend_class_entry *scope; scope = EG(active_op_array) ? EG(active_op_array)->scope : NULL; @@ -685,6 +697,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS instanceof_function(Z_OBJCE_P(EG(This)), scope TSRMLS_CC) && instanceof_function(scope, *ce TSRMLS_CC)) { fci->object_pp = &EG(This); + EX(object) = EG(This); } else { fci->object_pp = NULL; } @@ -713,16 +726,18 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS if (calling_scope && (colon = strstr(fname, "::")) != NULL) { int clen = colon - fname; int mlen = fname_len - clen - 2; - zend_class_entry **pce, *ce_child; + zend_class_entry **pce, *ce_child = NULL; if (zend_lookup_class(fname, clen, &pce TSRMLS_CC) == SUCCESS) { ce_child = *pce; } else { char *lcname = zend_str_tolower_dup(fname, clen); /* caution: lcname is not '\0' terminated */ - if (clen == sizeof("self") - 1 && memcmp(lcname, "self", sizeof("self") - 1) == 0) { - ce_child = EG(active_op_array) ? EG(active_op_array)->scope : NULL; - } else if (clen == sizeof("parent") - 1 && memcmp(lcname, "parent", sizeof("parent") - 1) == 0 && EG(active_op_array)->scope) { - ce_child = EG(active_op_array) && EG(active_op_array)->scope ? EG(scope)->parent : NULL; + if (calling_scope) { + if (clen == sizeof("self") - 1 && memcmp(lcname, "self", sizeof("self") - 1) == 0) { + ce_child = EG(active_op_array) ? EG(active_op_array)->scope : NULL; + } else if (clen == sizeof("parent") - 1 && memcmp(lcname, "parent", sizeof("parent") - 1) == 0 && EG(active_op_array)->scope) { + ce_child = EG(active_op_array) && EG(active_op_array)->scope ? EG(scope)->parent : NULL; + } } efree(lcname); } @@ -730,10 +745,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS zend_error(E_ERROR, "Cannot call method %s() or method does not exist", fname); return FAILURE; } - if (!instanceof_function(calling_scope, ce_child TSRMLS_CC)) { - zend_error(E_ERROR, "Cannot call method %s() of class %s which is not a derived from %s", fname, ce_child->name, calling_scope->name); - return 0; - } + check_scope_or_static = calling_scope; fci->function_table = &ce_child->function_table; calling_scope = ce_child; fname = fname + clen + 2; @@ -760,6 +772,12 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS EX(function_state).function = zend_std_get_static_method(calling_scope, function_name_lc, fname_len TSRMLS_CC); efree(function_name_lc); + if (check_scope_or_static && EX(function_state).function + && !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC) + && !instanceof_function(check_scope_or_static, calling_scope TSRMLS_CC)) { + zend_error(E_ERROR, "Cannot call method %s() of class %s which is not a derived from %s", fname, calling_scope->name, check_scope_or_static->name); + return 0; + } } else { char *function_name_lc = zend_str_tolower_dup(fname, fname_len); @@ -796,6 +814,19 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS EX(function_state).function = fci_cache->function_handler; calling_scope = fci_cache->calling_scope; fci->object_pp = fci_cache->object_pp; + EX(object) = fci->object_pp ? *fci->object_pp : NULL; + } + + if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) { + if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { + zend_error_noreturn(E_ERROR, "Cannot call abstract method %v::%v()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); + } + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { + zend_error(E_STRICT, "Function %s%s%s() is deprecated", + EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", + EX(function_state).function->common.scope ? "::" : "", + EX(function_state).function->common.function_name); + } } for (i=0; i<fci->param_count; i++) { diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index d37a6737b..36dafd680 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.c,v 1.121.2.1 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_hash.c,v 1.121.2.4 2006/04/07 10:06:21 dmitry Exp $ */ #include "zend.h" @@ -102,14 +102,14 @@ ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength) #define UPDATE_DATA(ht, p, pData, nDataSize) \ if (nDataSize == sizeof(void*)) { \ - if (!(p)->pDataPtr) { \ - pefree_rel((p)->pData, (ht)->persistent); \ + if ((p)->pData != &(p)->pDataPtr) { \ + pefree_rel((p)->pData, (ht)->persistent); \ } \ memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \ (p)->pData = &(p)->pDataPtr; \ } else { \ - if ((p)->pDataPtr) { \ - (p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent); \ + if ((p)->pData == &(p)->pDataPtr) { \ + (p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent); \ (p)->pDataPtr=NULL; \ } else { \ (p)->pData = (void *) perealloc_rel((p)->pData, nDataSize, (ht)->persistent); \ @@ -123,9 +123,9 @@ ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength) memcpy(&(p)->pDataPtr, pData, sizeof(void *)); \ (p)->pData = &(p)->pDataPtr; \ } else { \ - (p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent); \ + (p)->pData = (void *) pemalloc_rel(nDataSize, (ht)->persistent);\ if (!(p)->pData) { \ - pefree_rel(p, (ht)->persistent); \ + pefree_rel(p, (ht)->persistent); \ return FAILURE; \ } \ memcpy((p)->pData, pData, nDataSize); \ @@ -461,8 +461,10 @@ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLen p = ht->arBuckets[nIndex]; while (p != NULL) { - if ((p->h == h) && ((p->nKeyLength == 0) || /* Numeric index */ - ((p->nKeyLength == nKeyLength) && (!memcmp(p->arKey, arKey, nKeyLength))))) { + if ((p->h == h) + && (p->nKeyLength == nKeyLength) + && ((p->nKeyLength == 0) /* Numeric index (short circuits the memcmp() check) */ + || !memcmp(p->arKey, arKey, nKeyLength))) { /* String index */ HANDLE_BLOCK_INTERRUPTIONS(); if (p == ht->arBuckets[nIndex]) { ht->arBuckets[nIndex] = p->pNext; @@ -489,7 +491,7 @@ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLen if (ht->pDestructor) { ht->pDestructor(p->pData); } - if (!p->pDataPtr) { + if (p->pData != &p->pDataPtr) { pefree(p->pData, ht->persistent); } pefree(p, ht->persistent); @@ -518,7 +520,7 @@ ZEND_API void zend_hash_destroy(HashTable *ht) if (ht->pDestructor) { ht->pDestructor(q->pData); } - if (!q->pDataPtr && q->pData) { + if (q->pData != &q->pDataPtr) { pefree(q->pData, ht->persistent); } pefree(q, ht->persistent); @@ -544,7 +546,7 @@ ZEND_API void zend_hash_clean(HashTable *ht) if (ht->pDestructor) { ht->pDestructor(q->pData); } - if (!q->pDataPtr && q->pData) { + if (q->pData != &q->pDataPtr) { pefree(q->pData, ht->persistent); } pefree(q, ht->persistent); @@ -573,7 +575,7 @@ static Bucket *zend_hash_apply_deleter(HashTable *ht, Bucket *p) if (ht->pDestructor) { ht->pDestructor(p->pData); } - if (!p->pDataPtr) { + if (p->pData != &p->pDataPtr) { pefree(p->pData, ht->persistent); } retval = p->pListNext; @@ -732,11 +734,7 @@ ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSR q = p; p = p->pListLast; if (result & ZEND_HASH_APPLY_REMOVE) { - if (q->nKeyLength>0) { - zend_hash_del(ht, q->arKey, q->nKeyLength); - } else { - zend_hash_index_del(ht, q->h); - } + zend_hash_apply_deleter(ht, q); } if (result & ZEND_HASH_APPLY_STOP) { break; @@ -1259,7 +1257,7 @@ ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC) { - Bucket *p1, *p2; + Bucket *p1, *p2 = NULL; int result; void *pData2; diff --git a/Zend/zend_ini_parser.c b/Zend/zend_ini_parser.c index 0419a32d1..d8b56479e 100644 --- a/Zend/zend_ini_parser.c +++ b/Zend/zend_ini_parser.c @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -15,16 +17,24 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* 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. -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ +/* 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 @@ -36,6 +46,9 @@ /* Identify Bison output. */ #define YYBISON 1 +/* Bison version. */ +#define YYBISON_VERSION "2.3" + /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -45,8 +58,7 @@ /* Using locations. */ #define YYLSP_NEEDED 0 -/* If NAME_PREFIX is specified substitute the variables and functions - names. */ +/* Substitute the variable and function names. */ #define yyparse ini_parse #define yylex ini_lex #define yyerror ini_error @@ -71,6 +83,7 @@ TC_DOLLAR_CURLY = 264 }; #endif +/* Tokens. */ #define TC_STRING 258 #define TC_ENCAPSULATED_STRING 259 #define BRACK 260 @@ -303,7 +316,12 @@ ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_erro # define YYERROR_VERBOSE 0 #endif -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -315,56 +333,171 @@ typedef int YYSTYPE; /* Copy the second part of user declarations. */ -/* Line 214 of yacc.c. */ +/* Line 216 of yacc.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 -#if ! defined (yyoverflow) || YYERROR_VERBOSE +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif -# ifndef YYFREE -# define YYFREE free +#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 -# ifndef YYMALLOC -# define YYMALLOC malloc +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if 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 + +/* 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 i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# endif -# else -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else # 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 _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t + /* 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 _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (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 _STDLIB_H && (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 */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short int yyss; + yytype_int16 yyss; YYSTYPE yyvs; }; @@ -374,24 +507,24 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ +# if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ - register YYSIZE_T yyi; \ + YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (0) + while (YYID (0)) # endif # endif @@ -409,39 +542,33 @@ union yyalloc yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (0) + while (YYID (0)) #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 43 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 19 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 8 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 26 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 36 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 264 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -475,15 +602,15 @@ static const unsigned char yytranslate[] = #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned char yyprhs[] = +static const yytype_uint8 yyprhs[] = { 0, 0, 3, 6, 7, 11, 16, 18, 20, 22, 24, 26, 28, 30, 32, 33, 36, 39, 42, 43, 47, 49, 53, 57, 60, 63, 67 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = { 20, 0, -1, 20, 21, -1, -1, 3, 14, 22, -1, 3, 5, 14, 22, -1, 3, -1, 6, -1, @@ -495,7 +622,7 @@ static const yysigned_char yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = +static const yytype_uint16 yyrline[] = { 0, 221, 221, 222, 226, 234, 242, 243, 244, 249, 250, 251, 252, 253, 254, 259, 260, 261, 262, 266, @@ -503,9 +630,9 @@ static const unsigned short int yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* 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", "TC_STRING", "TC_ENCAPSULATED_STRING", @@ -519,7 +646,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 124, 38, 126, 33, 61, 10, 125, 40, 41 @@ -527,7 +654,7 @@ static const unsigned short int yytoknum[] = # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = +static const yytype_uint8 yyr1[] = { 0, 19, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 24, @@ -535,7 +662,7 @@ static const unsigned char yyr1[] = }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = +static const yytype_uint8 yyr2[] = { 0, 2, 2, 0, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 0, 3, @@ -545,7 +672,7 @@ static const unsigned char yyr2[] = /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned char yydefact[] = +static const yytype_uint8 yydefact[] = { 3, 0, 1, 6, 7, 8, 2, 0, 14, 14, 26, 10, 11, 0, 0, 13, 0, 4, 12, 9, @@ -553,8 +680,8 @@ static const unsigned char yydefact[] = 0, 25, 0, 21, 22, 19 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { -1, 1, 6, 17, 18, 27, 19, 20 }; @@ -562,7 +689,7 @@ static const yysigned_char yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -14 -static const yysigned_char yypact[] = +static const yytype_int8 yypact[] = { -14, 4, -14, -3, -14, -14, -14, -2, 17, 17, -14, -14, -14, 10, 10, -14, 10, -14, 5, -5, @@ -571,7 +698,7 @@ static const yysigned_char yypact[] = }; /* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = +static const yytype_int8 yypgoto[] = { -14, -14, -14, 19, -14, -14, -13, 13 }; @@ -581,7 +708,7 @@ static const yysigned_char yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -19 -static const yysigned_char yytable[] = +static const yytype_int8 yytable[] = { 22, 23, 7, 24, 2, 29, 30, 3, 10, 25, 4, 8, 9, 10, 26, 32, 33, 34, 35, 5, @@ -590,7 +717,7 @@ static const yysigned_char yytable[] = 0, 0, 0, 31 }; -static const yysigned_char yycheck[] = +static const yytype_int8 yycheck[] = { 13, 14, 5, 16, 0, 10, 11, 3, 3, 4, 6, 14, 14, 3, 9, 3, 29, 30, 16, 15, @@ -601,7 +728,7 @@ static const yysigned_char yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const unsigned char yystos[] = +static const yytype_uint8 yystos[] = { 0, 20, 0, 3, 6, 15, 21, 5, 14, 14, 3, 7, 8, 12, 13, 15, 17, 22, 23, 25, @@ -609,22 +736,6 @@ static const unsigned char yystos[] = 11, 18, 3, 25, 25, 16 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -650,30 +761,63 @@ do \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { \ - yyerror ("syntax error: cannot back up");\ + { \ + yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (0) +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - ((Current).first_line = (Rhs)[1].first_line, \ - (Current).first_column = (Rhs)[1].first_column, \ - (Current).last_line = (Rhs)[N].last_line, \ - (Current).last_column = (Rhs)[N].last_column) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) #endif + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM @@ -694,42 +838,96 @@ while (0) do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (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)) -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (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 +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| 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 (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (short int *bottom, short int *top) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) - short int *bottom; - short int *top; + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) + for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -738,45 +936,52 @@ yy_stack_print (bottom, top) do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (0) +} while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (int yyrule) +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void -yy_reduce_print (yyrule) +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; int yyrule; #endif { + int yynrhs = yyr2[yyrule]; int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); + 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++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) + 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 YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -791,13 +996,9 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -807,45 +1008,47 @@ int yydebug; #if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# 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 -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else +#else +static YYSIZE_T yystrlen (yystr) - const char *yystr; -# endif + const char *yystr; +#endif { - register const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# 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 * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else +#else +static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif + char *yydest; + const char *yysrc; +#endif { - register char *yyd = yydest; - register const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -855,70 +1058,192 @@ yystpcpy (yydest, yysrc) # endif # endif -#endif /* !YYERROR_VERBOSE */ +# 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); -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ + return yystpcpy (yyres, yystr) - yyres; +} +# endif -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + int yyn = yypact[yystate]; - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) { - default: - break; + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + 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 yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* 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 = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; } - YYFPRINTF (yyoutput, ")"); } +#endif /* YYERROR_VERBOSE */ + -#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yydestruct (int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: - break; + break; } } @@ -926,13 +1251,13 @@ yydestruct (yytype, yyvaluep) /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); -# else +#else int yyparse (); -# endif +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); @@ -949,14 +1274,18 @@ int yyparse (); `----------*/ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif +#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 (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else @@ -966,22 +1295,28 @@ yyparse () #endif #endif { - /* The lookahead symbol. */ + /* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; - register int yystate; - register int yyn; + int yystate; + int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ + /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif /* Three stacks and their tools: `yyss': related to states, @@ -992,18 +1327,18 @@ int yynerrs; to reallocate them elsewhere. */ /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - register short int *yyssp; + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + YYSTYPE *yyvsp; -#define YYPOPSTACK (yyvsp--, yyssp--) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; @@ -1012,9 +1347,9 @@ int yynerrs; YYSTYPE yyval; - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1031,7 +1366,6 @@ int yynerrs; yyssp = yyss; yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1039,8 +1373,7 @@ int yynerrs; `------------------------------------------------------------*/ 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. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: @@ -1053,18 +1386,18 @@ int yynerrs; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* 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; - short int *yyss1 = yyss; + 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 ("parser stack overflow", + yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), @@ -1075,21 +1408,21 @@ int yynerrs; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyoverflowlab; + goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short int *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyoverflowlab; + goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); @@ -1120,19 +1453,17 @@ int yynerrs; `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1147,7 +1478,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -1167,22 +1498,21 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; @@ -1221,11 +1551,11 @@ yyreduce: { #if DEBUG_CFG_PARSER - printf("'%s' = '%s'\n", yyvsp[-2].value.str.val, yyvsp[0].value.str.val); + printf("'%s' = '%s'\n", (yyvsp[(1) - (3)]).value.str.val, (yyvsp[(3) - (3)]).value.str.val); #endif - ZEND_INI_PARSER_CB(&yyvsp[-2], &yyvsp[0], ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); - free(yyvsp[-2].value.str.val); - free(yyvsp[0].value.str.val); + ZEND_INI_PARSER_CB(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); + free((yyvsp[(1) - (3)]).value.str.val); + free((yyvsp[(3) - (3)]).value.str.val); } break; @@ -1233,124 +1563,123 @@ yyreduce: { #if DEBUG_CFG_PARSER - printf("'%s'[ ] = '%s'\n", yyvsp[-3].value.str.val, yyvsp[0].value.str.val); + printf("'%s'[ ] = '%s'\n", (yyvsp[(1) - (4)]).value.str.val, (yyvsp[(4) - (4)]).value.str.val); #endif - ZEND_INI_PARSER_CB(&yyvsp[-3], &yyvsp[0], ZEND_INI_PARSER_POP_ENTRY, ZEND_INI_PARSER_ARG); - free(yyvsp[-3].value.str.val); - free(yyvsp[0].value.str.val); + ZEND_INI_PARSER_CB(&(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), ZEND_INI_PARSER_POP_ENTRY, ZEND_INI_PARSER_ARG); + free((yyvsp[(1) - (4)]).value.str.val); + free((yyvsp[(4) - (4)]).value.str.val); } break; case 6: - { ZEND_INI_PARSER_CB(&yyvsp[0], NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); free(yyvsp[0].value.str.val); } + { ZEND_INI_PARSER_CB(&(yyvsp[(1) - (1)]), NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); free((yyvsp[(1) - (1)]).value.str.val); } break; case 7: - { ZEND_INI_PARSER_CB(&yyvsp[0], NULL, ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG); free(yyvsp[0].value.str.val); } + { ZEND_INI_PARSER_CB(&(yyvsp[(1) - (1)]), NULL, ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG); free((yyvsp[(1) - (1)]).value.str.val); } break; case 9: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 10: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 11: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 12: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 13: - { zend_ini_init_string(&yyval); } + { zend_ini_init_string(&(yyval)); } break; case 14: - { zend_ini_init_string(&yyval); } + { zend_ini_init_string(&(yyval)); } break; case 15: - { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); free(yyvsp[0].value.str.val); } + { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free((yyvsp[(2) - (2)]).value.str.val); } break; case 16: - { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); free(yyvsp[0].value.str.val); } + { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free((yyvsp[(2) - (2)]).value.str.val); } break; case 17: - { zend_ini_add_string(&yyval, &yyvsp[-1], &yyvsp[0]); } + { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); } break; case 18: - { zend_ini_init_string(&yyval); } + { zend_ini_init_string(&(yyval)); } break; case 19: - { zend_ini_get_var(&yyval, &yyvsp[-1]); } + { zend_ini_get_var(&(yyval), &(yyvsp[(2) - (3)])); } break; case 20: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 21: - { zend_ini_do_op('|', &yyval, &yyvsp[-2], &yyvsp[0]); } + { zend_ini_do_op('|', &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); } break; case 22: - { zend_ini_do_op('&', &yyval, &yyvsp[-2], &yyvsp[0]); } + { zend_ini_do_op('&', &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); } break; case 23: - { zend_ini_do_op('~', &yyval, &yyvsp[0], NULL); } + { zend_ini_do_op('~', &(yyval), &(yyvsp[(2) - (2)]), NULL); } break; case 24: - { zend_ini_do_op('!', &yyval, &yyvsp[0], NULL); } + { zend_ini_do_op('!', &(yyval), &(yyvsp[(2) - (2)]), NULL); } break; case 25: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 26: - { zend_ini_get_constant(&yyval, &yyvsp[0]); } + { zend_ini_get_constant(&(yyval), &(yyvsp[(1) - (1)])); } break; - } - -/* Line 1010 of yacc.c. */ - - - yyvsp -= yylen; - yyssp -= yylen; +/* Line 1267 of yacc.c. */ + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1379,99 +1708,65 @@ yyerrlab: if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) - { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ + { + /* Return failure if at end of input. */ if (yychar == YYEOF) - for (;;) - { - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - } - } + YYABORT; + } else { - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); + yydestruct ("Error: discarding", + yytoken, &yylval); yychar = YYEMPTY; - } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -1481,15 +1776,17 @@ yyerrlab: `---------------------------------------------------*/ yyerrorlab: -#ifdef __GNUC__ - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) + /* 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; -#endif - yyvsp -= yylen; - yyssp -= yylen; + /* 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; @@ -1518,9 +1815,10 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - YYPOPSTACK; + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -1528,11 +1826,12 @@ yyerrlab1: if (yyn == YYFINAL) YYACCEPT; - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -1552,21 +1851,39 @@ yyabortlab: goto yyreturn; #ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + 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 - return yyresult; +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } diff --git a/Zend/zend_ini_parser.h b/Zend/zend_ini_parser.h index 836fbccf4..9e652172c 100644 --- a/Zend/zend_ini_parser.h +++ b/Zend/zend_ini_parser.h @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -15,13 +17,21 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* 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. -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE @@ -38,6 +48,7 @@ TC_DOLLAR_CURLY = 264 }; #endif +/* Tokens. */ #define TC_STRING 258 #define TC_ENCAPSULATED_STRING 259 #define BRACK 260 @@ -49,7 +60,7 @@ -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -58,5 +69,3 @@ typedef int YYSTYPE; - - diff --git a/Zend/zend_ini_scanner.c b/Zend/zend_ini_scanner.c index 02c52dd18..276c9885a 100644 --- a/Zend/zend_ini_scanner.c +++ b/Zend/zend_ini_scanner.c @@ -495,7 +495,7 @@ char *yytext; +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_scanner.l,v 1.41.2.1 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_ini_scanner.l,v 1.41.2.2 2006/01/17 19:56:25 iliaa Exp $ */ #define yyleng SCNG(yy_leng) #define yytext SCNG(yy_text) @@ -887,8 +887,18 @@ YY_RULE_SETUP case 5: YY_RULE_SETUP { + char *p = yytext; + /* ENCAPSULATED TC_STRING */ + while ((p = strpbrk(p, "\r\n"))) { + if (*p == '\r' && *(p + 1) == '\n') { + p++; + } + SCNG(lineno)++; + p++; + } + /* eat trailing " */ yytext[yyleng-1]=0; diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 2a1dad899..24414c32a 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_scanner.l,v 1.41.2.1 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_ini_scanner.l,v 1.41.2.2 2006/01/17 19:56:25 iliaa Exp $ */ #define yyleng SCNG(yy_leng) #define yytext SCNG(yy_text) @@ -139,8 +139,18 @@ NEWLINE ("\r"|"\n"|"\r\n") <INITIAL>["][^"]*["] { + char *p = yytext; + /* ENCAPSULATED TC_STRING */ + while ((p = strpbrk(p, "\r\n"))) { + if (*p == '\r' && *(p + 1) == '\n') { + p++; + } + SCNG(lineno)++; + p++; + } + /* eat trailing " */ yytext[yyleng-1]=0; diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index bd8dcc357..745c7470c 100755 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_interfaces.c,v 1.33.2.2 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_interfaces.c,v 1.33.2.3 2006/02/26 10:53:38 helly Exp $ */ #include "zend.h" #include "zend_API.h" @@ -336,7 +336,7 @@ static int zend_implement_aggregate(zend_class_entry *interface, zend_class_entr } else if (class_type->get_iterator != zend_user_it_get_new_iterator) { /* c-level get_iterator cannot be changed (exception being only Traversable is implmented) */ if (class_type->num_interfaces) { - for (i = 0; i < class_type->num_interfaces; i++) { + for (i = 0; i < (int)class_type->num_interfaces; i++) { if (class_type->interfaces[i] == zend_ce_iterator) { return FAILURE; } diff --git a/Zend/zend_language_parser.c b/Zend/zend_language_parser.c index 7040aa962..35f0e6523 100644 --- a/Zend/zend_language_parser.c +++ b/Zend/zend_language_parser.c @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -15,16 +17,24 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* 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. -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ +/* 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 @@ -36,6 +46,9 @@ /* Identify Bison output. */ #define YYBISON 1 +/* Bison version. */ +#define YYBISON_VERSION "2.3" + /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -45,8 +58,7 @@ /* Using locations. */ #define YYLSP_NEEDED 0 -/* If NAME_PREFIX is specified substitute the variables and functions - names. */ +/* Substitute the variable and function names. */ #define yyparse zendparse #define yylex zendlex #define yyerror zenderror @@ -182,6 +194,7 @@ T_PAAMAYIM_NEKUDOTAYIM = 375 }; #endif +/* Tokens. */ #define T_REQUIRE_ONCE 258 #define T_REQUIRE 259 #define T_EVAL 260 @@ -326,7 +339,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_language_parser.y,v 1.160.2.3 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_language_parser.y,v 1.160.2.4 2006/03/12 16:52:18 iliaa Exp $ */ /* * LALR shift/reduce conflicts and how they are resolved: @@ -369,7 +382,12 @@ # define YYERROR_VERBOSE 0 #endif -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -381,56 +399,171 @@ typedef int YYSTYPE; /* Copy the second part of user declarations. */ -/* Line 214 of yacc.c. */ +/* Line 216 of yacc.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 -#if ! defined (yyoverflow) || YYERROR_VERBOSE +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif -# ifndef YYFREE -# define YYFREE free +#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 -# ifndef YYMALLOC -# define YYMALLOC malloc +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if 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 + +/* 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 i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# endif -# else -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else # 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 _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t + /* 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 _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (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 _STDLIB_H && (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 */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short int yyss; + yytype_int16 yyss; YYSTYPE yyvs; }; @@ -440,24 +573,24 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ +# if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ - register YYSIZE_T yyi; \ + YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (0) + while (YYID (0)) # endif # endif @@ -475,39 +608,33 @@ union yyalloc yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (0) + while (YYID (0)) #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 4041 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 150 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 170 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 424 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 787 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 375 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +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, @@ -552,7 +679,7 @@ static const unsigned char yytranslate[] = #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned short int yyprhs[] = +static const yytype_uint16 yyprhs[] = { 0, 0, 3, 5, 6, 10, 11, 13, 15, 17, 22, 23, 27, 28, 30, 32, 34, 39, 41, 45, @@ -599,8 +726,8 @@ static const unsigned short int yyprhs[] = 1347, 1350, 1352, 1353, 1358 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short int yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = { 151, 0, -1, 152, -1, -1, 152, 153, 154, -1, -1, 158, -1, 192, -1, 193, -1, 115, 140, 141, @@ -742,7 +869,7 @@ static const short int yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = +static const yytype_uint16 yyrline[] = { 0, 152, 152, 156, 156, 157, 162, 163, 164, 165, 170, 170, 171, 176, 177, 178, 179, 184, 188, 189, @@ -790,9 +917,9 @@ static const unsigned short int yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* 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", "T_REQUIRE_ONCE", "T_REQUIRE", "T_EVAL", @@ -874,7 +1001,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 44, 263, 264, 265, 266, 61, 267, 268, 269, 270, 271, 272, @@ -895,7 +1022,7 @@ static const unsigned short int yytoknum[] = # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned short int yyr1[] = +static const yytype_uint16 yyr1[] = { 0, 150, 151, 153, 152, 152, 154, 154, 154, 154, 156, 155, 155, 157, 157, 157, 157, 158, 159, 160, @@ -943,7 +1070,7 @@ static const unsigned short int yyr1[] = }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = +static const yytype_uint8 yyr2[] = { 0, 2, 1, 0, 3, 0, 1, 1, 1, 4, 0, 3, 0, 1, 1, 1, 4, 1, 3, 0, @@ -993,7 +1120,7 @@ static const unsigned char yyr2[] = /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned short int yydefact[] = +static const yytype_uint16 yydefact[] = { 5, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 274, 0, 0, 0, 0, @@ -1076,8 +1203,8 @@ static const unsigned short int yydefact[] = 0, 0, 74, 0, 12, 10, 75 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = { -1, 1, 2, 4, 75, 175, 300, 414, 718, 77, 446, 556, 502, 617, 245, 508, 139, 507, 452, 621, @@ -1101,7 +1228,7 @@ static const short int yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -447 -static const short int yypact[] = +static const yytype_int16 yypact[] = { -447, 55, 78, -447, 820, 3088, 3088, -78, 3088, 3088, 3088, 3088, 3088, 3088, 3088, -447, 3088, 3088, 3088, 3088, @@ -1185,7 +1312,7 @@ static const short int yypact[] = }; /* YYPGOTO[NTERM-NUM]. */ -static const short int yypgoto[] = +static const yytype_int16 yypgoto[] = { -447, -447, -447, -447, -447, -182, -447, -447, 0, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, -447, @@ -1211,7 +1338,7 @@ static const short int yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -353 -static const short int yytable[] = +static const yytype_int16 yytable[] = { 121, 121, 130, 127, 76, 444, 509, 242, 309, 266, 669, 518, 434, 269, 649, 707, 120, 120, 33, 33, @@ -1620,7 +1747,7 @@ static const short int yytable[] = 0, 208 }; -static const short int yycheck[] = +static const yytype_int16 yycheck[] = { 23, 24, 26, 26, 4, 361, 452, 8, 182, 8, 26, 26, 351, 8, 8, 8, 71, 71, 73, 73, @@ -2031,7 +2158,7 @@ static const short int yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const unsigned short int yystos[] = +static const yytype_uint16 yystos[] = { 0, 151, 152, 0, 153, 3, 4, 5, 6, 7, 12, 42, 43, 48, 50, 51, 52, 53, 54, 55, @@ -2114,22 +2241,6 @@ static const unsigned short int yystos[] = 187, 73, 141, 188, 143, 155, 144 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -2155,30 +2266,63 @@ do \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { \ - yyerror ("syntax error: cannot back up");\ + { \ + yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (0) +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - ((Current).first_line = (Rhs)[1].first_line, \ - (Current).first_column = (Rhs)[1].first_column, \ - (Current).last_line = (Rhs)[N].last_line, \ - (Current).last_column = (Rhs)[N].last_column) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) #endif + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM @@ -2199,42 +2343,96 @@ while (0) do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (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)) -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (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 +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| 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 (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (short int *bottom, short int *top) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) - short int *bottom; - short int *top; + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) + for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -2243,45 +2441,52 @@ yy_stack_print (bottom, top) do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (0) +} while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (int yyrule) +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void -yy_reduce_print (yyrule) +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; int yyrule; #endif { + int yynrhs = yyr2[yyrule]; int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); + 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++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) + 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 YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -2296,13 +2501,9 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -2312,45 +2513,47 @@ int yydebug; #if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# 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 -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else +#else +static YYSIZE_T yystrlen (yystr) - const char *yystr; -# endif + const char *yystr; +#endif { - register const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# 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 * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else +#else +static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif + char *yydest; + const char *yysrc; +#endif { - register char *yyd = yydest; - register const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -2360,70 +2563,192 @@ yystpcpy (yydest, yysrc) # endif # endif -#endif /* !YYERROR_VERBOSE */ +# 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); -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ + return yystpcpy (yyres, yystr) - yyres; +} +# endif -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + int yyn = yypact[yystate]; - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) { - default: - break; + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + 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 yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* 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 = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; } - YYFPRINTF (yyoutput, ")"); } +#endif /* YYERROR_VERBOSE */ + -#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yydestruct (int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: - break; + break; } } @@ -2431,13 +2756,13 @@ yydestruct (yytype, yyvaluep) /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); -# else +#else int yyparse (); -# endif +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); @@ -2454,14 +2779,18 @@ int yyparse (); `----------*/ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif +#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 (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else @@ -2471,22 +2800,28 @@ yyparse () #endif #endif { - /* The lookahead symbol. */ + /* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; - register int yystate; - register int yyn; + int yystate; + int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ + /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif /* Three stacks and their tools: `yyss': related to states, @@ -2497,18 +2832,18 @@ int yynerrs; to reallocate them elsewhere. */ /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - register short int *yyssp; + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + YYSTYPE *yyvsp; -#define YYPOPSTACK (yyvsp--, yyssp--) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; @@ -2517,9 +2852,9 @@ int yynerrs; YYSTYPE yyval; - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); @@ -2536,7 +2871,6 @@ int yynerrs; yyssp = yyss; yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -2544,8 +2878,7 @@ int yynerrs; `------------------------------------------------------------*/ 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. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: @@ -2558,18 +2891,18 @@ int yynerrs; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* 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; - short int *yyss1 = yyss; + 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 ("parser stack overflow", + yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), @@ -2580,21 +2913,21 @@ int yynerrs; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyoverflowlab; + goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short int *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyoverflowlab; + goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); @@ -2625,19 +2958,17 @@ int yynerrs; `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -2652,7 +2983,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -2672,22 +3003,21 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; @@ -2769,12 +3099,12 @@ yyreduce: case 19: - { zend_do_if_cond(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_if_cond(&(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); } break; case 20: - { zend_do_if_after_statement(&yyvsp[-2], 1 TSRMLS_CC); } + { zend_do_if_after_statement(&(yyvsp[(4) - (6)]), 1 TSRMLS_CC); } break; case 21: @@ -2784,12 +3114,12 @@ yyreduce: case 22: - { zend_do_if_cond(&yyvsp[-2], &yyvsp[-1] TSRMLS_CC); } + { zend_do_if_cond(&(yyvsp[(3) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); } break; case 23: - { zend_do_if_after_statement(&yyvsp[-3], 1 TSRMLS_CC); } + { zend_do_if_after_statement(&(yyvsp[(4) - (7)]), 1 TSRMLS_CC); } break; case 24: @@ -2799,62 +3129,62 @@ yyreduce: case 25: - { yyvsp[-1].u.opline_num = get_next_op_number(CG(active_op_array)); } + { (yyvsp[(1) - (2)]).u.opline_num = get_next_op_number(CG(active_op_array)); } break; case 26: - { zend_do_while_cond(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_while_cond(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); } break; case 27: - { zend_do_while_end(&yyvsp[-6], &yyvsp[-2] TSRMLS_CC); } + { zend_do_while_end(&(yyvsp[(1) - (7)]), &(yyvsp[(5) - (7)]) TSRMLS_CC); } break; case 28: - { yyvsp[0].u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); } + { (yyvsp[(1) - (1)]).u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); } break; case 29: - { yyvsp[0].u.opline_num = get_next_op_number(CG(active_op_array)); } + { (yyvsp[(5) - (5)]).u.opline_num = get_next_op_number(CG(active_op_array)); } break; case 30: - { zend_do_do_while_end(&yyvsp[-8], &yyvsp[-4], &yyvsp[-2] TSRMLS_CC); } + { zend_do_do_while_end(&(yyvsp[(1) - (9)]), &(yyvsp[(5) - (9)]), &(yyvsp[(7) - (9)]) TSRMLS_CC); } break; case 31: - { zend_do_free(&yyvsp[-1] TSRMLS_CC); yyvsp[0].u.opline_num = get_next_op_number(CG(active_op_array)); } + { zend_do_free(&(yyvsp[(3) - (4)]) TSRMLS_CC); (yyvsp[(4) - (4)]).u.opline_num = get_next_op_number(CG(active_op_array)); } break; case 32: - { zend_do_extended_info(TSRMLS_C); zend_do_for_cond(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_extended_info(TSRMLS_C); zend_do_for_cond(&(yyvsp[(6) - (7)]), &(yyvsp[(7) - (7)]) TSRMLS_CC); } break; case 33: - { zend_do_free(&yyvsp[-1] TSRMLS_CC); zend_do_for_before_statement(&yyvsp[-6], &yyvsp[-3] TSRMLS_CC); } + { zend_do_free(&(yyvsp[(9) - (10)]) TSRMLS_CC); zend_do_for_before_statement(&(yyvsp[(4) - (10)]), &(yyvsp[(7) - (10)]) TSRMLS_CC); } break; case 34: - { zend_do_for_end(&yyvsp[-5] TSRMLS_CC); } + { zend_do_for_end(&(yyvsp[(7) - (12)]) TSRMLS_CC); } break; case 35: - { zend_do_switch_cond(&yyvsp[-1] TSRMLS_CC); } + { zend_do_switch_cond(&(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 36: - { zend_do_switch_end(&yyvsp[0] TSRMLS_CC); } + { zend_do_switch_end(&(yyvsp[(6) - (6)]) TSRMLS_CC); } break; case 37: @@ -2864,7 +3194,7 @@ yyreduce: case 38: - { zend_do_brk_cont(ZEND_BRK, &yyvsp[-1] TSRMLS_CC); } + { zend_do_brk_cont(ZEND_BRK, &(yyvsp[(2) - (3)]) TSRMLS_CC); } break; case 39: @@ -2874,7 +3204,7 @@ yyreduce: case 40: - { zend_do_brk_cont(ZEND_CONT, &yyvsp[-1] TSRMLS_CC); } + { zend_do_brk_cont(ZEND_CONT, &(yyvsp[(2) - (3)]) TSRMLS_CC); } break; case 41: @@ -2884,162 +3214,162 @@ yyreduce: case 42: - { zend_do_return(&yyvsp[-1], 0 TSRMLS_CC); } + { zend_do_return(&(yyvsp[(2) - (3)]), 0 TSRMLS_CC); } break; case 43: - { zend_do_return(&yyvsp[-1], 1 TSRMLS_CC); } + { zend_do_return(&(yyvsp[(2) - (3)]), 1 TSRMLS_CC); } break; case 47: - { zend_do_echo(&yyvsp[0] TSRMLS_CC); } + { zend_do_echo(&(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 48: - { zend_do_free(&yyvsp[-1] TSRMLS_CC); } + { zend_do_free(&(yyvsp[(1) - (2)]) TSRMLS_CC); } break; case 49: - { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&yyvsp[-1].u.constant); } + { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&(yyvsp[(2) - (3)]).u.constant); } break; case 51: - { zend_do_foreach_begin(&yyvsp[-2], &yyvsp[-1], &yyvsp[0], 1 TSRMLS_CC); } + { zend_do_foreach_begin(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]), 1 TSRMLS_CC); } break; case 52: - { zend_do_foreach_fetch(&yyvsp[-4], &yyvsp[-3], &yyvsp[0] TSRMLS_CC); } + { zend_do_foreach_fetch(&(yyvsp[(1) - (5)]), &(yyvsp[(2) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); } break; case 53: - { zend_do_foreach_cont(&yyvsp[-8], &yyvsp[-4], &yyvsp[-2], &yyvsp[-1] TSRMLS_CC); } + { zend_do_foreach_cont(&(yyvsp[(1) - (9)]), &(yyvsp[(5) - (9)]), &(yyvsp[(7) - (9)]), &(yyvsp[(8) - (9)]) TSRMLS_CC); } break; case 54: - { zend_do_foreach_end(&yyvsp[-10], &yyvsp[-6] TSRMLS_CC); } + { zend_do_foreach_end(&(yyvsp[(1) - (11)]), &(yyvsp[(5) - (11)]) TSRMLS_CC); } break; case 55: - { zend_do_foreach_begin(&yyvsp[-2], &yyvsp[-1], &yyvsp[0], 0 TSRMLS_CC); } + { zend_do_foreach_begin(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]), 0 TSRMLS_CC); } break; case 56: - { zend_do_foreach_fetch(&yyvsp[-4], &yyvsp[-3], &yyvsp[0] TSRMLS_CC); } + { zend_do_foreach_fetch(&(yyvsp[(1) - (5)]), &(yyvsp[(2) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); } break; case 57: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_foreach_cont(&yyvsp[-8], &yyvsp[-4], &yyvsp[-2], &yyvsp[-1] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(7) - (9)])); zend_do_foreach_cont(&(yyvsp[(1) - (9)]), &(yyvsp[(5) - (9)]), &(yyvsp[(7) - (9)]), &(yyvsp[(8) - (9)]) TSRMLS_CC); } break; case 58: - { zend_do_foreach_end(&yyvsp[-10], &yyvsp[-6] TSRMLS_CC); } + { zend_do_foreach_end(&(yyvsp[(1) - (11)]), &(yyvsp[(5) - (11)]) TSRMLS_CC); } break; case 59: - { yyvsp[0].u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } + { (yyvsp[(1) - (1)]).u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } break; case 60: - { zend_do_declare_end(&yyvsp[-5] TSRMLS_CC); } + { zend_do_declare_end(&(yyvsp[(1) - (6)]) TSRMLS_CC); } break; case 62: - { zend_do_try(&yyvsp[0] TSRMLS_CC); } + { zend_do_try(&(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 63: - { zend_initialize_try_catch_element(&yyvsp[-6] TSRMLS_CC); } + { zend_initialize_try_catch_element(&(yyvsp[(1) - (7)]) TSRMLS_CC); } break; case 64: - { zend_do_first_catch(&yyvsp[-2] TSRMLS_CC); } + { zend_do_first_catch(&(yyvsp[(7) - (9)]) TSRMLS_CC); } break; case 65: - { zend_do_begin_catch(&yyvsp[-11], &yyvsp[-3], &yyvsp[-1], 1 TSRMLS_CC); } + { zend_do_begin_catch(&(yyvsp[(1) - (12)]), &(yyvsp[(9) - (12)]), &(yyvsp[(11) - (12)]), 1 TSRMLS_CC); } break; case 66: - { zend_do_end_catch(&yyvsp[-15] TSRMLS_CC); } + { zend_do_end_catch(&(yyvsp[(1) - (16)]) TSRMLS_CC); } break; case 67: - { zend_do_mark_last_catch(&yyvsp[-11], &yyvsp[0] TSRMLS_CC); } + { zend_do_mark_last_catch(&(yyvsp[(7) - (18)]), &(yyvsp[(18) - (18)]) TSRMLS_CC); } break; case 68: - { zend_do_throw(&yyvsp[-1] TSRMLS_CC); } + { zend_do_throw(&(yyvsp[(2) - (3)]) TSRMLS_CC); } break; case 69: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 70: - { yyval.u.opline_num = -1; } + { (yyval).u.opline_num = -1; } break; case 71: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 72: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(2) - (2)]); } break; case 73: - { yyval.u.opline_num = get_next_op_number(CG(active_op_array)); } + { (yyval).u.opline_num = get_next_op_number(CG(active_op_array)); } break; case 74: - { zend_do_begin_catch(&yyvsp[-5], &yyvsp[-3], &yyvsp[-1], 0 TSRMLS_CC); } + { zend_do_begin_catch(&(yyvsp[(1) - (6)]), &(yyvsp[(3) - (6)]), &(yyvsp[(5) - (6)]), 0 TSRMLS_CC); } break; case 75: - { zend_do_end_catch(&yyvsp[-9] TSRMLS_CC); } + { zend_do_end_catch(&(yyvsp[(1) - (10)]) TSRMLS_CC); } break; case 78: - { zend_do_end_variable_parse(BP_VAR_UNSET, 0 TSRMLS_CC); zend_do_unset(&yyvsp[0] TSRMLS_CC); } + { zend_do_end_variable_parse(BP_VAR_UNSET, 0 TSRMLS_CC); zend_do_unset(&(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 79: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 80: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 81: @@ -3054,477 +3384,477 @@ yyreduce: case 83: - { yyval.op_type = ZEND_RETURN_VAL; } + { (yyval).op_type = ZEND_RETURN_VAL; } break; case 84: - { yyval.op_type = ZEND_RETURN_REF; } + { (yyval).op_type = ZEND_RETURN_REF; } break; case 85: - { yyvsp[0].u.opline_num = CG(zend_lineno); } + { (yyvsp[(1) - (1)]).u.opline_num = CG(zend_lineno); } break; case 86: - { zend_do_begin_function_declaration(&yyvsp[-3], &yyvsp[0], 0, yyvsp[-1].op_type, NULL TSRMLS_CC); } + { zend_do_begin_function_declaration(&(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), 0, (yyvsp[(3) - (4)]).op_type, NULL TSRMLS_CC); } break; case 87: - { zend_do_end_function_declaration(&yyvsp[-10] TSRMLS_CC); } + { zend_do_end_function_declaration(&(yyvsp[(1) - (11)]) TSRMLS_CC); } break; case 88: - { zend_do_begin_class_declaration(&yyvsp[-2], &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_begin_class_declaration(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 89: - { zend_do_end_class_declaration(&yyvsp[-7], &yyvsp[-6] TSRMLS_CC); } + { zend_do_end_class_declaration(&(yyvsp[(1) - (8)]), &(yyvsp[(2) - (8)]) TSRMLS_CC); } break; case 90: - { zend_do_begin_class_declaration(&yyvsp[-1], &yyvsp[0], NULL TSRMLS_CC); } + { zend_do_begin_class_declaration(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]), NULL TSRMLS_CC); } break; case 91: - { zend_do_end_class_declaration(&yyvsp[-6], &yyvsp[-5] TSRMLS_CC); } + { zend_do_end_class_declaration(&(yyvsp[(1) - (7)]), &(yyvsp[(2) - (7)]) TSRMLS_CC); } break; case 92: - { yyval.u.opline_num = CG(zend_lineno); yyval.u.EA.type = 0; } + { (yyval).u.opline_num = CG(zend_lineno); (yyval).u.EA.type = 0; } break; case 93: - { yyval.u.opline_num = CG(zend_lineno); yyval.u.EA.type = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; } + { (yyval).u.opline_num = CG(zend_lineno); (yyval).u.EA.type = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; } break; case 94: - { yyval.u.opline_num = CG(zend_lineno); yyval.u.EA.type = ZEND_ACC_FINAL_CLASS; } + { (yyval).u.opline_num = CG(zend_lineno); (yyval).u.EA.type = ZEND_ACC_FINAL_CLASS; } break; case 95: - { yyval.op_type = IS_UNUSED; } + { (yyval).op_type = IS_UNUSED; } break; case 96: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(2) - (2)]); } break; case 97: - { yyval.u.opline_num = CG(zend_lineno); yyval.u.EA.type = ZEND_ACC_INTERFACE; } + { (yyval).u.opline_num = CG(zend_lineno); (yyval).u.EA.type = ZEND_ACC_INTERFACE; } break; case 102: - { zend_do_implements_interface(&yyvsp[0] TSRMLS_CC); } + { zend_do_implements_interface(&(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 103: - { zend_do_implements_interface(&yyvsp[0] TSRMLS_CC); } + { zend_do_implements_interface(&(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 104: - { yyval.op_type = IS_UNUSED; } + { (yyval).op_type = IS_UNUSED; } break; case 105: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(2) - (2)]); } break; case 106: - { zend_check_writable_variable(&yyvsp[0]); yyval = yyvsp[0]; } + { zend_check_writable_variable(&(yyvsp[(1) - (1)])); (yyval) = (yyvsp[(1) - (1)]); } break; case 107: - { zend_check_writable_variable(&yyvsp[0]); yyval = yyvsp[0]; yyval.u.EA.type |= ZEND_PARSED_REFERENCE_VARIABLE; } + { zend_check_writable_variable(&(yyvsp[(2) - (2)])); (yyval) = (yyvsp[(2) - (2)]); (yyval).u.EA.type |= ZEND_PARSED_REFERENCE_VARIABLE; } break; case 114: - { zend_do_declare_stmt(&yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_declare_stmt(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 115: - { zend_do_declare_stmt(&yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_declare_stmt(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); } break; case 116: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 117: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(3) - (4)]); } break; case 118: - { yyval = yyvsp[-2]; } + { (yyval) = (yyvsp[(2) - (4)]); } break; case 119: - { yyval = yyvsp[-2]; } + { (yyval) = (yyvsp[(3) - (5)]); } break; case 120: - { yyval.op_type = IS_UNUSED; } + { (yyval).op_type = IS_UNUSED; } break; case 121: - { zend_do_extended_info(TSRMLS_C); zend_do_case_before_statement(&yyvsp[-3], &yyvsp[-2], &yyvsp[-1] TSRMLS_CC); } + { zend_do_extended_info(TSRMLS_C); zend_do_case_before_statement(&(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 122: - { zend_do_case_after_statement(&yyval, &yyvsp[-4] TSRMLS_CC); yyval.op_type = IS_CONST; } + { zend_do_case_after_statement(&(yyval), &(yyvsp[(2) - (6)]) TSRMLS_CC); (yyval).op_type = IS_CONST; } break; case 123: - { zend_do_extended_info(TSRMLS_C); zend_do_default_before_statement(&yyvsp[-2], &yyvsp[-1] TSRMLS_CC); } + { zend_do_extended_info(TSRMLS_C); zend_do_default_before_statement(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]) TSRMLS_CC); } break; case 124: - { zend_do_case_after_statement(&yyval, &yyvsp[-3] TSRMLS_CC); yyval.op_type = IS_CONST; } + { zend_do_case_after_statement(&(yyval), &(yyvsp[(2) - (5)]) TSRMLS_CC); (yyval).op_type = IS_CONST; } break; case 130: - { zend_do_if_cond(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_if_cond(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); } break; case 131: - { zend_do_if_after_statement(&yyvsp[-2], 0 TSRMLS_CC); } + { zend_do_if_after_statement(&(yyvsp[(5) - (7)]), 0 TSRMLS_CC); } break; case 133: - { zend_do_if_cond(&yyvsp[-2], &yyvsp[-1] TSRMLS_CC); } + { zend_do_if_cond(&(yyvsp[(4) - (6)]), &(yyvsp[(5) - (6)]) TSRMLS_CC); } break; case 134: - { zend_do_if_after_statement(&yyvsp[-3], 0 TSRMLS_CC); } + { zend_do_if_after_statement(&(yyvsp[(5) - (8)]), 0 TSRMLS_CC); } break; case 141: - { znode tmp; fetch_simple_variable(&tmp, &yyvsp[0], 0 TSRMLS_CC); yyval.op_type = IS_CONST; yyval.u.constant.value.lval=1; yyval.u.constant.type=IS_LONG; INIT_PZVAL(&yyval.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &yyval, NULL, &yyvsp[-1], &yyvsp[0], 0 TSRMLS_CC); } + { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(2) - (2)]), 0 TSRMLS_CC); (yyval).op_type = IS_CONST; (yyval).u.constant.value.lval=1; (yyval).u.constant.type=IS_LONG; INIT_PZVAL(&(yyval).u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &(yyval), NULL, &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]), 0 TSRMLS_CC); } break; case 142: - { znode tmp; fetch_simple_variable(&tmp, &yyvsp[0], 0 TSRMLS_CC); yyval.op_type = IS_CONST; yyval.u.constant.value.lval=1; yyval.u.constant.type=IS_LONG; INIT_PZVAL(&yyval.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &yyval, NULL, &yyvsp[-2], &yyvsp[0], 1 TSRMLS_CC); } + { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(3) - (3)]), 0 TSRMLS_CC); (yyval).op_type = IS_CONST; (yyval).u.constant.value.lval=1; (yyval).u.constant.type=IS_LONG; INIT_PZVAL(&(yyval).u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &(yyval), NULL, &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), 1 TSRMLS_CC); } break; case 143: - { znode tmp; fetch_simple_variable(&tmp, &yyvsp[-2], 0 TSRMLS_CC); yyval.op_type = IS_CONST; yyval.u.constant.value.lval=1; yyval.u.constant.type=IS_LONG; INIT_PZVAL(&yyval.u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &yyval, &yyvsp[0], &yyvsp[-4], &yyvsp[-2], 1 TSRMLS_CC); } + { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(3) - (5)]), 0 TSRMLS_CC); (yyval).op_type = IS_CONST; (yyval).u.constant.value.lval=1; (yyval).u.constant.type=IS_LONG; INIT_PZVAL(&(yyval).u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(1) - (5)]), &(yyvsp[(3) - (5)]), 1 TSRMLS_CC); } break; case 144: - { znode tmp; fetch_simple_variable(&tmp, &yyvsp[-2], 0 TSRMLS_CC); yyval.op_type = IS_CONST; yyval.u.constant.value.lval=1; yyval.u.constant.type=IS_LONG; INIT_PZVAL(&yyval.u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &yyval, &yyvsp[0], &yyvsp[-3], &yyvsp[-2], 0 TSRMLS_CC); } + { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(2) - (4)]), 0 TSRMLS_CC); (yyval).op_type = IS_CONST; (yyval).u.constant.value.lval=1; (yyval).u.constant.type=IS_LONG; INIT_PZVAL(&(yyval).u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), 0 TSRMLS_CC); } break; case 145: - { znode tmp; fetch_simple_variable(&tmp, &yyvsp[0], 0 TSRMLS_CC); yyval=yyvsp[-3]; yyval.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &yyval, NULL, &yyvsp[-1], &yyvsp[0], 0 TSRMLS_CC); } + { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(4) - (4)]), 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (4)]); (yyval).u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &(yyval), NULL, &(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]), 0 TSRMLS_CC); } break; case 146: - { znode tmp; fetch_simple_variable(&tmp, &yyvsp[0], 0 TSRMLS_CC); yyval=yyvsp[-4]; yyval.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &yyval, NULL, &yyvsp[-2], &yyvsp[0], 1 TSRMLS_CC); } + { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(5) - (5)]), 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (5)]); (yyval).u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV, &tmp, &(yyval), NULL, &(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), 1 TSRMLS_CC); } break; case 147: - { znode tmp; fetch_simple_variable(&tmp, &yyvsp[-2], 0 TSRMLS_CC); yyval=yyvsp[-6]; yyval.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &yyval, &yyvsp[0], &yyvsp[-4], &yyvsp[-2], 1 TSRMLS_CC); } + { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(5) - (7)]), 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (7)]); (yyval).u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &(yyval), &(yyvsp[(7) - (7)]), &(yyvsp[(3) - (7)]), &(yyvsp[(5) - (7)]), 1 TSRMLS_CC); } break; case 148: - { znode tmp; fetch_simple_variable(&tmp, &yyvsp[-2], 0 TSRMLS_CC); yyval=yyvsp[-5]; yyval.u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &yyval, &yyvsp[0], &yyvsp[-3], &yyvsp[-2], 0 TSRMLS_CC); } + { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(4) - (6)]), 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (6)]); (yyval).u.constant.value.lval++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &(yyval), &(yyvsp[(6) - (6)]), &(yyvsp[(3) - (6)]), &(yyvsp[(4) - (6)]), 0 TSRMLS_CC); } break; case 149: - { yyval.op_type = IS_UNUSED; } + { (yyval).op_type = IS_UNUSED; } break; case 150: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 151: - { yyval.op_type = IS_CONST; yyval.u.constant.type=IS_NULL;} + { (yyval).op_type = IS_CONST; (yyval).u.constant.type=IS_NULL;} break; case 152: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 153: - { yyval.u.constant.value.lval = 0; } + { (yyval).u.constant.value.lval = 0; } break; case 154: - { yyval.u.constant.value.lval = 1; zend_do_pass_param(&yyvsp[0], ZEND_SEND_VAL, yyval.u.constant.value.lval TSRMLS_CC); } + { (yyval).u.constant.value.lval = 1; zend_do_pass_param(&(yyvsp[(1) - (1)]), ZEND_SEND_VAL, (yyval).u.constant.value.lval TSRMLS_CC); } break; case 155: - { yyval.u.constant.value.lval = 1; zend_do_pass_param(&yyvsp[0], ZEND_SEND_VAR, yyval.u.constant.value.lval TSRMLS_CC); } + { (yyval).u.constant.value.lval = 1; zend_do_pass_param(&(yyvsp[(1) - (1)]), ZEND_SEND_VAR, (yyval).u.constant.value.lval TSRMLS_CC); } break; case 156: - { yyval.u.constant.value.lval = 1; zend_do_pass_param(&yyvsp[0], ZEND_SEND_REF, yyval.u.constant.value.lval TSRMLS_CC); } + { (yyval).u.constant.value.lval = 1; zend_do_pass_param(&(yyvsp[(2) - (2)]), ZEND_SEND_REF, (yyval).u.constant.value.lval TSRMLS_CC); } break; case 157: - { yyval.u.constant.value.lval=yyvsp[-2].u.constant.value.lval+1; zend_do_pass_param(&yyvsp[0], ZEND_SEND_VAL, yyval.u.constant.value.lval TSRMLS_CC); } + { (yyval).u.constant.value.lval=(yyvsp[(1) - (3)]).u.constant.value.lval+1; zend_do_pass_param(&(yyvsp[(3) - (3)]), ZEND_SEND_VAL, (yyval).u.constant.value.lval TSRMLS_CC); } break; case 158: - { yyval.u.constant.value.lval=yyvsp[-2].u.constant.value.lval+1; zend_do_pass_param(&yyvsp[0], ZEND_SEND_VAR, yyval.u.constant.value.lval TSRMLS_CC); } + { (yyval).u.constant.value.lval=(yyvsp[(1) - (3)]).u.constant.value.lval+1; zend_do_pass_param(&(yyvsp[(3) - (3)]), ZEND_SEND_VAR, (yyval).u.constant.value.lval TSRMLS_CC); } break; case 159: - { yyval.u.constant.value.lval=yyvsp[-3].u.constant.value.lval+1; zend_do_pass_param(&yyvsp[0], ZEND_SEND_REF, yyval.u.constant.value.lval TSRMLS_CC); } + { (yyval).u.constant.value.lval=(yyvsp[(1) - (4)]).u.constant.value.lval+1; zend_do_pass_param(&(yyvsp[(4) - (4)]), ZEND_SEND_REF, (yyval).u.constant.value.lval TSRMLS_CC); } break; case 160: - { zend_do_fetch_global_variable(&yyvsp[0], NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); } + { zend_do_fetch_global_variable(&(yyvsp[(3) - (3)]), NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); } break; case 161: - { zend_do_fetch_global_variable(&yyvsp[0], NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); } + { zend_do_fetch_global_variable(&(yyvsp[(1) - (1)]), NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); } break; case 162: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 163: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(2) - (2)]); } break; case 164: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(3) - (4)]); } break; case 165: - { zend_do_fetch_static_variable(&yyvsp[0], NULL, ZEND_FETCH_STATIC TSRMLS_CC); } + { zend_do_fetch_static_variable(&(yyvsp[(3) - (3)]), NULL, ZEND_FETCH_STATIC TSRMLS_CC); } break; case 166: - { zend_do_fetch_static_variable(&yyvsp[-2], &yyvsp[0], ZEND_FETCH_STATIC TSRMLS_CC); } + { zend_do_fetch_static_variable(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), ZEND_FETCH_STATIC TSRMLS_CC); } break; case 167: - { zend_do_fetch_static_variable(&yyvsp[0], NULL, ZEND_FETCH_STATIC TSRMLS_CC); } + { zend_do_fetch_static_variable(&(yyvsp[(1) - (1)]), NULL, ZEND_FETCH_STATIC TSRMLS_CC); } break; case 168: - { zend_do_fetch_static_variable(&yyvsp[-2], &yyvsp[0], ZEND_FETCH_STATIC TSRMLS_CC); } + { zend_do_fetch_static_variable(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_FETCH_STATIC TSRMLS_CC); } break; case 171: - { CG(access_type) = yyvsp[0].u.constant.value.lval; } + { CG(access_type) = (yyvsp[(1) - (1)]).u.constant.value.lval; } break; case 174: - { yyvsp[0].u.opline_num = CG(zend_lineno); } + { (yyvsp[(2) - (2)]).u.opline_num = CG(zend_lineno); } break; case 175: - { zend_do_begin_function_declaration(&yyvsp[-3], &yyvsp[0], 1, yyvsp[-1].op_type, &yyvsp[-4] TSRMLS_CC); } + { zend_do_begin_function_declaration(&(yyvsp[(2) - (5)]), &(yyvsp[(5) - (5)]), 1, (yyvsp[(4) - (5)]).op_type, &(yyvsp[(1) - (5)]) TSRMLS_CC); } break; case 176: - { zend_do_abstract_method(&yyvsp[-5], &yyvsp[-9], &yyvsp[0] TSRMLS_CC); zend_do_end_function_declaration(&yyvsp[-8] TSRMLS_CC); } + { zend_do_abstract_method(&(yyvsp[(5) - (10)]), &(yyvsp[(1) - (10)]), &(yyvsp[(10) - (10)]) TSRMLS_CC); zend_do_end_function_declaration(&(yyvsp[(2) - (10)]) TSRMLS_CC); } break; case 177: - { yyval.u.constant.value.lval = ZEND_ACC_ABSTRACT; } + { (yyval).u.constant.value.lval = ZEND_ACC_ABSTRACT; } break; case 178: - { yyval.u.constant.value.lval = 0; } + { (yyval).u.constant.value.lval = 0; } break; case 179: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 180: - { zend_error(E_STRICT, "var: Deprecated. Please use the public/private/protected modifiers"); yyval.u.constant.value.lval = ZEND_ACC_PUBLIC; } + { (yyval).u.constant.value.lval = ZEND_ACC_PUBLIC; } break; case 181: - { yyval.u.constant.value.lval = ZEND_ACC_PUBLIC; } + { (yyval).u.constant.value.lval = ZEND_ACC_PUBLIC; } break; case 182: - { yyval = yyvsp[0]; if (!(yyval.u.constant.value.lval & ZEND_ACC_PPP_MASK)) { yyval.u.constant.value.lval |= ZEND_ACC_PUBLIC; } } + { (yyval) = (yyvsp[(1) - (1)]); if (!((yyval).u.constant.value.lval & ZEND_ACC_PPP_MASK)) { (yyval).u.constant.value.lval |= ZEND_ACC_PUBLIC; } } break; case 183: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 184: - { yyval.u.constant.value.lval = zend_do_verify_access_types(&yyvsp[-1], &yyvsp[0]); } + { (yyval).u.constant.value.lval = zend_do_verify_access_types(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); } break; case 185: - { yyval.u.constant.value.lval = ZEND_ACC_PUBLIC; } + { (yyval).u.constant.value.lval = ZEND_ACC_PUBLIC; } break; case 186: - { yyval.u.constant.value.lval = ZEND_ACC_PROTECTED; } + { (yyval).u.constant.value.lval = ZEND_ACC_PROTECTED; } break; case 187: - { yyval.u.constant.value.lval = ZEND_ACC_PRIVATE; } + { (yyval).u.constant.value.lval = ZEND_ACC_PRIVATE; } break; case 188: - { yyval.u.constant.value.lval = ZEND_ACC_STATIC; } + { (yyval).u.constant.value.lval = ZEND_ACC_STATIC; } break; case 189: - { yyval.u.constant.value.lval = ZEND_ACC_ABSTRACT; } + { (yyval).u.constant.value.lval = ZEND_ACC_ABSTRACT; } break; case 190: - { yyval.u.constant.value.lval = ZEND_ACC_FINAL; } + { (yyval).u.constant.value.lval = ZEND_ACC_FINAL; } break; case 191: - { zend_do_declare_property(&yyvsp[0], NULL, CG(access_type) TSRMLS_CC); } + { zend_do_declare_property(&(yyvsp[(3) - (3)]), NULL, CG(access_type) TSRMLS_CC); } break; case 192: - { zend_do_declare_property(&yyvsp[-2], &yyvsp[0], CG(access_type) TSRMLS_CC); } + { zend_do_declare_property(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), CG(access_type) TSRMLS_CC); } break; case 193: - { zend_do_declare_property(&yyvsp[0], NULL, CG(access_type) TSRMLS_CC); } + { zend_do_declare_property(&(yyvsp[(1) - (1)]), NULL, CG(access_type) TSRMLS_CC); } break; case 194: - { zend_do_declare_property(&yyvsp[-2], &yyvsp[0], CG(access_type) TSRMLS_CC); } + { zend_do_declare_property(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), CG(access_type) TSRMLS_CC); } break; case 195: - { zend_do_declare_class_constant(&yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_declare_class_constant(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); } break; case 196: - { zend_do_declare_class_constant(&yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_declare_class_constant(&(yyvsp[(2) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); } break; case 197: - { zend_do_echo(&yyvsp[0] TSRMLS_CC); } + { zend_do_echo(&(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 198: - { zend_do_echo(&yyvsp[0] TSRMLS_CC); } + { zend_do_echo(&(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 199: - { yyval.op_type = IS_CONST; yyval.u.constant.type = IS_BOOL; yyval.u.constant.value.lval = 1; } + { (yyval).op_type = IS_CONST; (yyval).u.constant.type = IS_BOOL; (yyval).u.constant.value.lval = 1; } break; case 200: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 201: - { zend_do_free(&yyvsp[-1] TSRMLS_CC); } + { zend_do_free(&(yyvsp[(1) - (2)]) TSRMLS_CC); } break; case 202: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(4) - (4)]); } break; case 203: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 204: @@ -3534,793 +3864,793 @@ yyreduce: case 205: - { zend_do_list_end(&yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_list_end(&(yyval), &(yyvsp[(7) - (7)]) TSRMLS_CC); } break; case 206: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign(&yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 207: - { zend_check_writable_variable(&yyvsp[-3]); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&yyval, &yyvsp[-3], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (4)])); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); } break; case 208: - { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&yyvsp[-4]); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&(yyvsp[(1) - (5)])); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); } break; case 209: - { zend_do_end_new_object(&yyvsp[-4], &yyvsp[-3], &yyvsp[0] TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&yyval, &yyvsp[-6], &yyvsp[-4] TSRMLS_CC); } + { zend_do_end_new_object(&(yyvsp[(3) - (7)]), &(yyvsp[(4) - (7)]), &(yyvsp[(7) - (7)]) TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&(yyval), &(yyvsp[(1) - (7)]), &(yyvsp[(3) - (7)]) TSRMLS_CC); } break; case 210: - { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 211: - { zend_do_end_new_object(&yyval, &yyvsp[-3], &yyvsp[0] TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);} + { zend_do_end_new_object(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);} break; case 212: - { zend_do_clone(&yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_clone(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 213: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 214: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 215: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 216: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 217: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 218: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 219: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 220: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 221: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 222: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 223: - { zend_check_writable_variable(&yyvsp[-2]); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 224: - { zend_do_post_incdec(&yyval, &yyvsp[-1], ZEND_POST_INC TSRMLS_CC); } + { zend_do_post_incdec(&(yyval), &(yyvsp[(1) - (2)]), ZEND_POST_INC TSRMLS_CC); } break; case 225: - { zend_do_pre_incdec(&yyval, &yyvsp[0], ZEND_PRE_INC TSRMLS_CC); } + { zend_do_pre_incdec(&(yyval), &(yyvsp[(2) - (2)]), ZEND_PRE_INC TSRMLS_CC); } break; case 226: - { zend_do_post_incdec(&yyval, &yyvsp[-1], ZEND_POST_DEC TSRMLS_CC); } + { zend_do_post_incdec(&(yyval), &(yyvsp[(1) - (2)]), ZEND_POST_DEC TSRMLS_CC); } break; case 227: - { zend_do_pre_incdec(&yyval, &yyvsp[0], ZEND_PRE_DEC TSRMLS_CC); } + { zend_do_pre_incdec(&(yyval), &(yyvsp[(2) - (2)]), ZEND_PRE_DEC TSRMLS_CC); } break; case 228: - { zend_do_boolean_or_begin(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_boolean_or_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 229: - { zend_do_boolean_or_end(&yyval, &yyvsp[-3], &yyvsp[0], &yyvsp[-2] TSRMLS_CC); } + { zend_do_boolean_or_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); } break; case 230: - { zend_do_boolean_and_begin(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 231: - { zend_do_boolean_and_end(&yyval, &yyvsp[-3], &yyvsp[0], &yyvsp[-2] TSRMLS_CC); } + { zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); } break; case 232: - { zend_do_boolean_or_begin(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_boolean_or_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 233: - { zend_do_boolean_or_end(&yyval, &yyvsp[-3], &yyvsp[0], &yyvsp[-2] TSRMLS_CC); } + { zend_do_boolean_or_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); } break; case 234: - { zend_do_boolean_and_begin(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 235: - { zend_do_boolean_and_end(&yyval, &yyvsp[-3], &yyvsp[0], &yyvsp[-2] TSRMLS_CC); } + { zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); } break; case 236: - { zend_do_binary_op(ZEND_BOOL_XOR, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_BOOL_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 237: - { zend_do_binary_op(ZEND_BW_OR, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_BW_OR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 238: - { zend_do_binary_op(ZEND_BW_AND, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_BW_AND, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 239: - { zend_do_binary_op(ZEND_BW_XOR, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_BW_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 240: - { zend_do_binary_op(ZEND_CONCAT, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_CONCAT, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 241: - { zend_do_binary_op(ZEND_ADD, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_ADD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 242: - { zend_do_binary_op(ZEND_SUB, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_SUB, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 243: - { zend_do_binary_op(ZEND_MUL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_MUL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 244: - { zend_do_binary_op(ZEND_DIV, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_DIV, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 245: - { zend_do_binary_op(ZEND_MOD, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_MOD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 246: - { zend_do_binary_op(ZEND_SL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_SL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 247: - { zend_do_binary_op(ZEND_SR, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_SR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 248: - { yyvsp[-1].u.constant.value.lval=0; yyvsp[-1].u.constant.type=IS_LONG; yyvsp[-1].op_type = IS_CONST; INIT_PZVAL(&yyvsp[-1].u.constant); zend_do_binary_op(ZEND_ADD, &yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { (yyvsp[(1) - (2)]).u.constant.value.lval=0; (yyvsp[(1) - (2)]).u.constant.type=IS_LONG; (yyvsp[(1) - (2)]).op_type = IS_CONST; INIT_PZVAL(&(yyvsp[(1) - (2)]).u.constant); zend_do_binary_op(ZEND_ADD, &(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 249: - { yyvsp[-1].u.constant.value.lval=0; yyvsp[-1].u.constant.type=IS_LONG; yyvsp[-1].op_type = IS_CONST; INIT_PZVAL(&yyvsp[-1].u.constant); zend_do_binary_op(ZEND_SUB, &yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { (yyvsp[(1) - (2)]).u.constant.value.lval=0; (yyvsp[(1) - (2)]).u.constant.type=IS_LONG; (yyvsp[(1) - (2)]).op_type = IS_CONST; INIT_PZVAL(&(yyvsp[(1) - (2)]).u.constant); zend_do_binary_op(ZEND_SUB, &(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 250: - { zend_do_unary_op(ZEND_BOOL_NOT, &yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_unary_op(ZEND_BOOL_NOT, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 251: - { zend_do_unary_op(ZEND_BW_NOT, &yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_unary_op(ZEND_BW_NOT, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 252: - { zend_do_binary_op(ZEND_IS_IDENTICAL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_IS_IDENTICAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 253: - { zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 254: - { zend_do_binary_op(ZEND_IS_EQUAL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_IS_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 255: - { zend_do_binary_op(ZEND_IS_NOT_EQUAL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_IS_NOT_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 256: - { zend_do_binary_op(ZEND_IS_SMALLER, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_IS_SMALLER, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 257: - { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &yyval, &yyvsp[-2], &yyvsp[0] TSRMLS_CC); } + { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 258: - { zend_do_binary_op(ZEND_IS_SMALLER, &yyval, &yyvsp[0], &yyvsp[-2] TSRMLS_CC); } + { zend_do_binary_op(ZEND_IS_SMALLER, &(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]) TSRMLS_CC); } break; case 259: - { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &yyval, &yyvsp[0], &yyvsp[-2] TSRMLS_CC); } + { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]) TSRMLS_CC); } break; case 260: - { zend_do_instanceof(&yyval, &yyvsp[-2], &yyvsp[0], 0 TSRMLS_CC); } + { zend_do_instanceof(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), 0 TSRMLS_CC); } break; case 261: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 262: - { zend_do_begin_qm_op(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_begin_qm_op(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 263: - { zend_do_qm_true(&yyvsp[-1], &yyvsp[-3], &yyvsp[0] TSRMLS_CC); } + { zend_do_qm_true(&(yyvsp[(4) - (5)]), &(yyvsp[(2) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); } break; case 264: - { zend_do_qm_false(&yyval, &yyvsp[0], &yyvsp[-5], &yyvsp[-2] TSRMLS_CC); } + { zend_do_qm_false(&(yyval), &(yyvsp[(7) - (7)]), &(yyvsp[(2) - (7)]), &(yyvsp[(5) - (7)]) TSRMLS_CC); } break; case 265: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 266: - { zend_do_cast(&yyval, &yyvsp[0], IS_LONG TSRMLS_CC); } + { zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_LONG TSRMLS_CC); } break; case 267: - { zend_do_cast(&yyval, &yyvsp[0], IS_DOUBLE TSRMLS_CC); } + { zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_DOUBLE TSRMLS_CC); } break; case 268: - { zend_do_cast(&yyval, &yyvsp[0], IS_STRING TSRMLS_CC); } + { zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_STRING TSRMLS_CC); } break; case 269: - { zend_do_cast(&yyval, &yyvsp[0], IS_ARRAY TSRMLS_CC); } + { zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_ARRAY TSRMLS_CC); } break; case 270: - { zend_do_cast(&yyval, &yyvsp[0], IS_OBJECT TSRMLS_CC); } + { zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_OBJECT TSRMLS_CC); } break; case 271: - { zend_do_cast(&yyval, &yyvsp[0], IS_BOOL TSRMLS_CC); } + { zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_BOOL TSRMLS_CC); } break; case 272: - { zend_do_cast(&yyval, &yyvsp[0], IS_NULL TSRMLS_CC); } + { zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_NULL TSRMLS_CC); } break; case 273: - { zend_do_exit(&yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_exit(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 274: - { zend_do_begin_silence(&yyvsp[0] TSRMLS_CC); } + { zend_do_begin_silence(&(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 275: - { zend_do_end_silence(&yyvsp[-2] TSRMLS_CC); yyval = yyvsp[0]; } + { zend_do_end_silence(&(yyvsp[(1) - (3)]) TSRMLS_CC); (yyval) = (yyvsp[(3) - (3)]); } break; case 276: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 277: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(3) - (4)]); } break; case 278: - { zend_do_shell_exec(&yyval, &yyvsp[-1] TSRMLS_CC); } + { zend_do_shell_exec(&(yyval), &(yyvsp[(2) - (3)]) TSRMLS_CC); } break; case 279: - { zend_do_print(&yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_print(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 280: - { yyvsp[0].u.opline_num = zend_do_begin_function_call(&yyvsp[-1] TSRMLS_CC); } + { (yyvsp[(2) - (2)]).u.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (2)]) TSRMLS_CC); } break; case 281: - { zend_do_end_function_call(&yyvsp[-4], &yyval, &yyvsp[-1], 0, yyvsp[-3].u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); } + { zend_do_end_function_call(&(yyvsp[(1) - (5)]), &(yyval), &(yyvsp[(4) - (5)]), 0, (yyvsp[(2) - (5)]).u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); } break; case 282: - { zend_do_begin_class_member_function_call(&yyvsp[-3], &yyvsp[-1] TSRMLS_CC); } + { zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 283: - { zend_do_end_function_call(NULL, &yyval, &yyvsp[-1], 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);} + { zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(6) - (7)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);} break; case 284: - { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&yyvsp[-3], &yyvsp[-1] TSRMLS_CC); } + { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 285: - { zend_do_end_function_call(NULL, &yyval, &yyvsp[-1], 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);} + { zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(6) - (7)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);} break; case 286: - { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&yyvsp[-1] TSRMLS_CC); } + { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&(yyvsp[(1) - (2)]) TSRMLS_CC); } break; case 287: - { zend_do_end_function_call(&yyvsp[-4], &yyval, &yyvsp[-1], 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);} + { zend_do_end_function_call(&(yyvsp[(1) - (5)]), &(yyval), &(yyvsp[(4) - (5)]), 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);} break; case 288: - { zend_do_fetch_class(&yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_fetch_class(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 289: - { zend_do_fetch_class(&yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_fetch_class(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 290: - { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_fetch_class(&yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_fetch_class(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 291: - { zend_do_push_object(&yyvsp[-1] TSRMLS_CC); } + { zend_do_push_object(&(yyvsp[(1) - (2)]) TSRMLS_CC); } break; case 292: - { zend_do_push_object(&yyvsp[0] TSRMLS_CC); zend_do_declare_implicit_property(TSRMLS_C); } + { zend_do_push_object(&(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_declare_implicit_property(TSRMLS_C); } break; case 293: - { zend_do_pop_object(&yyval TSRMLS_CC); yyval.u.EA.type = ZEND_PARSED_MEMBER; } + { zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).u.EA.type = ZEND_PARSED_MEMBER; } break; case 294: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 297: - { zend_do_push_object(&yyvsp[0] TSRMLS_CC); zend_do_declare_implicit_property(TSRMLS_C); } + { zend_do_push_object(&(yyvsp[(2) - (2)]) TSRMLS_CC); zend_do_declare_implicit_property(TSRMLS_C); } break; case 298: - { memset(&yyval, 0, sizeof(znode)); yyval.op_type = IS_UNUSED; } + { memset(&(yyval), 0, sizeof(znode)); (yyval).op_type = IS_UNUSED; } break; case 299: - { memset(&yyval, 0, sizeof(znode)); yyval.op_type = IS_UNUSED; } + { memset(&(yyval), 0, sizeof(znode)); (yyval).op_type = IS_UNUSED; } break; case 300: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 301: - { yyval.u.constant.value.lval=0; } + { (yyval).u.constant.value.lval=0; } break; case 302: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 303: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 304: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 305: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 306: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 307: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 308: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 309: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 310: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 311: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 312: - { zend_do_fetch_constant(&yyval, NULL, &yyvsp[0], ZEND_CT TSRMLS_CC); } + { zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(1) - (1)]), ZEND_CT TSRMLS_CC); } break; case 313: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(2) - (2)]); } break; case 314: - { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&yyvsp[0].u.constant, &yyvsp[0].u.constant, &minus_one TSRMLS_CC); yyval = yyvsp[0]; } + { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant, &minus_one TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); } break; case 315: - { yyval = yyvsp[-1]; yyval.u.constant.type = IS_CONSTANT_ARRAY; } + { (yyval) = (yyvsp[(3) - (4)]); (yyval).u.constant.type = IS_CONSTANT_ARRAY; } break; case 316: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 317: - { zend_do_fetch_constant(&yyval, &yyvsp[-2], &yyvsp[0], ZEND_CT TSRMLS_CC); } + { zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_CT TSRMLS_CC); } break; case 318: - { zend_do_fetch_constant(&yyval, NULL, &yyvsp[0], ZEND_RT TSRMLS_CC); } + { zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(1) - (1)]), ZEND_RT TSRMLS_CC); } break; case 319: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 320: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 321: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 322: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 323: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 324: - { yyval = yyvsp[-1]; zend_do_end_heredoc(TSRMLS_C); } + { (yyval) = (yyvsp[(2) - (3)]); zend_do_end_heredoc(TSRMLS_C); } break; case 325: - { yyval.op_type = IS_CONST; INIT_PZVAL(&yyval.u.constant); array_init(&yyval.u.constant); } + { (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); } break; case 326: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(1) - (2)]); } break; case 329: - { zend_do_add_static_array_element(&yyval, &yyvsp[-2], &yyvsp[0]); } + { zend_do_add_static_array_element(&(yyval), &(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)])); } break; case 330: - { zend_do_add_static_array_element(&yyval, NULL, &yyvsp[0]); } + { zend_do_add_static_array_element(&(yyval), NULL, &(yyvsp[(3) - (3)])); } break; case 331: - { yyval.op_type = IS_CONST; INIT_PZVAL(&yyval.u.constant); array_init(&yyval.u.constant); zend_do_add_static_array_element(&yyval, &yyvsp[-2], &yyvsp[0]); } + { (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); zend_do_add_static_array_element(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); } break; case 332: - { yyval.op_type = IS_CONST; INIT_PZVAL(&yyval.u.constant); array_init(&yyval.u.constant); zend_do_add_static_array_element(&yyval, NULL, &yyvsp[0]); } + { (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); zend_do_add_static_array_element(&(yyval), NULL, &(yyvsp[(1) - (1)])); } break; case 333: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 334: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 335: - { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); yyval = yyvsp[0]; } + { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); } break; case 336: - { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); yyval = yyvsp[0]; } + { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); } break; case 337: - { zend_check_writable_variable(&yyvsp[-1]); } + { zend_check_writable_variable(&(yyvsp[(1) - (2)])); } break; case 338: - { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); yyval = yyvsp[0]; } + { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); } break; case 339: - { zend_check_writable_variable(&yyvsp[-1]); } + { zend_check_writable_variable(&(yyvsp[(1) - (2)])); } break; case 340: - { zend_do_push_object(&yyvsp[-1] TSRMLS_CC); } + { zend_do_push_object(&(yyvsp[(1) - (2)]) TSRMLS_CC); } break; case 341: - { zend_do_push_object(&yyvsp[0] TSRMLS_CC); } + { zend_do_push_object(&(yyvsp[(4) - (4)]) TSRMLS_CC); } break; case 342: - { zend_do_pop_object(&yyval TSRMLS_CC); yyval.u.EA.type = yyvsp[-6].u.EA.type | (yyvsp[0].u.EA.type ? yyvsp[0].u.EA.type : yyvsp[-1].u.EA.type); } + { zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).u.EA.type = (yyvsp[(1) - (7)]).u.EA.type | ((yyvsp[(7) - (7)]).u.EA.type ? (yyvsp[(7) - (7)]).u.EA.type : (yyvsp[(6) - (7)]).u.EA.type); } break; case 343: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 344: - { yyval.u.EA.type = yyvsp[0].u.EA.type; } + { (yyval).u.EA.type = (yyvsp[(2) - (2)]).u.EA.type; } break; case 345: - { yyval.u.EA.type = 0; } + { (yyval).u.EA.type = 0; } break; case 346: - { zend_do_push_object(&yyvsp[0] TSRMLS_CC); } + { zend_do_push_object(&(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 347: - { yyval.u.EA.type = yyvsp[0].u.EA.type; } + { (yyval).u.EA.type = (yyvsp[(4) - (4)]).u.EA.type; } break; case 348: - { zend_do_pop_object(&yyvsp[0] TSRMLS_CC); zend_do_begin_method_call(&yyvsp[0] TSRMLS_CC); } + { zend_do_pop_object(&(yyvsp[(1) - (1)]) TSRMLS_CC); zend_do_begin_method_call(&(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 349: - { zend_do_end_function_call(&yyvsp[-3], &yyval, &yyvsp[-1], 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); - zend_do_push_object(&yyval TSRMLS_CC); yyval.u.EA.type = ZEND_PARSED_METHOD_CALL; } + { zend_do_end_function_call(&(yyvsp[(1) - (4)]), &(yyval), &(yyvsp[(3) - (4)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); + zend_do_push_object(&(yyval) TSRMLS_CC); (yyval).u.EA.type = ZEND_PARSED_METHOD_CALL; } break; case 350: - { zend_do_declare_implicit_property(TSRMLS_C); yyval.u.EA.type = ZEND_PARSED_MEMBER; } + { zend_do_declare_implicit_property(TSRMLS_C); (yyval).u.EA.type = ZEND_PARSED_MEMBER; } break; case 351: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 352: - { zend_do_indirect_references(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 353: - { yyval = yyvsp[0]; zend_do_fetch_static_member(&yyval, &yyvsp[-2] TSRMLS_CC); } + { (yyval) = (yyvsp[(3) - (3)]); zend_do_fetch_static_member(&(yyval), &(yyvsp[(1) - (3)]) TSRMLS_CC); } break; case 354: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 355: - { zend_do_begin_variable_parse(TSRMLS_C); yyval = yyvsp[0]; yyval.u.EA.type = ZEND_PARSED_FUNCTION_CALL; } + { zend_do_begin_variable_parse(TSRMLS_C); (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_FUNCTION_CALL; } break; case 356: - { yyval = yyvsp[0]; yyval.u.EA.type = ZEND_PARSED_VARIABLE; } + { (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_VARIABLE; } break; case 357: - { zend_do_indirect_references(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); yyval.u.EA.type = ZEND_PARSED_VARIABLE; } + { zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); (yyval).u.EA.type = ZEND_PARSED_VARIABLE; } break; case 358: - { yyval = yyvsp[0]; yyval.u.EA.type = ZEND_PARSED_STATIC_MEMBER; } + { (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_STATIC_MEMBER; } break; case 359: - { fetch_array_dim(&yyval, &yyvsp[-3], &yyvsp[-1] TSRMLS_CC); } + { fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 360: - { fetch_string_offset(&yyval, &yyvsp[-3], &yyvsp[-1] TSRMLS_CC); } + { fetch_string_offset(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 361: - { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&yyval, &yyvsp[0], 1 TSRMLS_CC); } + { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); } break; case 362: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 363: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(3) - (4)]); } break; case 364: - { yyval.op_type = IS_UNUSED; } + { (yyval).op_type = IS_UNUSED; } break; case 365: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 366: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 367: @@ -4330,47 +4660,47 @@ yyreduce: case 368: - { znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&yyval, &tmp_znode, &yyvsp[-1] TSRMLS_CC);} + { znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&(yyval), &tmp_znode, &(yyvsp[(1) - (2)]) TSRMLS_CC);} break; case 369: - { fetch_array_dim(&yyval, &yyvsp[-3], &yyvsp[-1] TSRMLS_CC); } + { fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 370: - { fetch_string_offset(&yyval, &yyvsp[-3], &yyvsp[-1] TSRMLS_CC); } + { fetch_string_offset(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 371: - { znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&yyval, &tmp_znode, &yyvsp[0] TSRMLS_CC);} + { znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&(yyval), &tmp_znode, &(yyvsp[(1) - (1)]) TSRMLS_CC);} break; case 372: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 373: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 374: - { yyval.u.constant.value.lval = 1; } + { (yyval).u.constant.value.lval = 1; } break; case 375: - { yyval.u.constant.value.lval++; } + { (yyval).u.constant.value.lval++; } break; case 378: - { zend_do_add_list_element(&yyvsp[0] TSRMLS_CC); } + { zend_do_add_list_element(&(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 379: @@ -4390,117 +4720,117 @@ yyreduce: case 382: - { zend_do_init_array(&yyval, NULL, NULL, 0 TSRMLS_CC); } + { zend_do_init_array(&(yyval), NULL, NULL, 0 TSRMLS_CC); } break; case 383: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(1) - (2)]); } break; case 384: - { zend_do_add_array_element(&yyval, &yyvsp[0], &yyvsp[-2], 0 TSRMLS_CC); } + { zend_do_add_array_element(&(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(3) - (5)]), 0 TSRMLS_CC); } break; case 385: - { zend_do_add_array_element(&yyval, &yyvsp[0], NULL, 0 TSRMLS_CC); } + { zend_do_add_array_element(&(yyval), &(yyvsp[(3) - (3)]), NULL, 0 TSRMLS_CC); } break; case 386: - { zend_do_init_array(&yyval, &yyvsp[0], &yyvsp[-2], 0 TSRMLS_CC); } + { zend_do_init_array(&(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]), 0 TSRMLS_CC); } break; case 387: - { zend_do_init_array(&yyval, &yyvsp[0], NULL, 0 TSRMLS_CC); } + { zend_do_init_array(&(yyval), &(yyvsp[(1) - (1)]), NULL, 0 TSRMLS_CC); } break; case 388: - { zend_do_add_array_element(&yyval, &yyvsp[0], &yyvsp[-3], 1 TSRMLS_CC); } + { zend_do_add_array_element(&(yyval), &(yyvsp[(6) - (6)]), &(yyvsp[(3) - (6)]), 1 TSRMLS_CC); } break; case 389: - { zend_do_add_array_element(&yyval, &yyvsp[0], NULL, 1 TSRMLS_CC); } + { zend_do_add_array_element(&(yyval), &(yyvsp[(4) - (4)]), NULL, 1 TSRMLS_CC); } break; case 390: - { zend_do_init_array(&yyval, &yyvsp[0], &yyvsp[-3], 1 TSRMLS_CC); } + { zend_do_init_array(&(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(1) - (4)]), 1 TSRMLS_CC); } break; case 391: - { zend_do_init_array(&yyval, &yyvsp[0], NULL, 1 TSRMLS_CC); } + { zend_do_init_array(&(yyval), &(yyvsp[(2) - (2)]), NULL, 1 TSRMLS_CC); } break; case 392: - { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 393: - { zend_do_add_string(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 394: - { zend_do_add_string(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 395: - { zend_do_add_string(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 396: - { zend_do_add_char(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_add_char(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 397: - { zend_do_add_string(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 398: - { yyvsp[0].u.constant.value.lval = (long) '['; zend_do_add_char(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { (yyvsp[(2) - (2)]).u.constant.value.lval = (long) '['; zend_do_add_char(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 399: - { yyvsp[0].u.constant.value.lval = (long) ']'; zend_do_add_char(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { (yyvsp[(2) - (2)]).u.constant.value.lval = (long) ']'; zend_do_add_char(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 400: - { yyvsp[0].u.constant.value.lval = (long) '{'; zend_do_add_char(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { (yyvsp[(2) - (2)]).u.constant.value.lval = (long) '{'; zend_do_add_char(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 401: - { yyvsp[0].u.constant.value.lval = (long) '}'; zend_do_add_char(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { (yyvsp[(2) - (2)]).u.constant.value.lval = (long) '}'; zend_do_add_char(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 402: - { znode tmp; yyvsp[0].u.constant.value.lval = (long) '-'; zend_do_add_char(&tmp, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); yyvsp[0].u.constant.value.lval = (long) '>'; zend_do_add_char(&yyval, &tmp, &yyvsp[0] TSRMLS_CC); } + { znode tmp; (yyvsp[(2) - (2)]).u.constant.value.lval = (long) '-'; zend_do_add_char(&tmp, &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); (yyvsp[(2) - (2)]).u.constant.value.lval = (long) '>'; zend_do_add_char(&(yyval), &tmp, &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 403: - { zend_do_init_string(&yyval TSRMLS_CC); } + { zend_do_init_string(&(yyval) TSRMLS_CC); } break; case 404: - { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&yyval, &yyvsp[0], 1 TSRMLS_CC); } + { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); } break; case 405: @@ -4510,109 +4840,108 @@ yyreduce: case 406: - { fetch_array_begin(&yyval, &yyvsp[-4], &yyvsp[-1] TSRMLS_CC); } + { fetch_array_begin(&(yyval), &(yyvsp[(1) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); } break; case 407: - { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&yyvsp[-1], &yyvsp[-2], 1 TSRMLS_CC); zend_do_fetch_property(&yyval, &yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyvsp[(2) - (3)]), &(yyvsp[(1) - (3)]), 1 TSRMLS_CC); zend_do_fetch_property(&(yyval), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); } break; case 408: - { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&yyval, &yyvsp[-1], 1 TSRMLS_CC); } + { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(2) - (3)]), 1 TSRMLS_CC); } break; case 409: - { zend_do_begin_variable_parse(TSRMLS_C); fetch_array_begin(&yyval, &yyvsp[-4], &yyvsp[-2] TSRMLS_CC); } + { zend_do_begin_variable_parse(TSRMLS_C); fetch_array_begin(&(yyval), &(yyvsp[(2) - (6)]), &(yyvsp[(4) - (6)]) TSRMLS_CC); } break; case 410: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(2) - (3)]); } break; case 411: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 412: - { yyval = yyvsp[0]; } + { (yyval) = (yyvsp[(1) - (1)]); } break; case 413: - { fetch_simple_variable(&yyval, &yyvsp[0], 1 TSRMLS_CC); } + { fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); } break; case 414: - { yyval = yyvsp[-1]; } + { (yyval) = (yyvsp[(3) - (4)]); } break; case 415: - { zend_do_isset_or_isempty(ZEND_ISEMPTY, &yyval, &yyvsp[-1] TSRMLS_CC); } + { zend_do_isset_or_isempty(ZEND_ISEMPTY, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 416: - { zend_do_include_or_eval(ZEND_INCLUDE, &yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_include_or_eval(ZEND_INCLUDE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 417: - { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 418: - { zend_do_include_or_eval(ZEND_EVAL, &yyval, &yyvsp[-1] TSRMLS_CC); } + { zend_do_include_or_eval(ZEND_EVAL, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); } break; case 419: - { zend_do_include_or_eval(ZEND_REQUIRE, &yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_include_or_eval(ZEND_REQUIRE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 420: - { zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 421: - { zend_do_isset_or_isempty(ZEND_ISSET, &yyval, &yyvsp[0] TSRMLS_CC); } + { zend_do_isset_or_isempty(ZEND_ISSET, &(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); } break; case 422: - { zend_do_boolean_and_begin(&yyvsp[-1], &yyvsp[0] TSRMLS_CC); } + { zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } break; case 423: - { znode tmp; zend_do_isset_or_isempty(ZEND_ISSET, &tmp, &yyvsp[0] TSRMLS_CC); zend_do_boolean_and_end(&yyval, &yyvsp[-3], &tmp, &yyvsp[-2] TSRMLS_CC); } + { znode tmp; zend_do_isset_or_isempty(ZEND_ISSET, &tmp, &(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &tmp, &(yyvsp[(2) - (4)]) TSRMLS_CC); } break; case 424: - { zend_do_fetch_constant(&yyval, &yyvsp[-2], &yyvsp[0], ZEND_RT TSRMLS_CC); } + { zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_RT TSRMLS_CC); } break; - } - -/* Line 1010 of yacc.c. */ - - - yyvsp -= yylen; - yyssp -= yylen; +/* Line 1267 of yacc.c. */ + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -4641,99 +4970,65 @@ yyerrlab: if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) - { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ + { + /* Return failure if at end of input. */ if (yychar == YYEOF) - for (;;) - { - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - } - } + YYABORT; + } else { - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); + yydestruct ("Error: discarding", + yytoken, &yylval); yychar = YYEMPTY; - } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -4743,15 +5038,17 @@ yyerrlab: `---------------------------------------------------*/ yyerrorlab: -#ifdef __GNUC__ - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) + /* 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; -#endif - yyvsp -= yylen; - yyssp -= yylen; + /* 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; @@ -4780,9 +5077,10 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - YYPOPSTACK; + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -4790,11 +5088,12 @@ yyerrlab1: if (yyn == YYFINAL) YYACCEPT; - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -4814,21 +5113,39 @@ yyabortlab: goto yyreturn; #ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + 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 - return yyresult; +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } diff --git a/Zend/zend_language_parser.h b/Zend/zend_language_parser.h index 8bf7b3416..e3c6c0fd3 100644 --- a/Zend/zend_language_parser.h +++ b/Zend/zend_language_parser.h @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -15,13 +17,21 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* 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. -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE @@ -149,6 +159,7 @@ T_PAAMAYIM_NEKUDOTAYIM = 375 }; #endif +/* Tokens. */ #define T_REQUIRE_ONCE 258 #define T_REQUIRE 259 #define T_EVAL 260 @@ -271,7 +282,7 @@ -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -280,5 +291,3 @@ typedef int YYSTYPE; - - diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 3cd5df846..9c654e625 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_language_parser.y,v 1.160.2.3 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_language_parser.y,v 1.160.2.4 2006/03/12 16:52:18 iliaa Exp $ */ /* * LALR shift/reduce conflicts and how they are resolved: @@ -501,7 +501,7 @@ method_body: variable_modifiers: non_empty_member_modifiers { $$ = $1; } - | T_VAR { zend_error(E_STRICT, "var: Deprecated. Please use the public/private/protected modifiers"); $$.u.constant.value.lval = ZEND_ACC_PUBLIC; } + | T_VAR { $$.u.constant.value.lval = ZEND_ACC_PUBLIC; } ; method_modifiers: diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index 9f70b4d35..86bcf336a 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -2699,7 +2699,7 @@ char *yytext; +----------------------------------------------------------------------+ */ -/* $Id: zend_language_scanner.l,v 1.131.2.9 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_language_scanner.l,v 1.131.2.10 2006/01/17 09:39:57 dmitry Exp $ */ #define yyleng SCNG(yy_leng) #define yytext SCNG(yy_text) @@ -4939,7 +4939,6 @@ YY_RULE_SETUP { int label_len; - CG(zend_lineno)++; if (yytext[yyleng-2]=='\r') { label_len = yyleng-2; } else { @@ -4960,6 +4959,7 @@ YY_RULE_SETUP BEGIN(ST_IN_SCRIPTING); return T_END_HEREDOC; } else { + CG(zend_lineno)++; zend_copy_value(zendlval, yytext, yyleng); zendlval->type = IS_STRING; return T_STRING; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index d9c54ffd1..2bee00ad9 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_language_scanner.l,v 1.131.2.9 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_language_scanner.l,v 1.131.2.10 2006/01/17 09:39:57 dmitry Exp $ */ #define yyleng SCNG(yy_leng) #define yytext SCNG(yy_text) @@ -1734,7 +1734,6 @@ NEWLINE ("\r"|"\n"|"\r\n") <ST_HEREDOC>^{LABEL}(";")?{NEWLINE} { int label_len; - CG(zend_lineno)++; if (yytext[yyleng-2]=='\r') { label_len = yyleng-2; } else { @@ -1755,6 +1754,7 @@ NEWLINE ("\r"|"\n"|"\r\n") BEGIN(ST_IN_SCRIPTING); return T_END_HEREDOC; } else { + CG(zend_lineno)++; zend_copy_value(zendlval, yytext, yyleng); zendlval->type = IS_STRING; return T_STRING; diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h index c8f4ed9ff..a5e7d597d 100644 --- a/Zend/zend_modules.h +++ b/Zend/zend_modules.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_modules.h,v 1.67.2.2 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_modules.h,v 1.67.2.3 2006/04/06 21:10:45 andrei Exp $ */ #ifndef MODULES_H #define MODULES_H @@ -36,6 +36,7 @@ extern struct _zend_arg_info first_arg_force_ref[2]; extern struct _zend_arg_info second_arg_force_ref[3]; extern struct _zend_arg_info third_arg_force_ref[4]; extern struct _zend_arg_info fourth_arg_force_ref[5]; +extern struct _zend_arg_info fifth_arg_force_ref[6]; extern struct _zend_arg_info all_args_by_ref[1]; #define ZEND_MODULE_API_NO 20050922 diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index e2cffc3d2..5417f8c7f 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects.c,v 1.56.2.2 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_objects.c,v 1.56.2.3 2006/03/29 14:28:40 tony2001 Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -25,6 +25,26 @@ #include "zend_API.h" #include "zend_interfaces.h" +ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC) +{ + ALLOC_HASHTABLE(object->properties); + zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0); + + object->ce = ce; + object->guards = NULL; +} + +ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC) +{ + if (object->guards) { + zend_hash_destroy(object->guards); + FREE_HASHTABLE(object->guards); + } + if (object->properties) { + zend_hash_destroy(object->properties); + FREE_HASHTABLE(object->properties); + } +} ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC) { @@ -88,12 +108,7 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC) { - if (object->guards) { - zend_hash_destroy(object->guards); - FREE_HASHTABLE(object->guards); - } - zend_hash_destroy(object->properties); - FREE_HASHTABLE(object->properties); + zend_object_std_dtor(object TSRMLS_CC); efree(object); } diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h index 8058dfb2c..65af84286 100644 --- a/Zend/zend_objects.h +++ b/Zend/zend_objects.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects.h,v 1.25.2.1 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_objects.h,v 1.25.2.2 2006/03/29 14:28:40 tony2001 Exp $ */ #ifndef ZEND_OBJECTS_H #define ZEND_OBJECTS_H @@ -25,6 +25,8 @@ #include "zend.h" BEGIN_EXTERN_C() +ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC); +ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC); ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC); ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC); ZEND_API zend_object *zend_objects_get_address(zval *object TSRMLS_DC); diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 733ac9a96..48b37b3ab 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects_API.c,v 1.47.2.4 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_objects_API.c,v 1.47.2.6 2006/03/28 21:58:01 tony2001 Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -33,6 +33,7 @@ ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint ini objects->top = 1; /* Skip 0 so that handles are true */ objects->size = init_size; objects->free_list_head = -1; + memset(&objects->object_buckets[0], 0, sizeof(zend_object_store_bucket)); } ZEND_API void zend_objects_store_destroy(zend_objects_store *objects) @@ -52,7 +53,9 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS if (!objects->object_buckets[i].destructor_called) { objects->object_buckets[i].destructor_called = 1; if (obj->dtor && obj->object) { + obj->refcount++; obj->dtor(obj->object, i TSRMLS_CC); + obj->refcount--; } } } diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 0799cd66d..b7e20bd0b 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_opcode.c,v 1.110.2.3 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_opcode.c,v 1.110.2.5 2006/03/14 11:24:45 dmitry Exp $ */ #include <stdio.h> @@ -132,7 +132,17 @@ ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC) { if (function->type == ZEND_USER_FUNCTION) { zend_cleanup_op_array_data((zend_op_array *) function); - } + return ZEND_HASH_APPLY_KEEP; + } else { + return ZEND_HASH_APPLY_STOP; + } +} + +ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC) +{ + if (function->type == ZEND_USER_FUNCTION) { + zend_cleanup_op_array_data((zend_op_array *) function); + } return 0; } @@ -142,7 +152,7 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC) /* Clean all parts that can contain run-time data */ /* Note that only run-time accessed data need to be cleaned up, pre-defined data can not contain objects and thus are not probelmatic */ - zend_hash_apply(&(*pce)->function_table, (apply_func_t) zend_cleanup_function_data TSRMLS_CC); + zend_hash_apply(&(*pce)->function_table, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC); (*pce)->static_members = NULL; } else if (CE_STATIC_MEMBERS(*pce)) { zend_hash_destroy(CE_STATIC_MEMBERS(*pce)); diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 12282f44f..5a5180926 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.c,v 1.208.2.3 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_operators.c,v 1.208.2.4 2006/02/05 17:07:40 helly Exp $ */ #include <ctype.h> @@ -1267,9 +1267,9 @@ ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_ } -static inline void zend_free_obj_get_result(zval *op, int free_op) +static inline void zend_free_obj_get_result(zval *op) { - if (free_op) { + if (op) { if (op->refcount == 0) { zval_dtor(op); FREE_ZVAL(op); @@ -1280,26 +1280,50 @@ static inline void zend_free_obj_get_result(zval *op, int free_op) } #define COMPARE_RETURN_AND_FREE(retval) \ - zend_free_obj_get_result(op1_orig, free_op1); \ - zend_free_obj_get_result(op2_orig, free_op2); \ + zend_free_obj_get_result(op1_free); \ + zend_free_obj_get_result(op2_free); \ return retval; ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; - zend_bool free_op1 = 0, free_op2 = 0; - zval *op1_orig, *op2_orig; + zval *op1_free, *op2_free; + int op1_obj = op1->type == IS_OBJECT; + int op2_obj = op2->type == IS_OBJECT; - if (op1->type == IS_OBJECT && Z_OBJ_HT_P(op1)->get) { - op1 = Z_OBJ_HT_P(op1)->get(op1 TSRMLS_CC); - free_op1 = 1; - } - op1_orig = op1; - if (op2->type == IS_OBJECT && Z_OBJ_HT_P(op2)->get) { - op2 = Z_OBJ_HT_P(op2)->get(op2 TSRMLS_CC); - free_op2 = 1; + if (op1_obj) { + if (Z_OBJ_HT_P(op1)->get) { + op1 = op1_free = Z_OBJ_HT_P(op1)->get(op1 TSRMLS_CC); + } else if (!op2_obj && Z_OBJ_HT_P(op1)->cast_object) { + ALLOC_INIT_ZVAL(op1_free); + if (Z_OBJ_HT_P(op1)->cast_object(op1, op1_free, Z_TYPE_P(op2), 0 TSRMLS_CC) == FAILURE) { + op2_free = NULL; + ZVAL_BOOL(result, 0); + COMPARE_RETURN_AND_FREE(FAILURE); + } + op1 = op1_free; + } else { + op1_free = NULL; + } + } else { + op1_free = NULL; + } + if (op2_obj) { + if (Z_OBJ_HT_P(op2)->get) { + op2 = op2_free = Z_OBJ_HT_P(op2)->get(op2 TSRMLS_CC); + } else if (!op1_obj && Z_OBJ_HT_P(op2)->cast_object) { + ALLOC_INIT_ZVAL(op2_free); + if (Z_OBJ_HT_P(op2)->cast_object(op2, op2_free, Z_TYPE_P(op1), 0 TSRMLS_CC) == FAILURE) { + ZVAL_BOOL(result, 0); + COMPARE_RETURN_AND_FREE(FAILURE); + } + op2 = op2_free; + } else { + op2_free = NULL; + } + } else { + op2_free = NULL; } - op2_orig = op2; if ((op1->type == IS_NULL && op2->type == IS_STRING) || (op2->type == IS_NULL && op1->type == IS_STRING)) { diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 87d755006..3ad2c5f15 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -1250,7 +1250,7 @@ zend_strtod _double rv, rv0; Long L; ULong y, z; - Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; + Bigint *bb, *bb1, *bd, *bd0, *bs, *delta, *tmp; double result; CONST char decimal_point = '.'; @@ -1776,5 +1776,21 @@ zend_strtod if (se) *se = (char *)s; result = sign ? -value(rv) : value(rv); + + for (i = 0; i <= Kmax; i++) { + Bigint **listp = &freelist[i]; + while ((tmp = *listp) != NULL) { + *listp = tmp->next; + free(tmp); + } + freelist[i] = NULL; + } + + while (p5s) { + tmp = p5s; + p5s = p5s->next; + free(tmp); + } + return result; } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index aba47b844..c0cc2cf16 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.59.2.22 2006/01/04 23:53:04 andi Exp $ */ +/* $Id: zend_vm_def.h,v 1.59.2.27 2006/03/15 11:12:45 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -1723,6 +1723,15 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, ANY, CONST|TMP|VAR|UNUSED|CV) if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { + if (OP2_TYPE != IS_UNUSED && + EG(This) && + Z_OBJ_HT_P(EG(This))->get_class_entry && + !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { + /* We are calling method of the other (incompatible) class, + but passing $this. This is done for compatibility with php-4. */ + zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name); + + } if ((EX(object) = EG(This))) { EX(object)->refcount++; } @@ -1784,9 +1793,17 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY) zend_bool should_change_scope; zend_op *ctor_opline; - if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { - zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); - ZEND_VM_NEXT_OPCODE(); /* Never reached */ + if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) { + if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { + zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); + ZEND_VM_NEXT_OPCODE(); /* Never reached */ + } + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { + zend_error(E_STRICT, "Function %s%s%s() is deprecated", + EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", + EX(function_state).function->common.scope ? "::" : "", + EX(function_state).function->common.function_name); + }; } zend_ptr_stack_2_push(&EG(argument_stack), (void *) opline->extended_value, NULL); @@ -2983,7 +3000,9 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY) } array_ptr = *array_ptr_ptr; } else { - SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) { + SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + } array_ptr = *array_ptr_ptr; array_ptr->refcount++; } @@ -3086,7 +3105,7 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY) HashTable *fe_ht; zend_object_iterator *iter = NULL; int key_type; - zend_bool use_key = opline->extended_value & ZEND_FE_FETCH_WITH_KEY; + zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY); PZVAL_LOCK(array); @@ -3404,8 +3423,8 @@ ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|C ZEND_VM_HANDLER(79, ZEND_EXIT, CONST|TMP|VAR|UNUSED|CV, ANY) { + zend_op *opline = EX(opline); if (OP1_TYPE != IS_UNUSED) { - zend_op *opline = EX(opline); zend_free_op free_op1; zval *ptr = GET_OP1_ZVAL_PTR(BP_VAR_R); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index ef58b0d49..a9a3c5c2f 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -132,9 +132,17 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS) zend_bool should_change_scope; zend_op *ctor_opline; - if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { - zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); - ZEND_VM_NEXT_OPCODE(); /* Never reached */ + if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) { + if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { + zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); + ZEND_VM_NEXT_OPCODE(); /* Never reached */ + } + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { + zend_error(E_STRICT, "Function %s%s%s() is deprecated", + EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", + EX(function_state).function->common.scope ? "::" : "", + EX(function_state).function->common.function_name); + }; } zend_ptr_stack_2_push(&EG(argument_stack), (void *) opline->extended_value, NULL); @@ -670,6 +678,15 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { + if (IS_CONST != IS_UNUSED && + EG(This) && + Z_OBJ_HT_P(EG(This))->get_class_entry && + !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { + /* We are calling method of the other (incompatible) class, + but passing $this. This is done for compatibility with php-4. */ + zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name); + + } if ((EX(object) = EG(This))) { EX(object)->refcount++; } @@ -862,6 +879,15 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { + if (IS_TMP_VAR != IS_UNUSED && + EG(This) && + Z_OBJ_HT_P(EG(This))->get_class_entry && + !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { + /* We are calling method of the other (incompatible) class, + but passing $this. This is done for compatibility with php-4. */ + zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name); + + } if ((EX(object) = EG(This))) { EX(object)->refcount++; } @@ -1011,6 +1037,15 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { + if (IS_VAR != IS_UNUSED && + EG(This) && + Z_OBJ_HT_P(EG(This))->get_class_entry && + !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { + /* We are calling method of the other (incompatible) class, + but passing $this. This is done for compatibility with php-4. */ + zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name); + + } if ((EX(object) = EG(This))) { EX(object)->refcount++; } @@ -1159,6 +1194,15 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { + if (IS_UNUSED != IS_UNUSED && + EG(This) && + Z_OBJ_HT_P(EG(This))->get_class_entry && + !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { + /* We are calling method of the other (incompatible) class, + but passing $this. This is done for compatibility with php-4. */ + zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name); + + } if ((EX(object) = EG(This))) { EX(object)->refcount++; } @@ -1240,6 +1284,15 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { + if (IS_CV != IS_UNUSED && + EG(This) && + Z_OBJ_HT_P(EG(This))->get_class_entry && + !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { + /* We are calling method of the other (incompatible) class, + but passing $this. This is done for compatibility with php-4. */ + zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name); + + } if ((EX(object) = EG(This))) { EX(object)->refcount++; } @@ -2030,7 +2083,9 @@ static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } array_ptr = *array_ptr_ptr; } else { - SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) { + SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + } array_ptr = *array_ptr_ptr; array_ptr->refcount++; } @@ -2177,8 +2232,8 @@ static int ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { + zend_op *opline = EX(opline); if (IS_CONST != IS_UNUSED) { - zend_op *opline = EX(opline); zval *ptr = &opline->op1.u.constant; @@ -4446,7 +4501,9 @@ static int ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } array_ptr = *array_ptr_ptr; } else { - SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) { + SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + } array_ptr = *array_ptr_ptr; array_ptr->refcount++; } @@ -4594,8 +4651,8 @@ static int ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_EXIT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { + zend_op *opline = EX(opline); if (IS_TMP_VAR != IS_UNUSED) { - zend_op *opline = EX(opline); zend_free_op free_op1; zval *ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); @@ -7444,7 +7501,9 @@ static int ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } array_ptr = *array_ptr_ptr; } else { - SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) { + SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + } array_ptr = *array_ptr_ptr; array_ptr->refcount++; } @@ -7547,7 +7606,7 @@ static int ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) HashTable *fe_ht; zend_object_iterator *iter = NULL; int key_type; - zend_bool use_key = opline->extended_value & ZEND_FE_FETCH_WITH_KEY; + zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY); PZVAL_LOCK(array); @@ -7730,8 +7789,8 @@ static int ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_EXIT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { + zend_op *opline = EX(opline); if (IS_VAR != IS_UNUSED) { - zend_op *opline = EX(opline); zend_free_op free_op1; zval *ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); @@ -14017,8 +14076,8 @@ static int ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_EXIT_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { + zend_op *opline = EX(opline); if (IS_UNUSED != IS_UNUSED) { - zend_op *opline = EX(opline); zval *ptr = NULL; @@ -19539,7 +19598,9 @@ static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } array_ptr = *array_ptr_ptr; } else { - SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) { + SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); + } array_ptr = *array_ptr_ptr; array_ptr->refcount++; } @@ -19686,8 +19747,8 @@ static int ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { + zend_op *opline = EX(opline); if (IS_CV != IS_UNUSED) { - zend_op *opline = EX(opline); zval *ptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 04f544001..c717ad385 100644 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -16,7 +16,7 @@ | Authors: Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ - $Id: zend_vm_gen.php,v 1.12.2.4 2006/01/04 23:53:05 andi Exp $ + $Id: zend_vm_gen.php,v 1.12.2.5 2006/03/15 08:06:28 dmitry Exp $ */ $header_text = <<< DATA @@ -1200,13 +1200,13 @@ function gen_vm($def, $skel) { if ($kind == "handler") { $op = $opcodes[$opnames[$name]]; if (isset($op['op1']["ANY"]) && isset($op['op2']["ANY"])) { - out($f, "{\n\treturn ".$name."_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n}\n\n"); + out($f, "{\n\treturn ".$name.(ZEND_VM_SPEC?"_SPEC":"")."_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n}\n\n"); $done = 1; } } else if ($helpers[$name]["param"] == null) { $h = $helpers[$name]; if (isset($h['op1']["ANY"]) && isset($h['op2']["ANY"])) { - out($f, "{\n\treturn ".$name."_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n}\n\n"); + out($f, "{\n\treturn ".$name.(ZEND_VM_SPEC?"_SPEC":"")."(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n}\n\n"); $done = 1; } } |
