forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8f72bec
committed
Handle interaction of regexp's makesearch and MATCHALL more honestly.
Second thoughts about commit824bf71: we apply makesearch() toan NFA after having determined whether it is a MATCHALL pattern.Prepending ".*" doesn't make it non-MATCHALL, but it does change themaximum possible match length, and makesearch() failed to update that.This has no ill effects given the stylized usage of search NFAs, butit seems like it's better to keep the data structure consistent. Inparticular, fixing this allows more honest handling of the MATCHALLcheck in matchuntil(): we can now assert that maxmatchall is infinity,instead of lamely assuming that it should act that way.In passing, improve the code in dump[c]nfa so that infinite maxmatchallis printed as "inf" not a magic number.1 parentd782d59 commit8f72bec
3 files changed
+23
-10
lines changedLines changed: 14 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3660 | 3660 |
| |
3661 | 3661 |
| |
3662 | 3662 |
| |
3663 |
| - | |
3664 |
| - | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
3665 | 3670 |
| |
3666 | 3671 |
| |
3667 | 3672 |
| |
| |||
3824 | 3829 |
| |
3825 | 3830 |
| |
3826 | 3831 |
| |
3827 |
| - | |
3828 |
| - | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
3829 | 3839 |
| |
3830 | 3840 |
| |
3831 | 3841 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
599 | 599 |
| |
600 | 600 |
| |
601 | 601 |
| |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
602 | 609 |
| |
603 | 610 |
| |
604 | 611 |
| |
|
Lines changed: 2 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
385 | 385 |
| |
386 | 386 |
| |
387 | 387 |
| |
388 |
| - | |
389 |
| - | |
390 |
| - | |
391 |
| - | |
392 |
| - | |
393 |
| - | |
394 | 388 |
| |
395 | 389 |
| |
| 390 | + | |
| 391 | + | |
396 | 392 |
| |
397 | 393 |
| |
398 | 394 |
| |
|
0 commit comments
Comments
(0)