Prepare for 0.1 release: installable scripts.
* scripts/mes: New symlink. * scripts/elf.mes: Use it. * scripts/mescc.mes: Likewise, read all mes modules with include.mes. * scripts/paren.mes: Likewise. * scripts/repl.mes: Likewise.
This commit is contained in:
parent
3128c4b976
commit
323e78b190
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# -*-scheme-*-
|
# -*-scheme-*-
|
||||||
cat $($(dirname $0)/include.mes $0) $0 /dev/stdin | ./mes > a.out
|
cat $($(dirname $0)/include.mes $0) $0 /dev/stdin | $(dirname $0)/mes > a.out
|
||||||
chmod +x a.out
|
chmod +x a.out
|
||||||
exit $?
|
exit $?
|
||||||
!#
|
!#
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
for prefix in $(dirname $(dirname $0))/share/mes . $(dirname $(dirname $0)); do
|
||||||
|
if [ -d ${prefix}/module ]; then
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
done
|
||||||
cat $1 \
|
cat $1 \
|
||||||
| grep -Eo '(mes-use-module \([^()]+ [^()]+))' \
|
| grep -Eo '(mes-use-module \([^()]+ [^()]+))' \
|
||||||
| grep -Eo ' \([^)]+\)' \
|
| grep -Eo ' \([^)]+\)' \
|
||||||
| sed -e 's@^ *(@module/@' -e 's@ @/@g' -e 's@)@.mes@'
|
| sed -e "s@^ *(@${prefix}/module/@" -e 's@ @/@g' -e 's@)@.mes@'
|
||||||
|
|
1
scripts/mes
Symbolic link
1
scripts/mes
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../mes
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# -*-scheme-*-
|
# -*-scheme-*-
|
||||||
cat cc/main.c | cat $($(dirname $0)/include.mes $0) cc/c-lexer.mes cc/mescc.mes $0 /dev/stdin | ./mes > a.out
|
cat ${1-$(dirname $(dirname $0))/share/doc/mes/examples/main.c} | cat $($(dirname $0)/include.mes $0) $0 /dev/stdin | $(dirname $0)/mes > a.out
|
||||||
chmod +x a.out
|
chmod +x a.out
|
||||||
exit $?
|
exit $?
|
||||||
!#
|
!#
|
||||||
|
@ -29,7 +29,7 @@ exit $?
|
||||||
;;;
|
;;;
|
||||||
;;; Run with Guile:
|
;;; Run with Guile:
|
||||||
;;; make guile-mescc
|
;;; make guile-mescc
|
||||||
;;; BROKEN? cat cc/main.c | guile -s <(echo '(compile)' | cat guile/mes-0.scm module/mes/lalr.mes module/rnrs/bytevectors.mes module/srfi/srfi-1.mes module/mes/elf.mes module/mes/libc-i386.mes cc/c-lexer.mes cc/mescc.mes -)
|
;;; BROKEN? cat doc/examples/main.c | guile -s <(echo '(compile)' | cat guile/mes-0.scm module/mes/lalr.mes module/mes/elf.mes module/mes/libc-i386.mes module/rnrs/bytevectors.mes module/language/c/lexer.mes module/language/c/parser.mes module/language/c/compiler.mes -)
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -54,5 +54,9 @@ exit $?
|
||||||
(mes-use-module (mes elf))
|
(mes-use-module (mes elf))
|
||||||
(mes-use-module (mes libc-i386))
|
(mes-use-module (mes libc-i386))
|
||||||
|
|
||||||
|
(mes-use-module (language c lexer))
|
||||||
|
(mes-use-module (language c parser))
|
||||||
|
(mes-use-module (language c compiler))
|
||||||
|
|
||||||
(compile)
|
(compile)
|
||||||
()
|
()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# -*-scheme-*-
|
# -*-scheme-*-
|
||||||
echo -e 'EOF\n___P((()))' | cat $($(dirname $0)/include.mes $0) cc/paren.mes $0 /dev/stdin | ./mes
|
echo -e 'EOF\n___P((()))' | cat $($(dirname $0)/include.mes $0) $0 /dev/stdin | $(dirname $0)/mes
|
||||||
chmod +x a.out
|
chmod +x a.out
|
||||||
exit $?
|
exit $?
|
||||||
!#
|
!#
|
||||||
|
@ -30,7 +30,7 @@ exit $?
|
||||||
;;; Gambit wiki.
|
;;; Gambit wiki.
|
||||||
;;;
|
;;;
|
||||||
;;; Run with Guile:
|
;;; Run with Guile:
|
||||||
;;; echo '___P((()))' | guile -s <(echo '(paren-depth)' | cat cc/paren.mes -)
|
;;; echo '___P((()))' | guile -s <(echo '(paren-depth)' | cat module/language/paren.mes -)
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ exit $?
|
||||||
(mes-use-module (srfi srfi-9))
|
(mes-use-module (srfi srfi-9))
|
||||||
(mes-use-module (mes lalr-0))
|
(mes-use-module (mes lalr-0))
|
||||||
(mes-use-module (mes lalr))
|
(mes-use-module (mes lalr))
|
||||||
|
(mes-use-module (language paren))
|
||||||
|
|
||||||
(paren-depth)
|
(paren-depth)
|
||||||
()
|
()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# -*-scheme-*-
|
# -*-scheme-*-
|
||||||
cat $($(dirname $0)/include.mes $0) $0 /dev/stdin | ./mes
|
cat $($(dirname $0)/include.mes $0) $0 /dev/stdin | $(dirname $0)/mes
|
||||||
exit $?
|
exit $?
|
||||||
!#
|
!#
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue