diff options
author | Ondřej Surý <ondrej@sury.org> | 2010-10-21 08:52:46 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2010-10-21 08:52:46 +0200 |
commit | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (patch) | |
tree | 6460876d356113fa7053df36f2aa00baa7db24a9 /Zend/zend_ini_parser.y | |
parent | 855a09f4eded707941180c9d90acd17c25e29447 (diff) | |
download | php-01fcdff3849c3691d9aaeaab735846ab6d8895ca.tar.gz |
Imported Upstream version 5.3.3upstream/5.3.3
Diffstat (limited to 'Zend/zend_ini_parser.y')
-rw-r--r-- | Zend/zend_ini_parser.y | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index e4755fb0f..672947f08 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_parser.y 293154 2010-01-05 20:40:23Z sebastian $ */ +/* $Id: zend_ini_parser.y 300737 2010-06-24 22:32:42Z felipe $ */ #define DEBUG_CFG_PARSER 0 @@ -304,7 +304,7 @@ statement: ; section_string_or_value: - var_string_list { $$ = $1; } + var_string_list_section { $$ = $1; } | /* empty */ { zend_ini_init_string(&$$); } ; @@ -326,6 +326,15 @@ encapsed_list: | /* empty */ { zend_ini_init_string(&$$); } ; +var_string_list_section: + cfg_var_ref { $$ = $1; } + | constant_literal { $$ = $1; } + | '"' encapsed_list '"' { $$ = $2; } + | var_string_list_section cfg_var_ref { zend_ini_add_string(&$$, &$1, &$2); free(Z_STRVAL($2)); } + | var_string_list_section constant_literal { zend_ini_add_string(&$$, &$1, &$2); free(Z_STRVAL($2)); } + | var_string_list_section '"' encapsed_list '"' { zend_ini_add_string(&$$, &$1, &$3); free(Z_STRVAL($3)); } +; + var_string_list: cfg_var_ref { $$ = $1; } | constant_string { $$ = $1; } @@ -348,6 +357,14 @@ cfg_var_ref: TC_DOLLAR_CURLY TC_VARNAME '}' { zend_ini_get_var(&$$, &$2 TSRMLS_CC); free(Z_STRVAL($2)); } ; +constant_literal: + TC_CONSTANT { $$ = $1; } + | TC_RAW { $$ = $1; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ } + | TC_NUMBER { $$ = $1; /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ } + | TC_STRING { $$ = $1; /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ } + | TC_WHITESPACE { $$ = $1; /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ } +; + constant_string: TC_CONSTANT { zend_ini_get_constant(&$$, &$1 TSRMLS_CC); } | TC_RAW { $$ = $1; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ } |