[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Static validation of Lua String Patterns?
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 22 Apr 2017 09:30:52 +0200
On Fri, Apr 21, 2017 at 11:43 PM, Egor Skriptunoff
> "(.)%2" is an invalid pattern, but it could be applied to empty string
> without an error.
Yes, exactly. There are a number of these which go beyond simple
mechanical validation (brackets matching up etc).
My feeling is that it is possible to do this (after all, regexps can
be compiled) but not without going through a similar, recursive
process to existing matching - so you know how many captures you have,