all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How are regexen implemented in Emacs?
Date: Thu, 15 Dec 2022 14:38:45 +0100	[thread overview]
Message-ID: <Y5sjZR+RSZDwxQaV@tuxteam.de> (raw)
In-Reply-To: <87r0x1utw3.fsf@dataswamp.org>

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

On Thu, Dec 15, 2022 at 06:18:36AM +0100, Emanuel Berg wrote:

[...]

> A set of rules crunches the input and determines transitions
> from one state to another, I can imagine deterministic such
> rules - but nondeterministic, what does that mean?
> 
> Maybe that from one state S and input I there are not one but
> several ways to go, one can go to S' but also S'' and both
> "moves" are legal?

Exactly. The naive implementation of which involves keeping
a queue of possible states (breadth-first search).

Thompson's trick is converting the NFA into a DFA by considering
"sets of (possible) states" as your new states. But now you've
got 2^n states; the clever part is how to reduce that to some
manageable state space.

I think the Wikipedia has good articles on that.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2022-12-15 13:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 17:15 How are regexen implemented in Emacs? Marcin Borkowski
2022-12-12 18:16 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-12 19:09   ` Marcin Borkowski
2022-12-12 19:17     ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-12 20:31       ` Marcin Borkowski
2022-12-12 21:19         ` Stefan Monnier
2022-12-13  5:01           ` tomas
2022-12-13 16:16             ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-15  5:22             ` Emanuel Berg
2022-12-16 17:39               ` Akib Azmain Turja
2022-12-17  0:31                 ` Emanuel Berg
2022-12-18  0:54                   ` Jean Louis
2022-12-19 20:31                     ` Emanuel Berg
2022-12-12 20:01     ` tomas
2022-12-12 20:32       ` Marcin Borkowski
2022-12-12 21:24         ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-15  5:18       ` Emanuel Berg
2022-12-15 13:38         ` tomas [this message]
2022-12-15 16:46       ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-15 17:56         ` tomas
2022-12-17  0:13           ` Emanuel Berg
2022-12-15  3:45     ` Emanuel Berg
2022-12-15 13:22       ` tomas
2022-12-15  3:41 ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5sjZR+RSZDwxQaV@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.