Rewriting the Squeak syntax with OMeta. Its not that I don't like the squeak syntax, but, think of a language with multiple syntaxes! If you wrote a syntax for a different language in smalltalk, you could port applications to and from smalltalk more easily, in theory.
This is what I have.
The new Syntax class:
NewSyntax>>messageSyntax ::= <tsString>:o<space>$(<tsString>:m$) => [Transcript show: 'Message: ', m, ' was sent to: ', o]
Executed in a Workspace:
stringToMatch := '''OMeta'' (''subclass: #E'')'.
(E on: stringToMatch readStream) apply: #messageSynatax.
Transcript cr.
This doesn't do anything, but it could. the syntaxt this creates is like this:
'Object' ('message')
The quotes are required, and I dont think you can send more than one message at once, but this could be an example:
'Object' ('subclass: #HelloOMeta')
just a thought.
dz
--
David Zmick
/dz0004455\
http://dz0004455.googlepages.comhttp://dz0004455.blogspot.com