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

module BNFC.Backend.Latex where

import BNFC.Backend.CommonInterface.Backend

import BNFC.Backend.Latex.InitState
import BNFC.Backend.Latex.Latex
import BNFC.Backend.Latex.Makefile
import BNFC.Backend.Latex.State

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

data LatexBackendOptions = LatexOpts

latexOptionsParser :: Parser LatexBackendOptions
latexOptionsParser :: Parser LatexBackendOptions
latexOptionsParser = LatexBackendOptions -> Parser LatexBackendOptions
forall (f :: * -> *) a. Applicative f => a -> f a
pure LatexBackendOptions
LatexOpts

instance Backend 'TargetLatex where
  type BackendOptions 'TargetLatex = LatexBackendOptions
  type BackendState 'TargetLatex = LatexBackendState
  parseOpts :: Parser LatexBackendOptions
  parseOpts :: Parser LatexBackendOptions
parseOpts = Parser LatexBackendOptions
latexOptionsParser
  initState :: LBNF -> GlobalOptions -> BackendOptions 'TargetLatex -> Except String (BackendState 'TargetLatex)
  initState :: LBNF
-> GlobalOptions
-> BackendOptions 'TargetLatex
-> Except String (BackendState 'TargetLatex)
initState LBNF
_ GlobalOptions
globalOpts BackendOptions 'TargetLatex
_ = GlobalOptions -> Except String LatexBackendState
latexInitState GlobalOptions
globalOpts
  abstractSyntax :: LBNF -> State (BackendState 'TargetLatex) Result
  abstractSyntax :: LBNF -> State (BackendState 'TargetLatex) Result
abstractSyntax = LBNF -> State LatexBackendState Result
LBNF -> State (BackendState 'TargetLatex) Result
latex
  printer :: LBNF -> State (BackendState 'TargetLatex) Result
  printer :: LBNF -> State (BackendState 'TargetLatex) Result
printer LBNF
_ = Result -> State LatexBackendState Result
forall (m :: * -> *) a. Monad m => a -> m a
return []
  lexer :: LBNF -> State (BackendState 'TargetLatex) Result
  lexer :: LBNF -> State (BackendState 'TargetLatex) Result
lexer LBNF
_ = Result -> State LatexBackendState Result
forall (m :: * -> *) a. Monad m => a -> m a
return []
  parser :: LBNF -> State (BackendState 'TargetLatex) Result
  parser :: LBNF -> State (BackendState 'TargetLatex) Result
parser LBNF
_ = Result -> State LatexBackendState Result
forall (m :: * -> *) a. Monad m => a -> m a
return []
  parserTest :: LBNF -> State (BackendState 'TargetLatex) Result
  parserTest :: LBNF -> State (BackendState 'TargetLatex) Result
parserTest LBNF
_ = Result -> State LatexBackendState Result
forall (m :: * -> *) a. Monad m => a -> m a
return []
  makefile :: LBNF -> State (BackendState 'TargetLatex) Result
  makefile :: LBNF -> State (BackendState 'TargetLatex) Result
makefile = LBNF -> State LatexBackendState Result
LBNF -> State (BackendState 'TargetLatex) Result
latexmakefile