2016-11-19 22:25:24 +00:00
|
|
|
#! /bin/sh
|
|
|
|
# -*-scheme-*-
|
2018-07-23 17:10:34 +00:00
|
|
|
|
|
|
|
# For use as a scaffolded sexp reader test
|
2016-11-19 22:25:24 +00:00
|
|
|
# ***REMOVE THIS BLOCK COMMENT INITIALLY***
|
2018-07-23 17:10:34 +00:00
|
|
|
|
|
|
|
# GNU Mes --- Maxwell Equations of Software
|
|
|
|
# Copyright © 2016, 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
|
|
|
#
|
|
|
|
# This file is part of GNU Mes.
|
|
|
|
#
|
|
|
|
# GNU Mes is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
# your option) any later version.
|
|
|
|
#
|
|
|
|
# GNU Mes is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2018-11-11 15:25:36 +00:00
|
|
|
if [ "$MES" != guile ]; then
|
2019-11-03 21:15:11 +00:00
|
|
|
MES=${MES-$(dirname $0)/../bin/mes}
|
2018-11-11 15:25:36 +00:00
|
|
|
MES_BOOT=boot-02.scm exec $MES < $0
|
|
|
|
fi
|
2018-07-23 17:10:34 +00:00
|
|
|
|
2020-12-31 10:45:46 +00:00
|
|
|
exec ${MES-bin/mes} --no-auto-compile -s $0
|
2016-11-19 22:25:24 +00:00
|
|
|
!#
|
|
|
|
|
|
|
|
0
|
|
|
|
cons
|
|
|
|
(cons 0 1)
|
|
|
|
(display 0) (newline)
|
|
|
|
#t
|
|
|
|
#f
|
|
|
|
(display #t) (newline)
|
|
|
|
(display #f) (newline)
|
|
|
|
'foo
|
|
|
|
(display 'foo) (newline)
|
2017-05-19 19:10:08 +00:00
|
|
|
(display #o77) (newline)
|
|
|
|
(display #o-6) (newline)
|
2016-11-19 22:25:24 +00:00
|
|
|
(display #x16) (newline)
|
2017-03-26 22:11:05 +00:00
|
|
|
(display #x-16) (newline)
|
2016-11-19 22:25:24 +00:00
|
|
|
(display #\A) (newline)
|
|
|
|
(display #\newline) (newline)
|
2016-12-18 14:39:12 +00:00
|
|
|
#\alarm
|
|
|
|
#\backspace
|
|
|
|
#\tab
|
|
|
|
#\newline
|
|
|
|
#\vtab
|
|
|
|
#\page
|
|
|
|
#\return
|
|
|
|
#\space
|
|
|
|
(display "\"")
|
|
|
|
(display "\\")
|
|
|
|
(display "\\\"\"\\")
|
2016-11-19 22:25:24 +00:00
|
|
|
(display 'foo)(newline)
|
|
|
|
(display '(foo))(newline)
|
|
|
|
(display '('foo))(newline)
|
|
|
|
(display (cdr '(car . cdr))) (newline)
|
|
|
|
(display "foo bar") (newline)
|
|
|
|
;;barf
|
|
|
|
#!
|
|
|
|
barf
|
|
|
|
!#
|
2016-12-18 09:11:22 +00:00
|
|
|
#|
|
|
|
|
burp
|
|
|
|
|#
|
2016-12-18 09:02:49 +00:00
|
|
|
#;(bla) (display "must see!\n")
|
2016-12-25 11:37:35 +00:00
|
|
|
(display
|
|
|
|
(lambda (x)
|
|
|
|
#;()#t)
|
|
|
|
)
|
2017-03-26 14:47:18 +00:00
|
|
|
(display #(0 1 2)) (newline)
|
2016-11-19 22:25:24 +00:00
|
|
|
(display (list '(foo
|
|
|
|
#! boo !#
|
|
|
|
;;(bb 4)
|
|
|
|
)
|
|
|
|
))
|
|
|
|
(newline)
|
|
|
|
;; TODO: syntax, unsyntax, unsyntax-splicing
|