[Openmcl-devel] modify lisp reader such that :: is disallowed
taoufik.dachraoui at wanadoo.fr
Thu Jun 11 15:09:35 UTC 2009
Users will not have access to intern, find-package, ...
I implemented a loader that exports public symbols and shadow unwanted
so that users will not be able to use any private or shadowed symbols.
the only problem I am facing today (as far as I can see right now) is to
disallow users to access non exported symbols by using the double
I tried to use set-macro-character and set-dispatch-macro-character
but failed, and
the reason is that the lisp reader as soon as it finds a macro-
character the previously
read word will be considered as a token and there is no way to rollback.
For this reason I am trying to find a hack to modify the ccl lisp
reader as follows:
1. add parameter *use-double-colon* (default to t)
2. when (null *use-double-colon*) then the lisp reader must reject any
use of double colon
(let ((*use-double-colon* nil))
=> Error: use of double colons are not allowed
The portability is not an issue for me (at least now), and would like
to hack the ccl
lisp reader for performance reason (eg. do not want to use a new lisp
reader on top
of the already existing ccl lisp reader)
On Jun 11, 2009, at 4:54 PM, Robert P. Goldman wrote:
> This seems like a mistake, anyway, because this won't stop a user
> from typing
> (eval (list (intern "ERASE-TAOUFIKS-HARD-DRIVE" (find-
> package :private-package))))
> I continue to think that trying to sandbox common lisp is a very big
> project for a novice.
> The browser builders are often getting sandboxing wrong for
> Robert P. Goldman
> Principal Scientist, SIFT, LLC
> ..... Original Message .......
> On Thu, 11 Jun 2009 14:40:14 +0200 "Taoufik Dachraoui" <taoufik.dachraoui at wanadoo.fr
> > wrote:
>> I tried to modify the lisp reader such that the use of :: is
>> disallowed (throws an error) but failed.
>> I tried to use set-macro-character and set-dispatch-macro-character
>> without success.
>> ? ... set new lisp reader ....
>> ? test::x
>> Error: access to not exported symbols is forbidden
>> Kind regards
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
More information about the Openmcl-devel