diff options
author | EuAndreh <eu@euandre.org> | 2023-07-21 15:02:45 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-07-24 14:40:32 -0300 |
commit | 50701d2ce888d884283a21445c3df7ded557a173 (patch) | |
tree | 6ef6d0d14b0c9427ac5cdb375c0ba969b9201335 | |
parent | Initial reader macro syntax (diff) | |
download | resyn-50701d2ce888d884283a21445c3df7ded557a173.tar.gz resyn-50701d2ce888d884283a21445c3df7ded557a173.tar.xz |
README.md: Add stub content
Dump a sample REPL session to serve as minimal explanation.
-rw-r--r-- | README.md | 36 | ||||
-rw-r--r-- | meta.capim | 2 |
2 files changed, 36 insertions, 2 deletions
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"}}} |