Thank you for the clarification. I see. I guess I am handicapped by having converted the parser code to /360 assembler language.
Others might have studied the skeleton code. Maybe a comment to the effect that one should forget having seen this assignment? On 28 January 2013 18:02, Akim Demaille <a...@lrde.epita.fr> wrote: > > Le 28 janv. 2013 à 17:11, John P. Hartmann <jphartm...@gmail.com> a écrit : > >> On 28 January 2013 16:43, John P. Hartmann <jphartm...@gmail.com> wrote: >>> But here is another one: >>> >>> | dotobyfors dotobyfor { listend($1, $2); } >>> >>> Gets "warning: unset value: $$". >>> >>> I'm relying on the default $$ = $1 here. >>> >>> Or is there something more subtle going on? Or (shudder) is the >>> default applied only when there is no explicit semantic code? (In >>> which case I have a lot of grammars to fix.) >> >> Adding $$ = $1 kept Bison quiet. >> >> Here is a variation that gets Unused value $1. >> >> assign : variable ASSIGN expression >> { >> $$->term.oper = op_assign; >> >> This is also fixed by stating the default action. >> >> Surely this is a bug (?). > > Actually, I prefer to leave this as is, instead of promoting > the fact that $$ = $1 is run beforehand. This is not true > for all the configurations (where the warning is right), > so I still prefer pushing the users towards explicitly > perform their $$ = $1 themselves. > > Besides, you are not supposed to know that $$ = $1 is always > run before. The documentation should only state that if > no action at all is provided, then this action defaults to > { $$ = $1; }. > _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison