cvs: ZendEngine2(PHP_5_3) / zend_compile.c zend_language_scanner.c zend_language_scanner.l zend_language_scanner_defs.h
[email protected] ("Nuno Lopes")
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsnlopess1207855144@cvsserver> |
nlopess Thu Apr 10 19:19:04 2008 UTC
Modified files: (Branch: PHP_5_3)
/ZendEngine2 zend_compile.c zend_language_scanner.c
zend_language_scanner.l zend_language_scanner_defs.h
Log:
fix heredoc+nowdoc
#patch by Matt Wilmas
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.58&r2=1.647.2.27.2.41.2.59&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.58 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.59
--- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.58 Wed Apr 9 08:55:45 2008
+++ ZendEngine2/zend_compile.c Thu Apr 10 19:19:03 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.58 2008/04/09 08:55:45 dmitry Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.59 2008/04/10 19:19:03 nlopess Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -4680,8 +4680,6 @@
case T_END_NOWDOC:
efree(Z_STRVAL(zendlval->u.constant));
break;
- case EOF:
- return EOF;
}
INIT_PZVAL(&zendlval->u.constant);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_scanner.c?r1=1.1.2.9&r2=1.1.2.10&diff_format=u
Index: ZendEngine2/zend_language_scanner.c
diff -u ZendEngine2/zend_language_scanner.c:1.1.2.9 ZendEngine2/zend_language_scanner.c:1.1.2.10
--- ZendEngine2/zend_language_scanner.c:1.1.2.9 Wed Apr 9 22:01:20 2008
+++ ZendEngine2/zend_language_scanner.c Thu Apr 10 19:19:03 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5.dev on Wed Apr 9 22:52:47 2008 */
+/* Generated by re2c 0.13.5.dev on Thu Apr 10 20:01:41 2008 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.c,v 1.1.2.9 2008/04/09 22:01:20 nlopess Exp $ */
+/* $Id: zend_language_scanner.c,v 1.1.2.10 2008/04/10 19:19:03 nlopess Exp $ */
#if 0
# define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c)
@@ -2519,9 +2519,9 @@
/* Go back before last label char, to match in ST_END_HEREDOC state */
yyless(yyleng - 2);
- /* Subtract the label/newline length. yyleng must include newline
+ /* Subtract the remaining label length. yyleng must include newline
* before label, for zend_highlight/strip, tokenizer, etc. */
- yyleng -= CG(heredoc_len) + 1;
+ yyleng -= CG(heredoc_len) - 1;
CG(increment_lineno) = 1; /* For newline before label */
BEGIN(ST_END_HEREDOC);
@@ -8279,9 +8279,9 @@
/* Go back before last label char, to match in ST_END_NOWDOC state */
yyless(yyleng - 2);
- /* Subtract the label/newline length. yyleng must include newline
+ /* Subtract the remaining label length. yyleng must include newline
* before label, for zend_highlight/strip, tokenizer, etc. */
- yyleng -= CG(heredoc_len) + 1;
+ yyleng -= CG(heredoc_len) - 1;
CG(increment_lineno) = 1; /* For newline before label */
BEGIN(ST_END_NOWDOC);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_scanner.l?r1=1.131.2.11.2.13.2.14&r2=1.131.2.11.2.13.2.15&diff_format=u
Index: ZendEngine2/zend_language_scanner.l
diff -u ZendEngine2/zend_language_scanner.l:1.131.2.11.2.13.2.14 ZendEngine2/zend_language_scanner.l:1.131.2.11.2.13.2.15
--- ZendEngine2/zend_language_scanner.l:1.131.2.11.2.13.2.14 Wed Apr 9 22:01:20 2008
+++ ZendEngine2/zend_language_scanner.l Thu Apr 10 19:19:04 2008
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.l,v 1.131.2.11.2.13.2.14 2008/04/09 22:01:20 nlopess Exp $ */
+/* $Id: zend_language_scanner.l,v 1.131.2.11.2.13.2.15 2008/04/10 19:19:04 nlopess Exp $ */
#if 0
# define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c)
@@ -1733,9 +1733,9 @@
/* Go back before last label char, to match in ST_END_HEREDOC state */
yyless(yyleng - 2);
- /* Subtract the label/newline length. yyleng must include newline
+ /* Subtract the remaining label length. yyleng must include newline
* before label, for zend_highlight/strip, tokenizer, etc. */
- yyleng -= CG(heredoc_len) + 1;
+ yyleng -= CG(heredoc_len) - 1;
CG(increment_lineno) = 1; /* For newline before label */
BEGIN(ST_END_HEREDOC);
@@ -1885,9 +1885,9 @@
/* Go back before last label char, to match in ST_END_NOWDOC state */
yyless(yyleng - 2);
- /* Subtract the label/newline length. yyleng must include newline
+ /* Subtract the remaining label length. yyleng must include newline
* before label, for zend_highlight/strip, tokenizer, etc. */
- yyleng -= CG(heredoc_len) + 1;
+ yyleng -= CG(heredoc_len) - 1;
CG(increment_lineno) = 1; /* For newline before label */
BEGIN(ST_END_NOWDOC);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_scanner_defs.h?r1=1.1.2.7&r2=1.1.2.8&diff_format=u
Index: ZendEngine2/zend_language_scanner_defs.h
diff -u ZendEngine2/zend_language_scanner_defs.h:1.1.2.7 ZendEngine2/zend_language_scanner_defs.h:1.1.2.8
--- ZendEngine2/zend_language_scanner_defs.h:1.1.2.7 Wed Apr 9 22:01:20 2008
+++ ZendEngine2/zend_language_scanner_defs.h Thu Apr 10 19:19:04 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5.dev on Wed Apr 9 22:52:47 2008 */
+/* Generated by re2c 0.13.5.dev on Thu Apr 10 20:01:41 2008 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {