Commit 023b1e7
feat(specializer): wave-B regexp family — rust-regex behind an RE2 translation layer, corpus 484 -> 505 (TASK-53)
The engine is regex 1.x with the measured parity recipe (pins-waveB/
re2-vs-rust-regex.json): RegexBuilder::octal(true), default Unicode mode
(unicode(false) BREAKS (?i) folding parity — measured), and a bind-time
pattern rewrite in retrans.rs closing the whole Perl-class gap (\d ->
(?-u:\d) etc, in-class variants included) plus a reject list for the
irreconcilables (\B, (?<name>), duplicate group names, bounds > 1000,
stacked quantifiers — the last silently WRONG in rust, not just
error-shaped different). Replacement templates translate \N -> ${N},
$ -> $$, with RE2's invalid-rewrite quirks resolved at bind (out-of-
range backref = identity; global bad escape = consume-with-prefix).
Program grows a prepare-time regex table (print/parse round-trips it);
ReMatch/ReExtract/ReReplace run on both backends. Frontend serves
regexp_matches (SEARCH) / regexp_full_match / regexp_extract (''-on-miss,
flat 0..9 group check, NULL-group -> '') / regexp_replace (backslash
backrefs, 'g', NULL options -> NULL — the pinned asymmetry); ~ / !~ are
FULL match (NOT the Postgres search — measured, the DuckDB binder error
names regexp_full_match); SIMILAR TO passes the RAW pattern (no %%
translation) full-anchored; star * SIMILAR TO filters names by unanchored
search while NOT SIMILAR TO negates a full match (independent predicates
— pinned asymmetry); bare COLUMNS('re')/COLUMNS(*) expand in declared
order with alias stamping. List-valued forms stay clean-unsupported.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent b003122 commit 023b1e7
20 files changed
Lines changed: 1494 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
63 | 72 | | |
64 | 73 | | |
65 | 74 | | |
| |||
591 | 600 | | |
592 | 601 | | |
593 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
594 | 660 | | |
595 | 661 | | |
596 | 662 | | |
| |||
836 | 902 | | |
837 | 903 | | |
838 | 904 | | |
| 905 | + | |
| 906 | + | |
839 | 907 | | |
840 | 908 | | |
841 | 909 | | |
| |||
1084 | 1152 | | |
1085 | 1153 | | |
1086 | 1154 | | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
1087 | 1164 | | |
1088 | 1165 | | |
1089 | 1166 | | |
1090 | 1167 | | |
1091 | 1168 | | |
| 1169 | + | |
1092 | 1170 | | |
1093 | 1171 | | |
1094 | 1172 | | |
| |||
1122 | 1200 | | |
1123 | 1201 | | |
1124 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
1125 | 1205 | | |
1126 | 1206 | | |
1127 | 1207 | | |
| |||
1456 | 1536 | | |
1457 | 1537 | | |
1458 | 1538 | | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
1459 | 1563 | | |
1460 | 1564 | | |
1461 | 1565 | | |
| |||
1850 | 1954 | | |
1851 | 1955 | | |
1852 | 1956 | | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
1853 | 1960 | | |
1854 | 1961 | | |
1855 | 1962 | | |
| |||
1887 | 1994 | | |
1888 | 1995 | | |
1889 | 1996 | | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
1890 | 2000 | | |
1891 | 2001 | | |
1892 | 2002 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
61 | 82 | | |
62 | 83 | | |
63 | 84 | | |
| |||
120 | 141 | | |
121 | 142 | | |
122 | 143 | | |
| 144 | + | |
123 | 145 | | |
124 | 146 | | |
125 | 147 | | |
| |||
143 | 165 | | |
144 | 166 | | |
145 | 167 | | |
146 | | - | |
| 168 | + | |
147 | 169 | | |
148 | 170 | | |
149 | 171 | | |
| |||
1432 | 1454 | | |
1433 | 1455 | | |
1434 | 1456 | | |
1435 | | - | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
1436 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
1437 | 1510 | | |
1438 | 1511 | | |
1439 | 1512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| |||
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
451 | 455 | | |
452 | 456 | | |
453 | 457 | | |
| 458 | + | |
454 | 459 | | |
455 | 460 | | |
456 | 461 | | |
| |||
0 commit comments