]> granicus.if.org Git - php/commitdiff
MFB: Fixed yyleng calculation after the yyless change
authorMatt Wilmas <mattwil@php.net>
Mon, 9 Jun 2008 10:20:30 +0000 (10:20 +0000)
committerMatt Wilmas <mattwil@php.net>
Mon, 9 Jun 2008 10:20:30 +0000 (10:20 +0000)
Zend/zend_language_scanner.c
Zend/zend_language_scanner.l

index 865a0d6d1f69f3fec6073ff660429d016e0c9a34..e389849f92160d44bcbadb176a5847c10120cb9d 100644 (file)
@@ -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);
index e1c8f669adf6ba0cc0534b3b4d28bf94f62daca9..af38c9c8480f857e3a7e4366602fa3b6b19e6c61 100644 (file)
@@ -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);