check-parens: use SBCL reader for 100% accurate paren validation

Replace Python regex-based string/comment stripper with SBCL's actual
reader. For each lisp block, feeds the code to read-from-string in a
loop (reading all forms). Correctly classifies: package errors (not a
paren problem), reader errors (extra/missing closes), EOF (missing
closes Handles all Common Lisp reader edge cases: character literals
(#\( #\) #\;), block comments, string escaping
This commit is contained in:
2026-05-13 12:17:02 -04:00
parent fc7bc2fef8
commit 4c55f135fb
2 changed files with 117 additions and 60 deletions

View File

@@ -39,4 +39,5 @@ Pre-commit hook:
== Dependencies
None (stdlib Python 3).
Python 3 + SBCL (for the reader-based validation).
SBCL must be at `/usr/bin/sbcl` (the default path).