Wow 2.4 uses shaders with an comment at the end. They failed, because \0 was searched twice in new_line and {frag|vert}_program_1_0.
---
 src/mesa/shader/arbprogram.syn   |    6 +++---
 src/mesa/shader/arbprogram_syn.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mesa/shader/arbprogram.syn b/src/mesa/shader/arbprogram.syn
index f3aa1ad..b12c6a0 100644
--- a/src/mesa/shader/arbprogram.syn
+++ b/src/mesa/shader/arbprogram.syn
@@ -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';
diff --git a/src/mesa/shader/arbprogram_syn.h b/src/mesa/shader/arbprogram_syn.h
index 3f3ab07..d95a5de 100644
--- a/src/mesa/shader/arbprogram_syn.h
+++ b/src/mesa/shader/arbprogram_syn.h
@@ -1244,11 +1244,11 @@
 "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"

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to