emacs-devel
[Top][All Lists]
Advanced

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

Re: Character group folding in searches


From: Eli Zaretskii
Subject: Re: Character group folding in searches
Date: Sun, 08 Feb 2015 21:12:33 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Sun, 08 Feb 2015 09:03:23 -0500
> 
> > I'm sorry, I don't understand how this will solve the use-cases
> > brought up in this thread.  Can you explain?
> 
> Every equivalence class selected by such a DFA can match any set of
> strings that can be described by a regular expression, so it should be
> more than sufficiently powerful.

Who and how will create such a DFA?  (Or is it multiple DFAs?)
Are you thinking about DFAs created by compiling regular expressions,
or about some new infrastructure we don't yet have?

If the DFA will be the result of compiling regexps, we need quite a
few categories we don't yet have, I think, e.g., to express
diacriticals.  (The current set of categories is just a hodge-podge of
ad-hoc stuff that was needed by some feature at some point.)  We will
also need to decompose characters (NFD and NFKD at least).  That is,
if I at all understand what you have in mind.

> A first implementation of DFAs could use internally char-tables (where
> each node of the DFA is a char-table) but I think it's something
> entirely different from what you mean by "different char-tables" or
> "single char-table", since you'd choose one DFA (which may have any
> number of char-tables inside).

Char-tables are efficient, and at least for decomposition they seem to
be the perfect vehicle.  DFAs that come out of arbitrary regexps,
OTOH, can sometimes be very inefficient.  That's why I tend to think
about this in terms of char-tables.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]