gscanner.h File Reference

API published in:
API deprecated in:


#include <_ansi.h>
#include <glib/gdataset.h>
#include <glib/ghash.h>

Go to the source code of this file.


Data Structures

union   _GTokenValue
struct   _GScannerConfig
struct   _GScanner

Defines

#define  G_CSET_A_2_Z   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define  G_CSET_a_2_z   "abcdefghijklmnopqrstuvwxyz"
#define  G_CSET_DIGITS   "0123456789"
#define  G_CSET_LATINC
#define  G_CSET_LATINS
#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)   ((void)0)
#define  g_scanner_thaw_symbol_table(scanner)   ((void)0)

Typedefs

typedef typedefG_BEGIN_DECLS
struct _GScanner 
GScanner
typedef _GScannerConfig  GScannerConfig
typedef _GTokenValue  GTokenValue
typedef void(*  GScannerMsgFunc )(GScanner *scanner, gchar *message, gboolean error)

Enumerations

enum   GErrorType {
  G_ERR_UNKNOWN, G_ERR_UNEXP_EOF, G_ERR_UNEXP_EOF_IN_STRING, G_ERR_UNEXP_EOF_IN_COMMENT,
  G_ERR_NON_DIGIT_IN_CONST, G_ERR_DIGIT_RADIX, G_ERR_FLOAT_RADIX, G_ERR_FLOAT_MALFORMED
}
enum   GTokenType {
  G_TOKEN_EOF = 0, G_TOKEN_LEFT_PAREN = '(', G_TOKEN_RIGHT_PAREN = ')', G_TOKEN_LEFT_CURLY = '{',
  G_TOKEN_RIGHT_CURLY = '}', G_TOKEN_LEFT_BRACE = '[', G_TOKEN_RIGHT_BRACE = ']', G_TOKEN_EQUAL_SIGN = '=',
  G_TOKEN_COMMA = ',', G_TOKEN_NONE = 256, G_TOKEN_ERROR, G_TOKEN_CHAR,
  G_TOKEN_BINARY, G_TOKEN_OCTAL, G_TOKEN_INT, G_TOKEN_HEX,
  G_TOKEN_FLOAT, G_TOKEN_STRING, G_TOKEN_SYMBOL, G_TOKEN_IDENTIFIER,
  G_TOKEN_IDENTIFIER_NULL, G_TOKEN_COMMENT_SINGLE, G_TOKEN_COMMENT_MULTI, G_TOKEN_LAST
}

Functions

IMPORT_C GScanner g_scanner_new (const GScannerConfig *config_templ)
IMPORT_C void  g_scanner_destroy (GScanner *scanner)
IMPORT_C void  g_scanner_input_file (GScanner *scanner, gint input_fd)
IMPORT_C void  g_scanner_sync_file_offset (GScanner *scanner)
IMPORT_C void  g_scanner_input_text (GScanner *scanner, const gchar *text, guint text_len)
IMPORT_C GTokenType  g_scanner_get_next_token (GScanner *scanner)
IMPORT_C GTokenType  g_scanner_peek_next_token (GScanner *scanner)
IMPORT_C GTokenType  g_scanner_cur_token (GScanner *scanner)
IMPORT_C GTokenValue  g_scanner_cur_value (GScanner *scanner)
IMPORT_C guint  g_scanner_cur_line (GScanner *scanner)
IMPORT_C guint  g_scanner_cur_position (GScanner *scanner)
IMPORT_C gboolean  g_scanner_eof (GScanner *scanner)
IMPORT_C guint  g_scanner_set_scope (GScanner *scanner, guint scope_id)
IMPORT_C void  g_scanner_scope_add_symbol (GScanner *scanner, guint scope_id, const gchar *symbol, gpointer value)
IMPORT_C void  g_scanner_scope_remove_symbol (GScanner *scanner, guint scope_id, const gchar *symbol)
IMPORT_C gpointer  g_scanner_scope_lookup_symbol (GScanner *scanner, guint scope_id, const gchar *symbol)
IMPORT_C void  g_scanner_scope_foreach_symbol (GScanner *scanner, guint scope_id, GHFunc func, gpointer user_data)
IMPORT_C gpointer  g_scanner_lookup_symbol (GScanner *scanner, const gchar *symbol)
IMPORT_C 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)
IMPORT_C void  g_scanner_error (GScanner *scanner, const gchar *format,...) G_GNUC_PRINTF(2
IMPORT_C void IMPORT_C void  g_scanner_warn (GScanner *scanner, const gchar *format,...) G_GNUC_PRINTF(2

Define Documentation

#define G_CSET_a_2_z   "abcdefghijklmnopqrstuvwxyz"
 
#define G_CSET_A_2_Z   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 
#define G_CSET_DIGITS   "0123456789"
 
#define G_CSET_LATINC
 

Value:

"\300\301\302\303\304\305\306"\
                        "\307\310\311\312\313\314\315\316\317\320"\
                        "\321\322\323\324\325\326"\
                        "\330\331\332\333\334\335\336"
#define G_CSET_LATINS
 

Value:

"\337\340\341\342\343\344\345\346"\
                        "\347\350\351\352\353\354\355\356\357\360"\
                        "\361\362\363\364\365\366"\
                        "\370\371\372\373\374\375\376\377"
#define g_scanner_add_symbol scanner,
symbol,
value   ) 
 

Value:

G_STMT_START { \
  g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \
} G_STMT_END
#define g_scanner_foreach_symbol scanner,
func,
data   ) 
 

Value:

G_STMT_START { \
  g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \
} G_STMT_END
#define g_scanner_freeze_symbol_table scanner   )     ((void)0)
 
#define g_scanner_remove_symbol scanner,
symbol   ) 
 

Value:

G_STMT_START { \
  g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \
} G_STMT_END
#define g_scanner_thaw_symbol_table scanner   )     ((void)0)
 

Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _GScanner GScanner
 
typedef struct _GScannerConfig GScannerConfig
 
typedef void(* GScannerMsgFunc)(GScanner *scanner, gchar *message, gboolean error)
 
typedef union _GTokenValue GTokenValue
 

Enumeration Type Documentation

enum GErrorType
 
Enumerator:
G_ERR_UNKNOWN 
G_ERR_UNEXP_EOF 
G_ERR_UNEXP_EOF_IN_STRING 
G_ERR_UNEXP_EOF_IN_COMMENT 
G_ERR_NON_DIGIT_IN_CONST 
G_ERR_DIGIT_RADIX 
G_ERR_FLOAT_RADIX 
G_ERR_FLOAT_MALFORMED 
enum GTokenType
 
Enumerator:
G_TOKEN_EOF 
G_TOKEN_LEFT_PAREN 
G_TOKEN_RIGHT_PAREN 
G_TOKEN_LEFT_CURLY 
G_TOKEN_RIGHT_CURLY 
G_TOKEN_LEFT_BRACE 
G_TOKEN_RIGHT_BRACE 
G_TOKEN_EQUAL_SIGN 
G_TOKEN_COMMA 
G_TOKEN_NONE 
G_TOKEN_ERROR 
G_TOKEN_CHAR 
G_TOKEN_BINARY 
G_TOKEN_OCTAL 
G_TOKEN_INT 
G_TOKEN_HEX 
G_TOKEN_FLOAT 
G_TOKEN_STRING 
G_TOKEN_SYMBOL 
G_TOKEN_IDENTIFIER 
G_TOKEN_IDENTIFIER_NULL 
G_TOKEN_COMMENT_SINGLE 
G_TOKEN_COMMENT_MULTI 
G_TOKEN_LAST 

Function Documentation

IMPORT_C guint g_scanner_cur_line GScanner scanner  ) 
 
IMPORT_C guint g_scanner_cur_position GScanner scanner  ) 
 
IMPORT_C GTokenType g_scanner_cur_token GScanner scanner  ) 
 
IMPORT_C GTokenValue g_scanner_cur_value GScanner scanner  ) 
 
IMPORT_C void g_scanner_destroy GScanner scanner  ) 
 
IMPORT_C gboolean g_scanner_eof GScanner scanner  ) 
 
IMPORT_C void g_scanner_error GScanner scanner,
const gchar format,
  ...
 
IMPORT_C GTokenType g_scanner_get_next_token GScanner scanner  ) 
 
IMPORT_C void g_scanner_input_file GScanner scanner,
gint  input_fd
 
IMPORT_C void g_scanner_input_text GScanner scanner,
const gchar text,
guint  text_len
 
IMPORT_C gpointer g_scanner_lookup_symbol GScanner scanner,
const gchar symbol
 
IMPORT_C GScanner* g_scanner_new const GScannerConfig config_templ  ) 
 
IMPORT_C GTokenType g_scanner_peek_next_token GScanner scanner  ) 
 
IMPORT_C void g_scanner_scope_add_symbol GScanner scanner,
guint  scope_id,
const gchar symbol,
gpointer  value
 
IMPORT_C void g_scanner_scope_foreach_symbol GScanner scanner,
guint  scope_id,
GHFunc  func,
gpointer  user_data
 
IMPORT_C gpointer g_scanner_scope_lookup_symbol GScanner scanner,
guint  scope_id,
const gchar symbol
 
IMPORT_C void g_scanner_scope_remove_symbol GScanner scanner,
guint  scope_id,
const gchar symbol
 
IMPORT_C guint g_scanner_set_scope GScanner scanner,
guint  scope_id
 
IMPORT_C void g_scanner_sync_file_offset GScanner scanner  ) 
 
IMPORT_C 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
 
IMPORT_C void IMPORT_C void g_scanner_warn GScanner scanner,
const gchar format,
  ...
 

Copyright © Nokia Corporation 2001-2008
Back to top