Re: [CLSQL-Help] Still broken disable-sql-reader-syntax
Marcus Pearce <[email protected]> Tue, 3 Oct 2006 11:43:47 +0100 (BST)
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <Pine.LNX.4.62.0610031055330.6427@elgar> |
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--8323328-932803813-1159872227=:6427
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Thu, 28 Sep 2006, GP lisper wrote:
> On Thu, 02 Mar 2006 <hanche-JqIlAn8ZSnlRyvKAgBWctw-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org> wrote:
>>
>> Just start up a fresh lisp, load only clsql and nothing else, and test
>> it like this:
>>
>> SCRATCH> '[foo]
>> [FOO]
>> SCRATCH> (clsql:locally-enable-sql-reader-syntax)
>> ; No value
>> SCRATCH> '[foo]
>> #<CLSQL-SYS:SQL-IDENT-ATTRIBUTE FOO>
>> SCRATCH> (clsql:locally-disable-sql-reader-syntax)
>> ; No value
>> SCRATCH> '[foo]
>> Warning: Ignoring unmatched close parenthesis at file position 6.
>> [FOO
>>
>> locally-disable-sql-reader-syntax really should restore the
>> syntax for #\] as well.
>
> This is still broken for me in clsql-3.7.2, error is now:
>
> Error in KERNEL::UNBOUND-SYMBOL-ERROR-HANDLER: the variable ] is unbound
>
> cmucl-19b
Right, the problem here is that the call to
LOCALLY-DISABLE-SQL-READER-SYNTAX ends up making the following function
call:
(SET-MACRO-CHARACTER #\] NIL)
but SET-MACRO-CHARACTER requires a function designator as its second
argument[1] and "The consequences are undefined if a symbol is used as a
function designator but it does not have a global definition as a
function, or it has a global definition as a macro or a special form" [2].
SBCL (and presumably CMUCL) does something odd related to the
non-terminating-ness of the character while CLISP, for example, signals an
error.
I think the right thing to do is to reimplement
%{ENABLE,DISABLE}-SQL-READER-SYNTAX such that they operate on a copy of
the current readtable - see attached patch against 3.7.3.
With the patch applied, the problem described above goes away and the test
suite runs without failure on SBCL 0.9.16, Linux/x86, Postgresql 8.0.8.
Cheers,
Marcus
[1] http://www.lispworks.com/documentation/HyperSpec/Body/f_set_ma.htm
[2] http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#function_designator
--8323328-932803813-1159872227=:6427
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=syntax2.diff
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.62.0610031143470.6427@elgar>
Content-Description:
Content-Disposition: attachment; filename=syntax2.diff
LS0tIHN5bnRheC1vbGQubGlzcAkyMDA2LTEwLTAzIDEwOjIzOjAxLjAwMDAw
MDAwMCArMDEwMA0KKysrIHN5bnRheC5saXNwCTIwMDYtMTAtMDMgMTA6NDY6
NTMuMDAwMDAwMDAwICswMTAwDQpAQCAtMTYsOSArMTYsNyBAQA0KIA0KIChp
bi1wYWNrYWdlICM6Y2xzcWwtc3lzKQ0KIA0KLShkZWZ2YXIgKm9yaWdpbmFs
LXJlYWRlci1lbnRlciogbmlsKQ0KLQ0KLShkZWZ2YXIgKm9yaWdpbmFsLXJl
YWRlci1leGl0KiBuaWwpDQorKGRlZnZhciAqb3JpZ2luYWwtcmVhZHRhYmxl
KiBuaWwpDQogDQogKGRlZnZhciAqc3FsLW1hY3JvLW9wZW4tY2hhciogI1xb
KQ0KIA0KQEAgLTQ1LDEwICs0Myw5IEBADQogICAgICglZGlzYWJsZS1zcWwt
cmVhZGVyLXN5bnRheCkpKQ0KIA0KIChkZWZ1biAlZGlzYWJsZS1zcWwtcmVh
ZGVyLXN5bnRheCAoKQ0KLSAgKHdoZW4gKm9yaWdpbmFsLXJlYWRlci1lbnRl
cioNCi0gICAgKHNldC1tYWNyby1jaGFyYWN0ZXIgKnNxbC1tYWNyby1vcGVu
LWNoYXIqICpvcmlnaW5hbC1yZWFkZXItZW50ZXIqKSkNCi0gICh3aGVuICpv
cmlnaW5hbC1yZWFkZXItZXhpdCoNCi0gICAgKHNldC1tYWNyby1jaGFyYWN0
ZXIgKnNxbC1tYWNyby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zZXQtbWFjcm8tY2hhcmFjdGVyICpzcWwtbWFj
cm8tb3Blbi1jaGFyKiAjJ3NxbC1yZWFkZXItb3BlbikNCiAgICAgKHNldC1t
YWNyby1jaGFyYWN0ZXIgKnNxbC1tYWNyby1jbG9zZS1jaGFyKiAoZ2V0LW1h
Y3JvLWNoYXJhY3RlciAjXCkpKSkNCiAgICh2YWx1ZXMpKQ0KIA0K
--8323328-932803813-1159872227=:6427
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
CLSQL-Devel mailing list
[email protected]
http://lists.b9.com/mailman/listinfo/clsql-devel
--8323328-932803813-1159872227=:6427--