[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dubious features

From: Paul Eggert
Subject: Re: Dubious features
Date: Wed, 07 Jun 2006 11:08:14 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Akim Demaille <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]