home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Harvest C 1.3 / Source Code / structs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-21  |  2.4 KB  |  98 lines  |  [TEXT/ALFA]

  1. /*
  2.  * Harvest C
  3.  * 
  4.  * Copyright 1991 Eric W. Sink   All rights reserved.
  5.  * 
  6.  * This file contains all the data structure definitions for Harvest C.
  7.  * Generally each structure is declared, and then its type is assigned to a
  8.  * typedef.
  9.  * 
  10.  * 
  11.  */
  12.  
  13. #include "Common.h"
  14.  
  15. typedef long                    Codigo_t;
  16.  
  17. struct uniqstring {
  18.     struct uniqstring P__H         *next;
  19.     unsigned long                   HashKey;
  20.     char                            name[1];
  21. };
  22.  
  23. /* ------------------ Keyword Hash Table -------------------- */
  24.  
  25. /*
  26.  * Below, the data structure for the key word records, found in the hash
  27.  * table.
  28.  */
  29.  
  30. struct Keywordrecord {
  31.     char                           *name;
  32.     Codigo_t                        val;
  33.     long                            uses;
  34. };
  35. typedef struct Keywordrecord    KW_t;
  36. /*
  37.  * ------------- Parse Buffer (putting back tokens) -------------
  38.  */
  39.  
  40. /*
  41.  * Below, are the data structures for the Parse Buffer.  This data structure
  42.  * facilitates the parser's ability to "back up" if it has read too many
  43.  * tokens (ie if it discovers that the tokens read do not match the current
  44.  * rule.)  The Parse Buffer is an array. In GetToken() , if the buffer
  45.  * contains a token that token is returned, instead of fetching a new one,
  46.  * and the token is removed from the buffer.
  47.  */
  48.  
  49. struct PBnodeS {
  50.     Codigo_t                        tokval;
  51.     long double                     floating;
  52.     long                            integer;
  53.     char                            token[MAXIDLENGTH];
  54. };
  55. typedef struct PBnodeS          PB_t;
  56.  
  57. struct InFile_S {
  58.     char                            fname[MAXFILENAME];
  59.     short                           volrefnum;
  60.     long                            dirID;
  61.     struct InFile_S P__H           *next;
  62. };
  63. typedef struct InFile_S         InFile_t;
  64. typedef InFile_t P__H          *InFileVia_t;
  65.  
  66.  
  67. /* Actually this struct is never used */
  68. struct MemBuf_S {
  69.     unsigned char P__H             *buf;
  70.     unsigned long                   ndx;
  71. };
  72. typedef struct MemBuf_S         MemBuf_t;
  73. typedef MemBuf_t P__H          *MemBufVia_t;
  74.  
  75. #include <assert.h>
  76.  
  77.  
  78. #include "Param.h"
  79. #include "TypeRecord.h"
  80. #include "Lexer.h"
  81. #include "LinkStruct.h"
  82. #include "ParseTree.h"
  83. #include "SymTable.h"
  84. #include "PPSymTable.h"
  85. #include "CodeGen.h"
  86. #include "Scopes.h"
  87. #include "OMF.h"
  88. #include "GenericFile.h"
  89. #include "SRC.h"
  90. #include "Assem.h"
  91. #include "Errors.h"
  92. #include "Optimize.h"
  93. #include "Options.h"
  94.  
  95. #include "Protos.h"
  96.  
  97. #include "Globals.h"
  98.