From mboxrd@z Thu Jan 1 00:00:00 1970 From: T Alexander To: "Keogh, Craig" Cc: "'sourcenav@sourceware.cygnus.com'" Subject: RE: Help on Source Navigator parser Date: Mon, 13 Aug 2001 00:17:00 -0000 Message-id: <20010813071654.12842.qmail@web10302.mail.yahoo.com> References: <34168E9E775CD411A4430000F80768621B4434@unclassfs03.rlmsystems.com.au> X-SW-Source: 2001-q3/msg00109.html Dear Craig Keogh, Thanx for responding to my earlier mail. About the parsing part, we were able to compile the cp_maintest.c present in snavigator/parser/cpp/cpplib it gave us the following output for a small project(that file is attached along) The problem is though it gives the cross-reference, we are not able to know which class method or variable is used. This will give problem when more than one class has same method name's or variable name's(which is quiet possible). so i want to know whether any slight modification on the code would help us achieve our requirement. Thanking you in advance rgds Alexander --- "Keogh, Craig" wrote: > > what i want to know is > > that wether we'll be able to use the parser by > itself > > to create a database of the cross-refernce and all > > without running the snavigator. > > You can run the C++ parser, cbrowser, from the > command line: > cbrowser -y files.f -p /bin/more > > Where files.f is a list of files to parse, which you > can generate with > ls -1 *.c* > files.f > > But this won't build you a database. > > Look at \source\snavigator\hyper\sn.h > > Write your own functions of the prototypes listed > there. > Eg: > > int put_cross_ref ((int type,int scope_type,int > scope_lev, > char *fnc_cls,char *fnc,char *fnc_arg_types,char > *scope,char *what, > char *arg_types,char *file,int lineno,int acc)) > { > cout << type << scope_type << scope_level << > fnc_cls << fnc > << fnc_arg_types << scope << what << > arg_types << file > << lineno << acc << endl; > } > > And link cbrowser against your own implemenation. > Run it with: > cbrowser -y files.f -p /bin/more > > Of course, I don't recommend doing this. Use a > compiler compiler tool, and > do it yourself. > > Craig Keogh ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie get_symbol : ||privateref| crossref: 29 8 1 NULL NULL NULL privateref NULL /home/jithu/sourcenavigator/snavigator/parsers/c pp/alexsnproj/alexclas.cpp 25 1 get_symbol : ||operator=|unknown,int get_symbol : ||privateref| crossref: 29 8 1 NULL NULL NULL privateref NULL /home/jithu/sourcenavigator/snavigator/parsers/c pp/alexsnproj/alexclas.cpp 26 0 get_symbol : ||publicref| crossref: 29 8 1 NULL NULL NULL publicref NULL /home/jithu/sourcenavigator/snavigator/parsers/cp p/alexsnproj/alexclas.cpp 34 0 get_symbol : ||al| crossref: 29 8 1 NULL NULL NULL al NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/alexs nproj/useclass.cpp 29 1 get_symbol : ||publicref| crossref: 29 8 1 NULL NULL NULL publicref NULL /home/jithu/sourcenavigator/snavigator/parsers/cp p/alexsnproj/useclass.cpp 29 1 get_symbol : ||operator=|unknown,int crossref: 24 8 0 NULL NULL NULL a NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/alexsn proj/useclass.cpp 30 1 get_symbol : ||al| crossref: 29 8 1 NULL NULL NULL al NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/alexs nproj/useclass.cpp 30 0 get_symbol : ||getPublic| crossref: 29 8 1 NULL NULL NULL getPublic /home/jithu/sourcenavigator/snavigator/parsers/cpp/al exsnproj/useclass.cpp 30 0 crossref: 24 8 0 NULL NULL NULL a NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/alexsn proj/useclass.cpp 31 0 get_symbol : ||cout| crossref: 29 8 1 NULL NULL NULL cout NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/ale xsnproj/main.cpp 29 0 get_symbol : ||operator<<|unknown,const char * get_symbol : ||endl| crossref: 29 8 1 NULL NULL NULL endl NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/ale xsnproj/main.cpp 29 0 get_symbol : ||operator*|unknown,unknown get_symbol : ||new| crossref: 29 8 1 NULL NULL NULL new NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/alex snproj/main.cpp 30 0 get_symbol : ||operator=|unknown,unknown get_symbol : ||UseClass| crossref: 29 8 1 NULL NULL NULL UseClass /home/jithu/sourcenavigator/snavigator/parsers/cpp/ale xsnproj/main.cpp 30 0 get_symbol : ||cout| crossref: 29 8 1 NULL NULL NULL cout NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/ale xsnproj/main.cpp 31 0 get_symbol : ||operator<<|unknown,const char * get_symbol : ||usage| crossref: 29 8 1 NULL NULL NULL usage NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/al exsnproj/main.cpp 31 0 get_symbol : ||getValue| crossref: 29 8 1 NULL NULL NULL getValue /home/jithu/sourcenavigator/snavigator/parsers/cpp/ale xsnproj/main.cpp 31 0 get_symbol : ||operator<<|unknown,unknown get_symbol : ||endl| crossref: 29 8 1 NULL NULL NULL endl NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/ale xsnproj/main.cpp 31 0 get_symbol : ||operator<<|unknown,unknown get_symbol : ||cout| crossref: 29 8 1 NULL NULL NULL cout NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/ale xsnproj/main.cpp 35 0 get_symbol : ||operator<<|unknown,const char * get_symbol : ||endl| crossref: 29 8 1 NULL NULL NULL endl NULL /home/jithu/sourcenavigator/snavigator/parsers/cpp/ale xsnproj/main.cpp 35 0 get_symbol : ||operator<<|unknown,unknown get_symbol : ||EXIT_SUCCESS| crossref: 29 8 1 NULL NULL NULL EXIT_SUCCESS NULL /home/jithu/sourcenavigator/snavigator/parsers /cpp/alexsnproj/main.cpp 36 0