A StateRef allows you to figure out the token that corresponds to a particular aspect of a
TransitionParserState.
For instance, we may want to know what token is at the top of the stack for a given state.
Applying StackRef(0) to the state will return the index of the token.
More accurately, a set is returned, which will be empty if the StateRef refers
to a non-existent element of the state. For instance, applying StackRef(3) to a state whose
stack has 3 or fewer elements will return the empty set.
This set of classes is used primarily to facilitate feature creation (e.g. see
StateRefFeature).
A StateRef allows you to figure out the token that corresponds to a particular aspect of a TransitionParserState.
For instance, we may want to know what token is at the top of the stack for a given state. Applying StackRef(0) to the state will return the index of the token. More accurately, a set is returned, which will be empty if the StateRef refers to a non-existent element of the state. For instance, applying StackRef(3) to a state whose stack has 3 or fewer elements will return the empty set.
This set of classes is used primarily to facilitate feature creation (e.g. see StateRefFeature).