[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c-forward-sws: Is the code right?
From: |
Stefan Monnier |
Subject: |
Re: c-forward-sws: Is the code right? |
Date: |
Tue, 03 Apr 2018 17:03:46 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>>> I've just commented these "a\\`"s everywhere, and committed the fixes to
>>> master.
>> Maybe we should have a
>>
>> (defconst empty-regexp "\\`\\'a"
>> "Regular expression which cannot match anything.")
>>
>> in subr.el?
> Perhaps "nomatch-regexp" would be a better name ? There are several
> regexp constructs that match an empty string, rather than failing to
> match anything.
Right, I was thinking of regexps in the mathematical sense where they
describe a "set of strings", hence the "nomatch" regexp corresponds to
an "empty" regexp. IIRC Brzozovski used ∅ for this empty regexp and
ε for the regexp which matches the empty string.
"nomatch" would be less confusing, indeed.
Stefan