{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-unused-local-binds #-}
module Parsers.Brainfuck.SymanticParser
( module Parsers.Brainfuck.SymanticParser
, module Parsers.Brainfuck.SymanticParser.Grammar
) where
import Data.Either (Either)
import Data.String (String)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.Text as T
import qualified Symantic.Parser as SP
import Parsers.Brainfuck.SymanticParser.Grammar (grammar)
import Parsers.Brainfuck.Types (Instruction)
parserByteString :: BS.ByteString -> Either (SP.ParsingError BS.ByteString) [Instruction]
parserByteString :: ByteString -> Either (ParsingError ByteString) [Instruction]
parserByteString = $$(SP.runParser @BS.ByteString grammar)
parserByteStringLazy :: BSL.ByteString -> Either (SP.ParsingError BSL.ByteString) [Instruction]
parserByteStringLazy :: ByteString -> Either (ParsingError ByteString) [Instruction]
parserByteStringLazy = $$(SP.runParser @BSL.ByteString grammar)
parserString :: String -> Either (SP.ParsingError String) [Instruction]
parserString :: String -> Either (ParsingError String) [Instruction]
parserString = $$(SP.runParser @String grammar)
parserText :: T.Text -> Either (SP.ParsingError T.Text) [Instruction]
parserText :: Text -> Either (ParsingError Text) [Instruction]
parserText = $$(SP.runParser @T.Text grammar)