From: Markus Amsler Date: Mon, 31 Mar 2008 20:58:11 +0000 (-0600) Subject: fix parsing bug involving comments at the end of ARB v/f programs X-Git-Tag: mesa-7.8~4139^2~390^2~2034 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9136747a2b232ae7023972e6611cb2c845a86886;p=platform%2Fupstream%2Fmesa.git fix parsing bug involving comments at the end of ARB v/f programs --- diff --git a/src/mesa/shader/arbprogram.syn b/src/mesa/shader/arbprogram.syn index 1746a87..ba17d63 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 5f3f7d6..e0c901e 100644 --- a/src/mesa/shader/arbprogram_syn.h +++ b/src/mesa/shader/arbprogram_syn.h @@ -1242,11 +1242,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"