data Trans : Type -> Type- Totality: total
Visibility: public export
Constructors:
Run : a -> Trans a Ign : Trans a Err : Trans a
data Transition : Nat -> Type -> Type- Totality: total
Visibility: public export
Constructors:
Keep : Transition n a Done : a -> Transition n a Ignore : Transition n a Move : Fin (S n) -> a -> Transition n a MoveI : Fin (S n) -> Transition n a MoveE : Fin (S n) -> Transition n a Bottom : Transition n a
0 ByteTrans : Nat -> Type -> Type An array of arrays describing a lexer's state machine.
Totality: total
Visibility: public export0 Machine : Nat -> Type -> Type An array of arrays describing a lexer's state machine.
Totality: total
Visibility: public exportrecord DFA : Type -> Type A discrete finite automaton (DFA) encoded as
an array of state transitions plus an array
describing the terminal token states.
Totality: total
Visibility: public export
Constructor: L : (states : Nat) -> Machine states a -> DFA a
Projections:
.next : ({rec:0} : DFA a) -> Machine (states {rec:0}) a State transitions matrix.
If `cur` is the current state (encoded as a `Fin (S states)`
and `b` is the current input byte, the next state is determined
by `next[cur][b]` (in pseudo C-syntax).
.states : DFA a -> Nat Number of non-zero states in the automaton.
.states : DFA a -> Nat Number of non-zero states in the automaton.
Totality: total
Visibility: public exportstates : DFA a -> Nat Number of non-zero states in the automaton.
Totality: total
Visibility: public export.next : ({rec:0} : DFA a) -> Machine (states {rec:0}) a State transitions matrix.
If `cur` is the current state (encoded as a `Fin (S states)`
and `b` is the current input byte, the next state is determined
by `next[cur][b]` (in pseudo C-syntax).
Totality: total
Visibility: public exportnext : ({rec:0} : DFA a) -> Machine (states {rec:0}) a State transitions matrix.
If `cur` is the current state (encoded as a `Fin (S states)`
and `b` is the current input byte, the next state is determined
by `next[cur][b]` (in pseudo C-syntax).
Totality: total
Visibility: public export0 Results : Type -> Type- Totality: total
Visibility: public export byteDFA : TokenMap8 (Trans a) -> DFA a A DFA operating on raw bytes.
Totality: total
Visibility: exportdfa : Results a -> DFA a A utf-8 aware DFA operating on text.
Totality: total
Visibility: export