M2/VALUE: reader

This commit is contained in:
Jan Nieuwenhuizen 2019-10-26 13:32:10 +02:00
parent 20b861ac89
commit 88fbcb5ff7
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 10 additions and 5 deletions

View File

@ -37,8 +37,6 @@ read_input_file_env_ (SCM e, SCM a)
SCM
read_input_file_env (SCM a)
{
//R0 = a;
//return read_input_file_env_ (read_env (R0), R0);
return read_input_file_env_ (read_env (cell_nil), cell_nil);
}
@ -186,7 +184,10 @@ reader_read_list (int c, SCM a)
//return cell_nil;
SCM s = reader_read_sexp_ (c, a);
if (s == cell_dot)
return CAR (reader_read_list (readchar (), a));
{
s = reader_read_list (readchar (), a);
return CAR (s);
}
return cons (s, reader_read_list (readchar (), a));
}
@ -286,7 +287,8 @@ reader_read_character ()
}
else if (c == 'x' && ((p >= '0' && p <= '9') || (p >= 'a' && p <= 'f') || (p >= 'F' && p <= 'F')))
{
c = VALUE (reader_read_hex ());
SCM n = reader_read_hex ();
c = VALUE (n);
eputs ("reading hex c=");
eputs (itoa (c));
eputs ("\n");
@ -482,7 +484,10 @@ reader_read_string ()
// c = '\e';
c = 27;
else if (c == 'x')
c = VALUE (reader_read_hex ());
{
SCM n = reader_read_hex ();
c = VALUE (n);
}
}
g_buf[i] = c;
i = i + 1;