emacs-devel
[Top][All Lists]
Advanced

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

Regexp linting scan


From: Mattias Engdegård
Subject: Regexp linting scan
Date: Thu, 30 Jan 2020 17:16:42 +0100

Here is a new scan of regexp irregularities in the Emacs tree (master at 
1ed7cd41db), using relint 1.13, xr 1.15.

Relint now finds more regexps, and the xr linting engine has a new subsumption 
check. This check finds pairs of repetitions, one made unnecessary by the 
other, like [ab]+a* or a*a*. The check is somewhat experimental, but is 
accurate enough and not only indicates possible mistakes and general waste but 
also potential slow regexps.

As an example of the last point, the running time of

(string-match "a*a*b" (make-string N ?a))

is cubical in N. (Not all mistakes are exponential, but it's bad enough.)

Attachment: relint.log
Description: Binary data


reply via email to

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