|Javacc& JTree Jacek.Skrzypiec@sybernet.ie (Jacek skrzypiec) (1998-11-06)|
|Javacc& JTree KPRASAD@us.oracle.com (KPRASAD.US.ORACLE.COM) (1998-11-07)|
|Re: Javacc& JTree email@example.com (Janusz Szpilewski) (1998-11-12)|
|From:||Janusz Szpilewski <firstname.lastname@example.org>|
|Date:||12 Nov 1998 01:32:15 -0500|
Jacek skrzypiec wrote:
> I would be interested in exchanging the views with
> somebody who has worked with the Javacc.
There is a mailing list dedicated to JavaCC. Try to find its address,
JavaCC FAQ and other useful info at the JavaCC page:
> By the way, I am looking for information on representing classes in
> symbol tables, records are represented usually as a tuple consisting
> of an enumerated value representing its constructor (e.g. record) the
> numbers of fields and a sequence of pairs comprising representations
> of the field identifiers.
You can still maintain relations with class methods and internal
classes using general parent-children relations. It means in the class
representation provide containers with pointers to the definitions of
the scoped classes and methods. The inner entities can also (and usually
should) keep pointers to their parents. This is simple and efficient
enough to deal with scope, inheritance and any embedding.
So consider such example (in C++):
class MyClassDescription : public ClassDescription
// class name
// parent (scope) of the class
// pointer to the base class definition
// (or a list in the case of multiple inheritence)
MethodDescription* methods; // class methods
AttributeDescription* attributes; // class attributes
ClassDescription* innerClasses; // embedded classes
[...] // constructor, destructor and find/get/set
// related methods
ClassDescription, AttributeDescription etc. are abstract classes
(interfaces) representing given elements.
I hope it will clear the problem a little... Try also to check compiler
related references published on this newsgroup.
Return to the
Search the comp.compilers archives again.