----------------------------------------------------------------------------
| 334 | |
| 335 | //---------------------------------------------------------------------------- |
| 336 | bool |
| 337 | DFA::build(const std::string_view pattern, unsigned flags) |
| 338 | { |
| 339 | Regex rxp; |
| 340 | std::string string{pattern}; |
| 341 | |
| 342 | if (!(flags & RE_UNANCHORED)) { |
| 343 | flags |= RE_ANCHORED; |
| 344 | } |
| 345 | |
| 346 | if (!rxp.compile(pattern, flags)) { |
| 347 | return false; |
| 348 | } |
| 349 | _patterns.emplace_back(std::move(rxp), std::move(string)); |
| 350 | return true; |
| 351 | } |
| 352 | |
| 353 | //---------------------------------------------------------------------------- |
| 354 | int32_t |
no test coverage detected