From: Matt Wilmas Date: Mon, 9 Jun 2008 10:20:30 +0000 (+0000) Subject: MFB: Fixed yyleng calculation after the yyless change X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1565 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c131019799eb44511b907d3fa7b35d1c0688b33;p=php MFB: Fixed yyleng calculation after the yyless change --- diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index 865a0d6d1f..e389849f92 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.6.dev on Fri Jun 6 18:30:48 2008 */ +/* Generated by re2c 0.13.5 on Mon Jun 09 05:05:01 2008 */ #line 1 "Zend/zend_language_scanner.l" /* +----------------------------------------------------------------------+ @@ -3310,9 +3310,9 @@ yy181: /* 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); @@ -9396,9 +9396,9 @@ yy967: /* 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); diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index e1c8f669ad..af38c9c848 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -2532,9 +2532,9 @@ inline_char_handler: /* 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); @@ -2722,9 +2722,9 @@ inline_char_handler: /* 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);