[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: beta testing
From: |
Hans Aberg |
Subject: |
Re: beta testing |
Date: |
Wed, 21 Feb 2001 21:09:53 +0100 |
At 14:48 +0100 2001/02/21, Philippe Bekaert wrote:
>> I don't really understand what you are doing: With my suggestion, no file
>> should include the .tab.h file, only the .tabb.h file does that; instead
>> include the .tabb.h file. Then the declaration the macros in the .tab.h
>> file will be read singly from any file that includes .tabb.h file, no
>> matter thow many times the latter is included.
>The wrapper you propose avoids multiple inclusion of the y.tab.h file,
>but the duplicate declaration of YYSTYPE is not the result of including
>the header file multiple times.
If you use the %union declaration, then the .tab.h contains the C-union
that the parser uses. So then you should not YYSTYPE but somehow make sure
that the .tab.h file is included somehow, _with_the_suitable_macro_wrappers_
#ifndef my_parser_header
#define my_parser_header
#include "foo.tab.h"
#endif /* my_parser_header */
Have you tried to preprocess the file, and check where it goes wrong? -- To
me it sounds as a regular debugging problem (how to put in the suitable
macro conditionals).
>Either someone requests bison to generate the y.tab.h file, then why not
>#include it in the y.tab.c file (properly wrapped to avoid double
>inclusion in case someone like me already includes it on top of
>parser.bison)
>Or someone does not request bison to generate y.tab.h, and in that case
>nothing should change.
My guess it that Bison has been made more advanced as time goes by, and
this is yet another quick fix.
Hans Aberg
- Re: beta testing, (continued)
Re: beta testing, Hans Aberg, 2001/02/20
- Re: beta testing, Philippe Bekaert, 2001/02/20
- Re: beta testing, Hans Aberg, 2001/02/21
- Re: beta testing, Philippe Bekaert, 2001/02/21
- Re: beta testing, Hans Aberg, 2001/02/21
- Re: beta testing, Magnus Fromreide, 2001/02/21
- Re: beta testing, Hans Aberg, 2001/02/21
- Message not available
- Re: beta testing, Hans Aberg, 2001/02/21
Re: beta testing, Hans Aberg, 2001/02/21
Re: beta testing, Philippe Bekaert, 2001/02/21