Clan
0.8.0
|
00001 00002 /*+------- <| --------------------------------------------------------** 00003 ** A Clan ** 00004 **--- /.\ -----------------------------------------------------** 00005 ** <| [""M# symbol.h ** 00006 **- A | # -----------------------------------------------------** 00007 ** /.\ [""M# First version: 01/05/2008 ** 00008 **- [""M# | # U"U#U -----------------------------------------------** 00009 | # | # \ .:/ 00010 | # | #___| # 00011 ****** | "--' .-" ****************************************************** 00012 * |"-"-"-"-"-#-#-## Clan : the Chunky Loop Analyzer (experimental) * 00013 **** | # ## ###### ***************************************************** 00014 * \ .::::'/ * 00015 * \ ::::'/ Copyright (C) 2008 University Paris-Sud 11 * 00016 * :8a| # # ## * 00017 * ::88a ### This is free software; you can redistribute it * 00018 * ::::888a 8a ##::. and/or modify it under the terms of the GNU Lesser * 00019 * ::::::::888a88a[]::: General Public License as published by the Free * 00020 *::8:::::::::SUNDOGa8a::. Software Foundation, either version 2.1 of the * 00021 *::::::::8::::888:Y8888:: License, or (at your option) any later version. * 00022 *::::':::88::::888::Y88a::::::::::::... * 00023 *::'::.. . ..... .. ... . * 00024 * This software is distributed in the hope that it will be useful, but * 00025 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * 00026 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * 00027 * for more details. * 00028 * * 00029 * You should have received a copy of the GNU Lesser General Public License * 00030 * along with software; if not, write to the Free Software Foundation, Inc., * 00031 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 00032 * * 00033 * Clan, the Chunky Loop Analyzer * 00034 * Written by Cedric Bastoul, Cedric.Bastoul@u-psud.fr * 00035 * * 00036 ******************************************************************************/ 00037 00038 00039 #ifndef CLAN_SYMBOL_H 00040 # define CLAN_SYMBOL_H 00041 00042 # if defined(__cplusplus) 00043 extern "C" 00044 { 00045 # endif 00046 00047 struct osl_strings; 00048 struct osl_generic; 00049 struct osl_relation_list; 00050 00054 struct clan_symbol 00055 { 00056 int key; 00057 char* identifier; 00058 int type; 00059 int rank; 00060 struct clan_symbol* next; 00061 }; 00062 typedef struct clan_symbol clan_symbol_t; 00063 typedef struct clan_symbol* clan_symbol_p; 00064 00065 00066 /*+**************************************************************************** 00067 * Structure display function * 00068 ******************************************************************************/ 00069 void clan_symbol_print_structure(FILE*, clan_symbol_p, int); 00070 void clan_symbol_print(FILE*, clan_symbol_p); 00071 00072 00073 /*+**************************************************************************** 00074 * Memory allocation/deallocation function * 00075 ******************************************************************************/ 00076 clan_symbol_p clan_symbol_malloc(); 00077 void clan_symbol_free(clan_symbol_p); 00078 00079 00080 /*+**************************************************************************** 00081 * Processing functions * 00082 ******************************************************************************/ 00083 clan_symbol_p clan_symbol_lookup(clan_symbol_p, char*); 00084 clan_symbol_p clan_symbol_lookup_by_key(clan_symbol_p, int); 00085 clan_symbol_p clan_symbol_add(clan_symbol_p*, char*, int); 00086 int clan_symbol_get_rank(clan_symbol_p, char*); 00087 int clan_symbol_get_type(clan_symbol_p, char*); 00088 struct osl_strings* clan_symbol_array_to_strings(clan_symbol_p*, int); 00089 int clan_symbol_nb_of_type(clan_symbol_p, int); 00090 struct osl_generic* clan_symbol_to_strings(clan_symbol_p, int); 00091 clan_symbol_p clan_symbol_clone_one(clan_symbol_p); 00092 struct osl_generic* clan_symbol_to_arrays(clan_symbol_p); 00093 int clan_symbol_new_iterator(clan_symbol_p*, clan_symbol_p*, 00094 char*, int); 00095 int clan_symbol_update_type(clan_symbol_p, 00096 struct osl_relation_list*, int); 00097 00098 # if defined(__cplusplus) 00099 } 00100 # endif 00101 #endif /* define CLAN_SYMBOL_H */