[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How are regexen implemented in Emacs?
From: |
Stefan Monnier |
Subject: |
Re: How are regexen implemented in Emacs? |
Date: |
Mon, 12 Dec 2022 16:19:19 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> The linked article sounded a bit like "only idiots implement regexen
> in the naive way", and I was pretty sure Emacs devs are not idiots - but
> now I understand the reasons better.
I fully agree that it doesn't make sense to *start* with
a backtracking implementation, yes.
But once you've invested in one, it's harder to move to
something better.
This said, it *would* be better. Not only in terms of eliminating the
pathological blow ups, but it also offers opportunity to get new
functionality, such as the ability to capture the state of a regexp
match at a specific buffer position (so you can perform a multiline
regexp match one line at a time). It could also make it much more
reasonable to add the possibility to run ELisp code from within the
regexp match engine (e.g. add a \p(NAME) entry which calls the NAME
ELisp function).
Stefan
- How are regexen implemented in Emacs?, Marcin Borkowski, 2022/12/12
- Re: How are regexen implemented in Emacs?, Stefan Monnier, 2022/12/12
- Re: How are regexen implemented in Emacs?, Marcin Borkowski, 2022/12/12
- Re: How are regexen implemented in Emacs?, Stefan Monnier, 2022/12/12
- Re: How are regexen implemented in Emacs?, Marcin Borkowski, 2022/12/12
- Re: How are regexen implemented in Emacs?,
Stefan Monnier <=
- Re: How are regexen implemented in Emacs?, tomas, 2022/12/13
- Re: How are regexen implemented in Emacs?, Stefan Monnier, 2022/12/13
- Re: How are regexen implemented in Emacs?, Emanuel Berg, 2022/12/15
- Re: How are regexen implemented in Emacs?, Akib Azmain Turja, 2022/12/16
- Re: How are regexen implemented in Emacs?, Emanuel Berg, 2022/12/17
- Re: How are regexen implemented in Emacs?, Jean Louis, 2022/12/18
- Re: How are regexen implemented in Emacs?, Emanuel Berg, 2022/12/20
- Re: How are regexen implemented in Emacs?, tomas, 2022/12/12
- Re: How are regexen implemented in Emacs?, Marcin Borkowski, 2022/12/12
- Re: How are regexen implemented in Emacs?, Stefan Monnier, 2022/12/12