Rename construct to construct_nfa and improve tests

This commit is contained in:
2024-10-27 17:57:13 +00:00
parent 55e4e4f5ee
commit d35fa4e9da
3 changed files with 62 additions and 73 deletions

View File

@@ -143,7 +143,7 @@ static void construct_term(const regex_term_t *term, fsa_t *out)
construct_base(out, term->literal);
break;
case REGEX_TERM_SUBEXPR:
construct(&term->subexpr, out);
construct_nfa(&term->subexpr, out);
break;
case REGEX_TERM_WILDCARD:
case REGEX_TERM_CLASS:
@@ -199,7 +199,7 @@ static void construct_union(fsa_t *f, const fsa_t *o)
fsa_add_rule(f, final, 0, EPSILON);
}
void construct(const regex_t *regex, fsa_t *out)
void construct_nfa(const regex_t *regex, fsa_t *out)
{
assert(regex->count > 0);

View File

@@ -9,6 +9,6 @@
#include "fsa.h"
#include "regex.h"
void construct(const regex_t *regex, fsa_t *out);
void construct_nfa(const regex_t *regex, fsa_t *out);
#endif