<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi<div><br></div><div>The best I could find without hacking the ccl lisp reader is the following:</div><div><br></div><div><div>(defparameter *secure-readtable* (copy-readtable nil))</div><div><br></div><div>(set-macro-character #\:</div><div>   #'(lambda (s c) </div><div>       (declare (ignore s c))</div><div>       (progn</div><div><span class="Apple-tab-span" style="white-space:pre">    </span> (setq *readtable* (copy-readtable nil))</div><div><span class="Apple-tab-span" style="white-space:pre">     </span> (error "use of colons is not allowed")))</div><div>   nil</div><div>   *secure-readtable*)</div><div><br></div><div>Example:</div><div><br></div><div><div>? (let ((*readtable* *secure-readtable*)) (read))</div><div>:x</div><div><br></div><div>> <font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><b>Error: use of colons is not allowed</b></span></font></div><div>> While executing: #<Anonymous Function #x8ABC576>, in process listener(1).</div><div>> Type :POP to abort, :R for a list of available restarts.</div><div>> Type :? for other options.</div><div>1 > (get-macro-character #\:)</div><div>NIL</div><div>NIL</div><div>1 > :pop</div><div><br></div><div>? </div><div><br></div><div><div>But with this, users will not be able to use keywords either.</div><div><br></div><div>Is there a way to know if the colon is the first character in the token?</div><div>Does the reader has accessible working variables that we can consult?</div><div><br></div></div><div>Kind regards</div><div><br></div><div>-Taoufk</div><div><br></div></div><div><br></div><div><div>On Jun 11, 2009, at 4:54 PM, Robert P. Goldman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>This seems like a mistake, anyway, because this won't stop a user from typing<br><br>(eval (list (intern "ERASE-TAOUFIKS-HARD-DRIVE" (find-package :private-package))))<br><br>I continue to think that trying to sandbox common lisp is a very big project for a novice.<br><br>The browser builders are often getting sandboxing wrong for javascript, whích is a much simpler language.<br>___<br>Robert P. Goldman<br>Principal  Scientist, SIFT, LLC<br><a href="http://www.sift.info">www.sift.info</a><br><br> ..... Original Message .......<br>On Thu, 11 Jun 2009 14:40:14 +0200 "Taoufik Dachraoui" <taoufik.dachraoui@wanadoo.fr> wrote:<br><blockquote type="cite">Hi<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I tried to modify the lisp reader such that the use of :: is  <br></blockquote><blockquote type="cite">disallowed (throws an error) but failed.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I tried to use set-macro-character and set-dispatch-macro-character  <br></blockquote><blockquote type="cite">without success.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">example:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">? ... set new lisp reader ....<br></blockquote><blockquote type="cite">? test::x<br></blockquote><blockquote type="cite">Error: access to not exported symbols is forbidden<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Kind regards<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-Taoufik<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Openmcl-devel mailing list<br></blockquote><blockquote type="cite">Openmcl-devel@clozure.com<br></blockquote><blockquote type="cite">http://clozure.com/mailman/listinfo/openmcl-devel<br></blockquote><br><br></div></blockquote></div><br></div></body></html>