Re: ExtractClassHeirarchy.pl


Subject: Re: ExtractClassHeirarchy.pl
From: Craig Chambers (chambers@cs.washington.edu)
Date: Sat Nov 04 2000 - 14:19:35 PST


The various browse commands in Vortex can do this kind of thing, too, without
worrying about the syntax that things were declared using. The "all_children
any" prints all children. "objdecl foo" for an object foo prints out its
declaration. It would be nice to combine these two into something that prints
out object declarations for a hierarchy above or below a node. I suggest that
we modify the output to all_children (and variants) to look more like objdecl,
then maybe people can use this facility directly.

-- Craig

Keunwoo Lee wrote:
>
> I have published a quick & dirty Perl script that extracts a class
> heirarchy from a collection of Cecil source files. It is in CVS at
>
> $VORTEX/bin/shell/ExtractClassHierarchy.pl
>
> Currently it only handles the common case, i.e. "object foo" or "object
> foo isa bar" declarations that are formatted in standard Cecil style. It
> uses simple line-oriented pattern matching, so it doesn't work for decls
> spread over multiple lines or weirdly formatted decls. Nor does it handle
> "representation" declarations.
>
> However, it *does* handle out of order declarations (supertypes need not
> be declared before subtypes), and I have made an effort to have it ignore
> polymorphic type annotations so that
>
> object foo isa bar[x];
>
> will be recorded as a child of bar.
>
> Multiply inheriting objects, and their subtrees, should be listed once
> under each parent. I may add a flag that makes this optional if I feel
> the need.
>
> There may be bugs. Like I said, it's a quick & dirty script.
>
> ~k.lee



This archive was generated by hypermail 2b25 : Sat Nov 04 2000 - 14:19:03 PST