> On 29 Jun 2017, at 15:55, Piotr Marcińczyk <piomar...@gmail.com> wrote: > > I supposedly found a bug in lalr1.cc skeleton with variant semantic type.
You might check if std::variant, of C++17, can be used instead. Cf. http://en.cppreference.com/w/cpp/utility/variant > When using mid-rule action { $<type>$ = value; } to return a value that > will be used in further semantic actions, it appears that the value on > stack becomes zero. Tested with Bison version 3.0.4. This happens also if moved out to a separate rule, perhaps overwritten by the token semantic value. So it does not look safe for use.