Steel Bank Common Lisp

backquote with comma inside array

Reported by Nikodemus Siivola on 2008-12-17
2
Affects Status Importance Assigned to Milestone
SBCL
Medium
Unassigned

Bug Description

  reported by Bruno Haible sbcl-devel "various SBCL bugs" from CLISP
  test suite.
    (read-from-string "`#1A(1 2 ,(+ 2 2) 4)")
  gives
    #(1 2 ((SB-IMPL::|,|) + 2 2) 4)
  which probably isn't intentional.

Changed in sbcl:
importance: Undecided → Medium
status: New → Confirmed
Stas Boukarev (stassats) wrote :

This also affects commas inside #S. Attached patch signals an error in those cases.

Tobias C. Rittweiler (tcr) wrote :

I'm not sure whether that Bruno's example should signal an error. CLHS 2.4.6
says

  "`basic is the same as 'basic, that is, (quote basic), for any expression
    basic that is not a list or a general vector."

#1A(...) represents a general vector. So one could perhaps construct
an argument which says that Bruno's example should be considered
to be equivalent to `#(1 2 ,(+ 2 2) 4).

OTOH, 2.4.6 talks about syntax and gives a, presumably, exhausted
list of permitted syntaxes after backquote.

So I think signaling an error is indeed ok.

  status fixcommitted

In SBCL 1.0.36.21. Thanks for the patch!

Changed in sbcl:
status: Confirmed → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers