core: Disable reader.
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 22 Dec 2016 20:23:49 +0000 (21:23 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 22 Dec 2016 20:23:49 +0000 (21:23 +0100)
* mes.c (READER): Switch off.
* module/mes/read-0.mes (eat-whitespace): Handle #;.

mes.c
module/mes/read-0.mes

diff --git a/mes.c b/mes.c
index 7ee3825dc9c25eb1ba85302286bf71d00c77ef67..963f321a6d8dc1b61b22d22f0144bc1d457c08ac 100644 (file)
--- a/mes.c
+++ b/mes.c
@@ -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
index 44196bc27c2f050ecf1b2307959fd1e72958a20b..d1279cae166e6043d657c4aa4a3c91de3b171737 100644 (file)
                                          (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))