Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:05:33

0001 /*
0002  *  qp_symtab.h  --
0003  *  Declare routines for symbol table management
0004  *  used to store static typing of the 'identifier'
0005  *  type entities.
0006  *
0007  *  Original: 19-Oct-1994 15:57
0008  *
0009  *  Author:   Maarten Ballintijn <Maarten.Ballintijn@cern.ch>
0010  *
0011  *  $Id$
0012  *
0013  *  $Log$
0014  *  Revision 1.3  1996/04/23 18:39:04  maartenb
0015  *  - Add RCS keywords
0016  *
0017  *
0018  */
0019 
0020 #ifndef CERN_SYMTAB
0021 #define CERN_SYMTAB
0022 
0023 #ifndef CERN_SIGNATURE
0024 #include    "qp_signature.h"
0025 #endif
0026 
0027 
0028 typedef struct _stentry_ STEntry;
0029 struct _stentry_ {
0030     STEntry     *next;
0031     char        *name;
0032     Signature   *sig_list;
0033 };
0034 
0035 typedef struct _symtab_ {
0036     int size;
0037     int mark;
0038     int cnt;
0039     STEntry *tab;
0040     int hsize;
0041     STEntry **htab;
0042 } SymTab;
0043 
0044 
0045 extern SymTab *sf_symtab;
0046 
0047 
0048 SymTab *
0049 st_new( unsigned int size );
0050 
0051 STEntry *
0052 st_lookup( SymTab * st, char * const name );
0053 
0054 STIndex
0055 st_index( SymTab * st, char * const name );
0056 
0057 STEntry *
0058 st_entry( SymTab * st, STIndex index );
0059 
0060 int
0061 st_insert( SymTab * st, char * const name, Signature * const s );
0062 
0063 void
0064 st_del( SymTab * st, char * const name );
0065 
0066 void
0067 st_mark( SymTab * st );
0068 
0069 void
0070 st_sweep( SymTab * st );
0071 
0072 #endif  /*  CERN_SYMTAB */