# # Copyright (C) 1995-2007 Christian A. Weber, Christian Schneider, # Urban Mueller, Bernhard A. M. Seefeld. # # This file is part of the "UltraWeb 3000" Server Architecture. # UltraWeb 3000 is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # UltraWeb 3000 is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # Index: Zend/zend_compile.h =================================================================== RCS file: /repository/Zend/Attic/zend_compile.h,v retrieving revision 1.144.4.5 diff -u -r1.144.4.5 zend_compile.h --- Zend/zend_compile.h 31 May 2003 01:37:43 -0000 1.144.4.5 +++ Zend/zend_compile.h 23 Dec 2003 18:48:15 -0000 @@ -56,6 +56,7 @@ zend_uint type; } EA; } u; + struct _znode *named_parameter; } znode; Index: Zend/zend_language_parser.y =================================================================== RCS file: /repository/Zend/Attic/zend_language_parser.y,v retrieving revision 1.23 diff -u -r1.23 zend_language_parser.y --- Zend/zend_language_parser.y 4 Aug 2002 06:39:44 -0000 1.23 +++ Zend/zend_language_parser.y 23 Dec 2003 18:48:15 -0000 @@ -336,18 +336,20 @@ function_call_parameter_list: - non_empty_function_call_parameter_list { $$ = $1; } + non_empty_function_call_parameter_list possible_comma { $$ = $1; if ($$.named_parameter) { zend_do_pass_param($$.named_parameter, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); efree($$.named_parameter); $$.named_parameter = NULL; } } | /* empty */ { $$.u.constant.value.lval = 0; } ; non_empty_function_call_parameter_list: - expr_without_variable { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); } - | cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval TSRMLS_CC); } - | '&' w_cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval TSRMLS_CC); } - | non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); } - | non_empty_function_call_parameter_list ',' cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval TSRMLS_CC); } - | non_empty_function_call_parameter_list ',' '&' w_cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval TSRMLS_CC); } + expr_without_variable { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); $$.named_parameter = NULL; } + | cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval TSRMLS_CC); $$.named_parameter = NULL; } + | '&' w_cvar { $$.u.constant.value.lval = 1; zend_do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval TSRMLS_CC); $$.named_parameter = NULL; } + | expr T_DOUBLE_ARROW expr { $$.u.constant.value.lval = 1; $$.named_parameter = emalloc(sizeof(znode)); zend_do_init_array($$.named_parameter, &$3, &$1, 0 TSRMLS_CC); } + | non_empty_function_call_parameter_list ',' expr_without_variable { if ($$.named_parameter) { zend_do_pass_param($$.named_parameter, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); efree($$.named_parameter); $$.named_parameter = NULL; } $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); } + | non_empty_function_call_parameter_list ',' cvar { if ($$.named_parameter) { zend_do_pass_param($$.named_parameter, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); efree($$.named_parameter); $$.named_parameter = NULL; } $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval TSRMLS_CC); } + | non_empty_function_call_parameter_list ',' '&' w_cvar { if ($$.named_parameter) { zend_do_pass_param($$.named_parameter, ZEND_SEND_VAL, $$.u.constant.value.lval TSRMLS_CC); efree($$.named_parameter); $$.named_parameter = NULL; } $$.u.constant.value.lval=$1.u.constant.value.lval+1; zend_do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval TSRMLS_CC); } + | non_empty_function_call_parameter_list ',' expr T_DOUBLE_ARROW expr { if ($$.named_parameter) { zend_do_add_array_element($$.named_parameter, &$5, &$3, 0 TSRMLS_CC); } else { $$.named_parameter = emalloc(sizeof(znode)); zend_do_init_array($$.named_parameter, &$5, &$3, 0 TSRMLS_CC); $$.u.constant.value.lval=$1.u.constant.value.lval+1; } } ; global_var_list: