GLib.ScannerConfig¶
Fields¶
Name | Type | Access | Description |
---|---|---|---|
case_sensitive | int |
r/w | specifies if symbols are case sensitive (the default is False ). |
char_2_token | int |
r/w | specifies if characters are reported by setting token = ch or as GLib.TokenType.CHAR (the default is True ). |
cpair_comment_single | str |
r/w | 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). |
cset_identifier_first | str |
r/w | specifies the characters which can start identifiers (the default is GLib.CSET_a_2_z , “_”, and GLib.CSET_A_2_Z ). |
cset_identifier_nth | str |
r/w | specifies the characters which can be used in identifiers, after the first character (the default is GLib.CSET_a_2_z , “_0123456789”, GLib.CSET_A_2_Z , #G_CSET_LATINS, #G_CSET_LATINC). |
cset_skip_characters | str |
r/w | specifies which characters should be skipped by the scanner (the default is the whitespace characters: space, tab, carriage-return and line-feed). |
identifier_2_string | int |
r/w | specifies if identifiers are reported as strings (the default is False ). |
int_2_float | int |
r/w | specifies if all numbers are reported as GLib.TokenType.FLOAT (the default is False ). |
numbers_2_int | int |
r/w | specifies if binary, octal and hexadecimal numbers are reported as GLib.TokenType.INT (the default is True ). |
padding_dummy | int |
r | |
scan_binary | int |
r/w | specifies if binary numbers are recognized (the default is False ). |
scan_comment_multi | int |
r/w | specifies if multi-line comments are recognized (the default is True ). |
scan_float | int |
r/w | specifies if floating point numbers are recognized (the default is True ). |
scan_hex | int |
r/w | specifies if hexadecimal numbers are recognized (the default is True ). |
scan_hex_dollar | int |
r/w | specifies if ‘$’ is recognized as a prefix for hexadecimal numbers (the default is False ). |
scan_identifier | int |
r/w | specifies if identifiers are recognized (the default is True ). |
scan_identifier_1char | int |
r/w | specifies if single-character identifiers are recognized (the default is False ). |
scan_identifier_NULL | int |
r/w | specifies if None is reported as GLib.TokenType.IDENTIFIER_NULL (the default is False ). |
scan_octal | int |
r/w | specifies if octal numbers are recognized (the default is True ). |
scan_string_dq | int |
r/w | specifies if strings can be enclosed in double quotes (the default is True ). |
scan_string_sq | int |
r/w | specifies if strings can be enclosed in single quotes (the default is True ). |
scan_symbols | int |
r/w | specifies if symbols are recognized (the default is True ). |
scope_0_fallback | int |
r/w | specifies if a symbol is searched for in the default scope in addition to the current scope (the default is False ). |
skip_comment_multi | int |
r/w | specifies if multi-line comments are skipped and not returned as tokens (the default is True ). |
skip_comment_single | int |
r/w | specifies if single-line comments are skipped and not returned as tokens (the default is True ). |
store_int64 | int |
r/w | use value.v_int64 rather than v_int |
symbol_2_token | int |
r/w | specifies if symbols are reported by setting token = v_symbol or as GLib.TokenType.SYMBOL (the default is False ). |
Methods¶
None
Details¶
-
class
GLib.
ScannerConfig
¶ Specifies the
GLib.Scanner
parser configuration. Most settings can be changed during the parsing phase and will affect the lexical parsing of the next unpeeked token.