drslump/sexp-php — pull request #1 by rigidus (2012-12-13 06:21:42+00:00)
Title: quaziquoting

Hi
I modified the parser s-expressions to add the ability to use ` as equivalent to (quote
Hope this is useful.

Test:

$sexp = new Sexp();
$arr = $sexp->parse("(quote (a `b `c 'dddddd' `|dGVzdA==| `(`#DEADBEEF `f g
;; wefewfew
) h) i)");
print_r($arr);
print_r($sexp->serialize($arr));

Output:

(quote
(a
(quote b)
(quote c) dddddd
(quote test)
(quote
(
(quote DEADBEEF)
(quote f) g) h)) i)

Glukhov Mikhail, Russia, St. Petersburg, 13.12.2012 10:21