If I knew in advance (that is, before the action associated
with a rule was executed) I could set some variable that
could be tested in the action to decide whether to handle
the common case or whether some kind of semantic ambiguity
resolution was needed.
Unfortunately the function associated with %merge is called
AFTER the actions are executed.
Looking at the generated parser it seems that simply swapping
around the call to yyresolveAction and yyuserMerge (in yyresolveValue)
would achieve what I want (ie, the call to the %merge function
to occur first).
Does anybody know why the decision was made to have the %merge
function called last? This choice seems to be very suboptimal.