Commit graph

67 commits

Author SHA1 Message Date
Jan Nieuwenhuizen d114634203 Prepare for 0.1 release: new directory structure.
* scripts/elf.mes: New file.
* scripts/include.mes: New file.
* scripts/mescc.mes: New file.
* scripts/paren.mes: New file.
* scripts/repl.mes: New file.
* doc/examples/main.c: Move from ./main.c.
* module/mes/base-0.mes: Move from ./base0.mes.
* module/mes/base.mes: Move from top.
* module/mes/elf.mes: Likewise.
* module/mes/let-syntax.mes: Likewise.
* module/mes/let.mes: Likewise.
* module/mes/mes.mes: Likewise.
* module/mes/quasiquote.mes: Likewise.
* module/mes/repl.mes: Likewise.
* module/mes/scm.mes: Likewise.
* module/mes/syntax.mes: Likewise.
* module/mes/lalr-0.mes: Move from lib/lalr.mes.
* module/mes/lalr.mes: Move from lib/lalr.scm.
* module/mes/match.mes: Move from lib/match.scm.
* module/mes/record-0.mes: Move from lib/record.mes.
* module/mes/record.mes: Move from lib/record.scm.
* module/mes/test.mes: Move flom lib/.
* module/rnrs/bytevectors.mes: Move from lib/rnrs.
* module/srfi/srfi-0.mes: Move from lib/srfi.
* module/srfi/srfi-1.mes: Likewise.
* module/srfi/srfi-9.mes: Likewise.
* module/language/c/lexer.mes: Move from ./c-lexer.scm.
* module/language/c/parser.mes: Move from ./mescc.scm.
* module/language/c/compiler.mes: New file, split from parser.mes.
* module/language/paren.mes: Move from ./paren.scm.
* module/mes/libc-i386.mes: New file, split from elf.mes.
* tests/base.test: Move from test/.
* tests/closure.test: Likewise.
* tests/let-syntax.test: Likewise.
* tests/let.test: Likewise.
* tests/match.test: Likewise.
* tests/quasiquote.test: Likewise.
* tests/record.test: Likewise.
* tests/scm.test: Likewise.
* hello.S: Remove.
* hello.c: Remove.
* loop2.mes: Remove.
* test/foo.test: Remove.
2016-10-12 23:40:11 +02:00
Jan Nieuwenhuizen 2715e241e5 Add REPL.
* mes.c (expand_macro_env, force_output): New function.  Use STRING_MAX
  for string buffers throughout.  (eval_env, eval_begin_env): Rename
  from eval, eval_begin.  Update callers.
* repl.mes: New file.
* base.mes (list?): Move from scm.mes.
* scm.mes (eval, apply, primitive-eval, expand-macro): New function.
* GNUmakefile: New repl target.
2016-10-16 09:44:52 +02:00
Jan Nieuwenhuizen dd271be218 Add procedure? to base.
* base.mes (procedure?): Move from scm.mes.
2016-10-12 22:58:35 +02:00
Jan Nieuwenhuizen c506880a14 resurrect mescc. 2016-10-10 23:54:48 +02:00
Jan Nieuwenhuizen 4514be76d9 use IF as primitive, drop using cond/evcon only option. 2016-10-08 16:54:59 +02:00
Jan Nieuwenhuizen 2c7f26dbe6 mescc.scm: first a.out produced from main.c. 2016-08-14 01:44:42 +02:00
Jan Nieuwenhuizen ec8553dc4f mes.c: implement string->list. 2016-08-13 18:42:11 +02:00
Jan Nieuwenhuizen 1ddb703265 lib/rnrs/bytevectors.scm: minimal rnrs bytevectors. 2016-08-13 17:05:29 +02:00
Jan Nieuwenhuizen 287c0284fe Use IF iso COND as primitive; keep COND primitive as option. 2016-07-27 08:49:45 +02:00
Jan Nieuwenhuizen 3864d434fc split-up test suite, implement quasiquote in scheme. 2016-07-25 14:39:56 +02:00
Jan Nieuwenhuizen f170735edb mescc: mes parses simplest main with lalr. 2016-07-25 01:12:22 +02:00
Jan Nieuwenhuizen d07108a6e8 scm.mes: add port-location dummies. 2016-07-25 00:06:50 +02:00
Jan Nieuwenhuizen 479d988e42 mes.c: add set-cdr, substring, string-ref. 2016-07-25 00:06:18 +02:00
Jan Nieuwenhuizen 46387d411b mes.c: when reading `EOF', defer read control to program. 2016-07-24 18:28:45 +02:00
Jan Nieuwenhuizen 8dacd68fe8 mes.c, scm.c: add read-char, peek-char, char=?, char-alphabetic?. 2016-07-24 17:35:31 +02:00
Jan Nieuwenhuizen 82a89c680f scm.mes: add list-ref. 2016-07-24 17:25:03 +02:00
Jan Nieuwenhuizen bbdba26201 scm.mes: add expt. 2016-07-24 17:16:55 +02:00
Jan Nieuwenhuizen 9fc7868a6d scm.mes: remainder. 2016-07-24 17:11:49 +02:00
Jan Nieuwenhuizen 39d5722973 scm.mes: implement do. 2016-07-24 17:03:28 +02:00
Jan Nieuwenhuizen 746d06a0ec scm.mes: add max, min. 2016-07-24 16:34:54 +02:00
Jan Nieuwenhuizen e1bfc3e17e <=, >=: take multiple arguments. 2016-07-24 16:29:38 +02:00
Jan Nieuwenhuizen b5ab19aab7 mes.c: add quotient and modulo. 2016-07-24 15:25:16 +02:00
Jan Nieuwenhuizen 04f0eed66a scm.mes: make-vector: fix fill. 2016-07-24 14:10:18 +02:00
Jan Nieuwenhuizen 99762c07ca mes.c: fix apply. 2016-07-24 13:27:05 +02:00
Jan Nieuwenhuizen 8c1a5f19da fix for-each. 2016-07-24 12:40:44 +02:00
Jan Nieuwenhuizen 07a5f716fc lalr paren test 2016-07-24 12:08:21 +02:00
Jan Nieuwenhuizen d4e335b447 mes.c: add syntax, quasisyntax to reader.... 2016-07-24 00:40:37 +02:00
Jan Nieuwenhuizen 711a29f4f9 mes.c: refactor begin and closures. Fixes bugs/top.mes. 2016-07-24 00:01:31 +02:00
Jan Nieuwenhuizen 5126e16e66 trying to get records up....WIP 2016-07-23 14:39:33 +02:00
Jan Nieuwenhuizen 502336bf30 lib/srfi/srfi-0.scm: add. 2016-07-23 12:54:34 +02:00
Jan Nieuwenhuizen b63444d919 mes.c: barf on unknown symbols. 2016-07-23 11:51:06 +02:00
Jan Nieuwenhuizen 27ec11474b scm.mes: add last-pair. 2016-07-23 08:17:49 +02:00
Jan Nieuwenhuizen 5105f1e516 scm.mes: add assq-set!, assq-ref. 2016-07-23 01:38:25 +02:00
Jan Nieuwenhuizen efdd84b4c4 mes.c: add new macro type, junk *macro* hack. 2016-07-22 17:13:51 +02:00
Jan Nieuwenhuizen 04f3323f10 mes.c: store actual environment with closures. 2016-07-22 12:23:23 +02:00
Jan Nieuwenhuizen 24be64787b mes.c: store enviroment depth in closures. Fixes c1, c3 and more. 2016-07-19 21:37:39 +02:00
Jan Nieuwenhuizen 61bbbdffbf mes.c: move begin_env into eval, decruft. 2016-07-19 18:18:27 +02:00
Jan Nieuwenhuizen 80e6f95f91 fix some tests. 2016-07-18 22:59:33 +02:00
Jan Nieuwenhuizen 3a28828bdf remove booting into mes (would need VM), boot.mes; rewrite test.mes. 2016-07-18 22:43:16 +02:00
Jan Nieuwenhuizen bba631edcd add equal?, member, for-each. 2016-07-17 22:35:00 +02:00
Jan Nieuwenhuizen 59cdf9632f closures: mostly supported... 2016-07-17 22:15:31 +02:00
Jan Nieuwenhuizen f1bd1d461f add simple <=, >= and list?. 2016-07-17 12:56:31 +02:00
Jan Nieuwenhuizen c4d3d26f8d scm.mes: and: bugfix, return #f for (and #f 1 2 3). 2016-07-17 12:14:46 +02:00
Jan Nieuwenhuizen 44b26569a6 implement variable-argument and, or. 2016-07-16 20:02:14 +02:00
Jan Nieuwenhuizen 47fd339305 implement let loop. 2016-07-16 19:10:04 +02:00
Jan Nieuwenhuizen b638d33e4b cleanup let, let*, letrec 2016-07-16 17:57:19 +02:00
Jan Nieuwenhuizen dc8325ded3 implement unquote-splicing, cleanup some macros 2016-07-16 17:18:11 +02:00
Jan Nieuwenhuizen 02dc00d11c update macro, fix andmap. 2016-07-16 13:24:38 +02:00
Jan Nieuwenhuizen c1886195e6 add scheme apply, rename apply-> apply_env. 2016-07-16 08:17:56 +02:00
Jan Nieuwenhuizen 5d2259e55e add procedure? 2016-07-11 22:16:11 +02:00