mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
Fix lexing of "defined" as an operator, not an identifier.
Simply need to move the rule for IDENTIFIER to be after "defined" and everything is happy. With this change, tests 50 through 53 all pass now.
This commit is contained in:
parent
f6914fd37b
commit
16c1e980e2
2 changed files with 5 additions and 7 deletions
11
glcpp-lex.l
11
glcpp-lex.l
|
|
@ -102,12 +102,6 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
|
|||
return INTEGER;
|
||||
}
|
||||
|
||||
|
||||
{IDENTIFIER} {
|
||||
yylval.str = xtalloc_strdup (yyextra, yytext);
|
||||
return IDENTIFIER;
|
||||
}
|
||||
|
||||
"<<" {
|
||||
return LEFT_SHIFT;
|
||||
}
|
||||
|
|
@ -148,6 +142,11 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
|
|||
return DEFINED;
|
||||
}
|
||||
|
||||
{IDENTIFIER} {
|
||||
yylval.str = xtalloc_strdup (yyextra, yytext);
|
||||
return IDENTIFIER;
|
||||
}
|
||||
|
||||
{PUNCTUATION} {
|
||||
return yytext[0];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,4 +13,3 @@ failure_3
|
|||
#else
|
||||
success_3
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue