Tree constructor arity
The arity of a symbol is a natural number specifying how many arguments (inputs) it requires. This corresponds to the number of children required by a node labelled by this symbol in an abstract syntax tree.
- A symbol with arity 0 is sometimes said to be nullary.
- A symbol with arity 1 is sometimes said to be a unary operator.
- A symbol with arity 2 is sometimes said to be a binary operator.
If a set of symbols is given alongside their arities, they are said to be ranked.