telekons / one-more-re-nightmare

A fast regular expression compiler in Common Lisp
https://applied-langua.ge/projects/one-more-re-nightmare/
BSD 2-Clause "Simplified" License
138 stars 9 forks source link

Lint regular expressions #8

Closed no-defun-allowed closed 2 years ago

no-defun-allowed commented 2 years ago

The compiler macro should complain if a RE or some submatch will never match, at the least. Make the user think we're being productive while we're compiling the same code four times.

no-defun-allowed commented 2 years ago

d985722 includes a simple linter which detects dead expressions and groups by checking each state in a DFA for matches.