emacs-devel
[Top][All Lists]
Advanced

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

Experimental regexp check: repetition of empty-matching expression


From: Mattias Engdegård
Subject: Experimental regexp check: repetition of empty-matching expression
Date: Fri, 12 Apr 2019 22:00:28 +0200

As an experiment I added, to xr, a check for repetitions of expressions that 
can match the empty string, like

\(a*b*\)*

on the grounds that these are either mistakes or potentially risk being very 
slow on the backtracking regexp engine in Emacs. (A DFA would have no problem 
whatsoever; the regexp above would become a single state.)

Is this useful, or a pointless waste of time? Attached are the results from a 
relint run on the Emacs tree so that you can judge for yourselves. If the 
consensus is that it too often complains about perfectly fine regexps, then the 
check will be dropped unceremoniously.

Attachment: relint.log
Description: Binary data


reply via email to

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