16 Commits

Author SHA1 Message Date
e283fd2c52 Support + and ? in construct_nfa() 2024-11-03 12:16:38 +00:00
77e1a77e02 Support wildcards in construct 2024-11-03 11:59:56 +00:00
38b5b48289 Support classes in construct step 2024-11-03 11:55:05 +00:00
34fee99232 Fix bug in construct_nfa
Intermediate final states were being left in by add_fsa(); we always
want to mark the added FSA's final state as non-final.
2024-11-02 23:12:23 +00:00
730ec80220 No longer set state zero to be final in fsa_init() 2024-10-29 13:14:35 +00:00
d35fa4e9da Rename construct to construct_nfa and improve tests 2024-10-29 09:29:10 +00:00
55e4e4f5ee Add non-base-case construct tests and fix construct logic 2024-10-27 17:07:19 +00:00
d5b40f9324 Support subexpressions in construct() 2024-10-27 13:35:45 +00:00
bbecd12c91 Implement star construction 2024-10-27 13:33:40 +00:00
d54080032c Remove invalid assert() in construct() 2024-10-27 13:24:12 +00:00
280168bb6f Handle initial state being final in merge_fsas() 2024-10-27 13:23:15 +00:00
755f3f6805 Add runtime assertion on unhandled case in concat_fsas() 2024-10-27 13:21:29 +00:00
852102cab9 Implement union construction 2024-10-27 01:50:35 +00:00
007cddc292 Add some runtime assertions for state zero being final
I'm using this invariant to save work finding the final state so it
makes sense to test it.
2024-10-27 01:24:43 +01:00
2804638d84 Support sequences in construct() 2024-10-27 00:06:15 +01:00
2ac92f62f1 Implement NFA construction for empty expression and literals 2024-10-27 00:06:15 +01:00