Subrules become the fields of ParseTree classes.
You can specify the field name explicitly – if you don't, Nitra will try to automatically form the name from the subrule content.
A subrule name can be explicitly specified in one of the following ways.
=operator. The rule should be located to the right and the field name – to the left of the operator.
If the field name is not explicitly specified, Nitra will try to calculate it automatically. Below is the description of the name calculation algorithm:
?operator, the subrule name with the added
Optsuffix is used. For example, a field named
IdentifierOptwill be created for the
voidand which is not a literal token, then this rule's name is used. If there are more than one such rule, then the name should be manually specified, as calculation becomes impossible. In this case the compiler will return an error.