 
#ifndef sym_DEFINED
#define sym_DEFINED 1
 
#ifndef class_DEFINED
#include <class.h>
#endif /* class_DEFINED */
/* 
 * This file was generated by the Andrew class system preprocessor.
 * Don't make changes to this file as it is created from sym.ch and will be
 * overwritten.  Make changes to sym.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from sym.ch.
 */ 
 
/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
\* ********************************************************************** */
#if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS)
static char *sym_H_rcsid = "$Header: /afs/cs.cmu.edu/project/atk-dist/6.2/atk/syntax/sym/RCS/sym.ch,v 1.11 1993/05/04 01:34:45 susan Exp $";
#endif


/* sym.c
 *
 * A sym object is an entry in a symbol table.  Each symbol has associated with it a uniqe
 * name and scope.  sym should be subclassed if any additional data is desired.
 *
 * History:
 *
 *	5-24-88 Fred Hansen:	original symbol table module created.
 *	6-29-88 George Baggott:	rewritten as an object.
 *	7-07-88 George Baggott:	no longer a subclass of node.
 *	7-13-88 George Baggott:	partitions axed.
 */
/*
 *    $Log: sym.ch,v $
*Revision 1.11  1993/05/04  01:34:45  susan
*RCS Tree Split
*
*Revision 1.10.1.1  1993/02/02  04:13:08  rr2b
*new R6tape branch
*
*Revision 1.10  1992/12/14  20:57:48  rr2b
*disclaimerization
*
Revision 1.9  1992/11/26  02:02:58  wjh
updated header
.

Revision 1.8  92/06/05  16:50:26  rr2b
added support for proper destruction of symbols
. . .
Revision 1.1  88/10/21  10:42:15  wjh
Initial revision
 
 * Revision 1.0  88/06/23  12:15:00  gb17
 * Copied from /usr/andrew/lib/nullinset
 */


typedef long sym_ScopeType;

#define sym_GLOBAL ((sym_ScopeType) 0L)







/* 
 * End of information copied from sym.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
/* sym has no super class */ 
 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for sym 
 */ 
struct sym { 
    struct {
	struct basicobject_methods *sym_methods;
    } header;
	unsigned char *name;		/* the name of the symbol */
	long scope;		/* the scope in which the symbol is defined */
	struct sym *next;		/* used for handling collisions in hash table */
	boolean intable; /* whether this sym has been put in the table or not */

};

 
/* 
 * End of data structure for sym.
 */ 
 

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef sym_PROGRAMMERVERSION
#define sym_PROGRAMMERVERSION 1
#endif /* sym_PROGRAMMERVERSION */

#ifdef sym_VERSION
#undef sym_VERSION
#endif /* sym_VERSION */
#define sym_VERSION ((((sym_PROGRAMMERVERSION << 16) ^ (0 << 8) ^ sizeof(struct sym)) & 0x7ffff) + 0x80000 + (196 << 20))


#endif /* class_StaticInfoOnly */
#define sym_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *sym__GetClassInfo(); \
 extern struct classheader *sym_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, sym_classheader_StaticExport->name, sym__GetClassInfo, NULL, sym_classheader_StaticExport->namekey); } 
 
#define sym_StaticLoad()  \
    { \
    sym_StaticLoadOnlyThisClass();  \
    } 
 
#define sym_StaticEntry  {sym_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader sym_classheader = {
    sym_VERSION,
    "sym",
    "sym",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define sym_CLASSPROCEDURES (sym_classheader.classprocedures)
int sym_classref_;
#endif /* class_StaticInfoOnly */

#endif /* sym_DEFINED */

#if !defined(sym_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_sym) && !defined(class_StaticEntriesOnly)
#define sym_ROUTINESDEFINED

#define sym_GetName(self) \
		(((self))->name)
#define sym_GetScope(self) \
		(((self))->scope)
#define sym_SetScope(self,newScope) \
	(((self))->scope = (newScope))

#define sym_NewFromObject(self) \
    ((* ((struct sym * (*)())((self)->header.sym_methods->info->procs->routines[0]))) (&sym_classheader, (self)->header.sym_methods->info->versionnumber))
#define sym_New() \
    (*((struct sym * (*)()) (sym_CLASSPROCEDURES->routines[0])))(&sym_classheader,sym_VERSION)
#define sym_Initialize(self) \
    (*((void (*)()) (sym_CLASSPROCEDURES->routines[2])))(&sym_classheader,self, sym_VERSION)

#define sym_Destroy(self) \
    ((* ((void (*)()) ((self)->header.sym_methods->info->procs->routines[1]))) (&sym_classheader, self))
#define sym_Finalize(self) \
    (*((void (*)()) (sym_CLASSPROCEDURES->routines[3])))(&sym_classheader,self)

#define sym_InitializeClass() \
    (*((boolean (*)()) (sym_CLASSPROCEDURES->routines[5])))(&sym_classheader)
#define sym_InitializeObject(self) \
    (*((boolean (*)()) (sym_CLASSPROCEDURES->routines[6])))(&sym_classheader,self)
#define sym_FinalizeObject(self) \
    (*((void (*)()) (sym_CLASSPROCEDURES->routines[7])))(&sym_classheader,self)
#define sym_NewScope(enclosingScope) \
    (*((sym_ScopeType (*)()) (sym_CLASSPROCEDURES->routines[8])))(&sym_classheader,enclosingScope)
#define sym_DestroyScope(scope) \
    (*((void (*)()) (sym_CLASSPROCEDURES->routines[9])))(&sym_classheader,scope)
#define sym_ParentScope(scope) \
    (*((sym_ScopeType (*)()) (sym_CLASSPROCEDURES->routines[10])))(&sym_classheader,scope)
#define sym_Define(name,proto,scope) \
    (*((struct sym* (*)()) (sym_CLASSPROCEDURES->routines[11])))(&sym_classheader,name,proto,scope)
#define sym_Undefine(name,scope) \
    (*((boolean (*)()) (sym_CLASSPROCEDURES->routines[12])))(&sym_classheader,name,scope)
#define sym_Find(name,scope) \
    (*((struct sym* (*)()) (sym_CLASSPROCEDURES->routines[13])))(&sym_classheader,name,scope)
#define sym_Locate(name,proto,scope,new) \
    (*((struct sym* (*)()) (sym_CLASSPROCEDURES->routines[14])))(&sym_classheader,name,proto,scope,new)
#define sym_FindAll(name,scope,proc,rock) \
    (*((long (*)()) (sym_CLASSPROCEDURES->routines[15])))(&sym_classheader,name,scope,proc,rock)
#define sym_printtable() \
    (*((void (*)()) (sym_CLASSPROCEDURES->routines[16])))(&sym_classheader)


#endif /* !defined(sym_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_sym ) && !defined(class_StaticEntriesOnly)*/

