Class ScannerConfig

All Implemented Interfaces:
PointerInterface

public class ScannerConfig extends Record
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.

https://docs.gtk.org/glib/struct.ScannerConfig.html

  • Field Details

    • CSET_SKIP_CHARACTERS

      public static final String 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

      public static final String 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

      public static final String 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

      public static final String 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

      public static final String CASE_SENSITIVE
      specifies if symbols are case sensitive (the
      default is %FALSE).
      See Also:
    • SKIP_COMMENT_MULTI

      public static final String SKIP_COMMENT_MULTI
      specifies if multi-line comments are skipped
      and not returned as tokens (the default is %TRUE).
      See Also:
    • SKIP_COMMENT_SINGLE

      public static final String SKIP_COMMENT_SINGLE
      specifies if single-line comments are skipped
      and not returned as tokens (the default is %TRUE).
      See Also:
    • SCAN_COMMENT_MULTI

      public static final String SCAN_COMMENT_MULTI
      specifies if multi-line comments are recognized
      (the default is %TRUE).
      See Also:
    • SCAN_IDENTIFIER

      public static final String SCAN_IDENTIFIER
      specifies if identifiers are recognized (the
      default is %TRUE).
      See Also:
    • SCAN_IDENTIFIER_1CHAR

      public static final String SCAN_IDENTIFIER_1CHAR
      specifies if single-character
      identifiers are recognized (the default is %FALSE).
      See Also:
    • SCAN_IDENTIFIER_NULL

      public static final String SCAN_IDENTIFIER_NULL
      specifies if %NULL is reported as
      %G_TOKEN_IDENTIFIER_NULL (the default is %FALSE).
      See Also:
    • SCAN_SYMBOLS

      public static final String SCAN_SYMBOLS
      specifies if symbols are recognized (the default
      is %TRUE).
      See Also:
    • SCAN_BINARY

      public static final String SCAN_BINARY
      specifies if binary numbers are recognized (the
      default is %FALSE).
      See Also:
    • SCAN_OCTAL

      public static final String SCAN_OCTAL
      specifies if octal numbers are recognized (the
      default is %TRUE).
      See Also:
    • SCAN_FLOAT

      public static final String SCAN_FLOAT
      specifies if floating point numbers are recognized
      (the default is %TRUE).
      See Also:
    • SCAN_HEX

      public static final String SCAN_HEX
      specifies if hexadecimal numbers are recognized (the
      default is %TRUE).
      See Also:
    • SCAN_HEX_DOLLAR

      public static final String SCAN_HEX_DOLLAR
      specifies if '$' is recognized as a prefix for
      hexadecimal numbers (the default is %FALSE).
      See Also:
    • SCAN_STRING_SQ

      public static final String SCAN_STRING_SQ
      specifies if strings can be enclosed in single
      quotes (the default is %TRUE).
      See Also:
    • SCAN_STRING_DQ

      public static final String SCAN_STRING_DQ
      specifies if strings can be enclosed in double
      quotes (the default is %TRUE).
      See Also:
    • NUMBERS_2_INT

      public static final String 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

      public static final String INT_2_FLOAT
      specifies if all numbers are reported as %G_TOKEN_FLOAT
      (the default is %FALSE).
      See Also:
    • IDENTIFIER_2_STRING

      public static final String IDENTIFIER_2_STRING
      specifies if identifiers are reported as strings
      (the default is %FALSE).
      See Also:
    • CHAR_2_TOKEN

      public static final String 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

      public static final String 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

      public static final String 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

      public static final String STORE_INT64
      use value.v_int64 rather than v_int
      See Also:
    • PADDING_DUMMY

      public static final String PADDING_DUMMY
      See Also:
  • Constructor Details

    • ScannerConfig

      public ScannerConfig(PointerContainer pointer)
    • ScannerConfig

      public ScannerConfig()
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setFieldCsetSkipCharacters

      public 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).
    • getFieldCsetSkipCharacters

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

      public 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).
    • getFieldCsetIdentifierFirst

      public Str getFieldCsetIdentifierFirst()
      specifies the characters which can start
      identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z).
    • setFieldCsetIdentifierNth

      public 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).
    • getFieldCsetIdentifierNth

      public Str 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

      public void setFieldCpairCommentSingle(Str 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).
    • getFieldCpairCommentSingle

      public Str 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()