From: Kenneth Graunke Date: Mon, 21 Jun 2010 22:11:01 +0000 (-0700) Subject: glcpp: Recognize plain "//" as a comment. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6ae7afc0cf41922fdbdd45b7a433cc450424c87;p=mesa.git glcpp: Recognize plain "//" as a comment. Found in glsl-orangebook-ch06-bump.(frag|vert). This was resulting in the comments getting passed through to the main compiler's lexer. --- diff --git a/glcpp/glcpp-lex.l b/glcpp/glcpp-lex.l index 0dea9950015..fabe7566030 100644 --- a/glcpp/glcpp-lex.l +++ b/glcpp/glcpp-lex.l @@ -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;