> Le 21 nov. 2021 à 15:21, Jot Dot <jot...@shaw.ca> a écrit :
>
>>> "You need to compile with the /Zc:__cplusplus switch to see the updated
>>> value
>>> of the __cplusplus macro. We tried updating the macro by default and
>>> discovered
>>> that a lot of code doesn’t compile correctly when we change the value of
>>> __cplusplus"
>
>> No worries. Should I understand that now it works as expected?
>
> Ouch. Last night I dissected my code to introduce a major rewrite.
> For you, I went to a backup and checked. I get the following error only with
> glr2.cc :
>
> 1>D:\data\c\gen - Copy\runtime\scanner.h(35,55): error C2039:
> 'semantic_type': is not a member of 'gen::Parser'
Don't use semantic_type or YYSTYPE, just value_type.
> 1>D:\data\c\gen - Copy\runtime\parser.h(122): message : see declaration of
> 'gen::Parser'
> ... other irrelevant "Now I'm confused" errors
>
> In my scanner.h file I have:
> #undef YY_DECL
> #define YY_DECL int gen::Scanner::get_next_token(union
> gen::Parser::semantic_type& yylval, location& yylloc, Driver* pDriver)
>
> This worked for me with everything but glr2. (ie: glr.cc, lalr.cc)
The name semantic_value is deprecated: it is supported by old parsers, but new
ones use only value_type.
Cheers!