[self-interest] oldParser. using ?

Marko Mikulicic marko at seul.org
Sun Oct 14 18:22:29 UTC 2001


Marko Mikulicic wrote:

 >Hello,
 >
 >I finnally got a sparc machine (sparc station 10, dual supersparc 50 Mhz
 >128Mb ram. It's slooow but it works).
 >
 >I was browsing in the world an I found the oldParser parser object.
 >I tried to let him parse something but I don't know if I'm using it
 >correctly, since it
 >parses only one level and doesn't descend. For example, the object
 >'(add: 1+3 Bla: 4)'
 >parses (using primary: ) to a "parseNodes methodObject" with empty
 >.
 >
oops. it works. I didn't ispect well the lists.
I added some functionality to oldParser:

- non-local returns
- arguments in slot initializers: (| add: arg With: something = (arg do:
something) |) now works
- binary methods slot initializers: (| + arg = ( arg addToMe: self) |)
now works
- resend:  "resend.unary","parentSlot.unary","blabla.+-** arg","res.key:
arg1 With: arg2",
     "SomeSlot.add: me".

currently I'm trying to add annotations parsing,
But I still don't know how to flatten the nested annotations. How can I
read the raw annotation string
(is there a primitive ?) to lear by examples ?

When finished I hope it will parse code generated by the transporter.
It uses a simple framework, just a couple of messages for string, list,
looping and boolean conditionals.
It could be easly used for bootstrapping from a minimal image. I belive
it is more compliant than my old parser since it was originally written
by the Self group, so it could be a starting poin for those projects
which aims to reimplement self (also porting to smalltalk it's straight
forward, a little too mechanical and boring but it's not big).

If someone is interested I can post the sources.

Marko





More information about the Self-interest mailing list