public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
* Help on Source Navigator parser
@ 2001-08-09  2:22 T Alexander
  0 siblings, 0 replies; 4+ messages in thread
From: T Alexander @ 2001-08-09  2:22 UTC (permalink / raw)
  To: sourcenav

Dear All,

               I am going throuh the source navigator.
It does a pretty good parsing.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.


               I want to know it for C++. I went
through the cBrowser i don't know how to use it to
create the cross-refernce and all for a c++ project. I
need to get the same result as we get when we use
snavigator creating a project.

               please help.

rgds
Alexander.

____________________________________________________________
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Help on Source Navigator parser
  2001-08-09 16:56 Keogh, Craig
@ 2001-08-13  0:17 ` T Alexander
  0 siblings, 0 replies; 4+ messages in thread
From: T Alexander @ 2001-08-13  0:17 UTC (permalink / raw)
  To: Keogh, Craig; +Cc: 'sourcenav@sourceware.cygnus.com'

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" <keogh@rlmsystems.com.au> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Help on Source Navigator parser
@ 2001-08-09 16:56 Keogh, Craig
  2001-08-13  0:17 ` T Alexander
  0 siblings, 1 reply; 4+ messages in thread
From: Keogh, Craig @ 2001-08-09 16:56 UTC (permalink / raw)
  To: 'T Alexander'; +Cc: 'sourcenav@sourceware.cygnus.com'

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Help on source navigator Parser
@ 2001-08-08  3:23 Alexander T
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander T @ 2001-08-08  3:23 UTC (permalink / raw)
  To: sourcenav

Dear All,

               I am going throuh the source navigator. It does a pretty good
parsing.
              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.


               I want to know it for C++. I went through the cBrowser i
don't know how to use it to create the cross-refernce and all
               for a c++ project. I need to get the same result as we get
when we use snavigator creating a project.

               please help.

rgds
Alexander.


DISCLAIMER: This correspondence is confidential and intended for the named
recipient(s) only. If you are not the named recipient and receive this
correspondence in error, you must not copy, distribute or take any action in
reliance on it and you should delete it from your system and notify the
sender immediately. Unless otherwise stated, any views or opinions expressed
are solely those of the author and do not represent those of Subex Systems
Limited.

www.subexgroup.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-13  0:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-09  2:22 Help on Source Navigator parser T Alexander
  -- strict thread matches above, loose matches on Subject: below --
2001-08-09 16:56 Keogh, Craig
2001-08-13  0:17 ` T Alexander
2001-08-08  3:23 Help on source navigator Parser Alexander T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).