From 8d86f8c566c4181c846a872a5a2f88718e635a72 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 26 Oct 2012 08:09:05 +0200 Subject: fontconfig pixman mesa git update 26 oct 2012 fontconfig: 038aa930ae2c3b7972eefe334917e7222fe478ec mesa: 8fb4b1dce156d02a0907925364d8945915c29bcf pixman: 4b91f6ca72db3e8cbd7e97e9ef44be2f8994040d --- mesalib/src/glsl/glcpp/glcpp-lex.l | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'mesalib/src/glsl/glcpp/glcpp-lex.l') diff --git a/mesalib/src/glsl/glcpp/glcpp-lex.l b/mesalib/src/glsl/glcpp/glcpp-lex.l index 7ab58cb28..783c54549 100644 --- a/mesalib/src/glsl/glcpp/glcpp-lex.l +++ b/mesalib/src/glsl/glcpp/glcpp-lex.l @@ -67,7 +67,7 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner); %option stack %option never-interactive -%x DONE COMMENT UNREACHABLE SKIP +%x DONE COMMENT UNREACHABLE SKIP DEFINE SPACE [[:space:]] NONSPACE [^[:space:]] @@ -184,14 +184,22 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? glcpp_error(yylloc, yyextra, "#error%s", p); } -{HASH}define{HSPACE}+/{IDENTIFIER}"(" { +{HASH}define{HSPACE}+ { yyextra->space_tokens = 0; - return HASH_DEFINE_FUNC; + yy_push_state(DEFINE, yyscanner); + return HASH_DEFINE; } -{HASH}define { - yyextra->space_tokens = 0; - return HASH_DEFINE_OBJ; +{IDENTIFIER}/"(" { + yy_pop_state(yyscanner); + yylval->str = ralloc_strdup (yyextra, yytext); + return FUNC_IDENTIFIER; +} + +{IDENTIFIER} { + yy_pop_state(yyscanner); + yylval->str = ralloc_strdup (yyextra, yytext); + return OBJ_IDENTIFIER; } {HASH}undef { -- cgit v1.2.3