Next: , Previous: , Up: Terms   [Contents][Index]


4.9 Trees

In this document, unless otherwise stated,

For brevity, in contexts where the meaning is clear, we refer to a tree node simply as a node. Especially when looked at from the point of view of its labels, a node is often called an instance.

A node is a pair of tuples:

We note that this definition of a tree node is recursive.

In the following list of definitions and assertions, let

     nd = [ [ sym,  start, end ], children ]

be a tree node:

Let nd1 and nd2 be two nodes. If nd2 is a child of nd1, then nd1 is the parent of nd2.

We define ancestor recursively such that nd1 is the ancestor of a node nd2 iff one of the following are true:

Simlarly, we define descendant recursively such that nd1 is the descendant of a node nd2 iff one of the following are true:

A tree is its own root node. That implies that, in fact, tree and node are just two different terms for the same thing. We usually speak of trees when we are thinking of the nodes/trees as a collection of nodes, and we speak of nodes when we are more focused on the individual nodes.

A parse forest is a set of one or more parse trees. Each tree represents a parse.

We have used “parse” as a noun in several senses. Depending on context a “parse” may be

When the meaning of “parse” is not clear in context, we will be explicit about which sense is intended.

[ TODO: give example of tree ] [ TODO: define path ] [ TODO: define left vs. right ] [ TODO: define cut ] [ TODO: define frontier ] [ TODO: define top-down traversal ] [ TODO: define bottom-down traversal ]


Next: , Previous: , Up: Terms   [Contents][Index]