>>> "Joel" == Joel E Denny <[EMAIL PROTECTED]> writes:
> I'm beginning to think the declaration is a bit ugly though. How
> about something like this instead:
> %destructor { free ($$); } %symbol-default
> %printer { fprintf (yyoutput, "%s", $$); } %symbol-default
> I think that's clearer than just an empty list.
I don't like the empty either, and I meant to introduce $empty-word or
$epsilon, or whatever for empty rhs too. Maybe we should use a single
token for all these uses?
Alternatively, we can introduce %default-printer {};.
> Unfortunately, it is yet another % declaration, but it may have
> other uses: see here where I called it %any instead:
> http://lists.gnu.org/archive/html/bison-patches/2006-08/msg00033.html
> What do you think?
How about taking this opportunity to treat differently symbols with a
value from those without?
%printer { cerr << @$ << ": " << $$; } %valued-symbols
%printer { cerr << @$; } %valueless-symbols
Or
%default-valued-printer { cerr << @$ << ": " << $$; }
%default-valueless-printer { cerr << @$; }