portability: use CHAR_LITERAL instead of CHAR because MSVC defines CHAR

* src/parse-gram.y, src/scan-gram.l: here.
This commit is contained in:
Maarten De Braekeleer
2020-07-30 20:53:34 +02:00
committed by Akim Demaille
parent 8cf098415e
commit e73f086b0d
2 changed files with 5 additions and 5 deletions

View File

@@ -214,7 +214,7 @@
BRACED_CODE "{...}"
BRACED_PREDICATE "%?{...}"
BRACKETED_ID _("[identifier]")
CHAR _("character literal")
CHAR_LITERAL _("character literal")
COLON ":"
EPILOGUE _("epilogue")
EQUAL "="
@@ -232,7 +232,7 @@
%code pre-printer {tron (yyo);}
%code post-printer {troff (yyo);}
%type <unsigned char> CHAR
%type <unsigned char> CHAR_LITERAL
%printer { fputs (char_name ($$), yyo); } <unsigned char>
%type <char*> "{...}" "%?{...}" "%{...%}" EPILOGUE STRING TSTRING
@@ -765,7 +765,7 @@ value:
id:
ID
{ $$ = symbol_from_uniqstr ($1, @1); }
| CHAR
| CHAR_LITERAL
{
const char *var = "api.token.raw";
if (current_class == nterm_sym)

View File

@@ -615,9 +615,9 @@ eqopt ({sp}=)?
}
else
{
val->CHAR = last_string[0];
val->CHAR_LITERAL = last_string[0];
STRING_FREE ();
return CHAR;
return CHAR_LITERAL;
}
}
{eol} unexpected_newline (token_start, "'");