4 The Boa Lisp compiler, written in MzScheme, compiles s-exps to Python
5 byte-code, which can be executed using the Python interpreter
6 itself. This would inevitably provide the developer with Macros and
7 other intuitive powers of Lisp. Thanks to SYNTAX-CASE macros in
8 Scheme, I could implement the parser, and perhaps macros too, using
9 the READ function. The rest is trivial. FFI is used to call AST
10 functions in `libpython` to generate the final byte-code.
12 Consider the following script, taken from the examples in Boa Lisp:
16 (set! urls (:tuple "/(.*)" "hello"))
22 (for c in (xrange (int "10"))
23 (print "Hello," (+ name "!")))))
25 (if (= __name__ "__main__")
26 (web.run urls (globals))
32 This is the Hello World [web.py](http://webpy.org/) example. It can be
35 $ mzscheme -r compile.ss hello.boa hello.pyc
38 I think, this is neat so far. Imagine being able to import Boa modules
39 from Python and vice versa, which can be performed using import
40 hooks. Although I am being listless nowadays when it comes to this
41 project, I definitely want to complete the most wanted features like
42 mapping AST nodes to corresponding forms in s-exp with line number
43 information which would help in debugging the script. Furthermore,
44 having able to write Boa apps using the popular frameworks and
45 libraries like Twisted, Django, etc.. would prove to be very useful.
49 syntax-case.patch: Incomplete patch to replace `match.ss` with SYNTAX-CASE