How do I make a syntax tree?

See this page for how to do it in the schema. When you've read that, come back here.

Let's assume you have some in-memory representation of the tree which you can traverse both top-down and bottom-up.

Create the objects top-down (you will see later that you should probably assign monads bottom-up, but here we are concerned with how to create the tree objects). That is, create the highest nodes (for example, S nodes) first. Use CREATE OBJECT FROM MONADS so that you will get the object ID_D of the object just created as a return value from MQL.

Then recurse down the tree, creating each lower unit pointing to its parent. You will know the ID_D of the parent because you have just used CREATE OBJECT FROM MONADS to create the parent, which returns the ID_D of the object created.

Continue until you hit the bottom of the tree (words or morphemes).

Voila! A syntax tree with parent pointers in each node.


Previous:Creating objects
Up:Creating objects
Next:Monad assignment