Common Lisp implementation of Match Patterns Web standard
  • Common Lisp 97%
  • Makefile 3%
Find a file
2025-12-10 04:41:10 +04:00
.github Initial commit 2025-11-16 03:45:45 +04:00
deps makefile,deps/: Add for CLI test runs, REPLs, and vendored deps 2025-12-10 04:34:54 +04:00
source Reapply "cl-match-patterns(pattern,parse,match): Use pathnames" 2025-12-10 04:24:50 +04:00
tests Reapply "cl-match-patterns(pattern,parse,match): Use pathnames" 2025-12-10 04:24:50 +04:00
.gitignore Initial commit 2025-11-16 03:45:45 +04:00
.gitmodules makefile,deps/: Add for CLI test runs, REPLs, and vendored deps 2025-12-10 04:34:54 +04:00
cl-match-patterns.asd Initial commit 2025-11-16 03:45:45 +04:00
LICENSE Initial commit 2025-11-16 03:45:45 +04:00
makefile makefile,deps/: Add for CLI test runs, REPLs, and vendored deps 2025-12-10 04:34:54 +04:00
README.org README: Mention CLI running 2025-12-10 04:41:10 +04:00

cl-match-patterns

cl-match-patterns is a library supporting match patterns as seen in major browsers.

Might be useful for lightweight URL matching or interop with web engines like WebKit. Otherwise it’s just a minor nerd snipe for a Web standards freak like me 😉

Getting Started

Clone the Git repository:

  git clone --recursive https://codeberg.org/aartaka/cl-match-patterns ~/common-lisp/

And then load :cl-match-patterns in the REPL:

  (asdf:load-system :cl-match-patterns)
  ;; or, if you use Quicklisp
  (ql:quickload :cl-match-patterns)

And then use either of the APIs:

  (cl-match-patterns:parse "*://*/*")
  ;; => #<CL-MATCH-PATTERNS:PATTERN {12033506B3}>
  (cl-match-patterns:parse "*://")
  ;; CL-MATCH-PATTERNS:MALFORMED-PATTERN: Cannot parse pattern '*://' because path is mandatory (even if a mere '/')
  (cl-match-patterns:match "https://aartaka.me" (cl-match-patterns:parse "*://*/*"))
  ;; => T, T, T, T

In case you prefer CLI interaction, you can run tests with make check and get a development-ready REPL / Swank / Slynk with make repl / make swank / make slynk.

Examples