BNFC-2.9.2: A compiler front-end generator.
Safe HaskellNone
LanguageHaskell2010

BNFC.Options

Synopsis

Documentation

data Mode Source #

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.

Instances

Instances details
Eq Mode Source # 
Instance details

Defined in BNFC.Options

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Ord Mode Source # 
Instance details

Defined in BNFC.Options

Methods

compare :: Mode -> Mode -> Ordering #

(<) :: Mode -> Mode -> Bool #

(<=) :: Mode -> Mode -> Bool #

(>) :: Mode -> Mode -> Bool #

(>=) :: Mode -> Mode -> Bool #

max :: Mode -> Mode -> Mode #

min :: Mode -> Mode -> Mode #

Show Mode Source # 
Instance details

Defined in BNFC.Options

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

data Target Source #

Target languages

Instances

Instances details
Bounded Target Source # 
Instance details

Defined in BNFC.Options

Enum Target Source # 
Instance details

Defined in BNFC.Options

Eq Target Source # 
Instance details

Defined in BNFC.Options

Methods

(==) :: Target -> Target -> Bool #

(/=) :: Target -> Target -> Bool #

Ord Target Source # 
Instance details

Defined in BNFC.Options

Show Target Source # 
Instance details

Defined in BNFC.Options

type Backend Source #

Arguments

 = SharedOptions

Options

-> CF

Grammar

-> IO () 

parseMode :: [String] -> (Mode, UsageWarnings) Source #

Main parsing function

data SharedOptions Source #

This is the option record that is passed to the different backends.

Constructors

Options 

Fields

isDefault Source #

Arguments

:: 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 OCamlParser Source #

Which parser generator for ocaml?

Constructors

OCamlYacc 
Menhir 

data TokenText Source #

How to represent token content in the Haskell backend?

Constructors

StringToken

Represent strings as String.

ByteStringToken

Represent strings as ByteString.

TextToken

Represent strings as Data.Text.

Instances

Instances details
Eq TokenText Source # 
Instance details

Defined in BNFC.Options

Ord TokenText Source # 
Instance details

Defined in BNFC.Options

Show TokenText Source # 
Instance details

Defined in BNFC.Options

type InPackage = Maybe String Source #

Package name (C++ and Java backends).

translateOldOptions :: [String] -> ParseOpt [String] Source #

A translation function to maintain backward compatibility with the old option syntax.