summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2006-12-19 17:26:17 +0000
committerAndrei Zmievski <andrei@php.net>2006-12-19 17:26:17 +0000
commit16ea2ee6400990c4c21983d424eac6d77366d9c7 (patch)
tree7ae7299d345653631ecf1e6e75f34a422aafa2c9
parent078fda3d6ecf6fd03a36f0100881023ec855f21e (diff)
downloadphp-git-16ea2ee6400990c4c21983d424eac6d77366d9c7.tar.gz
Support 'b' prefix in front of string literals for forward compatibility
with PHP 6.
-rw-r--r--Zend/zend_language_scanner.l6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 2be628fdcc..8c78d9674e 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -1707,13 +1707,13 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
-<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 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
-<ST_IN_SCRIPTING>['] {
+<ST_IN_SCRIPTING>b?['] {
BEGIN(ST_SINGLE_QUOTE);
return '\'';
}