GScannerConfig

Specifies the #GScanner parser configuration. Most settings can be changed during the parsing phase and will affect the lexical parsing of the next unpeeked token.

Members

Variables

caseSensitive
uint caseSensitive;

specifies if symbols are case sensitive (the default is false).

char2Token
uint char2Token;

specifies if characters are reported by setting token = ch or as G_TOKEN_CHAR (the default is true).

cpairCommentSingle
char* 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).

csetIdentifierFirst
char* csetIdentifierFirst;

specifies the characters which can start identifiers (the default is G_CSET_a_2_z, "_", and G_CSET_A_2_Z).

csetIdentifierNth
char* csetIdentifierNth;

specifies the characters which can be used in identifiers, after the first character (the default is G_CSET_a_2_z, "_0123456789", G_CSET_A_2_Z, G_CSET_LATINS, G_CSET_LATINC).

csetSkipCharacters
char* csetSkipCharacters;

specifies which characters should be skipped by the scanner (the default is the whitespace characters: space, tab, carriage-return and line-feed).

identifier2String
uint identifier2String;

specifies if identifiers are reported as strings (the default is false).

int2Float
uint int2Float;

specifies if all numbers are reported as G_TOKEN_FLOAT (the default is false).

numbers2Int
uint numbers2Int;

specifies if binary, octal and hexadecimal numbers are reported as G_TOKEN_INT (the default is true).

paddingDummy
uint paddingDummy;
scanBinary
uint scanBinary;

specifies if binary numbers are recognized (the default is false).

scanCommentMulti
uint scanCommentMulti;

specifies if multi-line comments are recognized (the default is true).

scanFloat
uint scanFloat;

specifies if floating point numbers are recognized (the default is true).

scanHex
uint scanHex;

specifies if hexadecimal numbers are recognized (the default is true).

scanHexDollar
uint scanHexDollar;

specifies if '$' is recognized as a prefix for hexadecimal numbers (the default is false).

scanIdentifier
uint scanIdentifier;

specifies if identifiers are recognized (the default is true).

scanIdentifier1char
uint scanIdentifier1char;

specifies if single-character identifiers are recognized (the default is false).

scanIdentifierNULL
uint scanIdentifierNULL;

specifies if null is reported as G_TOKEN_IDENTIFIER_NULL (the default is false).

scanOctal
uint scanOctal;

specifies if octal numbers are recognized (the default is true).

scanStringDq
uint scanStringDq;

specifies if strings can be enclosed in double quotes (the default is true).

scanStringSq
uint scanStringSq;

specifies if strings can be enclosed in single quotes (the default is true).

scanSymbols
uint scanSymbols;

specifies if symbols are recognized (the default is true).

scope0Fallback
uint scope0Fallback;

specifies if a symbol is searched for in the default scope in addition to the current scope (the default is false).

skipCommentMulti
uint skipCommentMulti;

specifies if multi-line comments are skipped and not returned as tokens (the default is true).

skipCommentSingle
uint skipCommentSingle;

specifies if single-line comments are skipped and not returned as tokens (the default is true).

storeInt64
uint storeInt64;

use value.v_int64 rather than v_int

symbol2Token
uint symbol2Token;

specifies if symbols are reported by setting token = v_symbol or as G_TOKEN_SYMBOL (the default is false).