[libc-commits] [libc] [libc][regex] Wire regex entrypoints to ExprPool matcher (PR #232291)
Mike Lothian via libc-commits
libc-commits at lists.llvm.org
Sun Oct 18 14:58:14 PDT 2026
FireBurn wrote:
Hi Jeff, thanks for the regex work, and for putting compliance numbers in the description! I run Gentoo on llvm-libc, and I hit regex because the kernel's arch/x86/tools/relocs matches symbol names with patterns like ^real_mode_seg$. With the old literal search it died with a confusing "Invalid absolute R_386_16 relocation"
Before I'd spotted your ExprPool series I wrote a small backtracking engine on my fork to get unstuck: https://github.com/FireBurn/llvm-project/commit/d502413edff9. It does BRE and ERE, bracket expressions with classes, bounds, alternation, capture groups, backreferences and the usual flags, with a step limit so nothing can run away
I ran it through the same suites you used. On Spencer's tests it passes 347 of 464 in REG_NOSUB mode (32 skipped for REG_PEND, REG_STARTEND and REG_NOSPEC). On Fowler's basic.dat it passes all 199 ERE match/no-match cases, and on the three Fowler files together 411 of 415 match/no-match and 400 of 415 exact submatch positions. Most of the remaining failures are collating and equivalence classes and Spencer's stricter error codes
I'd much rather build on your design than carry a second engine. Would it help if I sent follow-ups on top of ExprPool and parse_ere in whatever order suits you, for example . and anchors, bracket expressions, repetition, groups and alternation, then BRE, then the flags? I can share the harness and the failure lists too. If you've already got a plan for those pieces, I'm happy to follow it or leave it alone. Thanks again!
https://github.com/llvm/llvm-project/pull/232291
More information about the libc-commits
mailing list