Lrgrep_supportSourcemodule RT = Lrgrep_runtimeEmit and link bytecode program
type ('clause, 'state) transition_action = {move : (Register.t * Register.t) list;store : Register.t list;clear : Register.t list;priority : ('clause Fix.Indexing.index * RT.priority * RT.priority) list;target : 'state Fix.Indexing.index;}The action of a transition is pair of:
type ('state, 'clause, 'lr1) state = {accept : ('clause Fix.Indexing.index * RT.priority * RT.register option array)
list;a clause to accept in this state.
*)halting : 'lr1 Utils.IndexSet.t;The set of labels that should cause matching to halt (this can be seen as a transition to a "virtual" sink state).
*)transitions : ('lr1 Utils.IndexSet.t * ('clause, 'state) transition_action)
list;Transitions for this state, as a list of labels and actions.
*)}The result of compaction is a program, a sparse table, and an array mapping each DFA state to the PC of the instructions that implement this state.
val compact :
'state Fix.Indexing.cardinal ->
('state Fix.Indexing.index -> ('state, _, _) state) ->
compact_dfaRun the compaction algorithm on a dfa