glcpp: Recognize plain "//" as a comment.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 21 Jun 2010 22:11:01 +0000 (15:11 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 23 Jun 2010 21:14:57 +0000 (14:14 -0700)
Found in glsl-orangebook-ch06-bump.(frag|vert).  This was resulting in
the comments getting passed through to the main compiler's lexer.

glcpp/glcpp-lex.l

index 0dea995..fabe756 100644 (file)
@@ -60,7 +60,7 @@ HEXADECIMAL_INTEGER   0[xX][0-9a-fA-F]+[uU]?
 %%
 
        /* Single-line comments */
-"//"[^\n]+\n {
+"//"[^\n]*\n {
        yylineno++;
        yycolumn = 0;
        return NEWLINE;