summaryrefslogtreecommitdiff
path: root/scheme
diff options
context:
space:
mode:
authormichele.simionato <devnull@localhost>2009-04-22 05:26:27 +0000
committermichele.simionato <devnull@localhost>2009-04-22 05:26:27 +0000
commit4cb7f0d9c1e599942ca128c43028a350261ec670 (patch)
tree78921c82fe5b4e43f09b00e0cb446a663057d570 /scheme
parentcf77d7b3e2a53e1f97dd46b76a2f3c2ec8ce57b8 (diff)
downloadmicheles-4cb7f0d9c1e599942ca128c43028a350261ec670.tar.gz
This is the first version of sweet-macros (0.8) compatible with Larceny ;-)
Diffstat (limited to 'scheme')
-rw-r--r--scheme/make_sweet_macros.py20
-rw-r--r--scheme/sweet-macros/main.sls2
2 files changed, 14 insertions, 8 deletions
diff --git a/scheme/make_sweet_macros.py b/scheme/make_sweet_macros.py
index fb44731..cfc1441 100644
--- a/scheme/make_sweet_macros.py
+++ b/scheme/make_sweet_macros.py
@@ -1,10 +1,10 @@
import os, sys, shutil
from scheme2rst import SNIPPET
-code = file('sweet-macros/main.sls').read()
+ikarus_code = file('sweet-macros/main.sls').read()
# GUARDED-SYNTAX-CASE, SYNTAX-MATCH, DEF-SYNTAX, SYNTAX-EXPAND
-snippets = [s.groups() for s in SNIPPET.finditer(code)]
+snippets = [s.groups() for s in SNIPPET.finditer(ikarus_code)]
snippet = dict(snippets)
helper1 = '''#!r6rs
@@ -44,12 +44,18 @@ main = '''#!r6rs
)
'''
+def write_on(fname, code):
+ file(fname, 'w').write(code)
+ os.system('zip sweet-macros %s' % fname)
+
def makefiles(name, snippet):
- file(name + '/helper1.mzscheme.sls', 'w').write(helper1 % snippet)
- file(name + '/helper2.mzscheme.sls', 'w').write(helper2 % snippet)
- file(name + '/helper3.mzscheme.sls', 'w').write(helper3 % snippet)
- file(name + '/main.mzscheme.sls', 'w').write(main % snippet)
- #os.system('zip -r %s %s' % (name, name))
+ write_on(name + '/main.sls', ikarus_code)
+ write_on('sweet-macros.larceny.sls', main)
+ for impl in ('larceny', 'mzscheme'):
+ write_on(name + '/helper1.%s.sls' % impl, helper1 % snippet)
+ write_on(name + '/helper2.%s.sls' % impl, helper2 % snippet)
+ write_on(name + '/helper3.%s.sls' % impl, helper3 % snippet)
+ write_on(name + '/main.%s.sls' % impl, main % snippet)
if __name__ == '__main__':
#plt_home = os.path.expanduser('~/.plt-scheme')
diff --git a/scheme/sweet-macros/main.sls b/scheme/sweet-macros/main.sls
index b1de309..c7b78f2 100644
--- a/scheme/sweet-macros/main.sls
+++ b/scheme/sweet-macros/main.sls
@@ -2,7 +2,7 @@
;;; Version: 0.8
;;; Author: Michele Simionato
;;; Email: michele.simionato@gmail.com
-;;; Date: 19-Apr-2009
+;;; Date: 22-Apr-2009
;;; Licence: BSD
(export syntax-match def-syntax syntax-expand sub)
(import (rnrs))