[Top][All Lists]

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

Re: Bison 1.30f

From: Hans Aberg
Subject: Re: Bison 1.30f
Date: Sun, 16 Dec 2001 11:36:07 +0100

At 21:38 -0800 2001/12/15, Paul Eggert wrote:
>> >  It assumes that the values can be copied merely by
>> >copying their bits.  It uses memcpy in places.
>> Can you give examples of this (so I can think more about it)?
>Sure: just look for yymemcpy in bison.simple.

The the othe posts.

>> I figure POSIX says something the presence of a Yacc compatible program.
>Yes, that's it.

I think that you perhaps misread it, because first you said
>Also, strictly speaking it is required for POSIX conformance.
>POSIX 1003.1-2001 says:
>   Conforming applications shall not use names beginning in yy or YY
>   since the yacc parser uses such names. Many of the names appear in the
>   final output of yacc, and thus they should be chosen to conform with
>   any additional rules created by the C compiler to be used. In
>   particular they appear in #define statements.

and later you say:

>> As for the real C++ support, I think that names yyfoo should become
>> yy::foo, and YYFOO macro names should as far as possible be eliminated and
>> replaced by yy C++ names. For example, in C++, one might replace
>>   # define   help_key        258
>> by
>>   const int help_key = 258;
>> which would make use of fewer macros.
>For C, this would contradict the POSIX standard, which requires that
>the symbols be visible to the preprocessor.  It would also break some
>real code.

The first quote does not says that the names should be macros, but that
some of the yy names _might_be_ macros. Therefore conforming application
should not use them.

  Hans Aberg

reply via email to

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