glcpp: Don't include newlines as part of #version-passthrough.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Jun 2010 22:41:00 +0000 (15:41 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 21 Jun 2010 19:31:04 +0000 (12:31 -0700)
Fixes glcpp/tests/064-version.c.

glcpp/glcpp-lex.l

index 3eb0fbc1d3e303275b603b59b16f9ac6ed1887fb..0dea99500157125a5b82a057966aa210ecbf2466 100644 (file)
@@ -80,7 +80,7 @@ HEXADECIMAL_INTEGER   0[xX][0-9a-fA-F]+[uU]?
 
        /* glcpp doesn't handle #extension, #version, or #pragma directives.
         * Simply pass them through to the main compiler's lexer/parser. */
-{HASH}(extension|version|pragma).*\n {
+{HASH}(extension|version|pragma)[^\n]+ {
        yylval->str = xtalloc_strdup (yyextra, yytext);
        yylineno++;
        yycolumn = 0;