Re: Project Question

Subject: Re: Project Question
From: John Sung (
Date: Fri Feb 22 2002 - 18:23:15 EST


If you take a look at the TraversalJ System Diagram,
you'll see that TraversalJ should read files of the
form .trv and output some .java file. So, the .trv
doesn't really have any "code" per say. It just has
some valid sentences for the grammar specified by your
class dictionary.

So, you should call parse() for your top level node in
the class dictionary for each of the files to generate
the parse tree, i.e. object graph, and output the
appropriate files.

You should create the ClassGraphListener/Factory
classes in the .cd file and add the methods for the
interface within the .beh files. Why create one when
you can just do that using demeterj?

Also, the CreateClassGraph class expects the getNew()
method to be defined in the ClassGraphListenerFactory
that's static. This is how an instance of MyListener
will get created. So, you don't need to do anything
with the input files.

Anyways, it shouldn't be too hard to figure this out.
If it's taking more than say 30 minutes, you should
ask me.


--- wrote:
> Hey,
> Having poured over the project doc, I'm a little
> confused regarding the
> schema of "COM1205 Middle-ware".
> I've designed a minimal version of the class
> dictionary for the traversal
> language. This handles code similar to:
> aspect MyTraversal {
> declare traversal t1: "from one thing to another";
> }
> The traversal language code, for which we have
> designed our class
> dictionary, is put in the .trv files, right?
> I've been implementing the ClassGraphListenerFactor,
> ClassGraphListener, and
> MyListener classes via the program.beh file in my
> main project folder.
> --> If I create those classes via the .beh file,
> don't I need to include
> them in the .cd and .input files in order for them
> to be generated upon
> typing "demeterj"?
> --> Is it correct to create those classes via the
> .beh files? Should they be
> created from scratch and put in with the
> ( &
> files in a separate folder?
> Thanks!

Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games

This archive was generated by hypermail 2b28 : Fri Feb 22 2002 - 18:23:20 EST