summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarkus Amsler <markus.amsler@oribi.org>2008-03-31 14:58:20 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-31 15:00:18 -0600
commit217f7f7e5d253550ca028b9696a4155d801733cb (patch)
tree16a2907ceacf94d5bcfa7efb2b7b06b55d1ed1fc /src
parent1e83d70b6d07c7d3c61ee0ddf0de9420c167175d (diff)
fix parsing bug involving comments at the end of ARB v/f programs
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/arbprogram.syn6
-rw-r--r--src/mesa/shader/arbprogram_syn.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/shader/arbprogram.syn b/src/mesa/shader/arbprogram.syn
index 2aa5551cf77..ccf047d4083 100644
--- a/src/mesa/shader/arbprogram.syn
+++ b/src/mesa/shader/arbprogram.syn
@@ -2605,14 +2605,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 3904870a09e..106fa5b009e 100644
--- a/src/mesa/shader/arbprogram_syn.h
+++ b/src/mesa/shader/arbprogram_syn.h
@@ -1223,11 +1223,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"