From: Yuri Khan <yuri.v.khan@gmail.com>
To: tomas@tuxteam.de
Cc: Michael Heerdegen <michael_heerdegen@web.de>, help-gnu-emacs@gnu.org
Subject: Re: How to get a concatenation of the negations with rx (ex: [^a][^b])?
Date: Sun, 12 Nov 2023 15:28:21 +0700 [thread overview]
Message-ID: <CAP_d_8U3euLr5Bh-mRvYUqVJGiXBCGZZq=9k_3ghRZsa_+U+AA@mail.gmail.com> (raw)
In-Reply-To: <ZVB+IsDJQnmokcrR@tuxteam.de>
On Sun, 12 Nov 2023 at 14:27, <tomas@tuxteam.de> wrote:
> Actually... the complement of a regular language is also a regular
> language, so there should be a regexp for that, too.
In all(?) the courses that taught me the theory of regular languages,
the construction of a negation of a regexp would be suitable as the
practical part of an exam question sheet.
As the first step, it is relatively straightforward to build a
non-deterministic finite state machine from the original regexp; then
we complement that NDFA’s set of accepting states; and then it’s a
tedious, error-prone job of building a regexp equivalent to that
complemented NDFA.
The regexp thus obtained is often not a pretty sight, either.
next prev parent reply other threads:[~2023-11-12 8:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-11 20:17 How to get a concatenation of the negations with rx (ex: [^a][^b])? Edgar Lux
2023-11-11 21:00 ` Emanuel Berg
2023-11-13 19:26 ` tomas
2023-11-12 7:03 ` Michael Heerdegen
2023-11-12 7:26 ` tomas
2023-11-12 8:28 ` Yuri Khan [this message]
2023-11-12 10:38 ` tomas
2023-11-12 11:53 ` Michael Heerdegen
2023-11-13 8:46 ` Anders Munch
2023-11-13 9:24 ` tomas
2023-12-24 11:54 ` tomas
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='CAP_d_8U3euLr5Bh-mRvYUqVJGiXBCGZZq=9k_3ghRZsa_+U+AA@mail.gmail.com' \
--to=yuri.v.khan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=tomas@tuxteam.de \
/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.