From: Alan Mackenzie <acm@muc.de>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: Scan of regexps in emacs
Date: Sat, 9 Mar 2019 14:56:21 +0000 [thread overview]
Message-ID: <20190309145621.GA5380@ACM> (raw)
In-Reply-To: <9f6f677b29f514c5f0bb1bb805e89d62eb146999.camel@acm.org>
Hello, Mattias.
On Sat, Mar 09, 2019 at 14:26:38 +0100, Mattias Engdegård wrote:
> Here is a new regexp error scan of the Emacs source tree.
> The new complaints are due to improvements in the regexp-finding
> abilities of the trawler. The locations are also more precise, and
> there is a caret line for extra help.
[ .... ]
As a matter of interest, the current scan failed to catch an unescaped
]. This was at the second ^ (inserted by me) in the last quoted line:
> emacs/lisp/progmodes/cc-awk.el:191:3: In c-awk-regexp-char-list-re: Unescaped literal `^' (pos 13)
> "\\[\\(\\\\[\n\r]\\)*^?\\(\\\\[\n\r]\\)*]?\\(\\\\\\(.\\|\n\\|\r\\|\\'\\)\\|\\[:[a-z]+:\\]\\|[^]\n\r]\\)*\\(]\\|$\\)"
> ....................^ ^
Incidentally, there is another error in this regexp. It contains a
stanza of the form A*x?A* near the beginning, which is asking for
trouble (time exponential in the number of escaped NLs) should there be
lots of escaped NLs anywhere. A correct way to write this is
\\(A*x\\)?A*.
I will be fixing all these glitches.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2019-03-09 14:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-09 13:26 Scan of regexps in emacs Mattias Engdegård
2019-03-09 14:56 ` Alan Mackenzie [this message]
2019-03-09 15:09 ` Alan Mackenzie
2019-03-10 11:19 ` Mattias Engdegård
2019-03-09 17:06 ` Paul Eggert
2019-03-09 17:46 ` Alan Mackenzie
2019-03-11 2:45 ` Paul Eggert
2019-03-11 2:56 ` Clément Pit-Claudel
2019-03-11 3:37 ` Paul Eggert
2019-03-11 8:39 ` Mattias Engdegård
2019-03-11 8:51 ` Mattias Engdegård
2019-03-11 22:49 ` Paul Eggert
2019-03-12 10:21 ` Mattias Engdegård
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=20190309145621.GA5380@ACM \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.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.