-
Notifications
You must be signed in to change notification settings - Fork 0
/
enum.h
85 lines (50 loc) · 2.17 KB
/
enum.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* $Id: enum.h,v 1.1 2024-01-03 23:24:05 behdad Exp $ */
#include "config.h"
/*-------------------*/
/* enum symbol table */
/*-------------------*/
extern SymbolTable *enum_table;
/*----------------------------------*/
/* Initialize a list of enumerators */
/*----------------------------------*/
EnumeratorList *new_enumerator_list (Enumerator *enumerator);
/*--------------------------------*/
/* Add the enumerator to the list */
/*--------------------------------*/
void add_enumerator_list (EnumeratorList *list, Enumerator *enumerator);
/*----------------------------------------------------------*/
/* Free storage used by the elements in the enumerator list */
/*----------------------------------------------------------*/
void free_enumerator_list (EnumeratorList *enumerator_list);
/*-----------------------*/
/* Create new enumerator */
/*-----------------------*/
void new_enumerator (Enumerator *e, char *name, char *comment_before, char *comment_after);
/*-----------------------------------------*/
/* Free the storage used by the enumerator */
/*-----------------------------------------*/
void free_enumerator (Enumerator *param);
/*--------------------------------------------------*/
/* add a comment to the last enumeralor in the list */
/*--------------------------------------------------*/
int comment_last_enumerator (EnumeratorList *enum_list, char *comment);
/*---------------------------*/
/* enum namespace management */
/*---------------------------*/
void add_enum_symbol (char *name, EnumeratorList *first_enum);
/*----------------------------------------------------------*/
/* look for the first enumerator associated with the symbol */
/*----------------------------------------------------------*/
EnumeratorList *find_enum_symbol _((char *name));
/*-------------------------*/
/* Destroy enumerator list */
/*-------------------------*/
void destroy_enum_lists();
/*----------------------------*/
/* create new typedef symbols */
/*----------------------------*/
void new_typedef_symbols _((DeclSpec *decl_spec, DeclaratorList *decl_list));
/*------------------*/
/* Enumerator error */
/*------------------*/
void enumerator_error _((char *name));