From 50701d2ce888d884283a21445c3df7ded557a173 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 21 Jul 2023 15:02:45 -0300 Subject: README.md: Add stub content Dump a sample REPL session to serve as minimal explanation. --- README.md | 36 ++++++++++++++++++++++++++++++++++++ meta.capim | 2 -- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 README.md delete mode 100644 meta.capim diff --git a/README.md b/README.md new file mode 100644 index 0000000..8820907 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# resyn + +Literal **re**gex **syn**tax for Common Lisp. + + +Sample REPL session: + +```lisp +* (asdf:load-system :resyn) +T +* (set-dispatch-macro-character #\# #\~ #'org.euandre.resyn:reader) +T +* (defparameter url "https://euandre.org") +URL +* (when (#~m|https?://(.*)| url) + :is-a-web-url) +:IS-A-WEB-URL +* '(#~m|https?://(.*)| url) +((LAMBDA (ORG.EUANDRE.RESYN::STR) + (ORG.EUANDRE.RESYN:MATCH "https?://(.*)" ORG.EUANDRE.RESYN::STR :ERE + :IGNORE-CASE? NIL :GLOBAL? NIL)) + URL) +* (equal '(#~m/abc/ "") + '(#~/abc/ "")) +T +* (let ((term "it")) + (#~s/%(term)/%(term) (the \%term)/i "it works like a charm")) +"it (the %term) works like a charm" +T +* (#~s/(a+)(b+)/\2\1/ "aabbbb") +"bbbbaa" +T +``` + +WIP version, with some FIXME markers spread throughout the code, and no +documentation yet. diff --git a/meta.capim b/meta.capim deleted file mode 100644 index 0a0ddb4..0000000 --- a/meta.capim +++ /dev/null @@ -1,2 +0,0 @@ -{:dependencies - {:check #{"lisp-cli"}}} -- cgit v1.2.3