Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Properties
- caseSensitive
- char2Token
- cpairCommentSingle
- csetIdentifierFirst
- csetIdentifierNth
- csetSkipCharacters
- identifier2String
- int2Float
- numbers2Int
- scanBinary
- scanCommentMulti
- scanFloat
- scanHex
- scanHexDollar
- scanIdentifier
- scanIdentifier1char
- scanIdentifierNULL
- scanOctal
- scanStringDq
- scanStringSq
- scanSymbols
- scope0Fallback
- skipCommentMulti
- skipCommentSingle
- storeInt64
- symbol2Token
Specifies the Scanner
parser configuration. Most settings can
be changed during the parsing phase and will affect the lexical
parsing of the next unpeeked token.
Synopsis
- newtype ScannerConfig = ScannerConfig (ManagedPtr ScannerConfig)
- newZeroScannerConfig :: MonadIO m => m ScannerConfig
- noScannerConfig :: Maybe ScannerConfig
- getScannerConfigCaseSensitive :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigCaseSensitive :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigChar2Token :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigChar2Token :: MonadIO m => ScannerConfig -> Word32 -> m ()
- clearScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> m ()
- getScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> m (Maybe Text)
- setScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> CString -> m ()
- clearScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m ()
- getScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m (Maybe Text)
- setScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> CString -> m ()
- clearScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> m ()
- getScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> m (Maybe Text)
- setScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> CString -> m ()
- clearScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> m ()
- getScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> m (Maybe Text)
- setScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> CString -> m ()
- getScannerConfigIdentifier2String :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigIdentifier2String :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigInt2Float :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigInt2Float :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigNumbers2Int :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigNumbers2Int :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanBinary :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanBinary :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanCommentMulti :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanFloat :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanFloat :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanHex :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanHex :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanHexDollar :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanHexDollar :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanIdentifier :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanIdentifier :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanIdentifier1char :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanIdentifier1char :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanIdentifierNULL :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanIdentifierNULL :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanOctal :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanOctal :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanStringDq :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanStringDq :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanStringSq :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanStringSq :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScanSymbols :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScanSymbols :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigScope0Fallback :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigScope0Fallback :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigSkipCommentMulti :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigSkipCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigSkipCommentSingle :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigSkipCommentSingle :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigStoreInt64 :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigStoreInt64 :: MonadIO m => ScannerConfig -> Word32 -> m ()
- getScannerConfigSymbol2Token :: MonadIO m => ScannerConfig -> m Word32
- setScannerConfigSymbol2Token :: MonadIO m => ScannerConfig -> Word32 -> m ()
Exported types
newtype ScannerConfig Source #
Memory-managed wrapper type.
Instances
WrappedPtr ScannerConfig Source # | |
Defined in GI.GLib.Structs.ScannerConfig wrappedPtrCalloc :: IO (Ptr ScannerConfig) # wrappedPtrCopy :: ScannerConfig -> IO ScannerConfig # wrappedPtrFree :: Maybe (FunPtr (Ptr ScannerConfig -> IO ())) # | |
tag ~ AttrSet => Constructible ScannerConfig tag Source # | |
Defined in GI.GLib.Structs.ScannerConfig new :: MonadIO m => (ManagedPtr ScannerConfig -> ScannerConfig) -> [AttrOp ScannerConfig tag] -> m ScannerConfig # |
newZeroScannerConfig :: MonadIO m => m ScannerConfig Source #
Construct a ScannerConfig
struct initialized to zero.
noScannerConfig :: Maybe ScannerConfig Source #
A convenience alias for Nothing
:: Maybe
ScannerConfig
.
Properties
caseSensitive
specifies if symbols are case sensitive (the
default is False
).
getScannerConfigCaseSensitive :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “case_sensitive
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #caseSensitive
setScannerConfigCaseSensitive :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “case_sensitive
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #caseSensitive:=
value ]
char2Token
specifies if characters are reported by setting
token = ch
or as TokenTypeChar
(the default is True
).
getScannerConfigChar2Token :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “char_2_token
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #char2Token
setScannerConfigChar2Token :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “char_2_token
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #char2Token:=
value ]
cpairCommentSingle
specifies the characters at the start and end of single-line comments. The default is "#\n" which means that single-line comments start with a '#' and continue until a '\n' (end of line).
clearScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> m () Source #
Set the value of the “cpair_comment_single
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#cpairCommentSingle
getScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> m (Maybe Text) Source #
Get the value of the “cpair_comment_single
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #cpairCommentSingle
setScannerConfigCpairCommentSingle :: MonadIO m => ScannerConfig -> CString -> m () Source #
Set the value of the “cpair_comment_single
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #cpairCommentSingle:=
value ]
csetIdentifierFirst
specifies the characters which can start
identifiers (the default is CSET_a_2_z
, "_", and CSET_A_2_Z
).
clearScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m () Source #
Set the value of the “cset_identifier_first
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#csetIdentifierFirst
getScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m (Maybe Text) Source #
Get the value of the “cset_identifier_first
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #csetIdentifierFirst
setScannerConfigCsetIdentifierFirst :: MonadIO m => ScannerConfig -> CString -> m () Source #
Set the value of the “cset_identifier_first
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #csetIdentifierFirst:=
value ]
csetIdentifierNth
specifies the characters which can be used
in identifiers, after the first character (the default is
CSET_a_2_z
, "_0123456789", CSET_A_2_Z
, G_CSET_LATINS
,
G_CSET_LATINC
).
clearScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> m () Source #
Set the value of the “cset_identifier_nth
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#csetIdentifierNth
getScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> m (Maybe Text) Source #
Get the value of the “cset_identifier_nth
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #csetIdentifierNth
setScannerConfigCsetIdentifierNth :: MonadIO m => ScannerConfig -> CString -> m () Source #
Set the value of the “cset_identifier_nth
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #csetIdentifierNth:=
value ]
csetSkipCharacters
specifies which characters should be skipped by the scanner (the default is the whitespace characters: space, tab, carriage-return and line-feed).
clearScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> m () Source #
Set the value of the “cset_skip_characters
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#csetSkipCharacters
getScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> m (Maybe Text) Source #
Get the value of the “cset_skip_characters
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #csetSkipCharacters
setScannerConfigCsetSkipCharacters :: MonadIO m => ScannerConfig -> CString -> m () Source #
Set the value of the “cset_skip_characters
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #csetSkipCharacters:=
value ]
identifier2String
specifies if identifiers are reported as strings
(the default is False
).
getScannerConfigIdentifier2String :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “identifier_2_string
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #identifier2String
setScannerConfigIdentifier2String :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “identifier_2_string
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #identifier2String:=
value ]
int2Float
specifies if all numbers are reported as TokenTypeFloat
(the default is False
).
getScannerConfigInt2Float :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “int_2_float
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #int2Float
setScannerConfigInt2Float :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “int_2_float
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #int2Float:=
value ]
numbers2Int
specifies if binary, octal and hexadecimal numbers
are reported as G_TOKEN_INT
(the default is True
).
getScannerConfigNumbers2Int :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “numbers_2_int
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #numbers2Int
setScannerConfigNumbers2Int :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “numbers_2_int
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #numbers2Int:=
value ]
scanBinary
specifies if binary numbers are recognized (the
default is False
).
getScannerConfigScanBinary :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_binary
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanBinary
setScannerConfigScanBinary :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_binary
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanBinary:=
value ]
scanCommentMulti
specifies if multi-line comments are recognized
(the default is True
).
getScannerConfigScanCommentMulti :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_comment_multi
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanCommentMulti
setScannerConfigScanCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_comment_multi
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanCommentMulti:=
value ]
scanFloat
specifies if floating point numbers are recognized
(the default is True
).
getScannerConfigScanFloat :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_float
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanFloat
setScannerConfigScanFloat :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_float
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanFloat:=
value ]
scanHex
specifies if hexadecimal numbers are recognized (the
default is True
).
getScannerConfigScanHex :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_hex
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanHex
setScannerConfigScanHex :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_hex
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanHex:=
value ]
scanHexDollar
specifies if '$' is recognized as a prefix for
hexadecimal numbers (the default is False
).
getScannerConfigScanHexDollar :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_hex_dollar
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanHexDollar
setScannerConfigScanHexDollar :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_hex_dollar
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanHexDollar:=
value ]
scanIdentifier
specifies if identifiers are recognized (the
default is True
).
getScannerConfigScanIdentifier :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_identifier
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanIdentifier
setScannerConfigScanIdentifier :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_identifier
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanIdentifier:=
value ]
scanIdentifier1char
specifies if single-character
identifiers are recognized (the default is False
).
getScannerConfigScanIdentifier1char :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_identifier_1char
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanIdentifier1char
setScannerConfigScanIdentifier1char :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_identifier_1char
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanIdentifier1char:=
value ]
scanIdentifierNULL
specifies if Nothing
is reported as
TokenTypeIdentifierNull
(the default is False
).
getScannerConfigScanIdentifierNULL :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_identifier_NULL
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanIdentifierNULL
setScannerConfigScanIdentifierNULL :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_identifier_NULL
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanIdentifierNULL:=
value ]
scanOctal
specifies if octal numbers are recognized (the
default is True
).
getScannerConfigScanOctal :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_octal
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanOctal
setScannerConfigScanOctal :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_octal
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanOctal:=
value ]
scanStringDq
specifies if strings can be enclosed in double
quotes (the default is True
).
getScannerConfigScanStringDq :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_string_dq
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanStringDq
setScannerConfigScanStringDq :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_string_dq
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanStringDq:=
value ]
scanStringSq
specifies if strings can be enclosed in single
quotes (the default is True
).
getScannerConfigScanStringSq :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_string_sq
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanStringSq
setScannerConfigScanStringSq :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_string_sq
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanStringSq:=
value ]
scanSymbols
specifies if symbols are recognized (the default
is True
).
getScannerConfigScanSymbols :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scan_symbols
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scanSymbols
setScannerConfigScanSymbols :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scan_symbols
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scanSymbols:=
value ]
scope0Fallback
specifies if a symbol is searched for in the
default scope in addition to the current scope (the default is False
).
getScannerConfigScope0Fallback :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “scope_0_fallback
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #scope0Fallback
setScannerConfigScope0Fallback :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “scope_0_fallback
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #scope0Fallback:=
value ]
skipCommentMulti
specifies if multi-line comments are skipped
and not returned as tokens (the default is True
).
getScannerConfigSkipCommentMulti :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “skip_comment_multi
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #skipCommentMulti
setScannerConfigSkipCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “skip_comment_multi
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #skipCommentMulti:=
value ]
skipCommentSingle
specifies if single-line comments are skipped
and not returned as tokens (the default is True
).
getScannerConfigSkipCommentSingle :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “skip_comment_single
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #skipCommentSingle
setScannerConfigSkipCommentSingle :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “skip_comment_single
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #skipCommentSingle:=
value ]
storeInt64
use value.v_int64 rather than v_int
getScannerConfigStoreInt64 :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “store_int64
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #storeInt64
setScannerConfigStoreInt64 :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “store_int64
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #storeInt64:=
value ]
symbol2Token
specifies if symbols are reported by setting
token = v_symbol
or as TokenTypeSymbol
(the default is False
).
getScannerConfigSymbol2Token :: MonadIO m => ScannerConfig -> m Word32 Source #
Get the value of the “symbol_2_token
” field.
When overloading is enabled, this is equivalent to
get
scannerConfig #symbol2Token
setScannerConfigSymbol2Token :: MonadIO m => ScannerConfig -> Word32 -> m () Source #
Set the value of the “symbol_2_token
” field.
When overloading is enabled, this is equivalent to
set
scannerConfig [ #symbol2Token:=
value ]