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

Re: regexp and valid-sre?



Implementing Emacs in Scheme is a use case for this.
On Nov 26, 2013 11:17 AM, "Michael Montague" <mikemon@xxxxxxxxx> wrote:

> 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 including
> 'valid-sre?'.