module BNFC.Backend.Txt2Tags.Options where

import BNFC.Prelude

import Options.Applicative

newtype Txt2TagsBackendOptions = TxtOpts {Txt2TagsBackendOptions -> String
target :: String}

txt2tagsOptionsParser :: Parser Txt2TagsBackendOptions
txt2tagsOptionsParser :: Parser Txt2TagsBackendOptions
txt2tagsOptionsParser = String -> Txt2TagsBackendOptions
TxtOpts (String -> Txt2TagsBackendOptions)
-> Parser String -> Parser Txt2TagsBackendOptions
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser String
oTarget

  where

  -- target option.
  oTarget :: Parser String
oTarget =
    Mod OptionFields String -> Parser String
forall s. IsString s => Mod OptionFields s -> Parser s
strOption
      ( Char -> Mod OptionFields String
forall (f :: * -> *) a. HasName f => Char -> Mod f a
short Char
't'
      Mod OptionFields String
-> Mod OptionFields String -> Mod OptionFields String
forall a. Semigroup a => a -> a -> a
<> String -> Mod OptionFields String
forall (f :: * -> *) a. HasName f => String -> Mod f a
long String
"target"
      Mod OptionFields String
-> Mod OptionFields String -> Mod OptionFields String
forall a. Semigroup a => a -> a -> a
<> String -> Mod OptionFields String
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
metavar String
"TARGET"
      Mod OptionFields String
-> Mod OptionFields String -> Mod OptionFields String
forall a. Semigroup a => a -> a -> a
<> String -> Mod OptionFields String
forall (f :: * -> *) a. String -> Mod f a
help String
"Set txt2tags target document type (for the Makefile)"
      Mod OptionFields String
-> Mod OptionFields String -> Mod OptionFields String
forall a. Semigroup a => a -> a -> a
<> Mod OptionFields String
forall a (f :: * -> *). Show a => Mod f a
showDefault
      Mod OptionFields String
-> Mod OptionFields String -> Mod OptionFields String
forall a. Semigroup a => a -> a -> a
<> String -> Mod OptionFields String
forall (f :: * -> *) a. HasValue f => a -> Mod f a
value String
"html"
      )