logo       

Re: cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l: msg#00061

Subject: Re: cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l
Hi Andrei,

Ah, I was going to ask about this soon :-) since I submitted a patch last
month to compliment the backported (binary) cast.  Couple things I noticed:

What about the 'b' prefix for T_CONSTANT_ENCAPSED_STRING?  Otherwise places
that require that type and work in 6 would fail with a parse error, wouldn't
they?  Also, 'b'-prefixed heredocs will fail since they don't account for
the extra char.

Here's my patch, BTW: http://news.php.net/php.internals/26562


Matt


----- Original Message -----
From: "Andrei Zmievski"
Sent: Tuesday, December 19, 2006

> andrei Tue Dec 19 17:26:17 2006 UTC
>
>   Modified files:              (Branch: PHP_5_2)
>     /ZendEngine2 zend_language_scanner.l
>   Log:
>   Support 'b' prefix in front of string literals for forward compatibility
>   with PHP 6.
>
>
>
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_scanner.l?r1=1.131.2.11.2.2&r2=1.131.2.11.2.3&diff_format=u
> Index: ZendEngine2/zend_language_scanner.l
> diff -u ZendEngine2/zend_language_scanner.l:1.131.2.11.2.2
ZendEngine2/zend_language_scanner.l:1.131.2.11.2.3
> --- ZendEngine2/zend_language_scanner.l:1.131.2.11.2.2 Thu Nov 23 22:04:54
2006
> +++ ZendEngine2/zend_language_scanner.l Tue Dec 19 17:26:17 2006
> @@ -19,7 +19,7 @@
>
+----------------------------------------------------------------------+
>  */
>
> -/* $Id: zend_language_scanner.l,v 1.131.2.11.2.2 2006/11/23 22:04:54
tony2001 Exp $ */
> +/* $Id: zend_language_scanner.l,v 1.131.2.11.2.3 2006/12/19 17:26:17
andrei Exp $ */
>
>  #define yyleng SCNG(yy_leng)
>  #define yytext SCNG(yy_text)
> @@ -1707,13 +1707,13 @@
>  }
>
>
> -<ST_IN_SCRIPTING>["] {
> +<ST_IN_SCRIPTING>b?["] {
>   BEGIN(ST_DOUBLE_QUOTES);
>   return '\"';
>  }
>
>
> -<ST_IN_SCRIPTING>"<<<"{TABS_AND_SPACES}{LABEL}{NEWLINE} {
> +<ST_IN_SCRIPTING>b?"<<<"{TABS_AND_SPACES}{LABEL}{NEWLINE} {
>   char *s;
>   CG(zend_lineno)++;
>   CG(heredoc_len) = yyleng-3-1-(yytext[yyleng-2]=='\r'?1:0);
> @@ -1734,7 +1734,7 @@
>  }
>
>
> -<ST_IN_SCRIPTING>['] {
> +<ST_IN_SCRIPTING>b?['] {
>   BEGIN(ST_SINGLE_QUOTE);
>   return '\'';
>  }
>

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe