symboltable.h
来自「decafc的源代码」· C头文件 代码 · 共 63 行
H
63 行
/**************************************************************************** * File name: symbolTable.h * * Description: header file for symbolTable.c * * Input: none * * Output: none * * Author: Luojian Chen * * Date: April 16, 1997 * ****************************************************************************/#ifndef _SYMBOL_TABLE_H_#define _SYMBOL_TABLE_H_#include <stdio.h>#include <string.h>#include "decafc.h"#define SYMBOL_TABLE_SIZE 19#define EOS '\0' /* NULL character *//* data structure of one element in the symbol table */typedef struct element { String id; /* key id */ int offset; struct element *typePtr; /* pointer to the type infomation */ struct element *next; /* pointer to the next symbol with the same hash table index */} Element;typedef Element *ElementPtr;typedef ElementPtr HashTableEntry;typedef HashTableEntry *HashTable;/* data structure of the symbol table */typedef struct symbolTable { HashTable hashTable; /* hash table pointer */ int numberOfEntries; /* hash table size */} SymbolTable;typedef SymbolTable *SymbolTablePtr;typedef struct symbolTableStackEntry { SymbolTablePtr symbolTablePtr; int beginLocalVarID; struct symbolTableStackEntry *next;} SymbolTableStackEntry;typedef SymbolTableStackEntry *SymbolTableStackEntryPtr;typedef struct symbolTableStack { SymbolTableStackEntryPtr top;} SymbolTableStack;typedef SymbolTableStack *SymbolTableStackPtr;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?