help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: will we ever have zero width assertions in regexps?


From: Ilya Zakharevich
Subject: Re: will we ever have zero width assertions in regexps?
Date: Mon, 31 Jan 2011 17:10:11 +0000 (UTC)
User-agent: slrn/0.9.8.1pl1 (Linux)

On 2011-01-31, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> match-with-continuation.  An interesting idea.  I already implemented
>> it for Perl (to support (??{}), but it is not exposed to the user.
>> Would one want this in non-interactive situations?
>
> I can't think of interactive uses, but I'd like to try and use it for
> to let font-lock find elements that span several lines, even when it
> works one-line-at-a-time.

So you have a REx which is matched against a line, but you want (in
addition to the usual effects of matching) to know whether it "wanted"
the match to overflow into the following line?

If so, it looks like "reusing the continuation state" would not be a
serious optimization - it would add just a small multiplicative
constant to the "use only the hypothetical bit" scenario...

Do I miss anything?
Ilya


reply via email to

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