2 /*+------- <| --------------------------------------------------------**
4 **--- /.\ -----------------------------------------------------**
5 ** <| [""M# symbol.h **
6 **- A | # -----------------------------------------------------**
7 ** /.\ [""M# First version: 01/05/2008 **
8 **- [""M# | # U"U#U -----------------------------------------------**
11 ****** | "--' .-" ******************************************************
12 * |"-"-"-"-"-#-#-## Clan : the Chunky Loop Analyzer (experimental) *
13 **** | # ## ###### *****************************************************
15 * \ ::::'/ Copyright (C) 2008 Cedric Bastoul *
17 * ::88a ### This is free software; you can redistribute it *
18 * ::::888a 8a ##::. and/or modify it under the terms of the GNU Lesser *
19 * ::::::::888a88a[]::: General Public License as published by the Free *
20 *::8:::::::::SUNDOGa8a::. Software Foundation, either version 3 of the *
21 *::::::::8::::888:Y8888:: License, or (at your option) any later version. *
22 *::::':::88::::888::Y88a::::::::::::... *
23 *::'::.. . ..... .. ... . *
24 * This software is distributed in the hope that it will be useful, but *
25 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
26 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
29 * You should have received a copy of the GNU Lesser General Public License *
30 * along with software; if not, write to the Free Software Foundation, Inc., *
31 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
33 * Clan, the Chunky Loop Analyzer *
34 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
36 ******************************************************************************/
40 # define CLAN_SYMBOL_H
43 # include <scoplib/scop.h>
44 # include <scoplib/macros.h>
46 # if defined(__cplusplus)
53 * The clan_symbol_t structure is a node of the symbol table of the parser.
57 char * identifier
; /**< Symbol identifier */
58 int type
; /**< Symbol type (variable, iterator...) */
59 int rank
; /**< Depth for iterators, number for others */
60 struct clan_symbol
* next
; /**< Next symbol in the symbol table */
62 typedef struct clan_symbol clan_symbol_t
;
63 typedef struct clan_symbol
* clan_symbol_p
;
66 /*+****************************************************************************
67 * Structure display function *
68 ******************************************************************************/
69 void clan_symbol_print_structure(FILE *, clan_symbol_p
, int);
70 void clan_symbol_print(FILE *, clan_symbol_p
);
73 /*+****************************************************************************
74 * Memory allocation/deallocation function *
75 ******************************************************************************/
76 clan_symbol_p
clan_symbol_malloc();
77 void clan_symbol_free(clan_symbol_p
);
80 /*+****************************************************************************
81 * Processing functions *
82 ******************************************************************************/
83 clan_symbol_p
clan_symbol_lookup(clan_symbol_p
, char *);
84 clan_symbol_p
clan_symbol_add(clan_symbol_p
*, char *, int, int);
85 void clan_symbol_remove(clan_symbol_p
*, clan_symbol_p
);
86 int clan_symbol_get_rank(clan_symbol_p
, char *);
87 int clan_symbol_get_type(clan_symbol_p
, char *);
88 char ** clan_symbol_iterators(clan_symbol_p
*, int);
89 char ** clan_symbol_id_array(clan_symbol_p
, int, int *);
92 # if defined(__cplusplus)
95 #endif /* define CLAN_SYMBOL_H */