Parse trees and syntax

Matthew Tuck matty@box.net.au
Mon, 07 Dec 1998 20:47:10 +1030


Hans-Dieter Dreier wrote:

> What do you mean by  "Program Platform Independent"?

It's more like Ultra, Program, Platform Independent Distribution.

> I'd omit most of it for a start. Just implement the very minimum.

I was thinking more in the long term.  My nesting hierachy, for example,
was hardly a version 1 aspiration.

> Do we need it for a start? I don't think so. Can it be fitted in
> later? Most likely.

Same.

> These concepts are equivalent. Having the linked list collapsed
> conserves memory in the parse tree but probably needs more memory
> during construction, and is not so easy to change at edit time as a
> linked list. If a statement would have a pointer to the next
> statement, that would effectively turn the statement delimiter into an
> infix operator (like +), which would require no special treatment /
> this is why I'd prefer a linked list (or rather: the same format as
> any other infix op).

It's not collapsed in the sense of hardcoded nodes, more like one
multi-valued node, something the following in the interpreter.

forall Stmt in Node.Stmts
   Execute(Stmt)
end forall

> Why not? I don't think a minimalistic compiler need to be so big. I
> admit we would have to tackle this pretty soon.

I was thinking more in terms of getting it bootstrappable.  It's not
always easier to define a "version" in release-often OSS.

-- 
     Matthew Tuck - Software Developer & All-Round Nice Guy
                              ***
       Check out the Ultra programming language project!
              http://www.box.net.au/~matty/ultra/