I want to write a parser for C++ which can extract methods and members pertaining to a particular class(es) in a CPP file. I used Parser Generattor tool by BumbleBee softwares and did all the project settings as required by them but still keep on getting fatal errors in Exception Class(of Visual Studio 6 Library).

Is there a proper tool wherein I can integrate lex and yacc with VC++ 6.0.

Urgent Help Required. Please help

Why not code in linux/unix env?

I can't shift to Linux becoz my existing project is in VC++ 6.0 and I've to add parsing functionality to it. Hence you can see the problem here.

maybe you should contact BumbleBee. Also possible that VC++ 6.0 is too old. You might try a more current compiler such as the free VC++ 2005 Express.

Perhaps you could use the Spirit parser combinator library instead.

Well the problem is not with Bumblebee. When I used a sample project from SampleCodeForLex/Yacc then also I faced the same error as mentioned below.

error C2440: '=' : cannot convert from 'struct _iobuf *' to 'class std::basic_istream<char,struct std::char_traits<char> > *'

for the code line

FILE   *temp,
         *f;
lexer.yyin = f;

lexer is the object of the class CLexRC wherein CLexRC loks like this in first line of the class

class YYEXPLEXER YYFAR CLexRC : public _YL yyclexer {

please help.

It's assigning an uninitialized FILE* to another value? There's something wrong with that picture. Anyway, it looks like the yyin member is of type std::basic_istream<char, struct std::char_traits<char> >*, and the code is trying to assign a FILE* to it. At least, that's what the error message says.

so how to type cast it. I'm understanding the error but as a matter of fact the CPP file is not manually written. it gets generated by Bumblebee Parser Generator. I saw this kind of file stream assignment to most of the projects

What shall I do ?:sweat:

I'm now able to run lex files fine but while utilizing the yacc stack descriptors like '$$' it is giving the following error:

warning Y4003: '$$' : attribute is untyped

thought this is a warning now. If I'm assigning anything to it or trying to use string copy then it is throwing an error.

please help.

please help. I'm not able to $$ at all. the error Untyped Attribute is repeated at any case.

PLease help me it is kind of urgent.

Member Avatar for iamthwee

Urgent, I'm sure. Maybe you should have started your homework earlier. He he.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.