CVS update: php31/main

From: Date: Mon, 24 Aug 1998 19:12:53 +0000
Subject: CVS update: php31/main
Groups: php.dev 
Request: Send a blank email to php-dev+get-551@lists.php.net to get a copy of this message
Date: Monday August 24, 1998 @ 15:12 Author: zeev Update of /repository/php31/main In directory asf:/tmp/cvs-serv26663/main Modified Files: language-parser.y language-scanner.l Log Message: Minor change, beginning to play with the parser Index: php31/main/language-parser.y diff -c php31/main/language-parser.y:2.6 php31/main/language-parser.y:2.7 *** php31/main/language-parser.y:2.6 Fri Aug 21 12:41:05 1998 --- php31/main/language-parser.y Mon Aug 24 15:12:53 1998 *************** *** 31,37 **** */ ! /* $Id: language-parser.y,v 2.6 1998/08/21 16:41:05 shane Exp $ */ /* --- 31,37 ---- */ ! /* $Id: language-parser.y,v 2.7 1998/08/24 19:12:53 zeev Exp $ */ /* *************** *** 264,269 **** --- 264,270 ---- %token PHP_LINE %token PHP_FILE %token STRING_CONSTANT + %token DOLLAR_BRACE %% /* Rules */ *************** *** 704,715 **** | encaps_list '$' STRING '[' NUM_STRING ']' { add_regular_array_encapsed_variable(&$$,&$1,&$3,&$5 _INLINE_TLS); } | encaps_list '$' STRING '[' '$' STRING ']' { add_variable_array_encapsed_variable(&$$,&$1,&$3,&$6 _INLINE_TLS); } | encaps_list '$' STRING PHP_CLASS_OPERATOR STRING { add_encapsed_object_property(&$$,&$1,&$3,&$5 _INLINE_TLS); } ! | encaps_list '$' '{' STRING '}' { add_regular_encapsed_variable(&$$,&$1,&$4 _INLINE_TLS); } ! | encaps_list '$' '{' STRING '[' STRING ']' '}' { add_assoc_array_encapsed_variable(&$$,&$1,&$4,&$6 _INLINE_TLS); } ! | encaps_list '$' '{' STRING '[' NUM_STRING ']' '}' { add_regular_array_encapsed_variable(&$$,&$1,&$4,&$6 _INLINE_TLS); } ! | encaps_list '$' '{' STRING '[' '$' STRING ']' '}' { add_variable_array_encapsed_variable(&$$,&$1,&$4,&$7 _INLINE_TLS); } ! | encaps_list '$' '{' STRING PHP_CLASS_OPERATOR STRING '}' { add_encapsed_object_property(&$$,&$1,&$4,&$6 _INLINE_TLS); } ! | encaps_list '$' '{' '$' STRING '}' { add_indirect_encapsed_variable(&$$,&$1,&$5 _INLINE_TLS); } | encaps_list STRING { if (GLOBAL(Execute)) { concat_function(&$$,&$1,&$2,0 _INLINE_TLS); } } | encaps_list NUM_STRING { if (GLOBAL(Execute)) { concat_function(&$$,&$1,&$2,0 _INLINE_TLS); } } | encaps_list ENCAPSED_AND_WHITESPACE { if (GLOBAL(Execute)) { concat_function(&$$,&$1,&$2,0 _INLINE_TLS); } } --- 705,717 ---- | encaps_list '$' STRING '[' NUM_STRING ']' { add_regular_array_encapsed_variable(&$$,&$1,&$3,&$5 _INLINE_TLS); } | encaps_list '$' STRING '[' '$' STRING ']' { add_variable_array_encapsed_variable(&$$,&$1,&$3,&$6 _INLINE_TLS); } | encaps_list '$' STRING PHP_CLASS_OPERATOR STRING { add_encapsed_object_property(&$$,&$1,&$3,&$5 _INLINE_TLS); } ! | encaps_list DOLLAR_BRACE unambiguous_variable_name '}' ! /* | encaps_list DOLLAR_BRACE STRING '}' { add_regular_encapsed_variable(&$$,&$1,&$3 _INLINE_TLS); } ! | encaps_list DOLLAR_BRACE STRING '[' STRING ']' '}' { add_assoc_array_encapsed_variable(&$$,&$1,&$3,&$5 _INLINE_TLS); } ! | encaps_list DOLLAR_BRACE STRING '[' NUM_STRING ']' '}' { add_regular_array_encapsed_variable(&$$,&$1,&$3,&$5 _INLINE_TLS); } ! | encaps_list DOLLAR_BRACE STRING '[' '$' STRING ']' '}' { add_variable_array_encapsed_variable(&$$,&$1,&$3,&$6 _INLINE_TLS); } ! | encaps_list DOLLAR_BRACE STRING PHP_CLASS_OPERATOR STRING '}' { add_encapsed_object_property(&$$,&$1,&$3,&$5 _INLINE_TLS); } ! | encaps_list DOLLAR_BRACE '$' STRING '}' { add_indirect_encapsed_variable(&$$,&$1,&$4 _INLINE_TLS); }*/ | encaps_list STRING { if (GLOBAL(Execute)) { concat_function(&$$,&$1,&$2,0 _INLINE_TLS); } } | encaps_list NUM_STRING { if (GLOBAL(Execute)) { concat_function(&$$,&$1,&$2,0 _INLINE_TLS); } } | encaps_list ENCAPSED_AND_WHITESPACE { if (GLOBAL(Execute)) { concat_function(&$$,&$1,&$2,0 _INLINE_TLS); } } Index: php31/main/language-scanner.l diff -c php31/main/language-scanner.l:2.4 php31/main/language-scanner.l:2.5 *** php31/main/language-scanner.l:2.4 Thu Aug 20 23:48:56 1998 --- php31/main/language-scanner.l Mon Aug 24 15:12:53 1998 *************** *** 1032,1037 **** --- 1032,1041 ---- return CHARACTER; } + <DOUBLE_QUOTES,BACKQUOTE>"${" { + return DOLLAR_BRACE; + } + <DOUBLE_QUOTES,BACKQUOTE>{ENCAPSED_TOKENS} { phplval->value.chval = yytext[0]; return yytext[0]; -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#551) next »