sprocket_bio.grammar.parser
- class sprocket_bio.grammar.parser.Event
Bases:
objectRepresents an event produced by the parser.
The parser produces a stream of events that can be used to construct a CST.
- class NodeStarted(kind, forward_parent)
Bases:
EventA new node has started.
- forward_parent
For left-recursive syntactic constructs, the parser produces a child node before it sees a parent.
forward_parentsaves the position of current event's parent.
- kind
The kind of the node.
- class Token(kind, span)
Bases:
EventA token was encountered.
- kind
The syntax kind of the token.
- span
The source span of the token.
- classmethod abandoned()
Gets an start node event for an abandoned node.