[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: OR, quantifier support in Lua patterns
- From: Ricardo Ramos Massaro <ricardo.massaro@...>
- Date: Wed, 10 Oct 2018 15:16:06 -0300
On Tue, Oct 9, 2018 at 6:47 PM Victor Krapivensky
<krapivenskiy.va@phystech.edu> wrote:
> See https://swtch.com/~rsc/regexp/regexp1.html for implementation in less than
> 400 lines of C (probably less rewritten in a "modern" style).
That's some really nice code, but it's missing *at least* one
essential feature that people expect
from a regex engine: captures.
The author calls captures "submatch extraction" and claims that
"Thompson-style algorithms
can be adapted to track submatch boundaries without giving up
efficient performance". If true,
it would be nice to see how simple and small a fast implementation can be.
- Ricardo