Remove functions from readtables?

Discussion of Common Lisp

Remove functions from readtables?

Postby porky11 » Thu Jun 12, 2014 3:24 am

Is it possible to remove some symbols from a readtable or to create an empty readtable, where I have to set all reader macros myself.

(copy-readtable) can only copy existing readtables and recreate the default readtable
(set-macro-character) can only set functions

This works, but it seems stupid to me:
Code: Select all
(set-syntax-from-char #\' #\x)


PS: if I redefine I also should redefine the Print-function, because of reading, but I don't find, how to do this.
porky11
 
Posts: 9
Joined: Fri May 02, 2014 6:46 am

Re: Remove functions from readtables?

Postby Goheeca » Thu Jun 12, 2014 4:44 am

There is only one option to edit (use some kind of an empty function in set-macro-character) setup-omnivore-readmacro*. But there is a dilemma on the line 83, it could be partially solved by creating the constant of an empty readtable in case you choose char-code-limit, I mean the speed problem of iterating over the whole set of unicode characters.
The printing part: I was discussing it in this topic.

* It's an ugly approach as I stated here (in the section Goheeca's remarks).
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of CLHS (and the dark themed version).
User avatar
Goheeca
 
Posts: 213
Joined: Thu May 10, 2012 12:54 pm

Re: Remove functions from readtables?

Postby marcoxa » Fri Jun 13, 2014 1:43 am

I know better ways to indulge in masochistic fetishes :mrgreen:
Marco Antoniotti
marcoxa
 
Posts: 69
Joined: Thu Aug 14, 2008 6:31 pm


Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 2 guests

cron