"Joel E. Denny" <[EMAIL PROTECTED]> writes:
> On Wed, 13 Sep 2006, Paul Eggert wrote:
>
>> The
>> old way is messy and complicated, but at least it's standardized and
>> has well-known properties.
>
> Do these well-known properties include the way Bison puts %{...%}
> sometimes in the header?
No, sorry, I was referring only to the yacc method.
> Any code related to the semantic type or to the location type goes in
> %stype-code {...} or %ltype-code {...}, respectively. This includes
> dependencies, #define YYSTYPE, and #define YYLTYPE. Any other code for
> the header goes in %header {...}. Any other code for the code file goes
> in %code {...}.
That's simpler, thanks. But why bother to distinguish %stype-code
from %ltype-code? Can't we simplify things even further by having
%type-code { ... } that carries both sets of code?
Come to think of it, why bother to distinguish %type-code from
%header? Wouldn't %header suffice?