mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-26 14:32:11 -08:00
'. returned SI:|.| while this is an internal way to construct lists
This commit is contained in:
parent
04bcc1414d
commit
d674020bd8
1 changed files with 12 additions and 4 deletions
16
src/c/read.d
16
src/c/read.d
|
|
@ -49,6 +49,7 @@ static cl_object dispatch_macro_character(cl_object table, cl_object strm, int c
|
|||
|
||||
#define ECL_READ_ONLY_TOKEN 1
|
||||
#define ECL_READ_RETURN_IGNORABLE 3
|
||||
#define ECL_READ_LIST_DOT 4
|
||||
|
||||
cl_object
|
||||
si_get_buffer_string()
|
||||
|
|
@ -340,12 +341,18 @@ LOOP:
|
|||
|
||||
/* The case in which the buffer is full of dots has to be especial cased */
|
||||
if (length == 1 && TOKEN_STRING_CHAR_CMP(token,0,'.')) {
|
||||
x = @'si::.';
|
||||
goto OUTPUT;
|
||||
if (flags == ECL_READ_LIST_DOT) {
|
||||
x = @'si::.';
|
||||
goto OUTPUT;
|
||||
} else {
|
||||
FEreader_error("Dots appeared illegally.", in, 0);
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < length; i++)
|
||||
int i;
|
||||
for (i = 0; i < length; i++) {
|
||||
if (!TOKEN_STRING_CHAR_CMP(token,i,'.'))
|
||||
goto MAYBE_NUMBER;
|
||||
}
|
||||
FEreader_error("Dots appeared illegally.", in, 0);
|
||||
}
|
||||
|
||||
|
|
@ -1527,7 +1534,8 @@ do_read_delimited_list(int d, cl_object in, bool proper_list)
|
|||
cl_object x, y = ECL_NIL;
|
||||
cl_object *p = &y;
|
||||
do {
|
||||
x = ecl_read_object_with_delimiter(in, d, 0, cat_constituent);
|
||||
x = ecl_read_object_with_delimiter(in, d, ECL_READ_LIST_DOT,
|
||||
cat_constituent);
|
||||
if (x == OBJNULL) {
|
||||
/* End of the list. */
|
||||
unlikely_if (after_dot == 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue