Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45096 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96318 invoked from network); 26 Jul 2009 09:30:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2009 09:30:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=gwynne@darkrainfall.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=gwynne@darkrainfall.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain darkrainfall.org from 208.97.132.207 cause and error) X-PHP-List-Original-Sender: gwynne@darkrainfall.org X-Host-Fingerprint: 208.97.132.207 caiajhbdccah.dreamhost.com Received: from [208.97.132.207] ([208.97.132.207:35574] helo=homiemail-a1.g.dreamhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/43-08024-F322C6A4 for ; Sun, 26 Jul 2009 05:30:40 -0400 Received: from Moonstar.home (pool-71-174-84-161.bstnma.fios.verizon.net [71.174.84.161]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by homiemail-a1.g.dreamhost.com (Postfix) with ESMTP id 5AE47119CD0; Sun, 26 Jul 2009 02:30:36 -0700 (PDT) Cc: PHP Developers Mailing List Message-ID: To: Rasmus Lerdorf In-Reply-To: <4A6C1F18.9040805@lerdorf.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Sun, 26 Jul 2009 05:30:35 -0400 References: <0DE5B38F-CBF8-4458-AC2E-CBBE1641CB45@darkrainfall.org> <4A6C1F18.9040805@lerdorf.com> X-Mailer: Apple Mail (2.935.3) Subject: Re: [PHP-DEV] Another tiny syntax patch From: gwynne@darkrainfall.org (Gwynne Raskind) On Jul 26, 2009, at 5:17 AM, Rasmus Lerdorf wrote: > We have talked about this before, and the conclusion was that if we > are > going to have an invalid PI, we might as well make it just as invalid as chars. I prefer strong namespacing of all my tags. " Gwynne Raskind wrote: >> For the sake of the heck of it, I'm gonna offer up this tiny patch >> I'm >> using in one of my projects. I don't really care if it gets >> included in >> anything or not, just thought it might interest someone. >> >> Effect: Adds a "> but >> works without the use of short_tags. >> Caveat: The formation "> section >> 2.6 of [1] defines a PITarget as a Name, which in turn is made up of >> NameChars (section 2.3), which do not include the "=" character. >> Advantage: Saves five characters of typing. "" versus >> "". >> >> Just thought I'd throw it out there. >> >> Index: Zend/zend_language_scanner.l >> =================================================================== >> --- Zend/zend_language_scanner.l (revision 286353) >> +++ Zend/zend_language_scanner.l (working copy) >> @@ -1537,6 +1588,15 @@ >> } >> >> >> +"> + zendlval->value.str.val = yytext; /* no copying - intentional */ >> + zendlval->value.str.len = yyleng; >> + zendlval->type = IS_STRING; >> + BEGIN(ST_IN_SCRIPTING); >> + return T_OPEN_TAG_WITH_ECHO; >> +} >> + >> + >> "> zendlval->value.str.val = yytext; /* no copying - intentional */ >> zendlval->value.str.len = yyleng; >> >> [1] Extensible Markup Language (XML) 1.0 Fifth Edition, >> http://www.w3.org/TR/2008/REC-xml-20081126/ -- Gwynne