budden <···········@mail.ru> writes:
> Hi!
>> 'cl-user::
> behaves differently. Some lisps return
> cl-user::||
> some err.
> Which is correct behaviour?
The correct behavior is to avoid reading cl-user::
cl-user:: is not amongst the valid patterns for a token:
http://www.lispworks.com/documentation/HyperSpec/Body/02_ce.htm
--
__Pascal Bourguignon__
On Apr 25, 4:38 pm, budden <···········@mail.ru> wrote:
> Thanks!
> In a practice:
>
> lispworks, clisp, ccl
> (read-from-string "cl-user::")
> returns cl-user::||
>
> sbcl and allegro report a error.
this must have been patched recently in ccl as it now returns:
> Error: Reader error: Illegal symbol syntax.
budden <···········@mail.ru> wrote:
+---------------
| In a practice:
|
| lispworks, clisp, ccl
| (read-from-string "cl-user::")
| returns cl-user::||
|
| sbcl and allegro report a error.
+---------------
As others have noted, bare CL-USER:: is an illegal token. However,
CL-USER::|| *is* a legal token, and thus the following should work
everywhere:
> (read-from-string "cl-user::||")
||
11
> (eq * (intern "" "CL-USER"))
T
> (symbol-name **)
""
> (length *)
0
>
-Rob
-----
Rob Warnock <····@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607