From e6ae7afc0cf41922fdbdd45b7a433cc450424c87 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 21 Jun 2010 15:11:01 -0700 Subject: [PATCH] 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. --- glcpp/glcpp-lex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glcpp/glcpp-lex.l b/glcpp/glcpp-lex.l index 0dea995..fabe756 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; -- 2.7.4