1 module Symantic.Parser.Machine
2 ( module Symantic.Parser.Machine
3 , module Symantic.Parser.Machine.Generate
4 , module Symantic.Parser.Machine.Input
5 , module Symantic.Parser.Machine.Instructions
6 , module Symantic.Parser.Machine.Optimize
7 , module Symantic.Parser.Machine.Program
8 , module Symantic.Parser.Machine.View
12 import Data.Function ((.))
14 import Symantic.Parser.Grammar
15 import Symantic.Parser.Machine.Generate
16 import Symantic.Parser.Machine.Input
17 import Symantic.Parser.Machine.Instructions
18 import Symantic.Parser.Machine.Optimize
19 import Symantic.Parser.Machine.Program
20 import Symantic.Parser.Machine.View
23 type Machine repr inp = Grammar (Program repr inp)
25 -- | Build a 'Machine' able to 'generateCode' for the given 'Parser'.
26 machine :: forall inp repr a.
27 Grammarable (InputToken inp) (Program repr inp) =>
28 Machinable (InputToken inp) repr =>
31 machine = optimizeMachine . grammar @(InputToken inp)