Hi Eduardo, > Le 30 mai 2015 à 02:02, Eduardo Madrid <emad...@crabel.com> a écrit : > > On Bison's manual: > > http://www.gnu.org/software/bison/manual/html_node/Actions.html > > > It states that > > ?If you don't specify an action for a rule, Bison supplies a default: $$ = $1
The bug is in the documentation: this default rule is not applied when you are using variants. That's a feature. Actually, it should not be called "default rule", it is in reality a "pre-action" which is always performed before the user's action. In the case of C, where basically you're just toying with pointers, it makes quite equivalent to actually being a default rule. In the case of C++ objects with constructors etc. it's not quite the same business. There is however still a pre-action: $$ is default-constructed.