Rename construct to construct_nfa and improve tests
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user