glsl2: Initialize yylineno and yycolumn so line numbers are sane.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 7 Jul 2010 18:40:51 +0000 (11:40 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 7 Jul 2010 19:41:26 +0000 (12:41 -0700)
src/glsl/glcpp/glcpp-lex.l
src/glsl/glsl_lexer.lpp

index 6a91b09954a65b6963b2ea9fb4cc68916db0f186..53e85556c16f3a479b0375967d388a57fdeabdfb 100644 (file)
@@ -36,6 +36,7 @@
       yylloc->first_line = yylineno;                            \
       yycolumn += yyleng;                                       \
    } while(0);
+#define YY_USER_INIT yylineno = 0; yycolumn = 0;
 %}
 
 %option bison-bridge bison-locations reentrant noyywrap
index ddaa19db722106d109b39bd94654d11787f0db20..6c1000876e11823866427f654e06cbff3f9ea761 100644 (file)
@@ -34,6 +34,8 @@
       yycolumn += yyleng;                                      \
    } while(0);
 
+#define YY_USER_INIT yylineno = 0; yycolumn = 0;
+
 %}
 
 %option bison-bridge bison-locations reentrant noyywrap