cvs: ZendEngine2 / zend_language_scanner.l

"Nuno Lopes" <[email protected]>
Newsgroups gmane.comp.php.cvs.zend
Message-ID <cvsnlopess1215362384@cvsserver>
nlopess		Sun Jul  6 16:39:44 2008 UTC

  Modified files:              
    /ZendEngine2	zend_language_scanner.l 
  Log:
  MFB
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_scanner.l?r1=1.186&r2=1.187&diff_format=u
Index: ZendEngine2/zend_language_scanner.l
diff -u ZendEngine2/zend_language_scanner.l:1.186 ZendEngine2/zend_language_scanner.l:1.187
--- ZendEngine2/zend_language_scanner.l:1.186	Mon Jun  9 10:20:30 2008
+++ ZendEngine2/zend_language_scanner.l	Sun Jul  6 16:39:44 2008
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_language_scanner.l,v 1.186 2008/06/09 10:20:30 mattwil Exp $ */
+/* $Id: zend_language_scanner.l,v 1.187 2008/07/06 16:39:44 nlopess Exp $ */
 
 #if 0
 # define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c)
@@ -2159,12 +2159,15 @@
 		/* ignore first line when it's started with a # */
 		goto restart;
 	} else {
+		YYCURSOR = yytext+1;
 		goto inline_char_handler;
 	}
 }
 
 <INITIAL>{ANY_CHAR} {
 
+inline_char_handler:
+
 	while (1) {
 		YYCTYPE *ptr = memchr(YYCURSOR, '<', YYLIMIT - YYCURSOR);
 
@@ -2177,7 +2180,7 @@
 			YYCURSOR = ptr + 1;
 
 			/* if it can be an opening tag, stop */
-			if (ptr < YYLIMIT && (*YYCURSOR == '?' || *YYCURSOR == '%')) {
+			if (YYCURSOR < YYLIMIT && (*YYCURSOR == '?' || *YYCURSOR == '%')) {
 				--YYCURSOR;
 				yyleng = YYCURSOR - SCNG(yy_text);
 				break;
@@ -2185,8 +2188,6 @@
 		}
 	}
 
-inline_char_handler:
-
 	Z_STRVAL_P(zendlval) = (char *) estrndup(yytext, yyleng);
 	Z_STRLEN_P(zendlval) = yyleng;
 	Z_TYPE_P(zendlval) = IS_STRING;



-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.