Package ch.bailu.gtk.glib
Class ScannerConfig
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.glib.ScannerConfig
- All Implemented Interfaces:
PointerInterface
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.
be changed during the parsing phase and will affect the lexical
parsing of the next unpeeked token.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
specifies if symbols are case sensitive (the
default is %FALSE).static final String
specifies if characters are reported by setting
`token = ch` or as %G_TOKEN_CHAR (the default is %TRUE).static final String
specifies the characters at the start and
end of single-line comments.static final String
specifies the characters which can start
identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z).static final String
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).static final String
specifies which characters should be skipped
by the scanner (the default is the whitespace characters: space,
tab, carriage-return and line-feed).static final String
specifies if identifiers are reported as strings
(the default is %FALSE).static final String
specifies if all numbers are reported as %G_TOKEN_FLOAT
(the default is %FALSE).static final String
specifies if binary, octal and hexadecimal numbers
are reported as %G_TOKEN_INT (the default is %TRUE).static final String
static final String
specifies if binary numbers are recognized (the
default is %FALSE).static final String
specifies if multi-line comments are recognized
(the default is %TRUE).static final String
specifies if floating point numbers are recognized
(the default is %TRUE).static final String
specifies if hexadecimal numbers are recognized (the
default is %TRUE).static final String
specifies if '$' is recognized as a prefix for
hexadecimal numbers (the default is %FALSE).static final String
specifies if identifiers are recognized (the
default is %TRUE).static final String
specifies if single-character
identifiers are recognized (the default is %FALSE).static final String
specifies if %NULL is reported as
%G_TOKEN_IDENTIFIER_NULL (the default is %FALSE).static final String
specifies if octal numbers are recognized (the
default is %TRUE).static final String
specifies if strings can be enclosed in double
quotes (the default is %TRUE).static final String
specifies if strings can be enclosed in single
quotes (the default is %TRUE).static final String
specifies if symbols are recognized (the default
is %TRUE).static final String
specifies if a symbol is searched for in the
default scope in addition to the current scope (the default is %FALSE).static final String
specifies if multi-line comments are skipped
and not returned as tokens (the default is %TRUE).static final String
specifies if single-line comments are skipped
and not returned as tokens (the default is %TRUE).static final String
use value.v_int64 rather than v_intstatic final String
specifies if symbols are reported by setting
`token = v_symbol` or as %G_TOKEN_SYMBOL (the default is %FALSE). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
int
specifies if symbols are case sensitive (the
default is %FALSE).int
specifies if characters are reported by setting
`token = ch` or as %G_TOKEN_CHAR (the default is %TRUE).specifies the characters at the start and
end of single-line comments.specifies the characters which can start
identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z).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).specifies which characters should be skipped
by the scanner (the default is the whitespace characters: space,
tab, carriage-return and line-feed).int
specifies if identifiers are reported as strings
(the default is %FALSE).int
specifies if all numbers are reported as %G_TOKEN_FLOAT
(the default is %FALSE).int
specifies if binary, octal and hexadecimal numbers
are reported as %G_TOKEN_INT (the default is %TRUE).int
int
specifies if binary numbers are recognized (the
default is %FALSE).int
specifies if multi-line comments are recognized
(the default is %TRUE).int
specifies if floating point numbers are recognized
(the default is %TRUE).int
specifies if hexadecimal numbers are recognized (the
default is %TRUE).int
specifies if '$' is recognized as a prefix for
hexadecimal numbers (the default is %FALSE).int
specifies if identifiers are recognized (the
default is %TRUE).int
specifies if single-character
identifiers are recognized (the default is %FALSE).int
specifies if %NULL is reported as
%G_TOKEN_IDENTIFIER_NULL (the default is %FALSE).int
specifies if octal numbers are recognized (the
default is %TRUE).int
specifies if strings can be enclosed in double
quotes (the default is %TRUE).int
specifies if strings can be enclosed in single
quotes (the default is %TRUE).int
specifies if symbols are recognized (the default
is %TRUE).int
specifies if a symbol is searched for in the
default scope in addition to the current scope (the default is %FALSE).int
specifies if multi-line comments are skipped
and not returned as tokens (the default is %TRUE).int
specifies if single-line comments are skipped
and not returned as tokens (the default is %TRUE).int
use value.v_int64 rather than v_intint
specifies if symbols are reported by setting
`token = v_symbol` or as %G_TOKEN_SYMBOL (the default is %FALSE).void
setFieldCaseSensitive
(int case_sensitive) specifies if symbols are case sensitive (the
default is %FALSE).void
setFieldChar2Token
(int char_2_token) specifies if characters are reported by setting
`token = ch` or as %G_TOKEN_CHAR (the default is %TRUE).void
setFieldCpairCommentSingle
(Str cpair_comment_single) specifies the characters at the start and
end of single-line comments.void
setFieldCsetIdentifierFirst
(Str cset_identifier_first) specifies the characters which can start
identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z).void
setFieldCsetIdentifierNth
(Str cset_identifier_nth) 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).void
setFieldCsetSkipCharacters
(Str cset_skip_characters) specifies which characters should be skipped
by the scanner (the default is the whitespace characters: space,
tab, carriage-return and line-feed).void
setFieldIdentifier2String
(int identifier_2_string) specifies if identifiers are reported as strings
(the default is %FALSE).void
setFieldInt2Float
(int int_2_float) specifies if all numbers are reported as %G_TOKEN_FLOAT
(the default is %FALSE).void
setFieldNumbers2Int
(int numbers_2_int) specifies if binary, octal and hexadecimal numbers
are reported as %G_TOKEN_INT (the default is %TRUE).void
setFieldScanBinary
(int scan_binary) specifies if binary numbers are recognized (the
default is %FALSE).void
setFieldScanCommentMulti
(int scan_comment_multi) specifies if multi-line comments are recognized
(the default is %TRUE).void
setFieldScanFloat
(int scan_float) specifies if floating point numbers are recognized
(the default is %TRUE).void
setFieldScanHex
(int scan_hex) specifies if hexadecimal numbers are recognized (the
default is %TRUE).void
setFieldScanHexDollar
(int scan_hex_dollar) specifies if '$' is recognized as a prefix for
hexadecimal numbers (the default is %FALSE).void
setFieldScanIdentifier
(int scan_identifier) specifies if identifiers are recognized (the
default is %TRUE).void
setFieldScanIdentifier1char
(int scan_identifier_1char) specifies if single-character
identifiers are recognized (the default is %FALSE).void
setFieldScanIdentifierNull
(int scan_identifier_NULL) specifies if %NULL is reported as
%G_TOKEN_IDENTIFIER_NULL (the default is %FALSE).void
setFieldScanOctal
(int scan_octal) specifies if octal numbers are recognized (the
default is %TRUE).void
setFieldScanStringDq
(int scan_string_dq) specifies if strings can be enclosed in double
quotes (the default is %TRUE).void
setFieldScanStringSq
(int scan_string_sq) specifies if strings can be enclosed in single
quotes (the default is %TRUE).void
setFieldScanSymbols
(int scan_symbols) specifies if symbols are recognized (the default
is %TRUE).void
setFieldScope0Fallback
(int scope_0_fallback) specifies if a symbol is searched for in the
default scope in addition to the current scope (the default is %FALSE).void
setFieldSkipCommentMulti
(int skip_comment_multi) specifies if multi-line comments are skipped
and not returned as tokens (the default is %TRUE).void
setFieldSkipCommentSingle
(int skip_comment_single) specifies if single-line comments are skipped
and not returned as tokens (the default is %TRUE).void
setFieldStoreInt64
(int store_int64) use value.v_int64 rather than v_intvoid
setFieldSymbol2Token
(int symbol_2_token) specifies if symbols are reported by setting
`token = v_symbol` or as %G_TOKEN_SYMBOL (the default is %FALSE).Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
CSET_SKIP_CHARACTERS
specifies which characters should be skipped
by the scanner (the default is the whitespace characters: space,
tab, carriage-return and line-feed).- See Also:
-
CSET_IDENTIFIER_FIRST
specifies the characters which can start
identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z).- See Also:
-
CSET_IDENTIFIER_NTH
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).- See Also:
-
CPAIR_COMMENT_SINGLE
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).- See Also:
-
CASE_SENSITIVE
specifies if symbols are case sensitive (the
default is %FALSE).- See Also:
-
SKIP_COMMENT_MULTI
specifies if multi-line comments are skipped
and not returned as tokens (the default is %TRUE).- See Also:
-
SKIP_COMMENT_SINGLE
specifies if single-line comments are skipped
and not returned as tokens (the default is %TRUE).- See Also:
-
SCAN_COMMENT_MULTI
specifies if multi-line comments are recognized
(the default is %TRUE).- See Also:
-
SCAN_IDENTIFIER
specifies if identifiers are recognized (the
default is %TRUE).- See Also:
-
SCAN_IDENTIFIER_1CHAR
specifies if single-character
identifiers are recognized (the default is %FALSE).- See Also:
-
SCAN_IDENTIFIER_NULL
specifies if %NULL is reported as
%G_TOKEN_IDENTIFIER_NULL (the default is %FALSE).- See Also:
-
SCAN_SYMBOLS
specifies if symbols are recognized (the default
is %TRUE).- See Also:
-
SCAN_BINARY
specifies if binary numbers are recognized (the
default is %FALSE).- See Also:
-
SCAN_OCTAL
specifies if octal numbers are recognized (the
default is %TRUE).- See Also:
-
SCAN_FLOAT
specifies if floating point numbers are recognized
(the default is %TRUE).- See Also:
-
SCAN_HEX
specifies if hexadecimal numbers are recognized (the
default is %TRUE).- See Also:
-
SCAN_HEX_DOLLAR
specifies if '$' is recognized as a prefix for
hexadecimal numbers (the default is %FALSE).- See Also:
-
SCAN_STRING_SQ
specifies if strings can be enclosed in single
quotes (the default is %TRUE).- See Also:
-
SCAN_STRING_DQ
specifies if strings can be enclosed in double
quotes (the default is %TRUE).- See Also:
-
NUMBERS_2_INT
specifies if binary, octal and hexadecimal numbers
are reported as %G_TOKEN_INT (the default is %TRUE).- See Also:
-
INT_2_FLOAT
specifies if all numbers are reported as %G_TOKEN_FLOAT
(the default is %FALSE).- See Also:
-
IDENTIFIER_2_STRING
specifies if identifiers are reported as strings
(the default is %FALSE).- See Also:
-
CHAR_2_TOKEN
specifies if characters are reported by setting
`token = ch` or as %G_TOKEN_CHAR (the default is %TRUE).- See Also:
-
SYMBOL_2_TOKEN
specifies if symbols are reported by setting
`token = v_symbol` or as %G_TOKEN_SYMBOL (the default is %FALSE).- See Also:
-
SCOPE_0_FALLBACK
specifies if a symbol is searched for in the
default scope in addition to the current scope (the default is %FALSE).- See Also:
-
STORE_INT64
use value.v_int64 rather than v_int- See Also:
-
PADDING_DUMMY
- See Also:
-
-
Constructor Details
-
ScannerConfig
-
ScannerConfig
public ScannerConfig()
-
-
Method Details
-
getClassHandler
-
setFieldCsetSkipCharacters
specifies which characters should be skipped
by the scanner (the default is the whitespace characters: space,
tab, carriage-return and line-feed). -
getFieldCsetSkipCharacters
specifies which characters should be skipped
by the scanner (the default is the whitespace characters: space,
tab, carriage-return and line-feed). -
setFieldCsetIdentifierFirst
specifies the characters which can start
identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z). -
getFieldCsetIdentifierFirst
specifies the characters which can start
identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z). -
setFieldCsetIdentifierNth
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). -
getFieldCsetIdentifierNth
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). -
setFieldCpairCommentSingle
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). -
getFieldCpairCommentSingle
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). -
setFieldCaseSensitive
public void setFieldCaseSensitive(int case_sensitive) specifies if symbols are case sensitive (the
default is %FALSE). -
getFieldCaseSensitive
public int getFieldCaseSensitive()specifies if symbols are case sensitive (the
default is %FALSE). -
setFieldSkipCommentMulti
public void setFieldSkipCommentMulti(int skip_comment_multi) specifies if multi-line comments are skipped
and not returned as tokens (the default is %TRUE). -
getFieldSkipCommentMulti
public int getFieldSkipCommentMulti()specifies if multi-line comments are skipped
and not returned as tokens (the default is %TRUE). -
setFieldSkipCommentSingle
public void setFieldSkipCommentSingle(int skip_comment_single) specifies if single-line comments are skipped
and not returned as tokens (the default is %TRUE). -
getFieldSkipCommentSingle
public int getFieldSkipCommentSingle()specifies if single-line comments are skipped
and not returned as tokens (the default is %TRUE). -
setFieldScanCommentMulti
public void setFieldScanCommentMulti(int scan_comment_multi) specifies if multi-line comments are recognized
(the default is %TRUE). -
getFieldScanCommentMulti
public int getFieldScanCommentMulti()specifies if multi-line comments are recognized
(the default is %TRUE). -
setFieldScanIdentifier
public void setFieldScanIdentifier(int scan_identifier) specifies if identifiers are recognized (the
default is %TRUE). -
getFieldScanIdentifier
public int getFieldScanIdentifier()specifies if identifiers are recognized (the
default is %TRUE). -
setFieldScanIdentifier1char
public void setFieldScanIdentifier1char(int scan_identifier_1char) specifies if single-character
identifiers are recognized (the default is %FALSE). -
getFieldScanIdentifier1char
public int getFieldScanIdentifier1char()specifies if single-character
identifiers are recognized (the default is %FALSE). -
setFieldScanIdentifierNull
public void setFieldScanIdentifierNull(int scan_identifier_NULL) specifies if %NULL is reported as
%G_TOKEN_IDENTIFIER_NULL (the default is %FALSE). -
getFieldScanIdentifierNull
public int getFieldScanIdentifierNull()specifies if %NULL is reported as
%G_TOKEN_IDENTIFIER_NULL (the default is %FALSE). -
setFieldScanSymbols
public void setFieldScanSymbols(int scan_symbols) specifies if symbols are recognized (the default
is %TRUE). -
getFieldScanSymbols
public int getFieldScanSymbols()specifies if symbols are recognized (the default
is %TRUE). -
setFieldScanBinary
public void setFieldScanBinary(int scan_binary) specifies if binary numbers are recognized (the
default is %FALSE). -
getFieldScanBinary
public int getFieldScanBinary()specifies if binary numbers are recognized (the
default is %FALSE). -
setFieldScanOctal
public void setFieldScanOctal(int scan_octal) specifies if octal numbers are recognized (the
default is %TRUE). -
getFieldScanOctal
public int getFieldScanOctal()specifies if octal numbers are recognized (the
default is %TRUE). -
setFieldScanFloat
public void setFieldScanFloat(int scan_float) specifies if floating point numbers are recognized
(the default is %TRUE). -
getFieldScanFloat
public int getFieldScanFloat()specifies if floating point numbers are recognized
(the default is %TRUE). -
setFieldScanHex
public void setFieldScanHex(int scan_hex) specifies if hexadecimal numbers are recognized (the
default is %TRUE). -
getFieldScanHex
public int getFieldScanHex()specifies if hexadecimal numbers are recognized (the
default is %TRUE). -
setFieldScanHexDollar
public void setFieldScanHexDollar(int scan_hex_dollar) specifies if '$' is recognized as a prefix for
hexadecimal numbers (the default is %FALSE). -
getFieldScanHexDollar
public int getFieldScanHexDollar()specifies if '$' is recognized as a prefix for
hexadecimal numbers (the default is %FALSE). -
setFieldScanStringSq
public void setFieldScanStringSq(int scan_string_sq) specifies if strings can be enclosed in single
quotes (the default is %TRUE). -
getFieldScanStringSq
public int getFieldScanStringSq()specifies if strings can be enclosed in single
quotes (the default is %TRUE). -
setFieldScanStringDq
public void setFieldScanStringDq(int scan_string_dq) specifies if strings can be enclosed in double
quotes (the default is %TRUE). -
getFieldScanStringDq
public int getFieldScanStringDq()specifies if strings can be enclosed in double
quotes (the default is %TRUE). -
setFieldNumbers2Int
public void setFieldNumbers2Int(int numbers_2_int) specifies if binary, octal and hexadecimal numbers
are reported as %G_TOKEN_INT (the default is %TRUE). -
getFieldNumbers2Int
public int getFieldNumbers2Int()specifies if binary, octal and hexadecimal numbers
are reported as %G_TOKEN_INT (the default is %TRUE). -
setFieldInt2Float
public void setFieldInt2Float(int int_2_float) specifies if all numbers are reported as %G_TOKEN_FLOAT
(the default is %FALSE). -
getFieldInt2Float
public int getFieldInt2Float()specifies if all numbers are reported as %G_TOKEN_FLOAT
(the default is %FALSE). -
setFieldIdentifier2String
public void setFieldIdentifier2String(int identifier_2_string) specifies if identifiers are reported as strings
(the default is %FALSE). -
getFieldIdentifier2String
public int getFieldIdentifier2String()specifies if identifiers are reported as strings
(the default is %FALSE). -
setFieldChar2Token
public void setFieldChar2Token(int char_2_token) specifies if characters are reported by setting
`token = ch` or as %G_TOKEN_CHAR (the default is %TRUE). -
getFieldChar2Token
public int getFieldChar2Token()specifies if characters are reported by setting
`token = ch` or as %G_TOKEN_CHAR (the default is %TRUE). -
setFieldSymbol2Token
public void setFieldSymbol2Token(int symbol_2_token) specifies if symbols are reported by setting
`token = v_symbol` or as %G_TOKEN_SYMBOL (the default is %FALSE). -
getFieldSymbol2Token
public int getFieldSymbol2Token()specifies if symbols are reported by setting
`token = v_symbol` or as %G_TOKEN_SYMBOL (the default is %FALSE). -
setFieldScope0Fallback
public void setFieldScope0Fallback(int scope_0_fallback) specifies if a symbol is searched for in the
default scope in addition to the current scope (the default is %FALSE). -
getFieldScope0Fallback
public int getFieldScope0Fallback()specifies if a symbol is searched for in the
default scope in addition to the current scope (the default is %FALSE). -
setFieldStoreInt64
public void setFieldStoreInt64(int store_int64) use value.v_int64 rather than v_int -
getFieldStoreInt64
public int getFieldStoreInt64()use value.v_int64 rather than v_int -
getFieldPaddingDummy
public int getFieldPaddingDummy()
-