help-bison
[Top][All Lists]
Advanced

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

Creating an object in the parser class


From: Ibraim Yesid Hernandez
Subject: Creating an object in the parser class
Date: Sun, 25 May 2008 13:42:56 -0500

Hi all,

I would like to create a object of some other class in the parser
class, that for this time it's called calcxx_parser, just as the
example.

So I want to create a object of the MyObject* object;

I was looking for some %"command" but didn't find any.

My solution was to add the following bison declarations:

%parse-param { MyObject* object }

In that way bison created automatically the object but it also creates
a parameter in the call to the parser, so I then went and sent this
parameter to NULL in the driver class.

Well, at least for me is working but willing to know a more convenient
way to get this thing working.

Thanks in advance for all your help,

Ibraim.




reply via email to

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