1 {-# LANGUAGE AllowAmbiguousTypes #-}
2 {-# LANGUAGE ScopedTypeVariables #-}
3 {-# LANGUAGE TemplateHaskell #-}
4 {-# LANGUAGE TypeApplications #-}
5 {-# LANGUAGE ViewPatterns #-}
6 -- for Symantic.Parser's TemplateHaskell
7 {-# LANGUAGE MagicHash #-}
8 {-# LANGUAGE ScopedTypeVariables #-}
9 {-# LANGUAGE RankNTypes #-}
10 {-# LANGUAGE UnboxedTuples #-}
11 {-# OPTIONS_GHC -Wno-unused-matches #-}
12 {-# OPTIONS_GHC -Wno-unused-local-binds #-}
13 module Parsers.Brainfuck.SymanticParser.AutoSplice where
15 import Data.Either (Either)
16 import qualified Data.ByteString as BS
17 import qualified Symantic.Parser as SP
19 import Parsers.Brainfuck.SymanticParser.Grammar (grammar)
20 import Parsers.Brainfuck.Types (Instruction)
22 parserByteString :: BS.ByteString -> Either (SP.ParsingError BS.ByteString) [Instruction]
23 parserByteString = $$(SP.runParser @BS.ByteString grammar)