Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38056 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37102 invoked from network); 1 Jun 2008 16:34:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2008 16:34:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle@zesix.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kalle@zesix.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zesix.com from 67.19.4.138 cause and error) X-PHP-List-Original-Sender: kalle@zesix.com X-Host-Fingerprint: 67.19.4.138 8a.4.1343.static.theplanet.com Received: from [67.19.4.138] ([67.19.4.138:54619] helo=web.clantemplates.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/30-35077-B7FC2484 for ; Sun, 01 Jun 2008 12:34:04 -0400 Received: from [81.216.205.138] (helo=KALLESAWESOMEPC) by web.clantemplates.com with esmtpa (Exim 4.63) (envelope-from ) id 1K2qVH-0005Vo-8Y; Sun, 01 Jun 2008 09:33:33 -0700 Message-ID: <94255589129046538F63FB153F92F6BF@KALLESAWESOMEPC> To: "Stanislav Malyshev" , "'PHP Internals'" References: <4842C9AF.6040803@zend.com> In-Reply-To: <4842C9AF.6040803@zend.com> Date: Sun, 1 Jun 2008 18:33:54 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - web.clantemplates.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - zesix.com Subject: Re: [PHP-DEV] multiple use From: kalle@zesix.com ("Kalle Sommer Nielsen") Hi Looks pretty good to me, I would prefer to have that insted of multiple use statements after each other like you can do with the global keyword. "+1" from me Kalle ----- Original Message ----- From: "Stanislav Malyshev" To: "'PHP Internals'" Sent: Sunday, June 01, 2008 6:09 PM Subject: [PHP-DEV] multiple use > Hi! > > Attached is the patch that implements multiple elements in use > statement, like this: > > use foo::bar as baz, foo::baz as bazbaz; > > Any objections to it? > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > -------------------------------------------------------------------------------- > Index: zend_language_parser.y > =================================================================== > RCS file: /repository/ZendEngine2/zend_language_parser.y,v > retrieving revision 1.160.2.4.2.8.2.20 > diff -u -r1.160.2.4.2.8.2.20 zend_language_parser.y > --- zend_language_parser.y 7 May 2008 12:04:37 -0000 1.160.2.4.2.8.2.20 > +++ zend_language_parser.y 28 May 2008 19:12:45 -0000 > @@ -172,13 +172,21 @@ > | class_declaration_statement { zend_do_early_binding(TSRMLS_C); } > | T_HALT_COMPILER '(' ')' ';' { zend_do_halt_compiler_register(TSRMLS_C); > YYACCEPT; } > | T_NAMESPACE namespace_name ';' { zend_do_namespace(&$2 TSRMLS_CC); } > - | T_USE namespace_name ';' { zend_do_use(&$2, NULL, 0 TSRMLS_CC); } > - | T_USE namespace_name T_AS T_STRING ';' { zend_do_use(&$2, &$4, 0 > TSRMLS_CC); } > - | T_USE T_PAAMAYIM_NEKUDOTAYIM T_STRING ';' { zend_do_use(&$3, NULL, 1 > TSRMLS_CC); } > - | T_USE T_PAAMAYIM_NEKUDOTAYIM T_STRING T_AS T_STRING ';' { > zend_do_use(&$3, &$5, 1 TSRMLS_CC); } > + | T_USE use_declarations ';' > | constant_declaration ';' > ; > > +use_declarations: > + use_declarations ',' use_declaration > + | use_declaration > + > +use_declaration: > + namespace_name { zend_do_use(&$1, NULL, 0 TSRMLS_CC); } > + | namespace_name T_AS T_STRING { zend_do_use(&$1, &$3, 0 TSRMLS_CC); } > + | T_PAAMAYIM_NEKUDOTAYIM T_STRING { zend_do_use(&$2, NULL, 1 > TSRMLS_CC); } > + | T_PAAMAYIM_NEKUDOTAYIM T_STRING T_AS T_STRING { zend_do_use(&$2, &$4, > 1 TSRMLS_CC); } > + > + > constant_declaration: > constant_declaration ',' T_STRING '=' static_scalar { > zend_do_declare_constant(&$3, &$5 TSRMLS_CC); } > | T_CONST T_STRING '=' static_scalar { zend_do_declare_constant(&$2, &$4 > TSRMLS_CC); } > > -------------------------------------------------------------------------------- > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php