Adding a new reserved word

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding a new reserved word

Carla F. Griggio
Hi everyone!

I want to add a new reserved word to a Pharo image. I tried to find the code that gives special treatment to words like nil, true, false, self, etc. and add my new reserved word, but as though I tried to immitate some things, I was not successful.

¿What could be the right way to do this? ¿Can I add a reserved word just adding some code on a Pharo image?

Thanks!

Carla.

PS: The object of doing this is nothing serious, I just want to make a friend laugh with a silly joke :)

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: Adding a new reserved word

Michael Roberts-2
I am not very familiar with the compiler machinery but look for
references to StdVariables in:

VariableNode class>>initialize
Encoder>>cantStoreInto:

this is quite a deep part of the system, but in principle it can be
changed if you know how.  Have fun!

cheers,
Mike

On Mon, Mar 15, 2010 at 2:29 PM, Carla F. Griggio
<[hidden email]> wrote:

> Hi everyone!
>
> I want to add a new reserved word to a Pharo image. I tried to find the code
> that gives special treatment to words like nil, true, false, self, etc. and
> add my new reserved word, but as though I tried to immitate some things, I
> was not successful.
>
> ¿What could be the right way to do this? ¿Can I add a reserved word just
> adding some code on a Pharo image?
>
> Thanks!
>
> Carla.
>
> PS: The object of doing this is nothing serious, I just want to make a
> friend laugh with a silly joke :)
>
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>
>

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: Adding a new reserved word

Stan Shepherd
In reply to this post by Carla F. Griggio
This thread is probably what you are after.
...Stan
http://n4.nabble.com/ANN-Like-Python-Like-Squeak-td1568101.html#a1568101