473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

C++/Bison Question

Hi everyone,

I am trying to compile a bison tab.cc file in with a c++ program I am
writing. The program compiles fine without the parser attached but when I
compile with it, it comes up with lots of errors to do with typeinfo and
math.h for some reason. I have included the errors below - any help would
be most appreciated.

Thanks in advance

Tom

******** Top of Bison file **************
#include <string>
#include <list>
#include <map>
#include "objects.h"

using namespace std;
***************************************

******* Error output ********************

In file included from /usr/include/c++/3.2.2/ios:48,
from /usr/include/c++/3.2.2/ostream:45,
from /usr/include/c++/3.2.2/iostream:45,
from clengthspec.h:22,
from objects.h:12,
from problem.yy:5:
/usr/include/c++/3.2.2/bits/localefwd.h:239: declaration does not declare
anything
/usr/include/c++/3.2.2/bits/localefwd.h:239: parse error before numeric
constant
In file included from /usr/include/c++/3.2.2/cmath:51,
from /usr/include/c++/3.2.2/bits/locale_facets.tcc:41,
from /usr/include/c++/3.2.2/locale:46,
from /usr/include/c++/3.2.2/bits/ostream.tcc:37,
from /usr/include/c++/3.2.2/ostream:275,
from /usr/include/c++/3.2.2/iostream:45,
from clengthspec.h:22,
from objects.h:12,
from problem.yy:5:
/usr/include/math.h:281: parse error before numeric constant
In file included from /usr/include/c++/3.2.2/bits/locale_facets.tcc:45,
from /usr/include/c++/3.2.2/locale:46,
from /usr/include/c++/3.2.2/bits/ostream.tcc:37,
from /usr/include/c++/3.2.2/ostream:275,
from /usr/include/c++/3.2.2/iostream:45,
from clengthspec.h:22,
from objects.h:12,
from problem.yy:5:
/usr/include/c++/3.2.2/typeinfo:84: parse error before numeric constant
/usr/include/c++/3.2.2/typeinfo:98: semicolon missing after declaration of
`
std::type_info'
/usr/include/c++/3.2.2/typeinfo:99: ISO C++ forbids defining types within
return type
/usr/include/c++/3.2.2/typeinfo:99: `bool' is now a keyword
/usr/include/c++/3.2.2/typeinfo:99: non-member function `std::type_info
std::before(const std::type_info&)' cannot have `const' method qualifier
/usr/include/c++/3.2.2/typeinfo:99: semicolon missing after declaration of
`
class std::type_info'
/usr/include/c++/3.2.2/typeinfo: In function `int std::before(const
std::type_info&)':
/usr/include/c++/3.2.2/typeinfo:99: `__name' undeclared (first use this
function)
/usr/include/c++/3.2.2/typeinfo:99: (Each undeclared identifier is
reported
only once for each function it appears in.)
/usr/include/c++/3.2.2/typeinfo:75: `const char*std::type_info::__name' is
protected
/usr/include/c++/3.2.2/typeinfo:99: within this context
/usr/include/c++/3.2.2/typeinfo: At global scope:
/usr/include/c++/3.2.2/typeinfo:101: non-member function `bool
std::operator==(const std::type_info&)' cannot have `const' method
qualifier
/usr/include/c++/3.2.2/typeinfo:101: `bool std::operator==(const
std::type_info&)' must take exactly two arguments
/usr/include/c++/3.2.2/typeinfo: In function `bool std::operator==(const
std::type_info&)':
/usr/include/c++/3.2.2/typeinfo:75: `const char*std::type_info::__name' is
protected
/usr/include/c++/3.2.2/typeinfo:101: within this context
/usr/include/c++/3.2.2/typeinfo: At global scope:
/usr/include/c++/3.2.2/typeinfo:104: non-member function `bool
std::operator!=(const std::type_info&)' cannot have `const' method
qualifier
/usr/include/c++/3.2.2/typeinfo:104: `bool std::operator!=(const
std::type_info&)' must take exactly two arguments
/usr/include/c++/3.2.2/typeinfo:107: parse error before `public'
/usr/include/c++/3.2.2/typeinfo:111: virtual outside class declaration
/usr/include/c++/3.2.2/typeinfo:111: non-member function `bool
std::__is_function_p()' cannot have `const' method qualifier
/usr/include/c++/3.2.2/typeinfo:120: virtual outside class declaration
/usr/include/c++/3.2.2/typeinfo:120: non-member function `bool
std::__do_catch(const std::type_info*, void**, unsigned int)' cannot
have `
const' method qualifier
/usr/include/c++/3.2.2/typeinfo:124: virtual outside class declaration
/usr/include/c++/3.2.2/typeinfo:124: non-member function `bool
std::__do_upcast(const __cxxabiv1::__class_type_info*, void**)' cannot
have
`const' method qualifier
/usr/include/c++/3.2.2/typeinfo:149: parse error before `}' token
In file included from objects.h:15,
from problem.yy:5:
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 22 '05 #1
0 1357

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DOKNIK | last post by:
Hi, I am trying to install PHP with the Apache DSO Installation on AIX 5.1. I have successfully configured and installed Apache and can view the Test Apache page successfully The installation...
8
by: pavel.orehov | last post by:
Hi, I am using flex and bizon to write HTTP parser. I am passing well flex and bison tools but can't compile their output. ================= Flex file (http_parser.lpp) ============== %{...
3
by: Santa | last post by:
I am trying to run bison tool, I am getting "/usr/share/bison.simple: No such file or directory" error, I have file bison.simple in cygwin/bin directory, I am trying to copy into /usr/share...
4
by: daniele.calisi | last post by:
Hi everyone, after some days spent in long searches with google, I still not have found a solution with this problem: I need to use flex (or flex++) and bison (but not bison++) in order to...
13
by: jc | last post by:
I have written a parser using bison and flex to read ASAP2 file for CAN communications. entire development was done in an unix environment and now the code is ready to be integrated to an existing...
1
by: Adam S | last post by:
I'm using bison to generate a C++ parser targeted for a microcontroller application. The command to generated C++ parser using bison is: bison --skeleton=lalr1.cc <myfile.ypp> and makes heavy...
2
by: eng.sharif | last post by:
i want use bison and flex in visual stdio 2005 for make small compiler by use Custom Build Rules in Visual C++ 2005 "FlexBison.rules file " but when i compile "example.y" i get error...
1
by: eng.sharif | last post by:
want use bison and flex in visual stdio 2005 for make small compiler by use Custom Build Rules in Visual C++ 2005 "FlexBison.rules file " but when i compile "example.y" i get error...
3
by: pendell | last post by:
Okay. So I've just installed Fedora core 7 fresh from my machine. It comes with G++, and bison installed directly. So I try to make a program that uses bison. C++ chokes with the error: ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.