an upper bound on the number of children (anything higher will round down to max
)
Provides a symbolic representation of the transform, used for creating feature names.
Provides a symbolic representation of the transform, used for creating feature names.
The NumChildrenToTheRight transform maps a token to how many of its children appear to its right in the state's
tokens
sequence. This will only be relevant for nodes on the stack (it is impossible for a buffer node to be associated with nodes to its right)It takes an argument
max
which allows you to specify an upper bound. For instance, ifmax
= 3 and a token has 5 children to its right, then applying this transform to that token will return Set(Symbol("3")), not Set(Symbol("5")).See the definition of TokenTransform (above) for more details about the interface.
an upper bound on the number of children (anything higher will round down to
max
)