 
#ifndef toksym_DEFINED
#define toksym_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 toksym.ch and will be
 * overwritten.  Make changes to toksym.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from toksym.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 *toksym_ch_rcsid = "$Header: /afs/cs.cmu.edu/project/atk-dist/6.2/atk/syntax/sym/RCS/toksym.ch,v 1.11 1993/05/04 01:34:45 susan Exp $";
#endif

/* toksym.ch
 *
 * A toksym object is a subclass of sym.  Its adds four fields:
 *	toknum	-  the token number for compiler
 *	loc, len 	-  position of the token in the source stream
 *	info	-  type dependant information
 *
 */

/*
 *    $Log: toksym.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:40  rr2b
*new R6tape branch
*
*Revision 1.10  1992/12/14  20:58:22  rr2b
*disclaimerization
*
Revision 1.9  1992/11/26  02:03:49  wjh
updated header
.

... 
 * Revision 1.0  88/07/13  20:50:00  WJHansen
 * Copied from sym.H
 */


#include "sym.ih"	
/* This include generates an error message claiming that sym.ih is included twice.  
   The conflict is with the include generated by class as part of toksym.ih, but
   the automatically generated include does NOT define the routines. */


/* the following doesn't work !?!?! */
/*	typedef sym_scopeType  toksym_scopeType;   */

typedef  long   toksym_scopeType;

#define toksym_GLOBAL sym_GLOBAL


union infotype {
	long intval;
	double *realval;
	char *str;
	long (*proc)();
	struct object *obj;
	struct node *node;
};








/* 
 * End of information copied from toksym.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
#define dontDefineRoutinesFor_sym
#include "sym.ih"
#undef dontDefineRoutinesFor_sym

 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for toksym 
 */ 
struct toksym { 
    union {
	struct basicobject_methods *toksym_methods;
	struct sym sym;
    } header;

	short toknum;	/* token code for yacc */
	long loc, len;	/* position of token in source */
	union infotype info;	/* type dependent */


};

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

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef toksym_PROGRAMMERVERSION
#define toksym_PROGRAMMERVERSION 1
#endif /* toksym_PROGRAMMERVERSION */

#ifdef toksym_VERSION
#undef toksym_VERSION
#endif /* toksym_VERSION */
#define toksym_VERSION ((((toksym_PROGRAMMERVERSION << 16) ^ (1 << 8) ^ sizeof(struct toksym)) & 0x7ffff) + 0x80000 + (1 << 20))


#endif /* class_StaticInfoOnly */
#define toksym_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *toksym__GetClassInfo(); \
 extern struct classheader *toksym_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, toksym_classheader_StaticExport->name, toksym__GetClassInfo, NULL, toksym_classheader_StaticExport->namekey); } 
 
#define toksym_StaticLoad()  \
    { \
    sym_StaticLoad(); \
    toksym_StaticLoadOnlyThisClass();  \
    } 
 
#define toksym_StaticEntry  {toksym_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader toksym_classheader = {
    toksym_VERSION,
    "toksym",
    "toksym",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define toksym_CLASSPROCEDURES (toksym_classheader.classprocedures)
int toksym_classref_;
#endif /* class_StaticInfoOnly */

#endif /* toksym_DEFINED */

#if !defined(toksym_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_toksym) && !defined(class_StaticEntriesOnly)
#define toksym_ROUTINESDEFINED

#define toksym_GetName(self) \
		(((&(self)->header.sym))->name)
#define toksym_GetScope(self) \
		(((&(self)->header.sym))->scope)
#define toksym_SetScope(self,newScope) \
	(((&(self)->header.sym))->scope = (newScope))
#define toksym_ToC(self,t,buf,maxlen) \
    ((* ((char * (*)())((self)->header.toksym_methods->routines[0]))) (self,t,buf,maxlen))
#define toksym_TGetName(self) \
	(((self))->header.sym.name)
#define toksym_TGetScope(self) \
	((toksym_scopeType)((self))->header.sym.scope)
#define toksym_GetLoc(self) \
		(((self))->loc)
#define toksym_GetLen(self) \
		(((self))->len)

#define toksym_NewFromObject(self) \
    ((* ((struct toksym * (*)())((self)->header.toksym_methods->info->procs->routines[0]))) (&toksym_classheader, (self)->header.toksym_methods->info->versionnumber))
#define toksym_New() \
    (*((struct toksym * (*)()) (toksym_CLASSPROCEDURES->routines[0])))(&toksym_classheader,toksym_VERSION)
#define toksym_Initialize(self) \
    (*((void (*)()) (toksym_CLASSPROCEDURES->routines[2])))(&toksym_classheader,self, toksym_VERSION)

#define toksym_Destroy(self) \
    ((* ((void (*)()) ((self)->header.toksym_methods->info->procs->routines[1]))) (&toksym_classheader, self))
#define toksym_Finalize(self) \
    (*((void (*)()) (toksym_CLASSPROCEDURES->routines[3])))(&toksym_classheader,self)

#define toksym_InitializeObject(self) \
    (*((boolean (*)()) (toksym_CLASSPROCEDURES->routines[5])))(&toksym_classheader,self)
#define toksym_FinalizeObject(self) \
    (*((void (*)()) (toksym_CLASSPROCEDURES->routines[6])))(&toksym_classheader,self)

#define toksym_TNewScope(enclosingScope) \
     ((toksym_scopeType)sym_NewScope(enclosingScope))
#define toksym_TDestroyScope(scope) \
     (sym_DestroyScope(scope))
#define toksym_TParentScope(scope) \
     ((toksym_scopeType)sym_ParentScope(scope))
#define toksym_TDefine(name,proto,scope) \
     ((struct toksym *)sym_Define(name, proto, scope))
#define toksym_TUndefine(name,scope) \
     (sym_Undefine(name, scope))
#define toksym_TFind(name,scope) \
     ((struct toksym *)sym_Find(name, scope))
#define toksym_TLocate(name,proto,scope,new) \
     ((struct toksym *)sym_Locate(name, proto, scope, new))
#define toksym_TFindAll(name,scope,proc,rock) \
     (sym_FindAll(name, scope, proc, rock))

#endif /* !defined(toksym_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_toksym ) && !defined(class_StaticEntriesOnly)*/

