Re: glr2.cc compile errors under Windows
Jot Dot <[email protected]> Sun, 21 Nov 2021 12:01:49 -0700 (MST)
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <[email protected]> |
> Don't use semantic_type or YYSTYPE, just value_type.
>
> The name semantic_value is deprecated: it is supported by old parsers, but new
> ones use only value_type.
Ok. I replaced YYSTYPE with my parser's value_type.
I did a similar action for YYLTYPE (since that too is undefined).
Everything still compiles and works with glr.cc
With glr2.cc I get the following error:
1>D:\data\c\gen\Gen Parser\parser.cpp(987,42): warning C4003: not enough arguments for function-like macro invocation 'max'
1>D:\data\c\gen\Gen Parser\parser.cpp(987,42): error C2589: '(': illegal token on right side of '::'
And the generated code that causes this error is:
template<typename T>
const std::ptrdiff_t strong_index_alias<T>::INVALID_INDEX =
std::numeric_limits<std::ptrdiff_t>::max ();
I would imagine this is new to glr2 since I can't find it in glr generated code.
PS: I'm not in a rush for this. I wouldn't want this issue to keep you from more pressing matters.
Thanks