[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bison enhancement or bug?
From: |
Akim Demaille |
Subject: |
Re: Possible bison enhancement or bug? |
Date: |
13 Mar 2002 09:44:24 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
| Dears bison mantainers
| Working with bison to generate C++ parser, I define the following base
| class:
|
|
| class BisonParser
| {
| public:
| virtual int parse() = 0;
| };
|
|
| My derived parser:
|
| class MyParser : public BisonParser
| {
| public:
| virtual int parse();
| };
|
| MyParser.h
|
| #define yyparse MyParser::parse
| More definitions follow
|
| When I compile it with GNU GCC, get the next error:
|
| int MyParser::parse();
|
| definition outside of class not allowed.
|
| This due to bison.simple prototype definition yyparse. In the attached
| file, I am sending patch to fix this.
|
|
| A last comment: Should I put a test more, for example if __cplusplus
| compiling?
|
|
| Arturo
| 362a363
| > # ifndef yyparse
| 367a369
| > #endif /* yyparse */
Err... Please, use diff -u, or diff -c if the former is not
supported. This diff is completely unreadable.
Anyway, would you be interested in trying the current CVS Bison, which
does output C++ parsers?