From: Olof-Joachim Frahm Date: Thu, 28 Aug 2014 22:49:38 +0000 (+0200) Subject: Add post about Lisp syntaxes. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=dcde588cded250b4f4a74855a6fc50987c683d6b;p=blog.git Add post about Lisp syntaxes. --- diff --git a/lisp-syntaxes.post b/lisp-syntaxes.post new file mode 100644 index 0000000..df1fd80 --- /dev/null +++ b/lisp-syntaxes.post @@ -0,0 +1,30 @@ +;;;;; +title: Lisp syntaxes +tags: lisp +date: 2014-08-28 23:41:03 +format: md +;;;;; + +Apart from the standard reader syntax, some libraries provide syntax for a DSL +of their own or to easily create objects. + +# Strings + +`#"foo"#` to allow strings with unescaped quotation marks included. + +The following is similar to shell here documents and Perl syntax: + + #>END + This is a text ended byEND + +The resulting string will be `"This is a text ended by"`. + +# Regular expressions + +`#R""` is the DSL used by `CL-PPCRE` to construct regular expressions. + +# SQL + +`(query [select 'item :where [= [slot-value 'item 'id] 23]])` is the DSL for +`CL-SQL`. The resulting expressions are later converted to regular SQL +statements.