help-bison
[Top][All Lists]
Advanced

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

Help Wanted


From: Ramneek Handa
Subject: Help Wanted
Date: Wed, 12 Feb 2003 15:47:41 +0530

Hi all,
  I have a task in hand for which i am required to reverse engineer c++
header files. Following is briefly what is required:
1. To find out various classes in the header.
2. To find out the various member functions inside each class.
3. To find out the parent class of each class(inherited from).
4. To find out various parameters for each function.

in short all the meta informaton :)..

i have following queries:

1) Is is good to generate a parse tree of the header file and evaluate
the various reqd things?
2) I have Roskind grammar, is it good enuf?
3) How fast is bison and flex combo, How much time wud it take to
generate a parse tree of a 100kb file?
4) Is there any other way to do this without making the parse tree?
5) Do i need the whole grammar for this purpose or can i use some
subset? if yes where can i find it :) ?

thanx in advance
-WT

-----Original Message-----
From: Tim Van Holder [mailto:address@hidden
Sent: Wednesday, February 12, 2003 1:56 PM
To: address@hidden
Cc: address@hidden
Subject: Re: $$


On Wed, 2003-02-12 at 00:14, Mike Rollins wrote:
> What "type" exactly, is '$$'?  Whenever I attempt to use it, I get:
> 
> $$ of `QualifiedName' has no declared type
> 
> My union is as follows:
> 
> %union{
>       char* ID
> }
> 
> and later I have:
> 
> %token <ID> IDENTIFIER
> 
> However, even if I do the following:
> 
> ...{$$.ID = yylval.ID;}...
> 
> I still get the above error.  What am I doing wrong?
> 
> Thanks,
> 
> Mike

Aside from
  %token <ID> IDENTIFIER
you also need
  %type <ID> myrule

then you can have

myrule
: IDENTIFIER
| SOMETHING_TO_IGNORE IDENTIFIER
  {
    $$ = $2;
  }
;

-- 
Tim Van Holder <address@hidden>



_______________________________________________
address@hidden http://mail.gnu.org/mailman/listinfo/help-bison




reply via email to

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