Safe Haskell | Safe-Inferred |
---|---|
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
- optMake :: 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 |
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 # pred :: HappyMode -> HappyMode # fromEnum :: HappyMode -> Int # enumFrom :: HappyMode -> [HappyMode] # enumFromThen :: HappyMode -> HappyMode -> [HappyMode] # enumFromTo :: HappyMode -> HappyMode -> [HappyMode] # enumFromThenTo :: HappyMode -> HappyMode -> HappyMode -> [HappyMode] # | |
Show HappyMode Source # | |
Eq HappyMode Source # | |
Ord HappyMode Source # | |
Defined in BNFC.Options |
data OCamlParser Source #
Which parser generator for ocaml?
Instances
OCamlParserName OCamlParser Source # | |
Defined in BNFC.Backend.OCaml.OCamlUtil ocamlParserName :: OCamlParser -> String Source # | |
Show OCamlParser Source # | |
Defined in BNFC.Options showsPrec :: Int -> OCamlParser -> ShowS # show :: OCamlParser -> String # showList :: [OCamlParser] -> ShowS # | |
Eq OCamlParser Source # | |
Defined in BNFC.Options (==) :: OCamlParser -> OCamlParser -> Bool # (/=) :: OCamlParser -> OCamlParser -> Bool # | |
Ord OCamlParser Source # | |
Defined in BNFC.Options compare :: OCamlParser -> OCamlParser -> Ordering # (<) :: OCamlParser -> OCamlParser -> Bool # (<=) :: OCamlParser -> OCamlParser -> Bool # (>) :: OCamlParser -> OCamlParser -> Bool # (>=) :: OCamlParser -> OCamlParser -> Bool # max :: OCamlParser -> OCamlParser -> OCamlParser # min :: OCamlParser -> OCamlParser -> OCamlParser # |
data JavaLexerParser Source #
Which Java backend?
Instances
Show JavaLexerParser Source # | |
Defined in BNFC.Options showsPrec :: Int -> JavaLexerParser -> ShowS # show :: JavaLexerParser -> String # showList :: [JavaLexerParser] -> ShowS # | |
Eq JavaLexerParser Source # | |
Defined in BNFC.Options (==) :: JavaLexerParser -> JavaLexerParser -> Bool # (/=) :: JavaLexerParser -> JavaLexerParser -> Bool # | |
Ord JavaLexerParser Source # | |
Defined in BNFC.Options compare :: JavaLexerParser -> JavaLexerParser -> Ordering # (<) :: JavaLexerParser -> JavaLexerParser -> Bool # (<=) :: JavaLexerParser -> JavaLexerParser -> Bool # (>) :: JavaLexerParser -> JavaLexerParser -> Bool # (>=) :: JavaLexerParser -> JavaLexerParser -> Bool # max :: JavaLexerParser -> JavaLexerParser -> JavaLexerParser # min :: JavaLexerParser -> JavaLexerParser -> JavaLexerParser # |
data RecordPositions Source #
Line numbers or not?
Instances
Show RecordPositions Source # | |
Defined in BNFC.Options showsPrec :: Int -> RecordPositions -> ShowS # show :: RecordPositions -> String # showList :: [RecordPositions] -> ShowS # | |
Eq RecordPositions Source # | |
Defined in BNFC.Options (==) :: RecordPositions -> RecordPositions -> Bool # (/=) :: RecordPositions -> RecordPositions -> Bool # | |
Ord RecordPositions Source # | |
Defined in BNFC.Options compare :: RecordPositions -> RecordPositions -> Ordering # (<) :: RecordPositions -> RecordPositions -> Bool # (<=) :: RecordPositions -> RecordPositions -> Bool # (>) :: RecordPositions -> RecordPositions -> Bool # (>=) :: RecordPositions -> RecordPositions -> Bool # max :: RecordPositions -> RecordPositions -> RecordPositions # min :: RecordPositions -> RecordPositions -> RecordPositions # |
How to represent token content in the Haskell backend?
StringToken | Represent strings as |
ByteStringToken | Represent strings as |
TextToken | Represent strings as |
translateOldOptions :: [String] -> ParseOpt [String] Source #
A translation function to maintain backward compatibility with the old option syntax.