From 85109bc5072391d3ef988f3ebaea66b6579b2b16 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Jul 2014 16:56:06 -0600 Subject: glsl/glcpp: rename ERROR to ERROR_TOKEN to fix MSVC build ERROR is a #define in the MSVC WinGDI.h header file. Add the _TOKEN suffix as we do for a few other lexer tokens. Reviewed-by: Kenneth Graunke --- src/glsl/glcpp/glcpp-lex.l | 2 +- src/glsl/glcpp/glcpp-parse.y | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/glsl/glcpp') diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 4b9ab23d07a..c126850d0c2 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -350,7 +350,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? error.* { BEGIN INITIAL; - RETURN_STRING_TOKEN (ERROR); + RETURN_STRING_TOKEN (ERROR_TOKEN); } /* After we see a "#define" we enter the start state diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index bc873cd99f0..4ee4110cb0c 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -171,11 +171,11 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value); /* We use HASH_TOKEN, DEFINE_TOKEN and VERSION_TOKEN (as opposed to * HASH, DEFINE, and VERSION) to avoid conflicts with other symbols, * (such as the and start conditions in the lexer). */ -%token COMMA_FINAL DEFINED ELIF_EXPANDED HASH_TOKEN DEFINE_TOKEN FUNC_IDENTIFIER OBJ_IDENTIFIER ELIF ELSE ENDIF ERROR IF IFDEF IFNDEF LINE PRAGMA UNDEF VERSION_TOKEN GARBAGE IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING LINE_EXPANDED NEWLINE OTHER PLACEHOLDER SPACE PLUS_PLUS MINUS_MINUS +%token COMMA_FINAL DEFINED ELIF_EXPANDED HASH_TOKEN DEFINE_TOKEN FUNC_IDENTIFIER OBJ_IDENTIFIER ELIF ELSE ENDIF ERROR_TOKEN IF IFDEF IFNDEF LINE PRAGMA UNDEF VERSION_TOKEN GARBAGE IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING LINE_EXPANDED NEWLINE OTHER PLACEHOLDER SPACE PLUS_PLUS MINUS_MINUS %token PASTE %type INTEGER operator SPACE integer_constant %type expression -%type IDENTIFIER FUNC_IDENTIFIER OBJ_IDENTIFIER INTEGER_STRING OTHER ERROR PRAGMA +%type IDENTIFIER FUNC_IDENTIFIER OBJ_IDENTIFIER INTEGER_STRING OTHER ERROR_TOKEN PRAGMA %type identifier_list %type preprocessing_token conditional_token %type pp_tokens replacement_list text_line conditional_tokens @@ -421,7 +421,7 @@ control_line_success: ; control_line_error: - HASH_TOKEN ERROR NEWLINE { + HASH_TOKEN ERROR_TOKEN NEWLINE { glcpp_error(& @1, parser, "#%s", $2); } | HASH_TOKEN GARBAGE pp_tokens NEWLINE { -- cgit v1.2.3