# # 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/ZendEngine2/zend_compile.h,v retrieving revision 1.265 diff -u -r1.265 zend_compile.h --- Zend/zend_compile.h 16 Dec 2003 11:44:19 -0000 1.265 +++ Zend/zend_compile.h 23 Dec 2003 18:35:15 -0000 @@ -67,6 +67,7 @@ zend_uint type; } EA; } u; + struct _znode *named_parameter; } znode; typedef struct _zend_execute_data zend_execute_data; Index: Zend/zend_language_parser.y =================================================================== RCS file: /repository/ZendEngine2/zend_language_parser.y,v retrieving revision 1.131 diff -u -r1.131 zend_language_parser.y --- Zend/zend_language_parser.y 19 Dec 2003 14:39:17 -0000 1.131 +++ Zend/zend_language_parser.y 23 Dec 2003 18:35:16 -0000 @@ -469,18 +469,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, Z_LVAL($$.u.constant) TSRMLS_CC); efree($$.named_parameter); $$.named_parameter = NULL; } } | /* empty */ { Z_LVAL($$.u.constant) = 0; } ; non_empty_function_call_parameter_list: - expr_without_variable { Z_LVAL($$.u.constant) = 1; zend_do_pass_param(&$1, ZEND_SEND_VAL, Z_LVAL($$.u.constant) TSRMLS_CC); } - | variable { Z_LVAL($$.u.constant) = 1; zend_do_pass_param(&$1, ZEND_SEND_VAR, Z_LVAL($$.u.constant) TSRMLS_CC); } - | '&' w_variable { Z_LVAL($$.u.constant) = 1; zend_do_pass_param(&$2, ZEND_SEND_REF, Z_LVAL($$.u.constant) TSRMLS_CC); } - | non_empty_function_call_parameter_list ',' expr_without_variable { Z_LVAL($$.u.constant)=Z_LVAL($1.u.constant)+1; zend_do_pass_param(&$3, ZEND_SEND_VAL, Z_LVAL($$.u.constant) TSRMLS_CC); } - | non_empty_function_call_parameter_list ',' variable { Z_LVAL($$.u.constant)=Z_LVAL($1.u.constant)+1; zend_do_pass_param(&$3, ZEND_SEND_VAR, Z_LVAL($$.u.constant) TSRMLS_CC); } - | non_empty_function_call_parameter_list ',' '&' w_variable { Z_LVAL($$.u.constant)=Z_LVAL($1.u.constant)+1; zend_do_pass_param(&$4, ZEND_SEND_REF, Z_LVAL($$.u.constant) TSRMLS_CC); } + expr_without_variable { Z_LVAL($$.u.constant) = 1; zend_do_pass_param(&$1, ZEND_SEND_VAL, Z_LVAL($$.u.constant) TSRMLS_CC); $$.named_parameter = NULL; } + | variable { Z_LVAL($$.u.constant) = 1; zend_do_pass_param(&$1, ZEND_SEND_VAR, Z_LVAL($$.u.constant) TSRMLS_CC); $$.named_parameter = NULL; } + | '&' w_variable { Z_LVAL($$.u.constant) = 1; zend_do_pass_param(&$2, ZEND_SEND_REF, Z_LVAL($$.u.constant) TSRMLS_CC); $$.named_parameter = NULL; } + | expr T_DOUBLE_ARROW expr { Z_LVAL($$.u.constant) = 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, Z_LVAL($$.u.constant) TSRMLS_CC); efree($$.named_parameter); $$.named_parameter = NULL; } Z_LVAL($$.u.constant)=Z_LVAL($1.u.constant)+1; zend_do_pass_param(&$3, ZEND_SEND_VAL, Z_LVAL($$.u.constant) TSRMLS_CC); } + | non_empty_function_call_parameter_list ',' variable { if ($$.named_parameter) { zend_do_pass_param($$.named_parameter, ZEND_SEND_VAL, Z_LVAL($$.u.constant) TSRMLS_CC); efree($$.named_parameter); $$.named_parameter = NULL; } Z_LVAL($$.u.constant)=Z_LVAL($1.u.constant)+1; zend_do_pass_param(&$3, ZEND_SEND_VAR, Z_LVAL($$.u.constant) TSRMLS_CC); } + | non_empty_function_call_parameter_list ',' '&' w_variable { if ($$.named_parameter) { zend_do_pass_param($$.named_parameter, ZEND_SEND_VAL, Z_LVAL($$.u.constant) TSRMLS_CC); efree($$.named_parameter); $$.named_parameter = NULL; } Z_LVAL($$.u.constant)=Z_LVAL($1.u.constant)+1; zend_do_pass_param(&$4, ZEND_SEND_REF, Z_LVAL($$.u.constant) 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); Z_LVAL($$.u.constant)=Z_LVAL($1.u.constant)+1; } } ; global_var_list: