Akim Demaille <[EMAIL PROTECTED]> writes:

> I don't recall the exact details, but yes, at that time there was a
> difference.  It might well be that there was no typedef, but just a
> #define, I don't remember.

That reminds me of another Posix incompatibility that I'd like to fix.
Posix says that a grammar can use <tag> without %union, and then it's
the user's responsibility to define the type YYSTYPE.  Hence the
following grammar conforms to Posix:

   %{
   void yyerror (char const *);
   int yylex (void);
   typedef union { char const *val; } YYSTYPE;
   %}
   %type <val> program
   %token <val> '+'
   %%
   program: '+';

but Bison incorrectly generates a C file that doesn't compile, because
it redeclares YYSTYPE.  I have prepared most of a patch to fix this,
but I'll have to redo it now that the scanner has changed.


Reply via email to