| 61 | } |
| 62 | |
| 63 | Result GetResult(LevenshteinDFA const & dfa, std::string const & s) |
| 64 | { |
| 65 | auto it = dfa.Begin(); |
| 66 | DFAMove(it, s); |
| 67 | if (it.Accepts()) |
| 68 | return Result(Status::Accepts, it.ErrorsMade(), it.PrefixErrorsMade()); |
| 69 | if (it.Rejects()) |
| 70 | return Result(Status::Rejects, it.ErrorsMade(), it.PrefixErrorsMade()); |
| 71 | return Result(Status::Intermediate, it.ErrorsMade(), it.PrefixErrorsMade()); |
| 72 | } |
| 73 | |
| 74 | bool Accepts(LevenshteinDFA const & dfa, std::string const & s) |
| 75 | { |
no test coverage detected