projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04ba86a
)
glcpp: Pass #version, #extension, and #pragma directives through unchanged.
author
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 16 Jun 2010 19:21:17 +0000
(12:21 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Mon, 21 Jun 2010 18:31:55 +0000
(11:31 -0700)
Let the main compiler's lexer/parser handle them.
glcpp/glcpp-lex.l
patch
|
blob
|
history
diff --git
a/glcpp/glcpp-lex.l
b/glcpp/glcpp-lex.l
index f736ac4d59d5efe47fa260ed42231d791166e2db..c28f2f6269eea9ceba3c4b409cdfe83643166b46 100644
(file)
--- a/
glcpp/glcpp-lex.l
+++ b/
glcpp/glcpp-lex.l
@@
-61,6
+61,13
@@
NON_STARS_THEN_STARS [^*]*[*]+
return SPACE;
}
+ /* 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 {
+ yylval.str = xtalloc_strdup (yyextra, yytext);
+ return OTHER;
+}
+
{HASH}if/.*\n {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;