Previous: , Up: Nullability   [Contents][Index]


13.5 Duplicate nulled nodes

A non-nulled node can never appear twice in the same tree. But duplicate nulled nodes in the same tree are quite possible. The start and end locations of a nulled node are the same, and other nodes can share the same start and end locations, so location information does not necessarily made a nulled node unique. Since a nulled node also always has no children, if two nulled nodes at the same location differ, they must differ in the symbol.

It is quite possible in a grammar to allow sequences of the same nulled symbol. All the nodes in this sequence will be equal to each other. These nodes represent multiple nulled symbol instances. The context (specifically, the position of the nulled node in the tree) is required to distinguish these instances.

Libmarpa could distinguish nulled nodes by including a “instance number” in the node and, from a set-theoretic point of view, this would be more appropriate. But, in the implementation, the context of a node is always available, and allowing for an “instance number” with each node would consume a considerable amount of space.