home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pascal.zip / symtable / symtable.hi < prev    next >
Text File  |  1995-10-29  |  2KB  |  99 lines

  1. /*
  2.  *        C . A . P .   S Y M B O L   T A B L E
  3.  *
  4.  *        I N T E R N A L   I N C L U D E   F I L E
  5.  *
  6.  *        Stéphane Charette @ C.A.P. Services
  7.  *
  8.  *        Last modified:  Stéphane Charette, 1995 October 29
  9.  *
  10.  *****************************************************************************
  11.  *
  12.  *        Project:    BILL
  13.  *        Group:    symbol table
  14.  *        File:        symtable\symtable.hi
  15.  *
  16.  *        This file contains all of the internal definitions used with
  17.  *        the symbol table portion of the interpreter BILL.
  18.  */
  19.  
  20.  
  21.  
  22. #ifndef _SYMTABLE_H_INTERNAL
  23.  
  24.     #define _SYMTABLE_H_INTERNAL
  25.  
  26.     /*
  27.      *        Includes
  28.      */
  29.         #include "..\symtable\symtable.h"
  30.         #include <stdio.h>
  31.         #include <stdlib.h>        // exit
  32.         #include <string.h>
  33.         #include <stdarg.h>        // vprintf, vfprintf
  34.  
  35.  
  36.  
  37.     /*
  38.      *        Defines
  39.      */
  40.  
  41.         #ifdef _SYMTABLE_DEBUG
  42.         #define SYMTABLE_DEBUG_FILENAME "SYMTABLE.TXT"    // output file for symbol table
  43.         #endif
  44.  
  45.  
  46.  
  47.     /*
  48.      *        Types & structures
  49.      */
  50.         #ifdef _SYMTABLE_DEBUG
  51.         struct SYMTABLE_DEBUG_STRUCT
  52.         {
  53.             BOOL    ScreenOutput;    // enable screen output
  54.             BOOL    FileOutput;        // enable file output
  55.         };
  56.         typedef struct SYMTABLE_DEBUG_STRUCT SYMTABLE_DEBUG;
  57.         #endif
  58.  
  59.         struct SYMTABLE_ENTRY_STRUCT
  60.         {
  61.             BOOL    Used;                // determines if this table entry is being used
  62.             BOOL    Constant;        // is this table entry a constant?
  63.             UCHAR    Name[ SYMTABLE_MAX_VAR_LEN + 1 ];    // name of the variable
  64.         };
  65.         typedef struct SYMTABLE_ENTRY_STRUCT SYMTABLE_ENTRY;
  66.  
  67.  
  68.  
  69.     /*
  70.      *        Macros
  71.      */
  72.  
  73.  
  74.  
  75.     /*
  76.      *        Local (internal) variables
  77.      */
  78.          SYMTABLE_ENTRY    Table[ SYMTABLE_MAX_ENTRY ];    // table => array of table entries
  79.         ERR SymTableInternalError;                            // keeps track of error codes
  80.         #ifdef _SYMTABLE_DEBUG
  81.         SYMTABLE_DEBUG    Symbol_Table_Debug;                // lexical debug states
  82.         FILE             *SymTableDebugFilePtr;                // file pointer for debug output
  83.         #endif
  84.  
  85.  
  86.  
  87.     /*
  88.      *        Local (internal) prototyping
  89.      */
  90.          void SymTableError( ERR );                            // sets error flag to specified ERR
  91.         #ifdef _SYMTABLE_DEBUG
  92.         ERR SymTableDebugWrite( UCHAR *text, ... );    // write debug information to screen/file
  93.         #endif
  94.  
  95.  
  96.  
  97. #endif
  98.  
  99.