emacs-devel
[Top][All Lists]
Advanced

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

Re: Scan of regexps in emacs


From: Alan Mackenzie
Subject: Re: Scan of regexps in emacs
Date: Sat, 9 Mar 2019 14:56:21 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

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).



reply via email to

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