{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}

module BNFC.Backend.Txt2Tags where

import BNFC.Backend.CommonInterface.Backend

import BNFC.Backend.Txt2Tags.InitState
import BNFC.Backend.Txt2Tags.Makefile
import BNFC.Backend.Txt2Tags.Options
import BNFC.Backend.Txt2Tags.State
import BNFC.Backend.Txt2Tags.Txt2Tags

import BNFC.CF

import BNFC.Prelude

import BNFC.Options.GlobalOptions
import BNFC.Options.Target

import Control.Monad.Except
import Control.Monad.State

import Options.Applicative

instance Backend 'TargetTxt2Tags where
  type BackendOptions 'TargetTxt2Tags = Txt2TagsBackendOptions
  type BackendState 'TargetTxt2Tags = Txt2TagsBackendState
  parseOpts :: Parser Txt2TagsBackendOptions
  parseOpts :: Parser Txt2TagsBackendOptions
parseOpts = Parser Txt2TagsBackendOptions
txt2tagsOptionsParser
  initState :: LBNF -> GlobalOptions -> BackendOptions 'TargetTxt2Tags -> Except String (BackendState 'TargetTxt2Tags)
  initState :: LBNF
-> GlobalOptions
-> BackendOptions 'TargetTxt2Tags
-> Except String (BackendState 'TargetTxt2Tags)
initState LBNF
_ GlobalOptions
globalOpts BackendOptions 'TargetTxt2Tags
txtopts = GlobalOptions
-> Txt2TagsBackendOptions -> Except String Txt2TagsBackendState
txt2tagsInitState GlobalOptions
globalOpts Txt2TagsBackendOptions
BackendOptions 'TargetTxt2Tags
txtopts
  abstractSyntax :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
  abstractSyntax :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
abstractSyntax = LBNF -> State Txt2TagsBackendState Result
LBNF -> State (BackendState 'TargetTxt2Tags) Result
txt2tags
  printer :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
  printer :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
printer LBNF
_ = Result -> State Txt2TagsBackendState Result
forall (m :: * -> *) a. Monad m => a -> m a
return []
  lexer :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
  lexer :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
lexer LBNF
_ = Result -> State Txt2TagsBackendState Result
forall (m :: * -> *) a. Monad m => a -> m a
return []
  parser :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
  parser :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
parser LBNF
_ = Result -> State Txt2TagsBackendState Result
forall (m :: * -> *) a. Monad m => a -> m a
return []
  parserTest :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
  parserTest :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
parserTest LBNF
_ = Result -> State Txt2TagsBackendState Result
forall (m :: * -> *) a. Monad m => a -> m a
return []
  makefile :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
  makefile :: LBNF -> State (BackendState 'TargetTxt2Tags) Result
makefile = LBNF -> State Txt2TagsBackendState Result
LBNF -> State (BackendState 'TargetTxt2Tags) Result
txt2tagsmakefile