[squeak-dev] So here is my new wild idea

David Zmick dz0004455 at gmail.com
Fri Aug 22 19:41:15 UTC 2008


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.com
http://dz0004455.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080822/22819f2b/attachment.htm


More information about the Squeak-dev mailing list