backquote with comma inside array

Bug #309093 reported by Nikodemus Siivola
2
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
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.

Tags: reader
Changed in sbcl:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Stas Boukarev (stassats) wrote :

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

Revision history for this message
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.

Revision history for this message
Nikodemus Siivola (nikodemus) wrote : Re: [Bug 309093] Re: backquote with comma inside array

  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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.