core: Disable reader.

* mes.c (READER): Switch off.
* module/mes/read-0.mes (eat-whitespace): Handle #;.
This commit is contained in:
Jan Nieuwenhuizen 2016-12-22 21:23:49 +01:00
parent 570eec966e
commit b45a3b6f33
2 changed files with 7 additions and 4 deletions

7
mes.c
View File

@ -30,7 +30,7 @@
#define DEBUG 0
#define FIXED_PRIMITIVES 1
#define READER 1
#define READER 0
#if READER
int ARENA_SIZE = 1000000;
@ -1195,10 +1195,9 @@ SCM
read_input_file_env (SCM a)
{
r0 = a;
#if READER
if (assq_ref_cache (cell_symbol_read_input_file, r0) != cell_undefined)
return apply_env (cell_symbol_read_input_file, cell_nil, r0);
return read_input_file_env_ (read_env (r0), r0);
#endif
return apply_env (cell_symbol_read_input_file, cell_nil, r0);
}
SCM

View File

@ -146,6 +146,10 @@
(read-byte)
(read-block-comment 33 (read-byte))
(eat-whitespace))
((eq? (peek-byte) 59)
(read-byte)
(read-word (read-byte) (list) (list))
(eat-whitespace))
((eq? (peek-byte) 124)
(read-byte)
(read-block-comment 124 (read-byte))