Tree grammars
A tree grammar consists of four pieces of data:
- A finite set of non-terminal symbols
- A set of ranked terminal symbols
- A finite set of production rules.
- A designated starting non-terminal symbol.
A tree $t$ is said to be valid according to the grammar, just if it can be derived from the starting non-terminal symbol by a finite sequence of replacements.