BNFC-2.9.4.1: 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 Source #

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

Ord Mode Source # 
Instance details

Defined in BNFC.Options

Show Mode 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 AlexVersion Source #

Which version of Alex is targeted?

Constructors

Alex3 

Instances

Instances details
Bounded AlexVersion Source # 
Instance details

Defined in BNFC.Options

Enum AlexVersion Source # 
Instance details

Defined in BNFC.Options

Eq AlexVersion Source # 
Instance details

Defined in BNFC.Options

Ord AlexVersion Source # 
Instance details

Defined in BNFC.Options

Show AlexVersion Source # 
Instance details

Defined in BNFC.Options

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.

data Ansi Source #

Restrict to ANSI standard (C/C++)?

Constructors

Ansi 
BeyondAnsi 

Instances

Instances details
Eq Ansi Source # 
Instance details

Defined in BNFC.Options

Methods

(==) :: Ansi -> Ansi -> Bool Source #

(/=) :: Ansi -> Ansi -> Bool Source #

Ord Ansi Source # 
Instance details

Defined in BNFC.Options

Show Ansi 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.