SN and C Struct's

Mo DeJong mdejong@cygnus.com
Fri Aug 4 05:54:00 GMT 2000


On Fri, 4 Aug 2000 dave.banham@tde.alstom.com wrote:
 
> Mo,
> For what you indicate this sounds like you are suggesting that the C/C++ parser
> needs modification so that it classifies/processes C struct's and typedef's
> differently. Has the parser not collected sufficient information already and it
> is 'simply' (nothing is ever simple!) a matter of modifying the hierarchy and
> class browsers?

If the parser is reading your code properly, that you should not
have to change it. I don't know if it is working correctly
in the case you describe, you will have to look at the
xref files in the DB to figure that out.

You can use dbdump (from the sn/bin dir) to print out
lots of info from the DB.

Here is an quick dump of the to refs in a small DB.

% cat f1.c 
int func1(int i) { return 0; }

% cat f2.c 
int func2(int i) { return func1(0); }

int funcu() {};
% dbdump .snprj/foo.by
# func1 fu # func2 fu r 000001 f2.c;{int} {int}

% dbdump .snprj/foo.to 
# func2 fu # func1 fu r 000001 f2.c;{int} {int}


> Will both the parser and the browsers need modification?
> 
> This sounds like 'hairy' stuff for an absolute tcl/tk beginner!!!

If the parser is getting all the info you need, then you can
ignore it and just focus on the browser bits. Trust me, you are
a lot better off writing Tcl code compared to spelunking
around in the parser source.

Mo DeJong
Red Hat Inc


More information about the Sourcenav mailing list