lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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