Commit Graph

23 Commits

Author SHA1 Message Date
Jan Nieuwenhuizen b65e57be31
core: Tune debug printing.
* src/mes.c: Tune debug printing.
* src/gc.c: Likewise.
* module/mes/guile.mes: Likewise.
* HACKING: Describe it.
2018-04-09 07:12:38 +02:00
Jan Nieuwenhuizen ad135d3752 doc: Release udpate.
* HACKING: Update.
* INSTALL: Update.
* NEWS: Update.
* README: Update.
* doc/ANNOUNCE-0.12: New file.
* throughout: (janneke) coming out.
2017-11-21 19:22:26 +01:00
Jan Nieuwenhuizen cd0e3f8ba5 mescc: Remove debugging.
* module/language/c99/compiler.mes: Remove debugging.
2018-04-07 13:14:58 +02:00
Jan Nieuwenhuizen 4c9690996c mes: Iterative recursive macro expand.
* src/mes.c (eval_apply): Iterative recursive macro expand.
* src/posix.c (set_current_input_port): Return previous port.
* module/mes/catch.mes (%eh): Use core:display.
* module/mes/display.mes (display-cut, display-cut2): Move macro
  definitions to toplevel.
2018-03-04 10:05:55 +01:00
Jan Nieuwenhuizen f077364bce mes: reader: reader_ prefix; read/write char/string in core.
* src/posix.c (peek_char, read_char, read_string, unread_char, write_char): New function.
* src/reader.c: Use reader_ prefix.

r#	bootstrappable.org
2018-01-06 07:58:23 +01:00
Jan Nieuwenhuizen 0e06928320 mes: open-input-string: peek fix.
* module/mes/guile.mes (open-input-string): Return actual tell.
* tests/guile.test ("open-input-string peek"): Test it.
2018-01-04 19:32:35 +01:00
Jan Nieuwenhuizen 28d0c259ed mes: with-input-from-string: peek fix.
* module/mes/guile.mes (with-input-from-string): Return actual tell.
* tests/guile.test ("with-input-from-string peek"): Test it.
2018-01-04 18:35:26 +01:00
Jan Nieuwenhuizen 5757ef3069 nyacc cpp-debugging, tests 2018-01-02 20:41:59 +01:00
Jan Nieuwenhuizen 244d11a2af mes: Add dirname.
* module/mes/guile.mes (dirname): New function.
2018-01-01 16:40:23 +01:00
Jan Nieuwenhuizen 08562b168d test: Add syntax tests.
* tests/syntax.test: New file.
* tests/syntax.test-guile: New file.

fixup: 1b0696f9 (Jan Nieuwenhuizen 2018-01-01 15:53:13 +0100 40) ,        (lambda ()
2018-01-01 15:53:13 +01:00
Jan Nieuwenhuizen ccddde9a84 mescc: Output performance hacks: use core:display.
* src/lib.c (display_): Write to g_stdout (WAS: STDOUT).
* module/mes/guile.scm (guile): Declare and export core:display core:display-error.
* module/mes/M1.mes (object->M1): Use core:display and string-append
  instead of format.
* module/mes/guile.mes (with-input-from-string): Add debugging.
  (open-input-string): Likewise.
  (read-string): Likewise.  Re-implement.
  (drain-input): Use read-string.
2017-12-09 20:10:57 +01:00
Jan Nieuwenhuizen 21aff4c7ad mes: Simplify read-string.
* module/mes/guile.mes (read-string): Simplify, probably fix even.
2017-05-21 12:21:07 +02:00
Jan Nieuwenhuizen 45ce77df85 core: Add current-output-port, open-output-file, set-current-output-port.
* libc/include/fcntl.h: Declare it.  Add some fcntl defines.
* libc/include/stdio.h: Remove fcntl defines, Declare g_stdout.
* module/language/c99/compiler.mes (c99-input->ast): Define O_WRONLY, O_RDWR.
* module/mes/guile.mes (with-output-to-file, with-output-to-port): New functions.
* src/posix.c (current_output_port, open_output_file,
  set_current_output_port): New functions.
* libc/mlibc.c (open): Add optional mode parameter.
* module/mes/libc-i386.mes (i386:open): Forward third parameter.
* scaffold/mini-mes.c (main): Init g_stdout.
* src/mes.c (main): Likewise.
2017-05-19 06:56:47 +02:00
Jan Nieuwenhuizen ec935e5667 mes: Consider GUILE_LOAD_PATH for include-from-path.
* module/mes/guile.scm (include-from-path): New macro.
2017-05-07 08:23:20 +02:00
Jan Nieuwenhuizen 92c363701b mes: Add srfi-16 to Nyacc Guile support.
* module/mes/guile.mes: Include srfi-16 for Nyacc.
2017-05-06 22:47:45 +02:00
Jan Nieuwenhuizen 9918ffab92 Add access?
* libc/mlibc.c (access): New function.
* module/mes/libc-i386.mes (i386:access): New function.
  (i386:libc): Add it.
* src/posix.c (access_p): New function.
* module/mes/posix.mes: New file.
* module/mes/base-0.mes (mes): Include it.
* module/mes/read-0-32.mo: Regenerate.
2017-04-16 09:51:45 +02:00
Jan Nieuwenhuizen 2c25f45678 scm: Add access?
* module/mes/guile.mes (access?): New dummy function.  Fixes Nyacc's #include.
2017-03-31 21:41:32 +02:00
Jan Nieuwenhuizen d938b38d5e scm: Add open-input-string, read-string.
* module/mes/guile.mes (open-input-string, read-string): New functions.
* tests/guile.test: New file.
* GNUmakefile (TESTS): Add it.
2017-04-01 12:51:35 +02:00
Jan Nieuwenhuizen fc263de433 build: Cleanup, use gcc-specific snarfing.
* .gitignore: Ignore *.o-32, mes-mini-mes.
* scripts/nyacc-calc.mes: Remove.
* scripts/nyacc.mes: Remove.
* scripts/paren.mes: Remove.
* make/install.make (install): Remove them.
p* module/mes/mes-0.mes: Remove.
* module/mes/loop-0.mes: Remove.
* build-aux/mes-snarf.scm (main): Add --mini option.
* GNUmakefile (mini-mes): Use it.
2017-04-02 17:01:22 +02:00
Jan Nieuwenhuizen 945fb39d18 scm: Bugfix drain-input.
* module/mes/guile.mes (drain-input): Bugfix: return string.
2017-03-27 21:00:49 +02:00
Jan Nieuwenhuizen b8fd6ca7b9 Add drain-input.
* module/mes/guile.mes (drain-input): New function.
2017-01-04 09:16:52 +01:00
Jan Nieuwenhuizen da6bd4cf97 Add make-string, object->string.
* module/mes/guile.mes (make-string, object->string): New functions.
2017-01-04 09:12:26 +01:00
Jan Nieuwenhuizen 77a9146aa5 Add support for including Guile files.
* module/mes/guile.mes: New file.
* module/mes/pretty-print.mes: New file.
2016-12-18 15:48:49 +01:00