We now have some (basic) support for Common Lisp.
If you use unsweeten with the new "-C" (Common Lisp) option, it'll try to
generate output that can be piped or later sent to a Common Lisp system.
Basically, it controls how quasiquote (`), comma (,), and comma-at (,@) are
displayed. It's not foolproof, but I think it works in the vast number of
cases. I also hacked in basic support for Common Lisp's "#.".
The big step "to be done" is to support #'name, which is Common Lisp's
(function name) but is Scheme's (syntax ...). So I need a new library
interface to let it know that a "Common Lisp" mode is enabled, so that it will
return (function ....) instead.
I don't expect to do much more than this for Common Lisp, but I think that is
enough to get started. Possible to-dos:
* Implement a string reader that's more forgiving than guile's, so that CL
strings can be read in.
* Add support for a few more #... when Common Lisp mode is enabled (basically,
so they can pass through).
Here's a demo:
unsweeten -C | clisp
defun factorial (n)
if {n <= 1}
1
{n * factorial{n - 1}}
==> FACTORIAL
factorial 40
==> 815915283247897734345611269596115894272000000000
; Now test quasiquotation and comma, which didn't work before:
`(1 2 ,(+ 3 4))
==> (1 2 7)
--- David A. Wheeler
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Readable-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/readable-discuss