Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Mode
- data Target
- type Backend = SharedOptions -> CF -> IO ()
- parseMode :: [String] -> (Mode, UsageWarnings)
- usage :: String
- help :: String
- versionString :: String
- data SharedOptions = Options {
- lbnfFile :: FilePath
- lang :: String
- outDir :: FilePath
- force :: Bool
- target :: Target
- make :: Maybe String
- inPackage :: InPackage
- linenumbers :: RecordPositions
- ansi :: Ansi
- inDir :: Bool
- functor :: Bool
- generic :: Bool
- alexMode :: AlexVersion
- tokenText :: TokenText
- glr :: HappyMode
- xml :: Int
- agda :: Bool
- ocamlParser :: OCamlParser
- javaLexerParser :: JavaLexerParser
- visualStudio :: Bool
- wcf :: Bool
- defaultOptions :: SharedOptions
- isDefault :: Eq a => (SharedOptions -> a) -> SharedOptions -> Bool
- printOptions :: SharedOptions -> String
- data AlexVersion = Alex3
- data HappyMode
- data OCamlParser
- data JavaLexerParser
- data RecordPositions
- data TokenText
- data Ansi
- = Ansi
- | BeyondAnsi
- type InPackage = Maybe String
- removedIn290 :: String
- translateOldOptions :: [String] -> ParseOpt [String]
Documentation
To decouple the option parsing from the execution of the program, we introduce a data structure that holds the result of the parsing of the arguments.
Target languages
TargetC | |
TargetCpp | |
TargetCppNoStl | |
TargetHaskell | |
TargetHaskellGadt | |
TargetLatex | |
TargetJava | |
TargetOCaml | |
TargetPygments | |
TargetCheck |
Instances
Bounded Target Source # | |
Enum Target Source # | |
Defined in BNFC.Options succ :: Target -> Target Source # pred :: Target -> Target Source # toEnum :: Int -> Target Source # fromEnum :: Target -> Int Source # enumFrom :: Target -> [Target] Source # enumFromThen :: Target -> Target -> [Target] Source # enumFromTo :: Target -> Target -> [Target] Source # enumFromThenTo :: Target -> Target -> Target -> [Target] Source # | |
Eq Target Source # | |
Ord Target Source # | |
Defined in BNFC.Options | |
Show Target Source # | |
data SharedOptions Source #
This is the option record that is passed to the different backends.
Options | |
|
Instances
:: Eq a | |
=> (SharedOptions -> a) | Option field name. |
-> SharedOptions | Options. |
-> Bool |
Check whether an option is unchanged from the default.
printOptions :: SharedOptions -> String Source #
Print options as input to BNFC.
unwords [ "bnfc", printOptions opts ]
should call bnfc with the same options
as the current instance.
data AlexVersion Source #
Which version of Alex is targeted?
Instances
Happy modes
Instances
Bounded HappyMode Source # | |
Enum HappyMode Source # | |
Defined in BNFC.Options succ :: HappyMode -> HappyMode Source # pred :: HappyMode -> HappyMode Source # toEnum :: Int -> HappyMode Source # fromEnum :: HappyMode -> Int Source # enumFrom :: HappyMode -> [HappyMode] Source # enumFromThen :: HappyMode -> HappyMode -> [HappyMode] Source # enumFromTo :: HappyMode -> HappyMode -> [HappyMode] Source # enumFromThenTo :: HappyMode -> HappyMode -> HappyMode -> [HappyMode] Source # | |
Eq HappyMode Source # | |
Ord HappyMode Source # | |
Defined in BNFC.Options | |
Show HappyMode Source # | |
data OCamlParser Source #
Which parser generator for ocaml?
Instances
Eq OCamlParser Source # | |
Defined in BNFC.Options (==) :: OCamlParser -> OCamlParser -> Bool Source # (/=) :: OCamlParser -> OCamlParser -> Bool Source # | |
Ord OCamlParser Source # | |
Defined in BNFC.Options compare :: OCamlParser -> OCamlParser -> Ordering Source # (<) :: OCamlParser -> OCamlParser -> Bool Source # (<=) :: OCamlParser -> OCamlParser -> Bool Source # (>) :: OCamlParser -> OCamlParser -> Bool Source # (>=) :: OCamlParser -> OCamlParser -> Bool Source # max :: OCamlParser -> OCamlParser -> OCamlParser Source # min :: OCamlParser -> OCamlParser -> OCamlParser Source # | |
Show OCamlParser Source # | |
Defined in BNFC.Options | |
OCamlParserName OCamlParser Source # | |
Defined in BNFC.Backend.OCaml.OCamlUtil ocamlParserName :: OCamlParser -> String Source # |
data JavaLexerParser Source #
Which Java backend?
Instances
Eq JavaLexerParser Source # | |
Defined in BNFC.Options (==) :: JavaLexerParser -> JavaLexerParser -> Bool Source # (/=) :: JavaLexerParser -> JavaLexerParser -> Bool Source # | |
Ord JavaLexerParser Source # | |
Defined in BNFC.Options compare :: JavaLexerParser -> JavaLexerParser -> Ordering Source # (<) :: JavaLexerParser -> JavaLexerParser -> Bool Source # (<=) :: JavaLexerParser -> JavaLexerParser -> Bool Source # (>) :: JavaLexerParser -> JavaLexerParser -> Bool Source # (>=) :: JavaLexerParser -> JavaLexerParser -> Bool Source # max :: JavaLexerParser -> JavaLexerParser -> JavaLexerParser Source # min :: JavaLexerParser -> JavaLexerParser -> JavaLexerParser Source # | |
Show JavaLexerParser Source # | |
Defined in BNFC.Options |
data RecordPositions Source #
Line numbers or not?
Instances
Eq RecordPositions Source # | |
Defined in BNFC.Options (==) :: RecordPositions -> RecordPositions -> Bool Source # (/=) :: RecordPositions -> RecordPositions -> Bool Source # | |
Ord RecordPositions Source # | |
Defined in BNFC.Options compare :: RecordPositions -> RecordPositions -> Ordering Source # (<) :: RecordPositions -> RecordPositions -> Bool Source # (<=) :: RecordPositions -> RecordPositions -> Bool Source # (>) :: RecordPositions -> RecordPositions -> Bool Source # (>=) :: RecordPositions -> RecordPositions -> Bool Source # max :: RecordPositions -> RecordPositions -> RecordPositions Source # min :: RecordPositions -> RecordPositions -> RecordPositions Source # | |
Show RecordPositions Source # | |
Defined in BNFC.Options |
How to represent token content in the Haskell backend?
StringToken | Represent strings as |
ByteStringToken | Represent strings as |
TextToken | Represent strings as |
Instances
Eq TokenText Source # | |
Ord TokenText Source # | |
Defined in BNFC.Options | |
Show TokenText Source # | |
translateOldOptions :: [String] -> ParseOpt [String] Source #
A translation function to maintain backward compatibility with the old option syntax.