BasicMatchingAutomaton¶
fauto.spad line 92 [edit on github]
This domain implements nondeterministic finite automaton using Thompson algorithm for matching. Currently only supports creation of very simple automaton, but representation and matching algorithm supports general nondeterministic finite automaton.
- make_automaton: (List String, Boolean, Boolean) -> %
make_automaton(ls, pre_wild, post_wild)builds automaton matching pattern consisting of alternating strings and stars, where strings are taken fromls, star match any sequence of character. Ifpre_wildittrue, then there is star at the start of the pattern, otherwise pattern starts with the first string ofls. If post_wild ittrue, then there is star at the end of the pattern, otherwise pattern ends with the last string ofls.