danielv@netvision.net.il wrote:
I sincerely hope that at least some of the people on this list will take an interest in this line of development.
/Mats Nygren
This one certainly will. I'm wondering what sort of tools you intend to develop for acting on the parse trees. Tools to generate and calculate attribute grammars and such would be very useful.
Daniel
Thanks for the interest. I have to disappoint you, a havent produced any hot new tools, only a particular framework which I will describe and motivate, and some particular code that is useful. (And some simple parsing tools I admit). At the present I find promoting this idea more important than producing smart tools. They will arise when needed.
BTW I did some (simple) tools earlier. It can be reincarnated in Squeak. The main point making them different from lex/yacc is that a tool should produce both a writer and a reader for its syntax. In this way an ever growing opportunity for connecting things arises. Quite different from a lot of computing practice. In more detail, a parsing tool should produce a bijective mapping from a set of tree's to a set of strings (or other sequences). The Scanner/Unscanner worked quite well. The parse/deparse tool neede more work. I guess in connection with TGen something powerful could be written that goes both ways.
Of course the well known Visitor pattern is useful for doing things with parse-trees. The Visitor when seen like this becomes the structure homomorphism or the elimination rule of the parse-tree type. Or rather a family of such with different traversal strategies.
And Prolog is good for juggling with trees. And functional programming (which is close to the Visitor pattern in this case).
I think that when the syntax-material is reincarnated in Squeak it will be a class hierarchy where languages will inherit structure from similar languages. Making it real easy to try out some new stuff as long as it it similar to something existing. In a way this is an answer to the tools question, use inheritance! My experience with this from outside Squeak with specialpurpose inheritance mechanisms is quite encouraging. Very often there is a family of related languages, this is handled quite well.
/Mats
Mats,
I wonder whether you might have a tool ready that would allow me to read in a bunch of Python files and convert them to Squeak. I know, that this is probably not really useful as the power of Python lays in its libraries but still, it would be nice if I could some of the millions of available python solutions to work with in Squeak.
If not, I might try to write a scanner/parser on my own, but I got the impression you're working on a similar idea already.
bye -- Stefan Matthias Aust \ Truth Until Paradox
squeak-dev@lists.squeakfoundation.org