[self-interest] Re: Self parser.
Jecel Assumpcao Jr
jecel at merlintec.com
Tue Oct 30 00:16:39 UTC 2001
On Monday 29 October 2001 12:19, Mikael wrote:
> Is it even possible to implement Self syntax as a BNF parser ?, it
> looks like it could be difficult ?
It isn't easy, but I think it is possible. The multiple uses of "."
make a clean separation of parsing and lexical analysis a problem and
the definition of "-" is pretty nasty.
The main problem is the implicit receivers and resends. You might want
to check out the hand crafted parser (in C) I wrote in tinySelf 0 which
includes my own Self BNF in the comments:
Unfortunately, it was easier for me to use a dirty trick to handle the
implicit receivers and resends than to actually follow my own BNF all
the way through.
Check out some other implementations like JSelf and OpenSelf:
More information about the Self-interest