home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.parl.clemson.edu
/
2015-02-07.ftp.parl.clemson.edu.tar
/
ftp.parl.clemson.edu
/
pub
/
coven
/
coven-utils-1.1.tgz
/
coven-utils-1.1.tar
/
utils
/
coven-language
/
symbol.h
< prev
Wrap
C/C++ Source or Header
|
2003-01-28
|
3KB
|
134 lines
/*
* (C) 2001 Clemson University
*
* See COPYING in top-level directory.
*/
#ifndef _SYMBOL_H_
#define _SYMBOL_H_
#ifndef lint
static char symbol_h_rcsid[] = "$Header: /projects/cvsroot/coven-language/symbol.h,v 1.3 2003/01/28 14:55:09 ndebard Exp $";
#endif
/* $Log: symbol.h,v $
/* Revision 1.3 2003/01/28 14:55:09 ndebard
/* New GPL.
/*
/* Revision 1.2 2003/01/23 13:06:54 ndebard
/* GPLed this dir.
/*
/* Revision 1.1.1.1 2003/01/23 11:47:48 ndebard
/* Imported source - from Coven project, reorganizing
/*
/* Revision 1.5 2002/11/06 14:43:16 ndebard
/* The compiler should now correctly parse the sample language we have
/* developed. It won't handle everything, but should be OK.
/*
/* Revision 1.4 2002/11/05 23:46:41 ndebard
/* Working on the language. It should handle everything up to dropping the
/* output for module calls right now.
/*
/* Revision 1.3 2002/07/31 14:44:48 ndebard
/* Lots of changes while in Scotland. This now parses the MODULES and
/* VARIABLES sections correctly (it is believed). The backend of the Coven
/* driver needs to be redesigned now to handle some new data types before
/* the PROGRAM section can be completed.
/*
/* Revision 1.2 2002/07/03 20:45:53 walt
/* initial added symbol table stuff
/*
/* Revision 1.1 2002/07/03 18:55:12 walt
/* First set of files for Coven compiler - WBL
/*
* Revision 1.5 1991/02/06 15:15:15 walt
* added linking capability
*
* Revision 1.4 90/11/29 13:09:38 walt
* moved to single source directory
* added RCS Headers and Logs
*
* Revision 1.3 90/08/20 12:14:39 walt
* version before connection configuration was added
*
* Revision 1.2 90/03/08 10:40:23 walt
* this is the original rawasm language
*
* Revision 1.1 90/02/02 10:19:53 walt
* Initial revision
*
*/
/*
* symbol.h --- declarations for all the public types
*/
#define TYPE_MODULE 0x1
#define TYPE_VARIABLE 0x2
#define TYPE_ARGUMENT 0x3
#define TYPE_TYPE 0x4
#define TYPE_CONST 0x5
typedef struct mod_call
{
char *name;
char *proc;
int thread;
char *btable;
char *loop;
struct mod_call *next;
} mod_call, *mod_call_p;
typedef struct argument_ent
{
char *name;
int direction;
int mclass;
struct sym_ent *type;
} argument_ent, *argument_ent_p;
typedef struct module_ent
{
char *path;
int times_called;
struct sym_ent *args;
} module_ent, *module_ent_p;
typedef struct variable_ent
{
int vclass;
struct sym_ent *type;
} variable_ent, *variable_ent_p;
typedef struct const_ent
{
struct sym_ent *type;
char *cvalue;
} const_ent, *const_ent_p;
typedef union type_ent
{
void *v;
module_ent_p mod;
variable_ent_p var;
const_ent_p con;
argument_ent_p arg;
} type_ent, *type_ent_p;
typedef struct sym_ent
{
char *name; /* ptr to string table */
int type;
union type_ent value; /* sybmol record */
struct sym_ent *next; /* next in line */
} sym_ent, *sym_ent_p;
sym_ent_p symenter(char *name, sym_ent_p context, int type);
sym_ent_p symlook(char *name, sym_ent_p context, int type);
sym_ent_p lookup_type(char *name);
void init_symbol_table();
#endif