Commit graph

52 commits

Author SHA1 Message Date
Jan Nieuwenhuizen c8e87f3021 Switch fat-c/boot using environment variable BOOT.
* GNUmakefile: check for BOOT, set CFLAGS.
* mes.c: Remove hardcoded BOOT define.
* scripts/include.mes: include loop-0 when BOOT is set.
2016-10-20 22:03:17 +02:00
Jan Nieuwenhuizen d1b8f0ff0c Introduce SCM type for special symbols.
* GNUmakefile (mes.h): Also export SCM to symbols.i
* mes.c: Introduce SCM type for special symbols.
  (builtin_eval): Rename from eval_env.  Update callers.
* module/mes/base-0.mes (eval): Remove.
* module/mes/repl.mes (repl): Use eval.
2016-10-20 19:19:32 +02:00
Jan Nieuwenhuizen d18e50a569 make tests standalone executable.
* tests/closure.test: Add shebang and boot-0 include.
* 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.
* GNUmakefile (mes-check): Run tests by exec'ing.
2016-10-19 00:36:12 +02:00
Jan Nieuwenhuizen 219a8cdfbb make clean: remove symbols.i.
* GNUmakefile (clean): remove symbols.i.
2016-10-19 00:36:12 +02:00
Jan Nieuwenhuizen b5af238305 Update guix hash.
* make/install.make (update-hash): New target.
* guix.scm: Prepare for update.
2016-10-18 23:50:09 +02:00
Jan Nieuwenhuizen 3128c4b976 Prepare for 0.1 release: gnu-build-system.
* configure: New file.
* make/install.make: New file.
* .gitignore: Ignore generated files.
* build-aux/gitlog-to-changelog: New file.
2016-10-16 00:34:23 +02:00
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 422b6e6ce9 Avoid 90% of cdr'ing environment, assuming static primitives.
* mes.c (internal_primitive_p)[STATIC_PRIMITIVES: New function.
 (lookup_macro)[STATIC_PRIMITIVES]: Use it.
 (internal_lookup_primitive)[STATIC_PRIMITIVES]: New function.
 (lookup)[STATIC_PRIMITIVES]: Use it.
 (mes_primitives)[STATIC_PRIMITIVES]: New function.
 (main): Use it.
* base0-if.mes (disabled-cond): Rename from xcond.
* GNUmakefile: Add commented profiling CFLAGS.
2016-10-12 21:14:06 +02:00
Jan Nieuwenhuizen 7ff86c393f cleanup and doc update. 2016-10-10 23:24:44 +02:00
Jan Nieuwenhuizen 2e1685dc2d test/match.test: pass. 2016-10-11 18:51:30 +02:00
Jan Nieuwenhuizen d3fab554d5 let-syntax.mes: implement. 2016-10-10 22:55:37 +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 509bf3956e mes.c: uniquify symbols. 2016-10-08 08:41:30 +02:00
Jan Nieuwenhuizen 3ff385ce6d mes-check: separate target. 2016-10-08 08:38:29 +02:00
Jan Nieuwenhuizen 2c7f26dbe6 mescc.scm: first a.out produced from main.c. 2016-08-14 01:44:42 +02:00
Jan Nieuwenhuizen 24291da28e elf.mes: remove text-free, softcode data-offset. 2016-08-13 19:19:52 +02:00
Jan Nieuwenhuizen 00e000306d elf.mes: compute text-free, text-offset. 2016-08-13 15:27:02 +02:00
Jan Nieuwenhuizen 1d08cc7f6f elf.mes: separate-out text, text-free and data sections. 2016-08-13 10:32:07 +02:00
Jan Nieuwenhuizen 355042300c elf.mes: a.out runs. 2016-08-12 16:38:59 +02:00
Jan Nieuwenhuizen 0829c5762c mescc/elf.mes: write minimal ELF header. 2016-08-12 14:17:55 +02:00
Jan Nieuwenhuizen ef874c8fd3 syntax-if.mes: TODO. 2016-07-27 12:16:44 +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 384a88dd53 hello.c, hello.S: hello world target for C compiler. 2016-07-26 07:30:53 +02:00
Jan Nieuwenhuizen f170735edb mescc: mes parses simplest main with lalr. 2016-07-25 01:12:22 +02:00
Jan Nieuwenhuizen 60a7c9099f mescc.scm: parse simple main.c. 2016-07-24 23:18:53 +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 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 262c507303 check: resurrect guile-check. 2016-07-23 15:17:03 +02:00
Jan Nieuwenhuizen 5126e16e66 trying to get records up....WIP 2016-07-23 14:39:33 +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 61bbbdffbf mes.c: move begin_env into eval, decruft. 2016-07-19 18:18:27 +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 d21d4aecfc guile runs macro-based mes:define-syntax, mes runs but yields *undefined*. 2016-07-17 00:03:14 +02:00
Jan Nieuwenhuizen be12facd6d support define-macro inside eval (i.e., inside define-macro) 2016-07-16 23:35:07 +02:00
Jan Nieuwenhuizen d53ea79a5d syntax... 2016-10-18 22:19:57 +02:00
Jan Nieuwenhuizen 02dc00d11c update macro, fix andmap. 2016-07-16 13:24:38 +02:00
Jan Nieuwenhuizen ddccd4747a add variable argument append. 2016-07-11 21:50:59 +02:00
Jan Nieuwenhuizen 081cb4a94f add vectors. 2016-07-11 10:38:02 +02:00
Jan Nieuwenhuizen a30ee9bb1d add strings. 2016-07-10 22:43:23 +02:00
Jan Nieuwenhuizen bfed3eb8b3 add +,/,*,=. 2016-07-10 12:52:53 +02:00
Jan Nieuwenhuizen 0ef7238600 loop2.mes: separate from scm.mes. 2016-07-10 10:55:05 +02:00
Jan Nieuwenhuizen 00687ba91a add set!. 2016-07-10 10:43:26 +02:00
Jan Nieuwenhuizen 72d96eb485 snarf scm functions and environment. 2016-07-09 23:12:25 +02:00
Jan Nieuwenhuizen 59bd723a8d move mes language additions to scm.mes. 2016-07-09 15:16:30 +02:00
Jan Nieuwenhuizen 1513c0d5fb boot.mes: generate from mes.mes, scm.mes, test.mes. 2016-07-09 13:23:58 +02:00
Jan Nieuwenhuizen 0eb32de9c7 mes.c: support `.' and add let. 2016-07-08 18:02:06 +02:00