]> Git — Sourcephile - haskell/symantic-parser.git/blob - src/Symantic/Parser/Automaton.hs
Add first golden tests for the Automaton
[haskell/symantic-parser.git] / src / Symantic / Parser / Automaton.hs
1 module Symantic.Parser.Automaton
2 ( module Symantic.Parser.Automaton
3 , module Symantic.Parser.Automaton.Instructions
4 , module Symantic.Parser.Automaton.Dump
5 ) where
6 import Symantic.Parser.Automaton.Instructions
7 import Symantic.Parser.Automaton.Dump
8
9 import Symantic.Parser.Grammar
10 import Data.Function ((.))
11 import qualified Language.Haskell.TH.Syntax as TH
12
13 automaton :: forall inp repr a.
14 InputPosition inp =>
15 Executable repr =>
16 Grammar (Automaton inp a) =>
17 ObserveSharing TH.Name (OptimizeComb TH.Name (Automaton inp a)) a ->
18 repr inp '[] ('Succ 'Zero) a a
19 automaton = runAutomaton . optimizeComb . observeSharing