[Ecls-list] recursivep in read_delimited_list - bug?

Alexander Gavrilov angavrilov at gmail.com
Sat Jan 17 10:41:58 UTC 2009


Hello,

I'm completely new to Lisp, so I may be wrong, but it seems
strange to me that read_delimited_list resets the backquote
parser environment when recursivep is true, and doesn't
change anything when it is false. All other functions, e.g.
read, behave in the opposite way. Besides, it breaks the
cl-match package.

Searching through the git history shows that this commit,
while doing code refactoring, effectively flipped the
condition:


commit 914f9595993a44fd36015caba3632f8cfeaae379
Author: jjgarcia <jjgarcia>  2002-11-11 15:57:21
Committer: jjgarcia <jjgarcia>  2002-11-11 15:57:21
Follows: ECL.0.6
Precedes: ECL.0.8

    1) Fix error in UNWIND-PROTECT forms: the destination frame nlj_fr has to
    be saved, because it may be overwritten by a BLOCK or TAGBODY inside
    the normal exit form.
    2) Implement Invocation History Stack as a chain of stack-allocated records.
    3) In compiled TAGBODY forms, replace tags with numbers to save space.

...

-	if (Null(recursivep)) {
-		old_sharp_eq_context = sharp_eq_context;
-		old_backq_level = backq_level;
-		sharp_eq_context = Cnil;

...

+	if (Null(recursivep))
+		l = do_read_delimited_list(d, strm);
+	else {
+		volatile cl_object old_sharp_eq_context = sharp_eq_context;
+		volatile int old_backq_level = backq_level;
+		CL_UNWIND_PROTECT_BEGIN {
+			sharp_eq_context = Cnil;


Alexander




More information about the ecl-devel mailing list