-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclist.h
53 lines (43 loc) · 963 Bytes
/
clist.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
/* clist.h
*
* We allow subroutine tokens to come earlier in a regular expression
* than the group that they're referring to. So in build_core, we need
* to keep track of the subroutine atoms until after all cores have
* been built. Hence this file, which declares a list of atom
* pointers.
*/
#ifndef __regex_clist
#define __regex_clist
#include "atom.h"
/* clist
*
* Holds a atom_t pointer and the int which represents the index
* of the core needed for the subroutine call.
*/
typedef struct _clist clist_t;
/** clist_next
*
* Gives the next node.
*/
clist_t* clist_next(clist_t*);
/** clist_pointer
*
* Gives the pointer to the atom.
*/
atom_t* clist_pointer(clist_t*);
/** clist_index
*
* Gives the index of the core.
*/
int clist_index(clist_t*);
/** clist_new
*
* Create a new node.
*/
clist_t* clist_new(clist_t*, atom_t*, int);
/** clist_free
*
* Delete all nodes.
*/
void clist_free(clist_t*);
#endif