| 1 |
< |
/* |
| 1 |
> |
/* |
| 2 |
|
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
| 3 |
|
* |
| 4 |
|
* The University of Notre Dame grants you ("Licensee") a |
| 57 |
|
|
| 58 |
|
//*** Global functions, variables, and structures ************ |
| 59 |
|
|
| 60 |
< |
unsigned short is_initialized = 0; // tells whether to init the linked list |
| 60 |
> |
unsigned short is_initialized = 0; // tells whether to init the linked list |
| 61 |
|
|
| 62 |
|
// reserved word elements for the hash table |
| 63 |
|
struct res_element{ |
| 88 |
|
//*** The Functions ******************************************* |
| 89 |
|
|
| 90 |
|
|
| 91 |
< |
/* |
| 92 |
< |
function to initialize the list of reserved words into memory. |
| 93 |
< |
*/ |
| 91 |
> |
/* |
| 92 |
> |
function to initialize the list of reserved words into memory. |
| 93 |
> |
*/ |
| 94 |
|
|
| 95 |
|
void initialize_res_list(){ |
| 96 |
|
|
| 125 |
|
|
| 126 |
|
|
| 127 |
|
/* |
| 128 |
< |
checks for reserved words. |
| 129 |
< |
If a reserved word is found, returns the token, |
| 130 |
< |
else returns 0. |
| 128 |
> |
checks for reserved words. |
| 129 |
> |
If a reserved word is found, returns the token, |
| 130 |
> |
else returns 0. |
| 131 |
|
*/ |
| 132 |
|
|
| 133 |
|
int res_word( char* text ){ |
| 189 |
|
key = hash( text ); |
| 190 |
|
|
| 191 |
|
if( defined_list != NULL ){ |
| 192 |
< |
def_ptr = defined_list[key]; |
| 192 |
> |
def_ptr = defined_list[key]; |
| 193 |
|
|
| 194 |
|
while( def_ptr != NULL ){ |
| 195 |
|
|