Rename structures and free procedures to reflect module change
This commit is contained in:
52
lib/regex.h
52
lib/regex.h
@@ -12,46 +12,46 @@ typedef struct {
|
||||
bool negated;
|
||||
int count, capacity;
|
||||
char *contents;
|
||||
} parse_class_t;
|
||||
} regex_class_t;
|
||||
|
||||
typedef enum {
|
||||
PARSE_QUANTIFIER_NONE,
|
||||
PARSE_QUANTIFIER_STAR,
|
||||
PARSE_QUANTIFIER_PLUS,
|
||||
PARSE_QUANTIFIER_QMARK,
|
||||
} parse_quantifier_t;
|
||||
REGEX_QUANTIFIER_NONE,
|
||||
REGEX_QUANTIFIER_STAR,
|
||||
REGEX_QUANTIFIER_PLUS,
|
||||
REGEX_QUANTIFIER_QMARK,
|
||||
} regex_quantifier_t;
|
||||
|
||||
typedef enum {
|
||||
PARSE_TERM_WILDCARD,
|
||||
PARSE_TERM_CLASS,
|
||||
PARSE_TERM_LITERAL,
|
||||
PARSE_TERM_SUBEXPR,
|
||||
PARSE_TERM_EMPTY,
|
||||
} parse_term_type_t;
|
||||
REGEX_TERM_WILDCARD,
|
||||
REGEX_TERM_CLASS,
|
||||
REGEX_TERM_LITERAL,
|
||||
REGEX_TERM_SUBEXPR,
|
||||
REGEX_TERM_EMPTY,
|
||||
} regex_term_type_t;
|
||||
|
||||
struct _parse_term;
|
||||
struct _regex_term;
|
||||
typedef struct {
|
||||
int count, capacity;
|
||||
struct _parse_term *contents;
|
||||
} parse_sequence_t;
|
||||
struct _regex_term *contents;
|
||||
} regex_sequence_t;
|
||||
|
||||
typedef struct {
|
||||
int count, capacity;
|
||||
parse_sequence_t *contents;
|
||||
} parse_tree_t;
|
||||
regex_sequence_t *contents;
|
||||
} regex_t;
|
||||
|
||||
typedef struct _parse_term {
|
||||
parse_quantifier_t quantifier;
|
||||
parse_term_type_t type;
|
||||
typedef struct _regex_term {
|
||||
regex_quantifier_t quantifier;
|
||||
regex_term_type_t type;
|
||||
union {
|
||||
parse_class_t class;
|
||||
regex_class_t class;
|
||||
char literal;
|
||||
parse_tree_t subexpr;
|
||||
regex_t subexpr;
|
||||
};
|
||||
} parse_term_t;
|
||||
} regex_term_t;
|
||||
|
||||
void parse_free_tree_children(const parse_tree_t *t);
|
||||
void parse_free_sequence_children(const parse_sequence_t *s);
|
||||
void parse_free_class_children(const parse_class_t *c);
|
||||
void regex_free_children(const regex_t *t);
|
||||
void regex_free_sequence_children(const regex_sequence_t *s);
|
||||
void regex_free_class_children(const regex_class_t *c);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user