0 | module Text.ILex.Lexer
2 | import public Text.ILex.DFA
3 | import public Data.Enum
4 | import Data.ByteString
5 | import Data.Linear.Token
10 | record Env (q : Type) (s : Type -> Type) where
16 | 0 Step1 : (q : Type) -> (r : Bits32) -> (s : Type -> Type) -> Type
17 | Step1 q r s = s q -> F1 q (Index r)
20 | 0 Fun1 : (q : Type) -> (s : Type -> Type) -> Type -> Type
21 | Fun1 q s a = (1 sk : Env q s) -> R1 q a
24 | 0 Run1 : (q : Type) -> (r : Bits32) -> (s : Type -> Type) -> Type
25 | Run1 q r s = Fun1 q s (Index r)
28 | 0 Step : (q : Type) -> (r : Bits32) -> (s : Type -> Type) -> Type
29 | Step q r s = Trans (Run1 q r s)
32 | toState : Index r -> Step q r s
33 | toState v = Run $
\(E _ t) => v # t
37 | 0 ByteStep : Nat -> (q : Type) -> (r : Bits32) -> (s : Type -> Type) -> Type
38 | ByteStep n q r s = IArray 256 (Transition n $
Run1 q r s)
42 | 0 Stepper : Nat -> (q : Type) -> (r : Bits32) -> (s : Type -> Type) -> Type
43 | Stepper n q r s = IArray (S n) (ByteStep n q r s)
49 | 0 DFA1 : (q : Type) -> (r : Bits32) -> (s : Type -> Type) -> Type
50 | DFA1 q r s = DFA (Run1 q r s)
53 | 0 Steps : (q : Type) -> (r : Bits32) -> (s : Type -> Type) -> Type
54 | Steps q r s = TokenMap (Step q r s)