Companion

object Companion

Functions

Link copied to clipboard

converts an automaton into a TokenStream. This is done by first Topo sorting the nodes in the Automaton. Nodes that have the same distance from the start are grouped together to form the position nodes for the TokenStream. The resulting TokenStream releases edges from the automaton as tokens in order from the position nodes. This requires the automaton be a finite DAG.