[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp and valid-sre?
On 11/26/2013 10:24 AM, John Cowan wrote:
Michael Montague scripsit:
I don't think that these are strong arguments for having
'valid-sre?'. An implementation for which compiling is expensive,
could easily internally do the "is it valid"-type check before
compiling. Having it in the interface adds no functionality that is
not already easily available.
It tells the compiler only to syntax-check and not go on to actually
compile. This is a very common feature in compilers: for example,
in gcc the -fsyntax-only option activates this mode. Sometimes
all you want to know at present is whether something is syntactically valid.
The only use case for 'valid-sre?' mentioned so far is Peter's
interactive regular expression IDE. The C standard does not require the
-fsyntax-only option. These do not seem like compelling arguments for