forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3068e45
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 parentba05dfe commit3068e45
3 files changed
+23
-10
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3602 | 3602 |
| |
3603 | 3603 |
| |
3604 | 3604 |
| |
3605 |
| - | |
3606 |
| - | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
3607 | 3612 |
| |
3608 | 3613 |
| |
3609 | 3614 |
| |
| |||
3766 | 3771 |
| |
3767 | 3772 |
| |
3768 | 3773 |
| |
3769 |
| - | |
3770 |
| - | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
3771 | 3781 |
| |
3772 | 3782 |
| |
3773 | 3783 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
598 | 598 |
| |
599 | 599 |
| |
600 | 600 |
| |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
601 | 608 |
| |
602 | 609 |
| |
603 | 610 |
| |
|
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)