public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
* parsing of java interfaces
@ 2000-07-26 13:09 Christian Nautze
  2000-07-26 17:48 ` Mo DeJong
  0 siblings, 1 reply; 7+ messages in thread
From: Christian Nautze @ 2000-07-26 13:09 UTC (permalink / raw)
  To: sourcenav

Hi,

first i would like to say thanks to everbody who contributed to
SN. Really great work! 

Second i wanted to ask if it is a bug or feature :)
when using SN with java that the "implements" clause
isn't parsed like "extends". So under "Hierarchy"
i only see super and sub classes but no interfaces which
where implemented. I think "implements" should be treated
similarly as "extends" in java. Any comments?

Christian Nautze

PS: execuse my bad english

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

* Re: parsing of java interfaces
  2000-07-26 13:09 parsing of java interfaces Christian Nautze
@ 2000-07-26 17:48 ` Mo DeJong
  2000-07-27 15:32   ` Christian Nautze
  0 siblings, 1 reply; 7+ messages in thread
From: Mo DeJong @ 2000-07-26 17:48 UTC (permalink / raw)
  To: Christian Nautze; +Cc: sourcenav

On Wed, 26 Jul 2000, Christian Nautze wrote:

> Hi,
> 
> first i would like to say thanks to everbody who contributed to
> SN. Really great work! 

We are hoping that the best contributions have yet to be made.
Folks on the list are already talking about adding Python,
Perl, and improved Tcl support. We are really excited about
the possibilities that opens up for cross language tools.

> Second i wanted to ask if it is a bug or feature :)
> when using SN with java that the "implements" clause
> isn't parsed like "extends". So under "Hierarchy"
> i only see super and sub classes but no interfaces which
> where implemented. I think "implements" should be treated
> similarly as "extends" in java. Any comments?

Sounds like a bug. Java's interface types are kind of like
multiple inheritance in C++, so we should use that same
sort of metaphor. Why don't you take a shot at fixing
it? You will have to much around with the Java parser
to see if that is where the problem is. Post a patch
to the list when you get it working.

Mo DeJong
Red Hat Inc

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

* Re: parsing of java interfaces
  2000-07-26 17:48 ` Mo DeJong
@ 2000-07-27 15:32   ` Christian Nautze
  2000-07-27 15:43     ` Syd Polk
       [not found]     ` <Pine.LNX.4.21.0007280834560.95-100000@moshpit.cygnus.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Christian Nautze @ 2000-07-27 15:32 UTC (permalink / raw)
  To: Mo DeJong; +Cc: sourcenav

Mo DeJong wrote:
> 
> On Wed, 26 Jul 2000, Christian Nautze wrote:
> 
> > Hi,
> >
> > first i would like to say thanks to everbody who contributed to
> > SN. Really great work!
> 
> We are hoping that the best contributions have yet to be made.
> Folks on the list are already talking about adding Python,
> Perl, and improved Tcl support. We are really excited about
> the possibilities that opens up for cross language tools.
> 
> > Second i wanted to ask if it is a bug or feature :)
> > when using SN with java that the "implements" clause
> > isn't parsed like "extends". So under "Hierarchy"
> > i only see super and sub classes but no interfaces which
> > where implemented. I think "implements" should be treated
> > similarly as "extends" in java. Any comments?
> 
> Sounds like a bug. Java's interface types are kind of like
> multiple inheritance in C++, so we should use that same
> sort of metaphor. Why don't you take a shot at fixing
> it? You will have to much around with the Java parser
> to see if that is where the problem is. Post a patch
> to the list when you get it working.
> 

having looked at the java parser i only can see that the .c and .h
files where generated with tools from a commercial company in germany:
(script files *.ast *.puma etc)

http://www.cocolab.de/

There are also old versions of the compiler generator tools available
from
1992 (although i do not know if they work with the config files). 
Do you have contact to this company and can the tools be used 
(on there site is only a demo version available for win*)
without paying fees for GNU projects or would be a better solution to
rewrite
the java parser with GNU tools like flex and bison ? 
(i haven't done something like this before but it seems to be a lot of
work :)

kind regards

Christian Nautze

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

* Re: parsing of java interfaces
  2000-07-27 15:32   ` Christian Nautze
@ 2000-07-27 15:43     ` Syd Polk
  2000-07-28  6:20       ` Gilles J. Seguin
       [not found]     ` <Pine.LNX.4.21.0007280834560.95-100000@moshpit.cygnus.com>
  1 sibling, 1 reply; 7+ messages in thread
From: Syd Polk @ 2000-07-27 15:43 UTC (permalink / raw)
  To: Christian Nautze, Mo DeJong; +Cc: sourcenav

>having looked at the java parser i only can see that the .c and .h
>files where generated with tools from a commercial company in germany:
>(script files *.ast *.puma etc)
>
> http://www.cocolab.de/
>
>There are also old versions of the compiler generator tools available
>from
>1992 (although i do not know if they work with the config files).
>Do you have contact to this company and can the tools be used
>(on there site is only a demo version available for win*)
>without paying fees for GNU projects or would be a better solution to
>rewrite
>the java parser with GNU tools like flex and bison ?
>(i haven't done something like this before but it seems to be a lot of
>work :)

Cygnus was unwilling to pay for this tool. It is not open source.

There are two alternatives:

- We can use gcj. gcj has already been modified to generate SN information 
once for the Code Fusion effort. While this has not been maintained, it is 
free, and the infrastructure is their for it.

- We can write a new parser from scratch using flex and bison.


Syd Polk		spolk@redhat.com
Engineering Manager	+1 415 777 9810 x 241
Red Hat, Inc.



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

* Re: parsing of java interfaces
       [not found]     ` <Pine.LNX.4.21.0007280834560.95-100000@moshpit.cygnus.com>
@ 2000-07-27 15:48       ` Alexandre Petit-Bianco
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Petit-Bianco @ 2000-07-27 15:48 UTC (permalink / raw)
  To: Ben Elliston; +Cc: Christian Nautze, Mo DeJong, apbianco, sourcenav

Ben Elliston writes:

> It would be a better solution to rewrite the Java parser.  Since
> it's LALR(1), it should be relatively straightforward.  I understand
> there was some work underway to reuse the parser from the GNU Java
> compiler, gcj.  Alex?

Yes, and this went into the Code Fusion boxed product. The xref stuff
is still sanitized out, but with the release of SN, it should make it
to egcs, I think.

Of course, I would have to verify that it works and then I would let
people hack on it since I don't really have the time to maintain it.

./A

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

* Re: parsing of java interfaces
  2000-07-27 15:43     ` Syd Polk
@ 2000-07-28  6:20       ` Gilles J. Seguin
  2000-07-28  6:25         ` Florent Pillet
  0 siblings, 1 reply; 7+ messages in thread
From: Gilles J. Seguin @ 2000-07-28  6:20 UTC (permalink / raw)
  To: sourcenav

Syd Polk wrote:
> 
> Cygnus was unwilling to pay for this tool. It is not open source.
> 
> There are two alternatives:
> 
> - We can use gcj. gcj has already been modified to generate SN information
> once for the Code Fusion effort. While this has not been maintained, it is
> free, and the infrastructure is their for it.

This is an interesting comment.  The name "Source"-Navigator was
nearly saying what we try to do.

Have we some kind of interest in using other methods, like
using the information provided by the compiler stabs information.
Basically using the information provided to or used by the
debugger(gdb).

> - We can write a new parser from scratch using flex and bison.

What is the position or the openness for a tool like antlr
< http://www.antlr.org > for the java parser,  The C parser
can used the PCCTS version.

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

* Re: parsing of java interfaces
  2000-07-28  6:20       ` Gilles J. Seguin
@ 2000-07-28  6:25         ` Florent Pillet
  0 siblings, 0 replies; 7+ messages in thread
From: Florent Pillet @ 2000-07-28  6:25 UTC (permalink / raw)
  To: Gilles J. Seguin; +Cc: sourcenav

Why don't you simply derive the Java parser from the existing C++ parser
?
These two languages are quite close and you'd have a good base to start
with. Plus, you don't need to have "compiler-quality" parsing since the
only
thing the parser needs to do is to provide accurate symbols.

I still think that using the C++ parser is the less expansive solution
in
terms of coding time.

"Gilles J. Seguin" wrote:
> 
> Syd Polk wrote:
> >
> > Cygnus was unwilling to pay for this tool. It is not open source.
> >
> > There are two alternatives:
> >
> > - We can use gcj. gcj has already been modified to generate SN information
> > once for the Code Fusion effort. While this has not been maintained, it is
> > free, and the infrastructure is their for it.
> 
> This is an interesting comment.  The name "Source"-Navigator was
> nearly saying what we try to do.
> 
> Have we some kind of interest in using other methods, like
> using the information provided by the compiler stabs information.
> Basically using the information provided to or used by the
> debugger(gdb).
> 
> > - We can write a new parser from scratch using flex and bison.
> 
> What is the position or the openness for a tool like antlr
> < http://www.antlr.org > for the java parser,  The C parser
> can used the PCCTS version.

-- 
Florent Pillet, Software Architect. e-mail: fpillet@opteway.com
opt[e]way S.A., 2881 route des cretes, BP 308
06906 Sophia Antipolis Cedex, France
Phone: +33 4 92 95 26 13 - Fax: +33 4 92 95 26 03
http://www.opteway.com/

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

end of thread, other threads:[~2000-07-28  6:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-26 13:09 parsing of java interfaces Christian Nautze
2000-07-26 17:48 ` Mo DeJong
2000-07-27 15:32   ` Christian Nautze
2000-07-27 15:43     ` Syd Polk
2000-07-28  6:20       ` Gilles J. Seguin
2000-07-28  6:25         ` Florent Pillet
     [not found]     ` <Pine.LNX.4.21.0007280834560.95-100000@moshpit.cygnus.com>
2000-07-27 15:48       ` Alexandre Petit-Bianco

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).