PageRenderTime 26ms CodeModel.GetById 17ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/glib/library/utilities/glib_lexical_scanner.e

http://github.com/tybor/Liberty
Specman e | 800 lines | 2 code | 247 blank | 551 comment | 0 complexity | 968946d95ca8f81b334a49d863075d14 MD5 | raw file
  1deferred class GLIB_LEXICAL_SCANNER
  2--    Lexical Scanner
  3
  4--    Lexical Scanner -- a general purpose lexical scanner.
  5
  6-- Synopsis
  7
  8
  9--  #include <glib.h>
 10
 11
 12--              GScanner;
 13--  GScanner*   g_scanner_new                   (const GScannerConfig *config_templ);
 14--              GScannerConfig;
 15
 16--  void        g_scanner_input_file            (GScanner *scanner,
 17--                                               gint input_fd);
 18--  void        g_scanner_sync_file_offset      (GScanner *scanner);
 19--  void        g_scanner_input_text            (GScanner *scanner,
 20--                                               const gchar *text,
 21--                                               guint text_len);
 22--  GTokenType  g_scanner_peek_next_token       (GScanner *scanner);
 23--  GTokenType  g_scanner_get_next_token        (GScanner *scanner);
 24
 25--  guint       g_scanner_cur_line              (GScanner *scanner);
 26--  guint       g_scanner_cur_position          (GScanner *scanner);
 27--  GTokenType  g_scanner_cur_token             (GScanner *scanner);
 28--  GTokenValue g_scanner_cur_value             (GScanner *scanner);
 29--  gboolean    g_scanner_eof                   (GScanner *scanner);
 30
 31--  guint       g_scanner_set_scope             (GScanner *scanner,
 32--                                               guint scope_id);
 33--  void        g_scanner_scope_add_symbol      (GScanner *scanner,
 34--                                               guint scope_id,
 35--                                               const gchar *symbol,
 36--                                               gpointer value);
 37--  void        g_scanner_scope_foreach_symbol  (GScanner *scanner,
 38--                                               guint scope_id,
 39--                                               GHFunc func,
 40--                                               gpointer user_data);
 41--  gpointer    g_scanner_scope_lookup_symbol   (GScanner *scanner,
 42--                                               guint scope_id,
 43--                                               const gchar *symbol);
 44--  void        g_scanner_scope_remove_symbol   (GScanner *scanner,
 45--                                               guint scope_id,
 46--                                               const gchar *symbol);
 47
 48--  #define     g_scanner_freeze_symbol_table   (scanner)
 49--  #define     g_scanner_thaw_symbol_table     (scanner)
 50--  gpointer    g_scanner_lookup_symbol         (GScanner *scanner,
 51--                                               const gchar *symbol);
 52
 53--  void        g_scanner_warn                  (GScanner *scanner,
 54--                                               const gchar *format,
 55--                                               ...);
 56--  void        g_scanner_error                 (GScanner *scanner,
 57--                                               const gchar *format,
 58--                                               ...);
 59--  void        g_scanner_unexp_token           (GScanner *scanner,
 60--                                               GTokenType expected_token,
 61--                                               const gchar *identifier_spec,
 62--                                               const gchar *symbol_spec,
 63--                                               const gchar *symbol_name,
 64--                                               const gchar *message,
 65--                                               gint is_error);
 66--  void        (*GScannerMsgFunc)              (GScanner *scanner,
 67--                                               gchar *message,
 68--                                               gboolean error);
 69
 70--  void        g_scanner_destroy               (GScanner *scanner);
 71
 72--  enum        GTokenType;
 73--  union       GTokenValue;
 74--  enum        GErrorType;
 75--  #define     G_CSET_a_2_z
 76--  #define     G_CSET_A_2_Z
 77--  #define     G_CSET_DIGITS
 78--  #define     G_CSET_LATINC
 79--  #define     G_CSET_LATINS
 80
 81--  #define     g_scanner_add_symbol            ( scanner, symbol, value )
 82--  #define     g_scanner_remove_symbol         ( scanner, symbol )
 83--  #define     g_scanner_foreach_symbol        ( scanner, func, data )
 84
 85-- Description
 86
 87--    The GScanner and its associated functions provide a general purpose lexical
 88--    scanner.
 89
 90-- Details
 91
 92--   GScanner
 93
 94--  typedef struct {
 95--    /* unused fields */
 96--    gpointer              user_data;
 97--    guint                 max_parse_errors;
 98
 99--    /* g_scanner_error() increments this field */
100--    guint                 parse_errors;
101
102--    /* name of input stream, featured by the default message handler */
103--    const gchar           *input_name;
104
105--    /* quarked data */
106--    GData                 *qdata;
107
108--    /* link into the scanner configuration */
109--    GScannerConfig        *config;
110
111--    /* fields filled in after g_scanner_get_next_token() */
112--    GTokenType            token;
113--    GTokenValue           value;
114--    guint                 line;
115--    guint                 position;
116
117--    /* fields filled in after g_scanner_peek_next_token() */
118--    GTokenType            next_token;
119--    GTokenValue           next_value;
120--    guint                 next_line;
121--    guint                 next_position;
122
123--    /* to be considered private */
124--    GHashTable            *symbol_table;
125--    gint                  input_fd;
126--    const gchar           *text;
127--    const gchar           *text_end;
128--    gchar                 *buffer;
129--    guint                 scope_id;
130
131--    /* handler function for _warn and _error */
132--    GScannerMsgFunc       msg_handler;
133--  } GScanner;
134
135--    The data structure representing a lexical scanner.
136
137--    You should set input_name after creating the scanner, since it is used by the
138--    default message handler when displaying warnings and errors. If you are scanning
139--    a file, the file name would be a good choice.
140
141--    The user_data and max_parse_errors fields are not used. If you need to associate
142--    extra data with the scanner you can place them here.
143
144--    If you want to use your own message handler you can set the msg_handler field.
145--    The type of the message handler function is declared by GScannerMsgFunc.
146
147--    ---------------------------------------------------------------------------------
148
149--   g_scanner_new ()
150
151--  GScanner*   g_scanner_new                   (const GScannerConfig *config_templ);
152
153--    Creates a new GScanner. The config_templ structure specifies the initial settings
154--    of the scanner, which are copied into the GScanner config field. If you pass NULL
155--    then the default settings are used.
156
157--    config_templ : the initial scanner settings.
158--    Returns :      the new GScanner.
159
160--    ---------------------------------------------------------------------------------
161
162--   GScannerConfig
163
164--  typedef struct {
165--    /* Character sets
166--     */
167--    gchar         *cset_skip_characters;          /* default: " \t\n" */
168--    gchar         *cset_identifier_first;
169--    gchar         *cset_identifier_nth;
170--    gchar         *cpair_comment_single;          /* default: "#\n" */
171
172--    /* Should symbol lookup work case sensitive?
173--     */
174--    guint         case_sensitive : 1;
175
176--    /* Boolean values to be adjusted "on the fly"
177--     * to configure scanning behaviour.
178--     */
179--    guint         skip_comment_multi : 1;         /* C like comment */
180--    guint         skip_comment_single : 1;        /* single line comment */
181--    guint         scan_comment_multi : 1;         /* scan multi line comments? */
182--    guint         scan_identifier : 1;
183--    guint         scan_identifier_1char : 1;
184--    guint         scan_identifier_NULL : 1;
185--    guint         scan_symbols : 1;
186--    guint         scan_binary : 1;
187--    guint         scan_octal : 1;
188--    guint         scan_float : 1;
189--    guint         scan_hex : 1;                   /* `0x0ff0' */
190--    guint         scan_hex_dollar : 1;            /* `$0ff0' */
191--    guint         scan_string_sq : 1;             /* string: 'anything' */
192--    guint         scan_string_dq : 1;             /* string: "\\-escapes!\n" */
193--    guint         numbers_2_int : 1;              /* bin, octal, hex => int */
194--    guint         int_2_float : 1;                /* int => G_TOKEN_FLOAT? */
195--    guint         identifier_2_string : 1;
196--    guint         char_2_token : 1;               /* return G_TOKEN_CHAR? */
197--    guint         symbol_2_token : 1;
198--    guint         scope_0_fallback : 1;           /* try scope 0 on lookups? */
199--    guint         store_int64 : 1;                /* use value.v_int64 rather than v_int */
200--    guint         padding_dummy;
201--  } GScannerConfig;
202
203--    Specifies the GScanner settings.
204
205--    cset_skip_characters specifies which characters should be skipped by the scanner
206--    (the default is the whitespace characters: space, tab, carriage-return and
207--    line-feed).
208
209--    cset_identifier_first specifies the characters which can start identifiers (the
210--    default is G_CSET_a_2_z, "_", and G_CSET_A_2_Z).
211
212--    cset_identifier_nth specifies the characters which can be used in identifiers,
213--    after the first character (the default is G_CSET_a_2_z, "_0123456789",
214--    G_CSET_A_2_Z, G_CSET_LATINS, G_CSET_LATINC).
215
216--    cpair_comment_single specifies the characters at the start and end of single-line
217--    comments. The default is "#\n" which means that single-line comments start with a
218--    '#' and continue until a '\n' (end of line).
219
220--    case_sensitive specifies if symbols are case sensitive (the default is FALSE).
221
222--    skip_comment_multi specifies if multi-line comments are skipped and not returned
223--    as tokens (the default is TRUE).
224
225--    skip_comment_single specifies if single-line comments are skipped and not
226--    returned as tokens (the default is TRUE).
227
228--    scan_comment_multi specifies if multi-line comments are recognized (the default
229--    is TRUE).
230
231--    scan_identifier specifies if identifiers are recognized (the default is TRUE).
232
233--    scan_identifier_1char specifies if single-character identifiers are recognized
234--    (the default is FALSE).
235
236--    scan_identifier_NULL specifies if NULL is reported as G_TOKEN_IDENTIFIER_NULL.
237--    (the default is FALSE).
238
239--    scan_symbols specifies if symbols are recognized (the default is TRUE).
240
241--    scan_binary specifies if binary numbers are recognized (the default is FALSE).
242
243--    scan_octal specifies if octal numbers are recognized (the default is TRUE).
244
245--    scan_float specifies if floating point numbers are recognized (the default is
246--    TRUE).
247
248--    scan_hex specifies if hexadecimal numbers are recognized (the default is TRUE).
249
250--    scan_hex_dollar specifies if '$' is recognized as a prefix for hexadecimal
251--    numbers (the default is FALSE).
252
253--    scan_string_sq specifies if strings can be enclosed in single quotes (the default
254--    is TRUE).
255
256--    scan_string_dq specifies if strings can be enclosed in double quotes (the default
257--    is TRUE).
258
259--    numbers_2_int specifies if binary, octal and hexadecimal numbers are reported as
260--    G_TOKEN_INT (the default is TRUE).
261
262--    int_2_float specifies if all numbers are reported as G_TOKEN_FLOAT (the default
263--    is FALSE).
264
265--    identifier_2_string specifies if identifiers are reported as strings (the default
266--    is FALSE).
267
268--    char_2_token specifies if characters are reported by setting token = ch or as
269--    G_TOKEN_CHAR (the default is TRUE).
270
271--    symbol_2_token specifies if symbols are reported by setting token = v_symbol or
272--    as G_TOKEN_SYMBOL (the default is FALSE).
273
274--    scope_0_fallback specifies if a symbol is searched for in the default scope in
275--    addition to the current scope (the default is FALSE).
276
277--    ---------------------------------------------------------------------------------
278
279--   g_scanner_input_file ()
280
281--  void        g_scanner_input_file            (GScanner *scanner,
282--                                               gint input_fd);
283
284--    Prepares to scan a file.
285
286--    scanner :  a GScanner.
287--    input_fd : a file descriptor.
288
289--    ---------------------------------------------------------------------------------
290
291--   g_scanner_sync_file_offset ()
292
293--  void        g_scanner_sync_file_offset      (GScanner *scanner);
294
295--    Rewinds the filedescriptor to the current buffer position and blows the file read
296--    ahead buffer. This is useful for third party uses of the scanners filedescriptor,
297--    which hooks onto the current scanning position.
298
299--    scanner : a GScanner.
300
301--    ---------------------------------------------------------------------------------
302
303--   g_scanner_input_text ()
304
305--  void        g_scanner_input_text            (GScanner *scanner,
306--                                               const gchar *text,
307--                                               guint text_len);
308
309--    Prepares to scan a text buffer.
310
311--    scanner :  a GScanner.
312--    text :     the text buffer to scan.
313--    text_len : the length of the text buffer.
314
315--    ---------------------------------------------------------------------------------
316
317--   g_scanner_peek_next_token ()
318
319--  GTokenType  g_scanner_peek_next_token       (GScanner *scanner);
320
321--    Gets the next token, without removing it from the input stream. The token data is
322--    placed in the next_token, next_value, next_line, and next_position fields of the
323--    GScanner structure.
324
325--    Note that, while the token is not removed from the input stream (i.e. the next
326--    call to g_scanner_get_next_token() will return the same token), it will not be
327--    reevaluated. This can lead to surprising results when changing scope after
328--    peeking for the next token. Getting the next token after switching the scope will
329--    return whatever was peeked before, regardless of any symbols that may have been
330--    added or removed in the new scope.
331
332--    scanner : a GScanner.
333--    Returns : the type of the token.
334
335--    ---------------------------------------------------------------------------------
336
337--   g_scanner_get_next_token ()
338
339--  GTokenType  g_scanner_get_next_token        (GScanner *scanner);
340
341--    Gets the next token, removing it from the input stream. The token data is placed
342--    in the token, value, line, and position fields of the GScanner structure.
343
344--    scanner : a GScanner.
345--    Returns : the type of the token.
346
347--    ---------------------------------------------------------------------------------
348
349--   g_scanner_cur_line ()
350
351--  guint       g_scanner_cur_line              (GScanner *scanner);
352
353--    Gets the current line in the input stream (counting from 1).
354
355--    scanner : a GScanner.
356--    Returns : the current line.
357
358--    ---------------------------------------------------------------------------------
359
360--   g_scanner_cur_position ()
361
362--  guint       g_scanner_cur_position          (GScanner *scanner);
363
364--    Gets the current position in the current line (counting from 0).
365
366--    scanner : a GScanner.
367--    Returns : the current position on the line.
368
369--    ---------------------------------------------------------------------------------
370
371--   g_scanner_cur_token ()
372
373--  GTokenType  g_scanner_cur_token             (GScanner *scanner);
374
375--    Gets the current token type. This is simply the token field in the GScanner
376--    structure.
377
378--    scanner : a GScanner.
379--    Returns : the current token type.
380
381--    ---------------------------------------------------------------------------------
382
383--   g_scanner_cur_value ()
384
385--  GTokenValue g_scanner_cur_value             (GScanner *scanner);
386
387--    Gets the current token value. This is simply the value field in the GScanner
388--    structure.
389
390--    scanner : a GScanner.
391--    Returns : the current token value.
392
393--    ---------------------------------------------------------------------------------
394
395--   g_scanner_eof ()
396
397--  gboolean    g_scanner_eof                   (GScanner *scanner);
398
399--    Returns TRUE if the scanner has reached the end of the file or text buffer.
400
401--    scanner : a GScanner.
402--    Returns : TRUE if the scanner has reached the end of the file or text buffer.
403
404--    ---------------------------------------------------------------------------------
405
406--   g_scanner_set_scope ()
407
408--  guint       g_scanner_set_scope             (GScanner *scanner,
409--                                               guint scope_id);
410
411--    Sets the current scope.
412
413--    scanner :  a GScanner.
414--    scope_id : the new scope id.
415--    Returns :  the old scope id.
416
417--    ---------------------------------------------------------------------------------
418
419--   g_scanner_scope_add_symbol ()
420
421--  void        g_scanner_scope_add_symbol      (GScanner *scanner,
422--                                               guint scope_id,
423--                                               const gchar *symbol,
424--                                               gpointer value);
425
426--    Adds a symbol to the given scope.
427
428--    scanner :  a GScanner.
429--    scope_id : the scope id.
430--    symbol :   the symbol to add.
431--    value :    the value of the symbol.
432
433--    ---------------------------------------------------------------------------------
434
435--   g_scanner_scope_foreach_symbol ()
436
437--  void        g_scanner_scope_foreach_symbol  (GScanner *scanner,
438--                                               guint scope_id,
439--                                               GHFunc func,
440--                                               gpointer user_data);
441
442--    Calls the given function for each of the symbol/value pairs in the given scope of
443--    the GScanner. The function is passed the symbol and value of each pair, and the
444--    given user_data parameter.
445
446--    scanner :   a GScanner.
447--    scope_id :  the scope id.
448--    func :      the function to call for each symbol/value pair.
449--    user_data : user data to pass to the function.
450
451--    ---------------------------------------------------------------------------------
452
453--   g_scanner_scope_lookup_symbol ()
454
455--  gpointer    g_scanner_scope_lookup_symbol   (GScanner *scanner,
456--                                               guint scope_id,
457--                                               const gchar *symbol);
458
459--    Looks up a symbol in a scope and return its value. If the symbol is not bound in
460--    the scope, NULL is returned.
461
462--    scanner :  a GScanner.
463--    scope_id : the scope id.
464--    symbol :   the symbol to look up.
465--    Returns :  the value of symbol in the given scope, or NULL if symbol is not bound
466--               in the given scope.
467
468--    ---------------------------------------------------------------------------------
469
470--   g_scanner_scope_remove_symbol ()
471
472--  void        g_scanner_scope_remove_symbol   (GScanner *scanner,
473--                                               guint scope_id,
474--                                               const gchar *symbol);
475
476--    Removes a symbol from a scope.
477
478--    scanner :  a GScanner.
479--    scope_id : the scope id.
480--    symbol :   the symbol to remove.
481
482--    ---------------------------------------------------------------------------------
483
484--   g_scanner_freeze_symbol_table()
485
486--  #define     g_scanner_freeze_symbol_table(scanner)
487
488--   Warning
489
490--    g_scanner_freeze_symbol_table has been deprecated since version 2.2 and should
491--    not be used in newly-written code. This macro does nothing.
492
493--    scanner : a GScanner.
494
495--    ---------------------------------------------------------------------------------
496
497--   g_scanner_thaw_symbol_table()
498
499--  #define     g_scanner_thaw_symbol_table(scanner)
500
501--   Warning
502
503--    g_scanner_thaw_symbol_table has been deprecated since version 2.2 and should not
504--    be used in newly-written code. This macro does nothing.
505
506--    scanner : a GScanner.
507
508--    ---------------------------------------------------------------------------------
509
510--   g_scanner_lookup_symbol ()
511
512--  gpointer    g_scanner_lookup_symbol         (GScanner *scanner,
513--                                               const gchar *symbol);
514
515--    Looks up a symbol in the current scope and return its value. If the symbol is not
516--    bound in the current scope, NULL is returned.
517
518--    scanner : a GScanner.
519--    symbol :  the symbol to look up.
520--    Returns : the value of symbol in the current scope, or NULL if symbol is not
521--              bound in the current scope.
522
523--    ---------------------------------------------------------------------------------
524
525--   g_scanner_warn ()
526
527--  void        g_scanner_warn                  (GScanner *scanner,
528--                                               const gchar *format,
529--                                               ...);
530
531--    Outputs a warning message, via the GScanner message handler.
532
533--    scanner : a GScanner.
534--    format :  the message format. See the printf() documentation.
535--    ... :     the parameters to insert into the format string.
536
537--    ---------------------------------------------------------------------------------
538
539--   g_scanner_error ()
540
541--  void        g_scanner_error                 (GScanner *scanner,
542--                                               const gchar *format,
543--                                               ...);
544
545--    Outputs an error message, via the GScanner message handler.
546
547--    scanner : a GScanner.
548--    format :  the message format. See the printf() documentation.
549--    ... :     the parameters to insert into the format string.
550
551--    ---------------------------------------------------------------------------------
552
553--   g_scanner_unexp_token ()
554
555--  void        g_scanner_unexp_token           (GScanner *scanner,
556--                                               GTokenType expected_token,
557--                                               const gchar *identifier_spec,
558--                                               const gchar *symbol_spec,
559--                                               const gchar *symbol_name,
560--                                               const gchar *message,
561--                                               gint is_error);
562
563--    Outputs a message through the scanner's msg_handler, resulting from an unexpected
564--    token in the input stream. Note that you should not call
565--    g_scanner_peek_next_token() followed by g_scanner_unexp_token() without an
566--    intermediate call to g_scanner_get_next_token(), as g_scanner_unexp_token()
567--    evaluates the scanner's current token (not the peeked token) to construct part of
568--    the message.
569
570--    scanner :         a GScanner.
571--    expected_token :  the expected token.
572--    identifier_spec : a string describing how the scanner's user refers to
573--                      identifiers (NULL defaults to "identifier"). This is used if
574--                      expected_token is G_TOKEN_IDENTIFIER or
575--                      G_TOKEN_IDENTIFIER_NULL.
576--    symbol_spec :     a string describing how the scanner's user refers to symbols
577--                      (NULL defaults to "symbol"). This is used if expected_token is
578--                      G_TOKEN_SYMBOL or any token value greater than G_TOKEN_LAST.
579--    symbol_name :     the name of the symbol, if the scanner's current token is a
580--                      symbol.
581--    message :         a message string to output at the end of the warning/error, or
582--                      NULL.
583--    is_error :        if TRUE it is output as an error. If FALSE it is output as a
584--                      warning.
585
586--    ---------------------------------------------------------------------------------
587
588--   GScannerMsgFunc ()
589
590--  void        (*GScannerMsgFunc)              (GScanner *scanner,
591--                                               gchar *message,
592--                                               gboolean error);
593
594--    Specifies the type of the message handler function.
595
596--    scanner : a GScanner.
597--    message : the message.
598--    error :   TRUE if the message signals an error, FALSE if it signals a warning.
599
600--    ---------------------------------------------------------------------------------
601
602--   g_scanner_destroy ()
603
604--  void        g_scanner_destroy               (GScanner *scanner);
605
606--    Frees all memory used by the GScanner.
607
608--    scanner : a GScanner.
609
610--    ---------------------------------------------------------------------------------
611
612--   enum GTokenType
613
614--  typedef enum
615--  {
616--    G_TOKEN_EOF                   =   0,
617
618--    G_TOKEN_LEFT_PAREN            = '(',
619--    G_TOKEN_RIGHT_PAREN           = ')',
620--    G_TOKEN_LEFT_CURLY            = '{',
621--    G_TOKEN_RIGHT_CURLY           = '}',
622--    G_TOKEN_LEFT_BRACE            = '[',
623--    G_TOKEN_RIGHT_BRACE           = ']',
624--    G_TOKEN_EQUAL_SIGN            = '=',
625--    G_TOKEN_COMMA                 = ',',
626
627--    G_TOKEN_NONE                  = 256,
628
629--    G_TOKEN_ERROR,
630
631--    G_TOKEN_CHAR,
632--    G_TOKEN_BINARY,
633--    G_TOKEN_OCTAL,
634--    G_TOKEN_INT,
635--    G_TOKEN_HEX,
636--    G_TOKEN_FLOAT,
637--    G_TOKEN_STRING,
638
639--    G_TOKEN_SYMBOL,
640--    G_TOKEN_IDENTIFIER,
641--    G_TOKEN_IDENTIFIER_NULL,
642
643--    G_TOKEN_COMMENT_SINGLE,
644--    G_TOKEN_COMMENT_MULTI,
645--    G_TOKEN_LAST
646--  } GTokenType;
647
648--    The possible types of token returned from each g_scanner_get_next_token() call.
649
650--    G_TOKEN_EOF         the end of the file.
651--    G_TOKEN_LEFT_PAREN  a '(' character.
652--    G_TOKEN_LEFT_CURLY  a '{' character.
653--    G_TOKEN_RIGHT_CURLY a '}' character.
654
655--    ---------------------------------------------------------------------------------
656
657--   union GTokenValue
658
659--  union GTokenValue
660--  {
661--    gpointer      v_symbol;
662--    gchar         *v_identifier;
663--    gulong        v_binary;
664--    gulong        v_octal;
665--    gulong        v_int;
666--    guint64       v_int64;
667--    gdouble       v_float;
668--    gulong        v_hex;
669--    gchar         *v_string;
670--    gchar         *v_comment;
671--    guchar        v_char;
672--    guint         v_error;
673--  };
674
675--    A union holding the value of the token.
676
677--    ---------------------------------------------------------------------------------
678
679--   enum GErrorType
680
681--  typedef enum
682--  {
683--    G_ERR_UNKNOWN,
684--    G_ERR_UNEXP_EOF,
685--    G_ERR_UNEXP_EOF_IN_STRING,
686--    G_ERR_UNEXP_EOF_IN_COMMENT,
687--    G_ERR_NON_DIGIT_IN_CONST,
688--    G_ERR_DIGIT_RADIX,
689--    G_ERR_FLOAT_RADIX,
690--    G_ERR_FLOAT_MALFORMED
691--  } GErrorType;
692
693--    The possible errors, used in the v_error field of GTokenValue, when the token is
694--    a G_TOKEN_ERROR.
695
696--    G_ERR_UNKNOWN              unknown error.
697--    G_ERR_UNEXP_EOF            unexpected end of file.
698--    G_ERR_UNEXP_EOF_IN_STRING  unterminated string constant.
699--    G_ERR_UNEXP_EOF_IN_COMMENT unterminated comment.
700--    G_ERR_NON_DIGIT_IN_CONST   non-digit character in a number.
701--    G_ERR_DIGIT_RADIX          digit beyond radix in a number.
702--    G_ERR_FLOAT_RADIX          non-decimal floating point number.
703--    G_ERR_FLOAT_MALFORMED      malformed floating point number.
704
705--    ---------------------------------------------------------------------------------
706
707--   G_CSET_a_2_z
708
709--  #define G_CSET_a_2_z    "abcdefghijklmnopqrstuvwxyz"
710
711--    The set of lowercase ASCII alphabet characters. Used for specifying valid
712--    identifier characters in GScannerConfig.
713
714--    ---------------------------------------------------------------------------------
715
716--   G_CSET_A_2_Z
717
718--  #define G_CSET_A_2_Z    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
719
720--    The set of uppercase ASCII alphabet characters. Used for specifying valid
721--    identifier characters in GScannerConfig.
722
723--    ---------------------------------------------------------------------------------
724
725--   G_CSET_DIGITS
726
727--  #define G_CSET_DIGITS   "0123456789"
728
729--    The set of digits. Used for specifying valid identifier characters in
730--    GScannerConfig.
731
732--    ---------------------------------------------------------------------------------
733
734--   G_CSET_LATINC
735
736--  #define     G_CSET_LATINC
737
738--    The set of uppercase ISO 8859-1 alphabet characters which are not ASCII
739--    characters. Used for specifying valid identifier characters in GScannerConfig.
740
741--    ---------------------------------------------------------------------------------
742
743--   G_CSET_LATINS
744
745--  #define     G_CSET_LATINS
746
747--    The set of lowercase ISO 8859-1 alphabet characters which are not ASCII
748--    characters. Used for specifying valid identifier characters in GScannerConfig.
749
750--    ---------------------------------------------------------------------------------
751
752--   g_scanner_add_symbol()
753
754--  #define     g_scanner_add_symbol( scanner, symbol, value )
755
756--   Warning
757
758--    g_scanner_add_symbol has been deprecated since version 2.2 and should not be used
759--    in newly-written code. Use g_scanner_scope_add_symbol() instead.
760
761--    Adds a symbol to the default scope.
762
763--    scanner : a GScanner.
764--    symbol :  the symbol to add.
765--    value :   the value of the symbol.
766
767--    ---------------------------------------------------------------------------------
768
769--   g_scanner_remove_symbol()
770
771--  #define     g_scanner_remove_symbol( scanner, symbol )
772
773--   Warning
774
775--    g_scanner_remove_symbol has been deprecated since version 2.2 and should not be
776--    used in newly-written code. Use g_scanner_scope_remove_symbol() instead.
777
778--    Removes a symbol from the default scope.
779
780--    scanner : a GScanner.
781--    symbol :  the symbol to remove.
782
783--    ---------------------------------------------------------------------------------
784
785--   g_scanner_foreach_symbol()
786
787--  #define     g_scanner_foreach_symbol( scanner, func, data )
788
789--   Warning
790
791--    g_scanner_foreach_symbol has been deprecated since version 2.2 and should not be
792--    used in newly-written code. Use g_scanner_scope_foreach_symbol() instead.
793
794--    Calls a function for each symbol in the default scope.
795
796--    scanner : a GScanner.
797--    func :    the function to call with each symbol.
798--    data :    data to pass to the function.
799end -- class GLIB_LEXICAL_SCANNER
800