Jan (janneke) Nieuwenhuizen
7932d4bad7
core: Remove core:make-cell.
...
* src/gc.c (alloc, make_cell, cons): Move from mes.c
* src/mes.c: (make_cell_): Remove.
* src/lib.c (char_to_integer, integer_to_char): New function.
* src/builtins.c (mes_builtins): Add them; remove make_cell_.
* mes/module/mes/type-0.mes (char->integer, integer->char): Remove.
2020-05-18 00:40:50 +02:00
Jan (janneke) Nieuwenhuizen
3539572f9c
Relicense imported LGPL v3+ files to GPL v3+.
...
Fixes https://savannah.nongnu.org/task/?16067 .
Reported via savannah by Ineiev <ineiev@gnu.org>.
* mes/module/mes/lalr.scm,
module/mes/getopt-long.scm,
module/mes/optargs.scm: Change header to GNU Mes header with GPL v3.
2021-11-09 12:01:04 +01:00
Jan (janneke) Nieuwenhuizen
a1196c87b5
doc: Release update.
...
* ROADMAP (release 0.x, unsorted): Rewrite, move done items ...
(DONE): ...here.
* build-aux/GNUmakefile.in: Update release process.
(gen-announce): Remove trailing '-'.
* NEWS (Changes in 0.23 since 0.22): Add section.
* README: Add armhf-linux, aarch64-linux, NLNet sponsoring, remove
confusing references to mes-m2 fork.
* doc/announce/ANNOUNCE-0.23: New file.
* mes/module/mes/repl.mes: Update copyright years.
* doc/mes.texi (Porting GNU Mes): Mention that armhf-linux is supported.
(Regular Requirements): Update.
* INSTALL (Other GNU/Linux): Likewise.
2021-03-14 12:06:31 +01:00
Danny Milosavljevic
451274bc80
mescc: Add modules for armv4.
...
* mes/module/mescc/armv4/as.mes: New file.
* mes/module/mescc/armv4/info.mes: New file.
* mes/module/mescc/mescc.mes: Use them.
2020-06-13 19:07:32 +02:00
Jan Nieuwenhuizen
2f72303e6c
build: Have configure respect GUILE_LOAD_PATH for mes to find Nyacc.
...
* configure: Substitute GUILE_LOAD_PATH from %load-path.
* configure.sh: Likewise.
* build-aux/config.make.in: Add GUILE_LOAD_PATH as subtitution variable.
* build-aux/config.sh.in: Likewise.
* mes/module/mes/guile.mes (%load-path): New variable.
2020-01-20 22:47:52 +01:00
Jan Nieuwenhuizen
27de9aa0e3
mescc: Add mes 0.19 compatibility.
...
* mes/module/mes/boot-0.scm (%datadir): Cater for %datadir not being
set.
2019-12-08 10:10:02 +01:00
Vagrant Cascadian
204dcaa452
boot-0: Fix spelling of "evaluate"
2019-06-10 23:56:04 -07:00
Jan Nieuwenhuizen
ac9c18f8b8
doc: Release update.
...
* BLURB: Release update.
* HACKING: Remove roadmap.
* INSTALL: Release update.
* NEWS: Add 0.21 section.
* README: Release update.
* ROADMAP: New file.
* configure.sh: Release update.
* doc/announce/ANNOUNCE-0.21: New file.
* doc/mes.texi: Release update.
2019-11-04 19:59:13 +01:00
Jan Nieuwenhuizen
c6cceb47f3
build: Update script help and usage.
...
* doc/mes.texi (Invoking mesar): New section.
* mes/module/mes/boot-0.scm: Add one line help description.
* module/mescc.scm (parse-opts): Likewise.
* scripts/diff.scm (main): Add -h,--help, -v,--version.
* scripts/mesar.in: Likewise.
2019-11-04 23:56:15 +01:00
Jan Nieuwenhuizen
092626243a
mes: Fix -c, --command.
...
* mes/module/mes/boot-0.scm: Prepend 'begin to expr list.
2019-10-10 13:22:12 +02:00
Jan Nieuwenhuizen
db9e6d7d8a
Revert "nyacc: 0.86.0 compatibility stub. WIP"
...
This reverts commit 0183cc1c42437fda27196e27b490285a61d47f59.
While it works to run Nyacc 0.86.0, it breaks running Nyacc 0.93 and
up. This would need more thought and work, adding a nyacc-compat
directory or so. Seems not worth the effort right now.
2019-09-16 21:14:15 +02:00
Jan Nieuwenhuizen
56266d2c64
nyacc: 0.86.0 compatibility stub. WIP
...
* mes/module/nyacc/lang/c99/util.scm: 0.86.0 compatibility stub.
2019-09-16 21:13:46 +02:00
Jan Nieuwenhuizen
ef29ade04b
mescc: Mes C Library: Add buffered read.
...
* lib/mes/__buffered_read.c: New file.
* build-aux/configure-lib.sh (libc_SOURCES): Add it. Also add memmove.c.
(libc_tcc_SOURCES): Remove memmove.c
* lib/linux/close.c (close): Clear read buffer.
* lib/linux/_open3.c (_open3): Likewise.
* lib/linux/lseek.c (lseek): Correct for read buffer.
* lib/stdio/fwrite.c (fwrite): Likewise.
* lib/posix/read.c (read): Call __buffered_read.
* lib/posix/write.c (write): Add FIXME note about buffered reads.
* simple.sh: Update.
2019-07-27 22:58:49 +02:00
Jan Nieuwenhuizen
7670d6be38
mes: Update to Nyacc 0.93.
...
* mes/module/nyacc/lang/c99/util.mes: New file.
* mes/module/nyacc/lang/c99/parser.mes: Use it.
* module/mescc/compile.scm (ast->info): Update for Nyacc 0.93.0.
* module/mescc/preprocess.scm (need-progress): Likewise.
(ast-strip-comment): Likewise.
2019-06-09 19:42:42 +02:00
Jan Nieuwenhuizen
dd34569751
mes: string->number: Support #x-prefixed hex numbers.
...
* mes/module/mes/scm.mes (string->number): Support "#x"-prefix.
* tests/math.test ("string->number #hex"): Test it.
2019-08-02 22:52:46 +02:00
Jan Nieuwenhuizen
81849edb86
mes: Remove broken copy of simple-format.
...
* mes/module/mes/simple-format.mes: New file.
* mes/module/mes/guile.mes: Use it.
(with-output-to-string, simple-format): Remove broken copies.
* mes/module/mes/display.mes (with-output-to-string, simple-format,
format): Remove.
2019-07-19 15:36:36 +02:00
Danny Milosavljevic
4b5d5017c4
Fix remainder handling.
...
* mes/module/mes/scm.mes (number->string): Fix remainder handling.
* build-aux/check-mescc.sh (XFAIL_TESTS): Remove
lib/tests/scaffold/60-math.c.
2019-07-05 15:52:04 +02:00
Jan Nieuwenhuizen
5dc245e739
build: Simplify.
...
core: Make mes src/ c files separate compilation units.
* include/mes/constants.h: New file.
* include/mes/macros.h: New file.
* include/mes/mes.h: New file.
* src/gc.c: Update.
* src/hash.c: Update.
* src/lib.c: Update.
* src/math.c: Update.
* src/mes.c: Update.
* src/module.c: Update.
* src/posix.c: Update.
* src/reader.c: Update.
* src/string.c: Update.
* src/struct.c: Update.
* src/vector.c: Update.
mes: Update datadir.
* src/mes.c (g_datadir): New global.
(open_boot): Rename from read_boot.
(read_boot): New function.
* mes/module/mes/boot-0.scm: Move from boot-0.scm.in
* configure: Update.
* configure.sh: Update.
mescc: Create libraries from separate files.
* .gitignore: Update.
* build-aux/bootstrap-mes.sh: Remove.
* build-aux/bootstrap.sh.in: Remove.
* build-aux/build-guile.sh: Update.
* build-aux/build-mes.sh: Update.
* build-aux/build-scaffold.sh: New file.
* build-aux/build.sh.in: Update.
* build-aux/cc.sh: Update.
* build-aux/check-tcc.sh: Remove.
* build-aux/config.sh.in: New file.
* build-aux/config.sh: Remove.
* build-aux/install.sh.in: Update.
* build-aux/test-boot.sh: New file.
* build-aux/test-c.sh: New file.
* build-aux/test-driver: New file.
* build-aux/test-suite.sh: New file.
* build-aux/trace.sh: Update.
* build-aux/uninstall.sh.in: Update.
* configure: Update.
* configure.sh: Update.
* lib/linux/x86-mes-mescc/crt1.c: Move from lib/linux/x86-mes.
* lib/linux/x86-mes-mescc/mini.c: Likewise.
* lib/linux/x86_64-mes-mescc/crt1.c: Move from lib/linux/x86_64-mes.
* lib/linux/x86_64-mes-mescc/mini.c: Likewise.
* lib/linux/x86-mes-gcc/syscall.c: Rename from mes.c.
* lib/linux/x86-mes-mescc/syscall.c: Likewise.
* lib/linux/x86_64-mes-gcc/syscall.c: Likewise.
* lib/linux/x86_64-mes-mescc/syscall.c: Likewise.
* lib/mes/mes_open.c: Include config.h.
* lib/tests/stdio/70-printf-hello.c: Likewise.
* lib/tests/stdio/70-printf-simple.c: Likewise.
* scaffold/gc-test.sh: New file.
* simple.sh: Update.
2019-06-08 15:36:22 +02:00
Jan Nieuwenhuizen
77e75c3142
mes: Bugfix for search-path. Fixes running MesCC on Guile.
...
* module/mescc/mescc.scm (arch-find): Also look in cwd.
* mes/module/mes/posix.mes (search-path): Do not look in cwd.
2019-05-27 21:51:37 +02:00
Jan (janneke) Nieuwenhuizen
1d56567c50
mes: Support -c EXPR.
...
* mes/module/mes/boot-0.scm.in: Support -c EXPR.
2019-05-16 00:04:45 +02:00
Jan (janneke) Nieuwenhuizen
b969c08205
mes: Support optional port on read.
...
* mes/module/mes/scm.mes (read): Support optional port on read.
2019-05-16 00:05:47 +02:00
Jan (janneke) Nieuwenhuizen
e0eee55bf3
build: Fix mescc installation on Debian.
...
* build-aux/pre-inst-env.in: Set bindir.
* scripts/mescc.in: Fix configure/prefix issues.
* mes/module/mes/boot-01.scm (integer->char): Remove.
(newline): Use "\n".
(%moduledir): Use string-append.
* mes/module/mes/boot-02.scm: Likewise.
* mes/module/mes/boot-0.scm: Likewise.
2019-05-15 23:26:52 +02:00
Jan Nieuwenhuizen
829cc9cca5
mes: m2: Move force-output to Scheme.
...
* mes/module/mes/posix.mes (force-output): New function.
* src/posix.c (force_output): Remove.
* src/mes.c (mes_builtins): Remove adding of force-output.
2019-05-05 13:11:33 +02:00
Jan Nieuwenhuizen
c5e098bc35
mescc: Mes C Library: Fix isatty.
...
* lib/posix/isatty.c (isatty): Test ioctl == 0.
* mes/module/mes/boot-0.scm.in: Update: no tty?: read from stdin.
2019-03-02 22:27:39 +01:00
Jan Nieuwenhuizen
90b384def3
mes: Support map and for-each with lists of unequal length.
...
* mes/module/mes/base.mes (map): Support lists of unequal length.
* mes/module/mes/scm.mes (for-each): Likewise.
* module/mescc/compile.scm (expr->register): Fix compile warning.
* tests/scm.test ("map 1,2", "map 2,1", "for-each 1,2", "for-each
2,1": Test it.
2019-03-02 14:33:58 +01:00
Jan Nieuwenhuizen
a9bf3bfb12
mes: Remove stray debugging newline output.
...
* mes/module/mes/guile.mes (open-input-file): Move debugging newline
into debug clause.
2019-02-24 10:49:56 +01:00
Jan Nieuwenhuizen
99ac7b59c4
core: Remove struct definitions for builtins, drop snarfing.
...
After making a change to the list of builtin functions, run
cat src/*.i
and move the into
src/mes.c:mes_builtins ()
and, or also after changing the list of fixed symbols in src/mes.c:mes_symbols (), do
cat src/*.h > src/builtins.h
* build-aux/build.sh.in: Remove snarfing.
* build-aux/bootstrap.sh.in: Likewise.
* mes/module/mes/display.mes (display):
* mes/module/mes/type-0.mes (cell:type-alist): Remove <cell:function>.
(function?, builtin?): Remove.
* src/builtins.h: New file.
* src/mes.c (TFUNCTION): Remove.
(struct function): Remove.
(apply_builtin): Rewrite from call.
(mes_builtins): Rewrite.
(init_builtin, make_builtin_type, make_builtin, builtin_name,
builtin_arity, builtin, builtin_p, builtin_printer): New function.
2019-01-04 09:55:16 +01:00
Jan Nieuwenhuizen
df27830846
mes: Add take-while.
...
* mes/module/srfi/srfi-1.mes (take-while): New function.
2018-12-27 16:36:22 +01:00
Jan Nieuwenhuizen
00289fb651
core: Remove --dump, --load.
...
* mes/module/mes/boot-0.scm.in (tty?): Remove --dump, --load.
* src/mes.c (bload_env): Remove.
* src/reader.c (dump): Remove.
2018-12-27 16:47:56 +01:00
Jan Nieuwenhuizen
32dcd3a575
doc: Release update.
...
* AUTHORS: Update.
* HACKING: Update.
* NEWS: Update.
* doc/mes.guix: Update.
* scripts/mescc.in: Update.
* mes/module/mes/boot-0.scm.in: Update.
* doc/announce/ANNOUNCE-0.19: New file.
2018-10-20 09:53:44 +02:00
Jan Nieuwenhuizen
e90aed9d1b
mes: assq-ref, assoc-ref: Support alist == #f.
...
* mes/module/mes/scm.mes (assq-ref): Support alist == #f.
(assoc-ref): Likewise.
2018-12-15 12:56:15 +01:00
Jan Nieuwenhuizen
6b841a0cab
mescc: Run without shell.
...
* mes/module/mescc.mes: New file.
* module/mescc.scm: Include it.
* scripts/mescc.scm.in: New file.
* scripts/mescc.in: Use it; Make pure shell.
* configure: Substitute it.
* configure.sh: Substitute it.
* build-aux/install.sh.in: Install it.
2018-11-25 13:21:03 +01:00
Jan Nieuwenhuizen
1ab054002c
core: Add string-ref.
...
* src/strings.c (string_ref): New function.
* mes/module/mes/scm.mes (string-ref): Remove.
2018-11-16 00:15:50 +01:00
Jan Nieuwenhuizen
6af0b49f09
core: Add string-length.
...
* src/strings.c (string_length): New function.
* mes/module/mes/scm.mes (string-length): Remove.
2018-11-15 23:51:29 +01:00
Jan Nieuwenhuizen
819b32e61c
core: Add string-append.
...
* src/strings.c (string_append): New function.
* mes/module/mes/boot-0.scm.in (string-append): Remove.
* mes/module/mes/boot-03.scm (string-append): Remove.
* scaffold/boot/50-make-string.scm (string-append): Remove.
* scaffold/boot/50-string-append.scm (string-append): Remove.
* scaffold/boot/50-string-join.scm (string-append): Remove.
* scaffold/boot/51-module.scm (string-append): Remove.
* scaffold/boot/52-define-module.scm (string-append): Remove.
* tests/macro.test (string-append): Remove.
* scaffold/boot/17-string-append.scm: Move from 50-string-append.scm.
2018-11-15 23:09:56 +01:00
Jan Nieuwenhuizen
149f2a3e51
core: String as array of bytes.
...
* src/strings.c: New file.
* src/mes.c: Use it. Update users.
2018-11-11 16:25:36 +01:00
Jan Nieuwenhuizen
0be3bea141
mes: Remove copy of make-string.
...
* mes/module/mes/guile.mes (make-string): Remove copy.
2018-11-14 08:19:01 +01:00
Jan Nieuwenhuizen
e27e7af055
mes: Oops, %moduledir debug info.
...
* mes/module/mes/boot-0.scm.in: Oops, %moduledir debug info.
2018-11-11 14:47:14 +01:00
Jan Nieuwenhuizen
fb8a6f3408
mes; Add read-line.
...
* mes/module/mes/guile.mes (read-line): New function.
2018-11-11 16:57:58 +01:00
Jan Nieuwenhuizen
c61c6866b5
mes: dirname: Fix for absolute file names.
...
* mes/module/mes/guile.mes (dirname): Fix absolute files.
2018-11-11 10:15:12 +01:00
Jan Nieuwenhuizen
e0a2d540f4
mes: Add file-exists?.
...
* mes/module/mes/guile.mes (file-exists?): New function.
2018-11-11 10:14:50 +01:00
Jan Nieuwenhuizen
e95c5742be
mes: Add with-error-to-file.
...
* mes/module/mes/guile.mes (with-error-to-file): New function.
2018-11-11 10:14:10 +01:00
Jan Nieuwenhuizen
9da1fd92b6
mes: Add string-downcase, string-upcase, string-tokenize.
...
* mes/module/srfi/srfi-13.mes (string-downcase, string-upcase,
string-tokenize): New function.
2018-11-11 10:00:04 +01:00
Jan Nieuwenhuizen
9543962ece
mes: Add char-downcase, char-upcase.
...
* mes/module/srfi/srfi-14.mes (char-downcase, char-upcase): New
function.
2018-11-11 10:10:43 +01:00
Jan Nieuwenhuizen
b7f5e1a8f9
mes: Add char-set:digit, char-set:lower-case, char-set:upper-case.
...
* mes/module/srfi/srfi-14.mes (char-set:digit, char-set:lower-case,
char-set:upper-case): New variable.
2018-11-11 10:09:41 +01:00
Jan Nieuwenhuizen
b9534cb287
mes: Add char-set-adjoin, char-set-complement.
...
* mes/module/srfi/srfi-14.mes (char-set-adjoin, char-set-complement):
New function.
2018-11-11 10:08:03 +01:00
Jan Nieuwenhuizen
1f1fa33eaa
mes: system*: Support redirection.
...
* mes/module/mes/posix.mes (system*): Support redirection.
2018-11-11 10:00:50 +01:00
Jan Nieuwenhuizen
7d2e0f1215
core: Support redirection of stderr.
...
* include/libmes-mini.h (g_stderr): New global.
* lib/mes/eputc.c (eputc): Use it.
* lib/mes/eputs.c (eputs): Likewise.
* lib/mes/oputc.c (oputc): Likewise.
* lib/mes/oputs.c (oputs): Likewise.
* src/lib.c (display_error_, write_error_): Likewise.
* src/posix.c (write_byte): Likewise.
* src/mes.c (mes_builtins): Likewise.
(main): Iniitalize g_stderr.
* src/posix.c (current_error_port, set_current_error_port): New
function.
* mes/module/mes/boot-0.scm.in (current-output-port,
current-error-port): Remove.
2018-11-11 10:04:03 +01:00
Jan Nieuwenhuizen
06bf0fd6a3
mes: Add ceil, floor, round, inexact->exact.
...
* mes/module/mes/scm.mes (ceil, floor, round, inexact->exact,
exact->inexact): New function.
2018-10-21 12:07:06 +02:00
Jan Nieuwenhuizen
0e1d98963c
mes: read-string: Take optional port argument.
...
* src/posix.c (read_string): Take optional port argument.
* mes/module/mes/guile.mes (read-string): Remove.
2018-10-21 12:00:00 +02:00