Commit graph

9 commits

Author SHA1 Message Date
Jan Nieuwenhuizen 6b4bf34ff2 Support backslash in string.
* reader.c (read_string): Handle '\\'.
* tests/read.test: Add it.
2016-12-18 15:39:12 +01:00
Jan Nieuwenhuizen 89f771f18a Support #\alarm, #\vtab.
* mes.c (char_alarm): New variable.
  (char_vtab): Rename from char_vt.
* reader.c (read_character): Add alarm, update vtab.
* display.c (display): Likewise.
* module/language/c/lexer.mes (read-string): Use vtab.
2016-12-18 15:21:05 +01:00
Jan Nieuwenhuizen 95d913097d Support non-nested #| |# comment.
* module/mes/read-0.mes (read-word, read-block-comment): Implement #|.
* reader.c (read_word, read_block_comment)[READER]: Likewise.
* tests/read.test: Test it.
* NEWS: Mention it.
2016-12-18 10:11:22 +01:00
Jan Nieuwenhuizen 9dcff14bba Support #; comment.
* module/mes/read-0.mes (read-word): Implement #;.
* reader.c (read_word)[READER]: Likewise.
* tests/read.test: Test it.
* NEWS: Mention it.
2016-12-18 10:02:49 +01:00
Jan Nieuwenhuizen 46a617f16e core: Support keywords.
* display.c (display): Handle keyword.
* mes.c (type_t): Add KEYWORD.
  (eq_p): Handle it.
  (make_keyword): New function.
* reader.c (lookup): Use it.
* type.c (keyword_p): New function.
* NEWS: Update.
2016-12-16 23:30:33 +01:00
Jan Nieuwenhuizen 885f48757a Handle form-feed.
* module/mes/read-0.mes (eat-whitespace, read-word): Handle form-feed.
* reader.c (eat_whitespace, read_word): Likewise.
2016-12-16 18:30:54 +01:00
Jan Nieuwenhuizen dd1daf92e4 Extend Scheme reader, reduce C reader dependency.
* mes.c (bload_env): Mark as internal.
  (load_env): Likewise.  Load Scheme reader from source.  Remove dumping.
  (dump): New function.
* (vm_begin_env): Allow for gc while read_input_file_env.
  (mes_builtins): Add *dot*.
  (read_input_file_env)[!READER]: Invoke read-input-file.
* module/mes/read-0.mes (read-env): New function.
  (read-word): Support quasisyntax.
  Remove usage of ' thoughout.
* module/mes/repl.mes (repl): Use read instead of read-env. 
* guile/mes.scm (environment): Add *dot*.
* guile/reader.mes: Update.
* NEWS: Update.
2016-12-13 19:58:34 +01:00
Jan Nieuwenhuizen e4e29f00b0 core: gc bugfixes.
* mes.c (make_tmps): New function.
  (make_symbols, gc): Use it.
  (vm_call_with_values_env): New vm function.
  (call-with-values): Call it.
  (eval_env): Do not call eval_env inline.
* define.c (vm_define_env): Use r2 rather than local name.
  (g_symbols): Rename from symbols.
2016-12-12 20:35:19 +01:00
Jan Nieuwenhuizen f26c7222b2 core: Split-off cache, display, reader.
* mes.c: Remove cache, display, reader functions.
* cache.c: New file.
* display.c: New file.
* reader.c: New file.
2016-12-12 20:35:19 +01:00