parsing (was: related projects)

Jecel Assumpcao Jr
Fri Feb 28 14:32:03 2003

On Thursday 27 February 2003 17:58, Brian T Rice wrote:
> I suppose so, but I wouldn't point out PIE and Sketchpad as the best
> of what was lost.

Having read all the available papers on these projects, I wouldn't mind 
having them exactly as they were back then. Specially Sketchpad.

> Nope, it's entirely pragmatic. Generally, the Tunesy thing we intend
> to do requires us to deal with programs in an abstract manner,
> allowing annotations to be built without special syntax. So expect
> interesting things after the bootstrapped system has been built out
> into something semi-comfortable.

That will be interesting. Integrating annotations with the "main" 
program will give you many of the same problems that the Aspects people 
face. This is a place where graphics can help: a single line linking 
one point in the source to another point in a separate "file" is far 
clearer than any textual naming convention, thought in theory it would 
seem about the same.

> > Supposing you have Arrow running in Slate. My question is if the
> > two would eventually merge somehow or if Arrow would always be a
> > kind of application for doing limited things?
> Eventually, they should merge in some way, with Arrow becoming a
> general pervasive utility for developing information transformations
> and translations, as well as providing the nuts and bolts for an
> inference system. However, this requires some fancy partial
> evaluation work and even more work on relating the different ways of
> formalizing arrows, so who knows when/if it will be feasible.

This is where having a group of PhD students sometimes helps. I guess 
the plan "1. make it work, 2. make it right and 3. make it fast" is 
good since having 1 you can get other people interested in doing 2 and 

> > [quick overview of the new syntax]
> This appears to be requiring context-free grammars.

Not really - my system doesn't have a parser at all! The code editor 
tricks you into entering and manipulating syntax trees directly :-)

This is my version of "as simple as possible".

I am still interested in parsers for importing code from Self/Smalltalk, 
however. And for reading other kinds of files as well.

> This kind of
> syntax generality is why I've been looking into Maude's MetaParser
> system (see

This looks very flexible.

> Right now
> I'm translating a Smalltalk parser-generator to Slate just to get LR1
> and LALR1 handling, and it's not attractive at all, although better
> than it was for Smalltalk.

Have you seen the Mango package for Self? It translates "structured BNF" 
into a LR1, LALR1 or SLR1 grammar (you choose which) and then generates 
a Self program to parse it. Ole Agesen's test example was ANSI C and it 
was used by Mario to parse GNU Smalltalk. I have never understood why a 
parser couldn't be generated directly from the original structured BNF.

> But to get the MetaParser usage, you have to implement Maude's
> semantics to some extent, so eventually the object-oriented approach
> has to yield somehow. I suppose this is where I should tie things in
> with Arrow, but I'm not sure.

The Maude manual pages you gave a link to talk about "objects" a lot. I 
haven't looked at the rest of the language description.

-- Jecel