/* * pop symbol table identifiers at this level symbol_right_bracket(); */ void symbol_right_bracket( void) { TUPLE *tuple; /* * print the complete symbol table before poping symbols off */ #ifdef YYDEBUG if( IS_FLAGS_SYMBOL( data.flags)) { printf( "pop symbol table level: %d\n", data.level); print_symbol_table(); } #endif /* * check and remove all tuple above level */ for( tuple = data.symbol_table; tuple; tuple = data.symbol_table) { if( tuple->level < data.level) break; put_address( tuple->address, 1); data.symbol_table = tuple->next; tuple->next = data.symbol_table_free; data.symbol_table_free = tuple; } /* * decrement the symbol table level */ data.level--; return; }
/* * clean-up and exit the software */ int java2cpp_exit( void) { #ifdef YYDEBUG if( IS_FLAGS_SYMBOL(data.flags)) { print_symbol_table(); } #endif de_clips_list(data.symbol_table); #ifdef YYDEBUG print_typedef_table(); #endif de_clips_list(data.typedef_table); /* * Check if memory leak */ if(data.memory) { fprintf(stderr, "Error: memory deallocation error: %d\n",data.memory); } /** check if compiler warnings */ if(data.warnings) fprintf(stderr, "Warning: compiler warnings: %d\n", data.warnings); /** check for errors */ if(data.errors) fprintf(stderr, "Error: compiler errors: %d\n", data.errors); return (data.errors); }
/* * clean-up and exit the software */ int main_exit( void) { /* * print the symbol table */ #ifdef YYDEBUG if( IS_FLAGS_SYMBOL( data.flags)) { print_symbol_table(); } #endif /* * deallocate the symbol table list */ free_tuple_list( data.symbol_table); free_tuple_list( data.symbol_table_free); /* * check if memory leak */ if( data.memory) fprintf( stderr, "Error: memory deallocation error: %d\n", data.memory); /* * check if compiler warnings */ if( data.warnings) fprintf( stderr, "Warning: compiler warnings: %d\n", data.warnings); /* * check if compiler errors */ if( data.errors) fprintf( stderr, "Error: compiler errors: %d\n", data.errors); return( data.errors); }
/* * pop symbol table identifiers at this level symbol_right_bracket(); */ void symbol_right_bracket( void) { CLIPS *clips; /* * print the complete symbol table before poping symbols off */ #ifdef YYDEBUG if( IS_FLAGS_SYMBOL( data.flags)) { printf( "pop symbol table level: %d\n", data.level); print_symbol_table(); } #endif /* * check and remove all clips above level */ for( clips = data.symbol_table; clips; clips = data.symbol_table) { if( clips->level < data.level) break; put_address( clips->address); data.symbol_table = clips->next; de_clips( clips); } /* * decrement the symbol table level */ data.level--; return; }
/* * clean-up and exit the software */ int main_exit( void) { /* * print the attribute table */ #ifdef YYDEBUG if( IS_FLAGS_SYMBOL( data.flags)) { print_attribute_table(); } #endif return 0; }
/* * clean-up and exit the software */ int ansi_c_exit( void) { /* * print the typedef table then deallocate it */ #ifdef YYDEBUG print_typedef_table(); #endif de_clips_list( data.typedef_table); /* * print the symbol table */ #ifdef YYDEBUG if( IS_FLAGS_SYMBOL( data.flags)) { print_symbol_table(); } #endif /* * deallocate the symbol table list */ de_clips_list( data.symbol_table); /* * check if memory leak */ if( data.memory) fprintf( stderr, "Error: memory deallocation error: %d\n", data.memory); /* * check if compiler warnings */ if( data.warnings) fprintf( stderr, "Warning: compiler warnings: %d\n", data.warnings); /* * check if compiler errors */ if( data.errors) fprintf( stderr, "Error: compiler errors: %d\n", data.errors); return( data.errors); }
/* * clean-up and exit the software */ int main_exit( void) { /* * print the symbol table */ #ifdef YYDEBUG if( IS_FLAGS_SYMBOL( data.flags)) { print_symbol_table(); } #endif /* * check for a memory leak */ if( data.memory) fprintf( stderr, "Error: memory leak: %d\n", data.memory); /* * check for compiler errors */ if( data.errors) fprintf( stderr, "Errors: %d\n", data.errors); return data.errors; }