bug-bison
[Top][All Lists]
Advanced

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

Possible bison enhancement or bug?


From: Arturo Josè Montes Sinning
Subject: Possible bison enhancement or bug?
Date: Wed, 13 Mar 2002 04:03:09 -0500
User-agent: Mozilla/5.0 (X11; U; Linux 2.4.4-4GB i686; en-US; m18) Gecko/20001107 Netscape6/6.0

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 */

reply via email to

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