fix parsing bug involving comments at the end of ARB v/f programs
authorMarkus Amsler <markus.amsler@oribi.org>
Mon, 31 Mar 2008 20:58:28 +0000 (14:58 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 31 Mar 2008 20:58:48 +0000 (14:58 -0600)
src/mesa/shader/arbprogram.syn
src/mesa/shader/arbprogram_syn.h

index f3aa1ad7249d87b8c2838d5061cd8bb14fc765b8..b12c6a0eda532c22d1faaae28b3a100319ca1672 100644 (file)
@@ -2643,14 +2643,14 @@ white_char
     ' ' .or '\t' .or '\n' .or '\r';
 
 comment_block
-    '#' .and .loop comment_char .and new_line;
+    '#' .and .loop comment_char .and optional_new_line;
 
 /* All ASCII characters except '\r', '\n' and '\0' */
 comment_char
     '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
 
-new_line
-    '\n' .or crlf .or '\0';
+optional_new_line
+    '\n' .or crlf .or .true;
 
 crlf
     '\r' .and '\n';
index 3f3ab073cf950deac55fdd8af0d8d57b7bf83bb5..d95a5dede4af48538c53771f53b054aef0f30c78 100644 (file)
 "white_char\n"
 " ' ' .or '\\t' .or '\\n' .or '\\r';\n"
 "comment_block\n"
-" '#' .and .loop comment_char .and new_line;\n"
+" '#' .and .loop comment_char .and optional_new_line;\n"
 "comment_char\n"
 " '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"new_line\n"
-" '\\n' .or crlf .or '\\0';\n"
+"optional_new_line\n"
+" '\\n' .or crlf .or .true;\n"
 "crlf\n"
 " '\\r' .and '\\n';\n"
 "semicolon\n"