mes: resurrect full reader in C core.
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 29 Nov 2017 20:42:50 +0000 (21:42 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 29 Nov 2017 20:42:50 +0000 (21:42 +0100)
commitc3fdfedb2093775e3af299b99cd8f1e2e4ed6eed
tree20d6f5fd189842d85593a8c485247d8acd62e0bc
parent74c419746778996426766c40aeff479c8309566b
mes: resurrect full reader in C core.

* module/mes/read-0.mes (defined?): New function.
  (eat-whitespace, read-env, read-word, read-block-comment,
  read-line-comment, read-list, read-character, read-hex, read-octal,
  reader:read-string, lookup, read-hash, read-word): Only define if
  not %c-reader.
* module/mes/base-0.mes (defined?): Remove.
* src/mes.c[MES_C_READER]: Set ARENA_SIZE=10000000.
  (scm_symbol_quasiquote scm_symbol_unquote,
  scm_symbol_unquote_splicing, scm_symbol_syntax,
  scm_symbol_quasisyntax, scm_symbol_unsyntax,
  scm_symbol_unsyntax_splicing): New symbol.
  (scm_symbol_c_reader): New symbol.
  (MAKE_KEYWORD)[MES_C_READER]: New define.
  (mes_symbols): Define %c_reader.
* src/reader.c (read_word_)[MES_C_READER]: Extend to full Scheme
  reader.
  (eat_whitespace)[MES_C_READER]: Likewise.
  (read_block_comment, read_hash, read_word, read_character,
  read_octal, read_hex, append_char, read_string)[MES_C_READER]:
  Likewise.
* make.scm (bin.gcc,bin.mescc): Define MES_C_READER=1.
make.scm
module/mes/base-0.mes
module/mes/read-0.mes
module/mes/scm.mes
src/mes.c
src/reader.c