X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Freference%2Fglib%2Fhtml%2Fglib-Lexical-Scanner.html;h=4fbf2f1f0ac1c1503dd102fff0be4389c22a6a37;hb=147c398cd05d71fb172d3788b9dc576c67141811;hp=cd555fc9787cf65e44fcc1e304f3ae4f469be60c;hpb=5e3c122e6c1fb35ed1a2cb0b76e62a519251fb33;p=platform%2Fupstream%2Fglib2.0.git diff --git a/docs/reference/glib/html/glib-Lexical-Scanner.html b/docs/reference/glib/html/glib-Lexical-Scanner.html index cd555fc..4fbf2f1 100644 --- a/docs/reference/glib/html/glib-Lexical-Scanner.html +++ b/docs/reference/glib/html/glib-Lexical-Scanner.html @@ -3,33 +3,13 @@ Lexical Scanner - + - - + + - - - - - - - - - - - - - - - - - - - - @@ -38,7 +18,7 @@ - + -
+
@@ -55,72 +35,77 @@
-
+

Synopsis

 #include <glib.h>
 
-                    GScanner;
-                    GScannerConfig;
-GScanner*           g_scanner_new                       (const GScannerConfig *config_templ);
-void                g_scanner_destroy                   (GScanner *scanner);
+struct              GScanner;
+struct              GScannerConfig;
+GScanner *          g_scanner_new                       (const GScannerConfig *config_templ);
+void                g_scanner_destroy                   (GScanner *scanner);
 
-void                g_scanner_input_file                (GScanner *scanner,
-                                                         gint input_fd);
-void                g_scanner_sync_file_offset          (GScanner *scanner);
-void                g_scanner_input_text                (GScanner *scanner,
-                                                         const gchar *text,
-                                                         guint text_len);
-GTokenType          g_scanner_peek_next_token           (GScanner *scanner);
-GTokenType          g_scanner_get_next_token            (GScanner *scanner);
-gboolean            g_scanner_eof                       (GScanner *scanner);
+void                g_scanner_input_file                (GScanner *scanner,
+                                                         gint input_fd);
+void                g_scanner_sync_file_offset          (GScanner *scanner);
+void                g_scanner_input_text                (GScanner *scanner,
+                                                         const gchar *text,
+                                                         guint text_len);
+GTokenType          g_scanner_peek_next_token           (GScanner *scanner);
+GTokenType          g_scanner_get_next_token            (GScanner *scanner);
+gboolean            g_scanner_eof                       (GScanner *scanner);
 
-guint               g_scanner_cur_line                  (GScanner *scanner);
-guint               g_scanner_cur_position              (GScanner *scanner);
-GTokenType          g_scanner_cur_token                 (GScanner *scanner);
-GTokenValue         g_scanner_cur_value                 (GScanner *scanner);
+guint               g_scanner_cur_line                  (GScanner *scanner);
+guint               g_scanner_cur_position              (GScanner *scanner);
+GTokenType          g_scanner_cur_token                 (GScanner *scanner);
+GTokenValue         g_scanner_cur_value                 (GScanner *scanner);
 
-guint               g_scanner_set_scope                 (GScanner *scanner,
-                                                         guint scope_id);
-void                g_scanner_scope_add_symbol          (GScanner *scanner,
-                                                         guint scope_id,
-                                                         const gchar *symbol,
-                                                         gpointer value);
-void                g_scanner_scope_foreach_symbol      (GScanner *scanner,
-                                                         guint scope_id,
-                                                         GHFunc func,
-                                                         gpointer user_data);
-gpointer            g_scanner_scope_lookup_symbol       (GScanner *scanner,
-                                                         guint scope_id,
-                                                         const gchar *symbol);
-void                g_scanner_scope_remove_symbol       (GScanner *scanner,
-                                                         guint scope_id,
-                                                         const gchar *symbol);
-#define             g_scanner_add_symbol                ( scanner, symbol, value )
-#define             g_scanner_remove_symbol             ( scanner, symbol )
-#define             g_scanner_foreach_symbol            ( scanner, func, data )
+guint               g_scanner_set_scope                 (GScanner *scanner,
+                                                         guint scope_id);
+void                g_scanner_scope_add_symbol          (GScanner *scanner,
+                                                         guint scope_id,
+                                                         const gchar *symbol,
+                                                         gpointer value);
+void                g_scanner_scope_foreach_symbol      (GScanner *scanner,
+                                                         guint scope_id,
+                                                         GHFunc func,
+                                                         gpointer user_data);
+gpointer            g_scanner_scope_lookup_symbol       (GScanner *scanner,
+                                                         guint scope_id,
+                                                         const gchar *symbol);
+void                g_scanner_scope_remove_symbol       (GScanner *scanner,
+                                                         guint scope_id,
+                                                         const gchar *symbol);
+#define             g_scanner_add_symbol                (scanner,
+                                                         symbol,
+                                                         value)
+#define             g_scanner_remove_symbol             (scanner,
+                                                         symbol)
+#define             g_scanner_foreach_symbol            (scanner,
+                                                         func,
+                                                         data)
 
 #define             g_scanner_freeze_symbol_table       (scanner)
 #define             g_scanner_thaw_symbol_table         (scanner)
-gpointer            g_scanner_lookup_symbol             (GScanner *scanner,
-                                                         const gchar *symbol);
+gpointer            g_scanner_lookup_symbol             (GScanner *scanner,
+                                                         const gchar *symbol);
 
-void                g_scanner_warn                      (GScanner *scanner,
-                                                         const gchar *format,
-                                                         ...);
-void                g_scanner_error                     (GScanner *scanner,
-                                                         const gchar *format,
-                                                         ...);
-void                g_scanner_unexp_token               (GScanner *scanner,
-                                                         GTokenType expected_token,
-                                                         const gchar *identifier_spec,
-                                                         const gchar *symbol_spec,
-                                                         const gchar *symbol_name,
-                                                         const gchar *message,
-                                                         gint is_error);
-void                (*GScannerMsgFunc)                  (GScanner *scanner,
-                                                         gchar *message,
-                                                         gboolean error);
+void                g_scanner_warn                      (GScanner *scanner,
+                                                         const gchar *format,
+                                                         ...);
+void                g_scanner_error                     (GScanner *scanner,
+                                                         const gchar *format,
+                                                         ...);
+void                g_scanner_unexp_token               (GScanner *scanner,
+                                                         GTokenType expected_token,
+                                                         const gchar *identifier_spec,
+                                                         const gchar *symbol_spec,
+                                                         const gchar *symbol_name,
+                                                         const gchar *message,
+                                                         gint is_error);
+void                (*GScannerMsgFunc)                  (GScanner *scanner,
+                                                         gchar *message,
+                                                         gboolean error);
 
 #define             G_CSET_a_2_z
 #define             G_CSET_A_2_Z
@@ -132,18 +117,18 @@ union               GErrorType;
 
-
+

Description

-The GScanner and its associated functions provide a general purpose -lexical scanner. +The GScanner and its associated functions provide a +general purpose lexical scanner.

-
+

Details

-
-

GScanner

-
typedef struct {
+
+

struct GScanner

+
struct GScanner {
   /* unused fields */
   gpointer		user_data;
   guint			max_parse_errors;
@@ -171,104 +156,90 @@ lexical scanner.
   GTokenValue		next_value;
   guint			next_line;
   guint			next_position;
-  
-  /* to be considered private */
-  GHashTable		*symbol_table;
-  gint			input_fd;
-  const gchar		*text;
-  const gchar		*text_end;
-  gchar			*buffer;
-  guint			scope_id;
-  
+
   /* handler function for _warn and _error */
   GScannerMsgFunc msg_handler;
-} GScanner;
+};
 

The data structure representing a lexical scanner.

-You should set input_name after creating -the scanner, since it is used by the default message handler when -displaying warnings and errors. If you are scanning a file, the file -name would be a good choice. +You should set input_name after creating the scanner, since +it is used by the default message handler when displaying +warnings and errors. If you are scanning a file, the filename +would be a good choice.

-The user_data and -max_parse_errors fields are not used. -If you need to associate extra data with the scanner you can place them here. +The user_data and max_parse_errors fields are not used. +If you need to associate extra data with the scanner you +can place them here.

If you want to use your own message handler you can set the -msg_handler field. The type of the message -handler function is declared by GScannerMsgFunc. +msg_handler field. The type of the message handler function +is declared by GScannerMsgFunc.

- + - + - + - + - + - - + + - - - - - - - @@ -277,47 +248,16 @@ handler function is declared by GHashTable *symbol_table;

- - - - - - - - - - - - - - - - - - - - - - - - +

gpointer user_data;

-unused

guint max_parse_errors;

-unused

guint parse_errors;

-g_scanner_error() increments this field

const gchar *input_name;

-name of input stream, featured by the default message handler

GData *qdata;

-quarked data

GScannerConfig *config;

-

GScannerConfig *config;

link into the scanner configuration

GTokenType token;

token parsed by the last g_scanner_get_next_token() +token parsed by the last g_scanner_get_next_token()

GTokenValue value;

value of the last token from g_scanner_get_next_token() +value of the last token from g_scanner_get_next_token()

guint line;

line number of the last token from g_scanner_get_next_token() +line number of the last token from g_scanner_get_next_token()

guint position;

char number of the last token from g_scanner_get_next_token() +char number of the last token from g_scanner_get_next_token()

GTokenType next_token;

token parsed by the last g_scanner_peek_next_token() +token parsed by the last g_scanner_peek_next_token()

GTokenValue next_value;

value of the last token from g_scanner_peek_next_token() +value of the last token from g_scanner_peek_next_token()

guint next_line;

line number of the last token from g_scanner_peek_next_token() +line number of the last token from g_scanner_peek_next_token()
-

gint input_fd;

-

const gchar *text;

-

const gchar *text_end;

-

gchar *buffer;

-

guint scope_id;

-

GScannerMsgFunc msg_handler;

function to handle GScanner message output -handler function for _warn and _error

-
-

GScannerConfig

-
typedef struct {
+
+

struct GScannerConfig

+
struct GScannerConfig {
   /* Character sets
    */
   gchar		*cset_skip_characters;		/* default: " \t\n" */
@@ -353,171 +293,204 @@ handler function is declared by GScanner parser configuration. Most settings can be changed during
-the parsing phase and will affect the lexical parsing of the next unpeeked token.
-

-

-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). -

-

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

-

-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). -

-

-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). -

-

-case_sensitive specifies if symbols are -case sensitive (the default is FALSE). -

-

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

-

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

-

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

-

-scan_identifier specifies if identifiers -are recognized (the default is TRUE). -

-

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

-

-scan_identifier_NULL specifies if -NULL is reported as G_TOKEN_IDENTIFIER_NULL. -(the default is FALSE). -

-

-scan_symbols specifies if symbols are -recognized (the default is TRUE). -

-

-scan_binary specifies if binary numbers -are recognized (the default is FALSE). -

-

-scan_octal specifies if octal numbers -are recognized (the default is TRUE). -

-

-scan_float specifies if floating point numbers -are recognized (the default is TRUE). -

-

-scan_hex specifies if hexadecimal numbers -are recognized (the default is TRUE). -

-

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

-

-scan_string_sq specifies if strings can be -enclosed in single quotes (the default is TRUE). -

-

-scan_string_dq specifies if strings can be -enclosed in double quotes (the default is TRUE). -

-

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

-

-int_2_float specifies if all numbers are -reported as G_TOKEN_FLOAT (the default is FALSE). -

-

-identifier_2_string specifies if identifiers -are reported as strings (the default is FALSE). -

-

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

-

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

-

-scope_0_fallback specifies if a symbol -is searched for in the default scope in addition to the current scope -(the default is FALSE). +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.

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

gchar *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).

gchar *cset_identifier_first;

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

gchar *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).

gchar *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).

guint case_sensitive : 1;

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

guint skip_comment_multi : 1;

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

guint skip_comment_single : 1;

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

guint scan_comment_multi : 1;

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

guint scan_identifier : 1;

specifies if identifiers are recognized (the +default is TRUE).

guint scan_identifier_1char : 1;

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

guint scan_identifier_NULL : 1;

specifies if NULL is reported as +G_TOKEN_IDENTIFIER_NULL (the default is FALSE).

guint scan_symbols : 1;

specifies if symbols are recognized (the default +is TRUE).

guint scan_binary : 1;

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

guint scan_octal : 1;

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

guint scan_float : 1;

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

guint scan_hex : 1;

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

guint scan_hex_dollar : 1;

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

guint scan_string_sq : 1;

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

guint scan_string_dq : 1;

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

guint numbers_2_int : 1;

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

guint int_2_float : 1;

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

guint identifier_2_string : 1;

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

guint char_2_token : 1;

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

guint symbol_2_token : 1;

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

guint scope_0_fallback : 1;

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

guint store_int64 : 1;

use value.v_int64 rather than v_int

-
+

g_scanner_new ()

-
GScanner*           g_scanner_new                       (const GScannerConfig *config_templ);
+
GScanner *          g_scanner_new                       (const GScannerConfig *config_templ);

-Creates a new GScanner. -The config_templ structure specifies the initial settings of the scanner, -which are copied into the GScanner config field. -If you pass NULL then the default settings are used. +Creates a new GScanner. +

+

+The config_templ structure specifies the initial settings +of the scanner, which are copied into the GScanner +config field. If you pass NULL then the default settings +are used.

- + -

config_templ :

the initial scanner settings. -the initial scanner settings

Returns :

the new GScanner. +the new GScanner

-
+

g_scanner_destroy ()

-
void                g_scanner_destroy                   (GScanner *scanner);
+
void                g_scanner_destroy                   (GScanner *scanner);

-Frees all memory used by the GScanner. +Frees all memory used by the GScanner.

-

scanner :

a GScanner. +a GScanner

-
+

g_scanner_input_file ()

-
void                g_scanner_input_file                (GScanner *scanner,
-                                                         gint input_fd);
+
void                g_scanner_input_file                (GScanner *scanner,
+                                                         gint input_fd);

Prepares to scan a file.

@@ -526,42 +499,41 @@ Prepares to scan a file.

scanner :

-a GScanner. +a GScanner

input_fd :

-a file descriptor. - +a file descriptor

-
+

g_scanner_sync_file_offset ()

-
void                g_scanner_sync_file_offset          (GScanner *scanner);
+
void                g_scanner_sync_file_offset          (GScanner *scanner);

-Rewinds the filedescriptor to the current buffer position and blows -the file read ahead buffer. This is useful for third party uses of -the scanners filedescriptor, which hooks onto the current scanning -position. +Rewinds the filedescriptor to the current buffer position +and blows the file read ahead buffer. This is useful for +third party uses of the scanners filedescriptor, which hooks +onto the current scanning position.

-

scanner :

a GScanner. +a GScanner

-
+

g_scanner_input_text ()

-
void                g_scanner_input_text                (GScanner *scanner,
-                                                         const gchar *text,
-                                                         guint text_len);
+
void                g_scanner_input_text                (GScanner *scanner,
+                                                         const gchar *text,
+                                                         guint text_len);

Prepares to scan a text buffer.

@@ -570,215 +542,202 @@ Prepares to scan a text buffer.

scanner :

-a GScanner. +a GScanner

text :

-the text buffer to scan. - +the text buffer to scan

text_len :

-the length of the text buffer. - +the length of the text buffer

-
+

g_scanner_peek_next_token ()

-
GTokenType          g_scanner_peek_next_token           (GScanner *scanner);
+
GTokenType          g_scanner_peek_next_token           (GScanner *scanner);

Parses the next token, without removing it from the input stream. -The token data is placed in the -next_token, -next_value, -next_line, and -next_position fields of the GScanner structure. +The token data is placed in the next_token, next_value, next_line, +and next_position fields of the GScanner structure.

-Note that, while the token is not removed from the input stream (i.e. -the next call to g_scanner_get_next_token() will return the same token), -it will not be reevaluated. This can lead to surprising results when -changing scope or the scanner configuration after peeking the next token. -Getting the next token after switching the scope or configuration will -return whatever was peeked before, regardless of any symbols that may -have been added or removed in the new scope. +Note that, while the token is not removed from the input stream +(i.e. the next call to g_scanner_get_next_token() will return the +same token), it will not be reevaluated. This can lead to surprising +results when changing scope or the scanner configuration after peeking +the next token. Getting the next token after switching the scope or +configuration will return whatever was peeked before, regardless of +any symbols that may have been added or removed in the new scope.

- - +

scanner :

a GScanner. +a GScanner

Returns :

the type of the token. -the type of the token

-
+

g_scanner_get_next_token ()

-
GTokenType          g_scanner_get_next_token            (GScanner *scanner);
+
GTokenType          g_scanner_get_next_token            (GScanner *scanner);

-Parses the next token just like g_scanner_peek_next_token() and also -removes it from the input stream. -The token data is placed in the -token, -value, -line, and -position fields of the GScanner structure. +Parses the next token just like g_scanner_peek_next_token() +and also removes it from the input stream. The token data is +placed in the token, value, line, and position fields of +the GScanner structure.

- - +

scanner :

a GScanner. +a GScanner

Returns :

the type of the token. -the type of the token

-
+

g_scanner_eof ()

-
gboolean            g_scanner_eof                       (GScanner *scanner);
+
gboolean            g_scanner_eof                       (GScanner *scanner);

-Returns TRUE if the scanner has reached the end of the file or text buffer. +Returns TRUE if the scanner has reached the end of +the file or text buffer.

- +TRUE if the scanner has reached the end of +the file or text buffer

scanner :

a GScanner. +a GScanner

Returns :

-TRUE if the scanner has reached the end of the file or text buffer. -

-
+

g_scanner_cur_line ()

-
guint               g_scanner_cur_line                  (GScanner *scanner);
+
guint               g_scanner_cur_line                  (GScanner *scanner);

-Returns the current line in the input stream (counting from 1). -This is the line of the last token parsed via g_scanner_get_next_token(). +Returns the current line in the input stream (counting +from 1). This is the line of the last token parsed via +g_scanner_get_next_token().

- - +

scanner :

a GScanner. +a GScanner

Returns :

the current line. -the current line

-
+

g_scanner_cur_position ()

-
guint               g_scanner_cur_position              (GScanner *scanner);
+
guint               g_scanner_cur_position              (GScanner *scanner);

-Returns the current position in the current line (counting from 0). -This is the position of the last token parsed via g_scanner_get_next_token(). +Returns the current position in the current line (counting +from 0). This is the position of the last token parsed via +g_scanner_get_next_token().

- - +

scanner :

a GScanner. +a GScanner

Returns :

the current position on the line. -the current position on the line

-
+

g_scanner_cur_token ()

-
GTokenType          g_scanner_cur_token                 (GScanner *scanner);
+
GTokenType          g_scanner_cur_token                 (GScanner *scanner);

-Gets the current token type. -This is simply the token field in the GScanner -structure. +Gets the current token type. This is simply the token +field in the GScanner structure.

- - +

scanner :

a GScanner. +a GScanner

Returns :

the current token type. -the current token type

-
+

g_scanner_cur_value ()

-
GTokenValue         g_scanner_cur_value                 (GScanner *scanner);
+
GTokenValue         g_scanner_cur_value                 (GScanner *scanner);

-Gets the current token value. -This is simply the value field in the GScanner -structure. +Gets the current token value. This is simply the value +field in the GScanner structure.

- - +

scanner :

a GScanner. +a GScanner

Returns :

the current token value. -the current token value

-
+

g_scanner_set_scope ()

-
guint               g_scanner_set_scope                 (GScanner *scanner,
-                                                         guint scope_id);
+
guint               g_scanner_set_scope                 (GScanner *scanner,
+                                                         guint scope_id);

Sets the current scope.

@@ -787,29 +746,27 @@ Sets the current scope.

scanner :

-a GScanner. +a GScanner

scope_id :

-the new scope id. - +the new scope id

Returns :

-the old scope id. - +the old scope id

-
+

g_scanner_scope_add_symbol ()

-
void                g_scanner_scope_add_symbol          (GScanner *scanner,
-                                                         guint scope_id,
-                                                         const gchar *symbol,
-                                                         gpointer value);
+
void                g_scanner_scope_add_symbol          (GScanner *scanner,
+                                                         guint scope_id,
+                                                         const gchar *symbol,
+                                                         gpointer value);

Adds a symbol to the given scope.

@@ -818,71 +775,66 @@ Adds a symbol to the given scope.

scanner :

-a GScanner. +a GScanner

scope_id :

-the scope id. - +the scope id

symbol :

-the symbol to add. - +the symbol to add

value :

-the value of the symbol. - +the value of the symbol

-
+

g_scanner_scope_foreach_symbol ()

-
void                g_scanner_scope_foreach_symbol      (GScanner *scanner,
-                                                         guint scope_id,
-                                                         GHFunc func,
-                                                         gpointer user_data);
+
void                g_scanner_scope_foreach_symbol      (GScanner *scanner,
+                                                         guint scope_id,
+                                                         GHFunc func,
+                                                         gpointer user_data);

-Calls the given function for each of the symbol/value pairs in the -given scope of the GScanner. The function is passed the symbol and -value of each pair, and the given user_data parameter. +Calls the given function for each of the symbol/value pairs +in the given scope of the GScanner. The function is passed +the symbol and value of each pair, and the given user_data +parameter.

- - + - + - +

scanner :

a GScanner. +a GScanner

scope_id :

the scope id. -the scope id

func :

the function to call for each symbol/value pair. -the function to call for each symbol/value pair

user_data :

user data to pass to the function. -user data to pass to the function

-
+

g_scanner_scope_lookup_symbol ()

-
gpointer            g_scanner_scope_lookup_symbol       (GScanner *scanner,
-                                                         guint scope_id,
-                                                         const gchar *symbol);
+
gpointer            g_scanner_scope_lookup_symbol       (GScanner *scanner,
+                                                         guint scope_id,
+                                                         const gchar *symbol);

Looks up a symbol in a scope and return its value. If the symbol is not bound in the scope, NULL is returned. @@ -892,34 +844,31 @@ symbol is not bound in the scope, scanner :

-a GScanner. +a GScanner

scope_id :

-the scope id. - +the scope id

symbol :

-the symbol to look up. - +the symbol to look up

Returns :

the value of symbol in the given scope, or NULL -if symbol is not bound in the given scope. - +if symbol is not bound in the given scope.

-
+

g_scanner_scope_remove_symbol ()

-
void                g_scanner_scope_remove_symbol       (GScanner *scanner,
-                                                         guint scope_id,
-                                                         const gchar *symbol);
+
void                g_scanner_scope_remove_symbol       (GScanner *scanner,
+                                                         guint scope_id,
+                                                         const gchar *symbol);

Removes a symbol from a scope.

@@ -928,27 +877,25 @@ Removes a symbol from a scope.

scanner :

-a GScanner. +a GScanner

scope_id :

-the scope id. - +the scope id

symbol :

-the symbol to remove. - +the symbol to remove

-
+

g_scanner_add_symbol()

#define             g_scanner_add_symbol( scanner, symbol, value )
-
+

Warning

g_scanner_add_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_add_symbol() instead.

@@ -960,27 +907,25 @@ Adds a symbol to the default scope.

scanner :

-a GScanner. +a GScanner

symbol :

-the symbol to add. - +the symbol to add

value :

-the value of the symbol. - +the value of the symbol

-
+

g_scanner_remove_symbol()

#define             g_scanner_remove_symbol( scanner, symbol )
-
+

Warning

g_scanner_remove_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_remove_symbol() instead.

@@ -992,22 +937,21 @@ Removes a symbol from the default scope.

scanner :

-a GScanner. +a GScanner

symbol :

-the symbol to remove. - +the symbol to remove

-
+

g_scanner_foreach_symbol()

#define             g_scanner_foreach_symbol( scanner, func, data )
-
+

Warning

g_scanner_foreach_symbol has been deprecated since version 2.2 and should not be used in newly-written code. Use g_scanner_scope_foreach_symbol() instead.

@@ -1019,27 +963,25 @@ Calls a function for each symbol in the default scope.

scanner :

-a GScanner. +a GScanner

func :

-the function to call with each symbol. - +the function to call with each symbol

data :

-data to pass to the function. - +data to pass to the function

-
+

g_scanner_freeze_symbol_table()

#define             g_scanner_freeze_symbol_table(scanner)
-
+

Warning

g_scanner_freeze_symbol_table has been deprecated since version 2.2 and should not be used in newly-written code. This macro does nothing.

@@ -1050,16 +992,16 @@ There is no reason to use this macro, since it does nothing.

scanner :

-a GScanner. +a GScanner

-
+

g_scanner_thaw_symbol_table()

#define             g_scanner_thaw_symbol_table(scanner)
-
+

Warning

g_scanner_thaw_symbol_table has been deprecated since version 2.2 and should not be used in newly-written code. This macro does nothing.

@@ -1070,178 +1012,166 @@ There is no reason to use this macro, since it does nothing.

scanner :

-a GScanner. +a GScanner

-
+

g_scanner_lookup_symbol ()

-
gpointer            g_scanner_lookup_symbol             (GScanner *scanner,
-                                                         const gchar *symbol);
+
gpointer            g_scanner_lookup_symbol             (GScanner *scanner,
+                                                         const gchar *symbol);

-Looks up a symbol in the current scope and return its value. If the -symbol is not bound in the current scope, NULL is returned. +Looks up a symbol in the current scope and return its value. +If the symbol is not bound in the current scope, NULL is +returned.

- - + +if symbol is not bound in the current scope

scanner :

a GScanner. +a GScanner

symbol :

the symbol to look up. -the symbol to look up

Returns :

the value of symbol in the current scope, or NULL -if symbol is not bound in the current scope. -

-
+

g_scanner_warn ()

-
void                g_scanner_warn                      (GScanner *scanner,
-                                                         const gchar *format,
-                                                         ...);
+
void                g_scanner_warn                      (GScanner *scanner,
+                                                         const gchar *format,
+                                                         ...);

-Outputs a warning message, via the GScanner message handler. +Outputs a warning message, via the GScanner message handler.

- - + - +

scanner :

a GScanner. +a GScanner

format :

the message format. See the printf() -documentation. -the message format. See the printf() documentation

... :

the parameters to insert into the format string. -the parameters to insert into the format string

-
+

g_scanner_error ()

-
void                g_scanner_error                     (GScanner *scanner,
-                                                         const gchar *format,
-                                                         ...);
+
void                g_scanner_error                     (GScanner *scanner,
+                                                         const gchar *format,
+                                                         ...);

-Outputs an error message, via the GScanner message handler. +Outputs an error message, via the GScanner message handler.

- - + - +

scanner :

a GScanner. +a GScanner

format :

the message format. See the printf() -documentation. -the message format. See the printf() documentation

... :

the parameters to insert into the format string. -the parameters to insert into the format string

-
+

g_scanner_unexp_token ()

-
void                g_scanner_unexp_token               (GScanner *scanner,
-                                                         GTokenType expected_token,
-                                                         const gchar *identifier_spec,
-                                                         const gchar *symbol_spec,
-                                                         const gchar *symbol_name,
-                                                         const gchar *message,
-                                                         gint is_error);
-

-Outputs a message through the scanner's msg_handler, resulting from an -unexpected token in the input stream. -Note that you should not call g_scanner_peek_next_token() followed by -g_scanner_unexp_token() without an intermediate call to -g_scanner_get_next_token(), as g_scanner_unexp_token() evaluates the -scanner's current token (not the peeked token) to construct part -of the message. +

void                g_scanner_unexp_token               (GScanner *scanner,
+                                                         GTokenType expected_token,
+                                                         const gchar *identifier_spec,
+                                                         const gchar *symbol_spec,
+                                                         const gchar *symbol_name,
+                                                         const gchar *message,
+                                                         gint is_error);
+

+Outputs a message through the scanner's msg_handler, +resulting from an unexpected token in the input stream. +Note that you should not call g_scanner_peek_next_token() +followed by g_scanner_unexp_token() without an intermediate +call to g_scanner_get_next_token(), as g_scanner_unexp_token() +evaluates the scanner's current token (not the peeked token) +to construct part of the message.

- - + - + - + - + - + - +

scanner :

a GScanner. +a GScanner

expected_token :

the expected token. -the expected token

identifier_spec :

a string describing how the scanner's user refers to - identifiers (NULL defaults to "identifier"). - This is used if expected_token is G_TOKEN_IDENTIFIER - or G_TOKEN_IDENTIFIER_NULL. -a string describing how the scanner's user +refers to identifiers (NULL defaults to "identifier"). +This is used if expected_token is G_TOKEN_IDENTIFIER or +G_TOKEN_IDENTIFIER_NULL.

symbol_spec :

a string describing how the scanner's user refers to - symbols (NULL defaults to "symbol"). - This is used if expected_token is G_TOKEN_SYMBOL or - any token value greater than G_TOKEN_LAST. -a string describing how the scanner's user refers +to symbols (NULL defaults to "symbol"). This is used if +expected_token is G_TOKEN_SYMBOL or any token value greater +than G_TOKEN_LAST.

symbol_name :

the name of the symbol, if the scanner's current token - is a symbol. -the name of the symbol, if the scanner's current +token is a symbol.

message :

a message string to output at the end of the warning/error, or NULL. -a message string to output at the end of the +warning/error, or NULL.

is_error :

if TRUE it is output as an error. If FALSE it is output as a - warning. -if TRUE it is output as an error. If FALSE it is +output as a warning.

-
+

GScannerMsgFunc ()

-
void                (*GScannerMsgFunc)                  (GScanner *scanner,
-                                                         gchar *message,
-                                                         gboolean error);
+
void                (*GScannerMsgFunc)                  (GScanner *scanner,
+                                                         gchar *message,
+                                                         gboolean error);

Specifies the type of the message handler function.

@@ -1250,79 +1180,76 @@ Specifies the type of the message handler function.

scanner :

-a GScanner. +a GScanner

message :

-the message. - +the message

error :

-TRUE if the message signals an error, FALSE if it - signals a warning. - +TRUE if the message signals an error, +FALSE if it signals a warning.

-
+

G_CSET_a_2_z

#define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz"
 

The set of lowercase ASCII alphabet characters. -Used for specifying valid identifier characters in GScannerConfig. +Used for specifying valid identifier characters +in GScannerConfig.


-
+

G_CSET_A_2_Z

#define G_CSET_A_2_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 

The set of uppercase ASCII alphabet characters. -Used for specifying valid identifier characters in GScannerConfig. +Used for specifying valid identifier characters +in GScannerConfig.


-
+

G_CSET_DIGITS

#define G_CSET_DIGITS "0123456789"
 
-

-The set of digits. -Used for specifying valid identifier characters in GScannerConfig. -


-
+

G_CSET_LATINC

#define             G_CSET_LATINC

-The set of uppercase ISO 8859-1 alphabet characters which are -not ASCII characters. -Used for specifying valid identifier characters in GScannerConfig. +The set of uppercase ISO 8859-1 alphabet characters +which are not ASCII characters. +Used for specifying valid identifier characters +in GScannerConfig.


-
+

G_CSET_LATINS

#define             G_CSET_LATINS

-The set of lowercase ISO 8859-1 alphabet characters which are -not ASCII characters. -Used for specifying valid identifier characters in GScannerConfig. +The set of lowercase ISO 8859-1 alphabet characters +which are not ASCII characters. +Used for specifying valid identifier characters +in GScannerConfig.


-
+

enum GTokenType

-
typedef enum
-{
+
typedef enum {
   G_TOKEN_EOF			=   0,
   
   G_TOKEN_LEFT_PAREN		= '(',
@@ -1352,42 +1279,47 @@ Used for specifying valid identifier characters in g_scanner_get_next_token() call.
+The possible types of token returned from each
+g_scanner_get_next_token() call.
 

- - + + + + - -

G_TOKEN_EOF

the end of the file. +the end of the file

G_TOKEN_LEFT_PAREN

a '(' character. +a '(' character +

G_TOKEN_RIGHT_PAREN

a ')' character

G_TOKEN_LEFT_CURLY

a '{' character. +a '{' character

G_TOKEN_RIGHT_CURLY

a '}' character. +a '}' character

-
-
+

enum GErrorType

-
typedef enum
-{
+
typedef enum {
   G_ERR_UNKNOWN,
   G_ERR_UNEXP_EOF,
   G_ERR_UNEXP_EOF_IN_STRING,
@@ -1423,50 +1407,50 @@ A union holding the value of the token.
 } GErrorType;
 

-The possible errors, used in the v_error field -of GTokenValue, when the token is a G_TOKEN_ERROR. +The possible errors, used in the v_error field +of GTokenValue, when the token is a G_TOKEN_ERROR.

- - - - - - - - @@ -1476,6 +1460,6 @@ of
- Generated by GTK-Doc V1.13 + Generated by GTK-Doc V1.18 \ No newline at end of file

G_ERR_UNKNOWN

unknown error. +unknown error

G_ERR_UNEXP_EOF

unexpected end of file. +unexpected end of file

G_ERR_UNEXP_EOF_IN_STRING

unterminated string constant. +unterminated string constant

G_ERR_UNEXP_EOF_IN_COMMENT

unterminated comment. +unterminated comment

G_ERR_NON_DIGIT_IN_CONST

non-digit character in a number. +non-digit character in a number

G_ERR_DIGIT_RADIX

digit beyond radix in a number. +digit beyond radix in a number

G_ERR_FLOAT_RADIX

non-decimal floating point number. +non-decimal floating point number

G_ERR_FLOAT_MALFORMED

malformed floating point number. +malformed floating point number