~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/imagemap/imap_cern_lex.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#define yy_create_buffer cern__create_buffer
2
 
#define yy_delete_buffer cern__delete_buffer
3
 
#define yy_scan_buffer cern__scan_buffer
4
 
#define yy_scan_string cern__scan_string
5
 
#define yy_scan_bytes cern__scan_bytes
6
 
#define yy_flex_debug cern__flex_debug
7
 
#define yy_init_buffer cern__init_buffer
8
 
#define yy_flush_buffer cern__flush_buffer
9
 
#define yy_load_buffer_state cern__load_buffer_state
10
 
#define yy_switch_to_buffer cern__switch_to_buffer
11
 
#define yyin cern_in
12
 
#define yyleng cern_leng
13
 
#define yylex cern_lex
14
 
#define yyout cern_out
15
 
#define yyrestart cern_restart
16
 
#define yytext cern_text
17
 
 
18
 
#line 19 "imap_cern_lex.c"
 
1
 
 
2
#line 3 "<stdout>"
 
3
 
 
4
#define  YY_INT_ALIGNED short int
 
5
 
19
6
/* A lexical scanner generated by flex */
20
7
 
21
 
/* Scanner skeleton version:
22
 
 * $Header: /cvs/gnome/gimp/plug-ins/imagemap/imap_cern_lex.c,v 1.5 2003/12/26 20:30:36 neo Exp $
23
 
 */
24
 
 
25
8
#define FLEX_SCANNER
26
9
#define YY_FLEX_MAJOR_VERSION 2
27
10
#define YY_FLEX_MINOR_VERSION 5
28
 
 
 
11
#define YY_FLEX_SUBMINOR_VERSION 33
 
12
#if YY_FLEX_SUBMINOR_VERSION > 0
 
13
#define FLEX_BETA
 
14
#endif
 
15
 
 
16
/* First, we deal with  platform-specific or compiler-specific issues. */
 
17
 
 
18
/* begin standard C headers. */
29
19
#include <stdio.h>
30
 
 
31
 
 
32
 
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
33
 
#ifdef c_plusplus
34
 
#ifndef __cplusplus
35
 
#define __cplusplus
36
 
#endif
37
 
#endif
38
 
 
 
20
#include <string.h>
 
21
#include <errno.h>
 
22
#include <stdlib.h>
 
23
 
 
24
/* end standard C headers. */
 
25
 
 
26
/* flex integer type definitions */
 
27
 
 
28
#ifndef FLEXINT_H
 
29
#define FLEXINT_H
 
30
 
 
31
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
32
 
 
33
#if __STDC_VERSION__ >= 199901L
 
34
 
 
35
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 
36
 * if you want the limit (max/min) macros for int types. 
 
37
 */
 
38
#ifndef __STDC_LIMIT_MACROS
 
39
#define __STDC_LIMIT_MACROS 1
 
40
#endif
 
41
 
 
42
#include <inttypes.h>
 
43
typedef int8_t flex_int8_t;
 
44
typedef uint8_t flex_uint8_t;
 
45
typedef int16_t flex_int16_t;
 
46
typedef uint16_t flex_uint16_t;
 
47
typedef int32_t flex_int32_t;
 
48
typedef uint32_t flex_uint32_t;
 
49
#else
 
50
typedef signed char flex_int8_t;
 
51
typedef short int flex_int16_t;
 
52
typedef int flex_int32_t;
 
53
typedef unsigned char flex_uint8_t; 
 
54
typedef unsigned short int flex_uint16_t;
 
55
typedef unsigned int flex_uint32_t;
 
56
#endif /* ! C99 */
 
57
 
 
58
/* Limits of integral types. */
 
59
#ifndef INT8_MIN
 
60
#define INT8_MIN               (-128)
 
61
#endif
 
62
#ifndef INT16_MIN
 
63
#define INT16_MIN              (-32767-1)
 
64
#endif
 
65
#ifndef INT32_MIN
 
66
#define INT32_MIN              (-2147483647-1)
 
67
#endif
 
68
#ifndef INT8_MAX
 
69
#define INT8_MAX               (127)
 
70
#endif
 
71
#ifndef INT16_MAX
 
72
#define INT16_MAX              (32767)
 
73
#endif
 
74
#ifndef INT32_MAX
 
75
#define INT32_MAX              (2147483647)
 
76
#endif
 
77
#ifndef UINT8_MAX
 
78
#define UINT8_MAX              (255U)
 
79
#endif
 
80
#ifndef UINT16_MAX
 
81
#define UINT16_MAX             (65535U)
 
82
#endif
 
83
#ifndef UINT32_MAX
 
84
#define UINT32_MAX             (4294967295U)
 
85
#endif
 
86
 
 
87
#endif /* ! FLEXINT_H */
39
88
 
40
89
#ifdef __cplusplus
41
90
 
42
 
#include <stdlib.h>
43
 
#include <unistd.h>
44
 
 
45
 
/* Use prototypes in function declarations. */
46
 
#define YY_USE_PROTOS
47
 
 
48
91
/* The "const" storage-class-modifier is valid. */
49
92
#define YY_USE_CONST
50
93
 
52
95
 
53
96
#if __STDC__
54
97
 
55
 
#define YY_USE_PROTOS
56
98
#define YY_USE_CONST
57
99
 
58
100
#endif  /* __STDC__ */
59
101
#endif  /* ! __cplusplus */
60
102
 
61
 
#ifdef __TURBOC__
62
 
 #pragma warn -rch
63
 
 #pragma warn -use
64
 
#include <io.h>
65
 
#include <stdlib.h>
66
 
#define YY_USE_CONST
67
 
#define YY_USE_PROTOS
68
 
#endif
69
 
 
70
103
#ifdef YY_USE_CONST
71
104
#define yyconst const
72
105
#else
73
106
#define yyconst
74
107
#endif
75
108
 
76
 
 
77
 
#ifdef YY_USE_PROTOS
78
 
#define YY_PROTO(proto) proto
79
 
#else
80
 
#define YY_PROTO(proto) ()
81
 
#endif
82
 
 
83
109
/* Returned upon end-of-file. */
84
110
#define YY_NULL 0
85
111
 
94
120
 * but we do it the disgusting crufty way forced on us by the ()-less
95
121
 * definition of BEGIN.
96
122
 */
97
 
#define BEGIN yy_start = 1 + 2 *
 
123
#define BEGIN (yy_start) = 1 + 2 *
98
124
 
99
125
/* Translate the current start state into a value that can be later handed
100
126
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
101
127
 * compatibility.
102
128
 */
103
 
#define YY_START ((yy_start - 1) / 2)
 
129
#define YY_START (((yy_start) - 1) / 2)
104
130
#define YYSTATE YY_START
105
131
 
106
132
/* Action number for EOF rule of a given start state. */
107
133
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
108
134
 
109
135
/* Special action meaning "start processing a new file". */
110
 
#define YY_NEW_FILE yyrestart( yyin )
 
136
#define YY_NEW_FILE cern_restart(cern_in  )
111
137
 
112
138
#define YY_END_OF_BUFFER_CHAR 0
113
139
 
114
140
/* Size of default input buffer. */
 
141
#ifndef YY_BUF_SIZE
115
142
#define YY_BUF_SIZE 16384
116
 
 
 
143
#endif
 
144
 
 
145
/* The state buf must be large enough to hold one state per character in the main buffer.
 
146
 */
 
147
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
148
 
 
149
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
 
150
#define YY_TYPEDEF_YY_BUFFER_STATE
117
151
typedef struct yy_buffer_state *YY_BUFFER_STATE;
118
 
 
119
 
extern int yyleng;
120
 
extern FILE *yyin, *yyout;
 
152
#endif
 
153
 
 
154
extern int cern_leng;
 
155
 
 
156
extern FILE *cern_in, *cern_out;
121
157
 
122
158
#define EOB_ACT_CONTINUE_SCAN 0
123
159
#define EOB_ACT_END_OF_FILE 1
124
160
#define EOB_ACT_LAST_MATCH 2
125
161
 
126
 
/* The funky do-while in the following #define is used to turn the definition
127
 
 * int a single C statement (which needs a semi-colon terminator).  This
128
 
 * avoids problems with code like:
129
 
 *
130
 
 *      if ( condition_holds )
131
 
 *              yyless( 5 );
132
 
 *      else
133
 
 *              do_something_else();
134
 
 *
135
 
 * Prior to using the do-while the compiler would get upset at the
136
 
 * "else" because it interpreted the "if" statement as being all
137
 
 * done when it reached the ';' after the yyless() call.
138
 
 */
139
 
 
140
 
/* Return all but the first 'n' matched characters back to the input stream. */
141
 
 
 
162
    #define YY_LESS_LINENO(n)
 
163
    
 
164
/* Return all but the first "n" matched characters back to the input stream. */
142
165
#define yyless(n) \
143
166
        do \
144
167
                { \
145
 
                /* Undo effects of setting up yytext. */ \
146
 
                *yy_cp = yy_hold_char; \
 
168
                /* Undo effects of setting up cern_text. */ \
 
169
        int yyless_macro_arg = (n); \
 
170
        YY_LESS_LINENO(yyless_macro_arg);\
 
171
                *yy_cp = (yy_hold_char); \
147
172
                YY_RESTORE_YY_MORE_OFFSET \
148
 
                yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
149
 
                YY_DO_BEFORE_ACTION; /* set up yytext again */ \
 
173
                (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
 
174
                YY_DO_BEFORE_ACTION; /* set up cern_text again */ \
150
175
                } \
151
176
        while ( 0 )
152
177
 
153
 
#define unput(c) yyunput( c, yytext_ptr )
 
178
#define unput(c) yyunput( c, (yytext_ptr)  )
154
179
 
155
180
/* The following is because we cannot portably get our hands on size_t
156
181
 * (without autoconf's help, which isn't available because we want
157
182
 * flex-generated scanners to compile on their own).
158
183
 */
 
184
 
 
185
#ifndef YY_TYPEDEF_YY_SIZE_T
 
186
#define YY_TYPEDEF_YY_SIZE_T
159
187
typedef unsigned int yy_size_t;
160
 
 
161
 
 
 
188
#endif
 
189
 
 
190
#ifndef YY_STRUCT_YY_BUFFER_STATE
 
191
#define YY_STRUCT_YY_BUFFER_STATE
162
192
struct yy_buffer_state
163
193
        {
164
194
        FILE *yy_input_file;
195
225
         */
196
226
        int yy_at_bol;
197
227
 
 
228
    int yy_bs_lineno; /**< The line count. */
 
229
    int yy_bs_column; /**< The column count. */
 
230
    
198
231
        /* Whether to try to fill the input buffer when we reach the
199
232
         * end of it.
200
233
         */
201
234
        int yy_fill_buffer;
202
235
 
203
236
        int yy_buffer_status;
 
237
 
204
238
#define YY_BUFFER_NEW 0
205
239
#define YY_BUFFER_NORMAL 1
206
240
        /* When an EOF's been seen but there's still some text to process
210
244
         * possible backing-up.
211
245
         *
212
246
         * When we actually see the EOF, we change the status to "new"
213
 
         * (via yyrestart()), so that the user can continue scanning by
214
 
         * just pointing yyin at a new input file.
 
247
         * (via cern_restart()), so that the user can continue scanning by
 
248
         * just pointing cern_in at a new input file.
215
249
         */
216
250
#define YY_BUFFER_EOF_PENDING 2
 
251
 
217
252
        };
 
253
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
218
254
 
219
 
static YY_BUFFER_STATE yy_current_buffer = 0;
 
255
/* Stack of input buffers. */
 
256
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 
257
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
 
258
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
220
259
 
221
260
/* We provide macros for accessing buffer states in case in the
222
261
 * future we want to put the buffer states in a more general
223
262
 * "scanner state".
224
 
 */
225
 
#define YY_CURRENT_BUFFER yy_current_buffer
226
 
 
227
 
 
228
 
/* yy_hold_char holds the character lost when yytext is formed. */
 
263
 *
 
264
 * Returns the top of the stack, or NULL.
 
265
 */
 
266
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
 
267
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
 
268
                          : NULL)
 
269
 
 
270
/* Same as previous macro, but useful when we know that the buffer stack is not
 
271
 * NULL or when we need an lvalue. For internal use only.
 
272
 */
 
273
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 
274
 
 
275
/* yy_hold_char holds the character lost when cern_text is formed. */
229
276
static char yy_hold_char;
230
 
 
231
277
static int yy_n_chars;          /* number of characters read into yy_ch_buf */
232
 
 
233
 
 
234
 
int yyleng;
 
278
int cern_leng;
235
279
 
236
280
/* Points to current character in buffer. */
237
281
static char *yy_c_buf_p = (char *) 0;
238
 
static int yy_init = 1;         /* whether we need to initialize */
 
282
static int yy_init = 0;         /* whether we need to initialize */
239
283
static int yy_start = 0;        /* start state number */
240
284
 
241
 
/* Flag which is used to allow yywrap()'s to do buffer switches
242
 
 * instead of setting up a fresh yyin.  A bit of a hack ...
 
285
/* Flag which is used to allow cern_wrap()'s to do buffer switches
 
286
 * instead of setting up a fresh cern_in.  A bit of a hack ...
243
287
 */
244
288
static int yy_did_buffer_switch_on_eof;
245
289
 
246
 
void yyrestart YY_PROTO(( FILE *input_file ));
247
 
 
248
 
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
249
 
void yy_load_buffer_state YY_PROTO(( void ));
250
 
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
251
 
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
252
 
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
253
 
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
254
 
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
255
 
 
256
 
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
257
 
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
258
 
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
259
 
 
260
 
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
261
 
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
262
 
static void yy_flex_free YY_PROTO(( void * ));
263
 
 
264
 
#define yy_new_buffer yy_create_buffer
 
290
void cern_restart (FILE *input_file  );
 
291
void cern__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
 
292
YY_BUFFER_STATE cern__create_buffer (FILE *file,int size  );
 
293
void cern__delete_buffer (YY_BUFFER_STATE b  );
 
294
void cern__flush_buffer (YY_BUFFER_STATE b  );
 
295
void cern_push_buffer_state (YY_BUFFER_STATE new_buffer  );
 
296
void cern_pop_buffer_state (void );
 
297
 
 
298
static void cern_ensure_buffer_stack (void );
 
299
static void cern__load_buffer_state (void );
 
300
static void cern__init_buffer (YY_BUFFER_STATE b,FILE *file  );
 
301
 
 
302
#define YY_FLUSH_BUFFER cern__flush_buffer(YY_CURRENT_BUFFER )
 
303
 
 
304
YY_BUFFER_STATE cern__scan_buffer (char *base,yy_size_t size  );
 
305
YY_BUFFER_STATE cern__scan_string (yyconst char *yy_str  );
 
306
YY_BUFFER_STATE cern__scan_bytes (yyconst char *bytes,int len  );
 
307
 
 
308
void *cern_alloc (yy_size_t  );
 
309
void *cern_realloc (void *,yy_size_t  );
 
310
void cern_free (void *  );
 
311
 
 
312
#define yy_new_buffer cern__create_buffer
265
313
 
266
314
#define yy_set_interactive(is_interactive) \
267
315
        { \
268
 
        if ( ! yy_current_buffer ) \
269
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
270
 
        yy_current_buffer->yy_is_interactive = is_interactive; \
 
316
        if ( ! YY_CURRENT_BUFFER ){ \
 
317
        cern_ensure_buffer_stack (); \
 
318
                YY_CURRENT_BUFFER_LVALUE =    \
 
319
            cern__create_buffer(cern_in,YY_BUF_SIZE ); \
 
320
        } \
 
321
        YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
271
322
        }
272
323
 
273
324
#define yy_set_bol(at_bol) \
274
325
        { \
275
 
        if ( ! yy_current_buffer ) \
276
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
277
 
        yy_current_buffer->yy_at_bol = at_bol; \
 
326
        if ( ! YY_CURRENT_BUFFER ){\
 
327
        cern_ensure_buffer_stack (); \
 
328
                YY_CURRENT_BUFFER_LVALUE =    \
 
329
            cern__create_buffer(cern_in,YY_BUF_SIZE ); \
 
330
        } \
 
331
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
278
332
        }
279
333
 
280
 
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
281
 
 
282
 
 
283
 
#define yywrap() 1
 
334
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
335
 
 
336
/* Begin user sect3 */
 
337
 
 
338
#define cern_wrap() 1
284
339
#define YY_SKIP_YYWRAP
 
340
 
285
341
typedef unsigned char YY_CHAR;
286
 
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
 
342
 
 
343
FILE *cern_in = (FILE *) 0, *cern_out = (FILE *) 0;
 
344
 
287
345
typedef int yy_state_type;
288
 
extern char *yytext;
289
 
#define yytext_ptr yytext
290
 
 
291
 
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
292
 
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
293
 
static int yy_get_next_buffer YY_PROTO(( void ));
294
 
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
 
346
 
 
347
extern int cern_lineno;
 
348
 
 
349
int cern_lineno = 1;
 
350
 
 
351
extern char *cern_text;
 
352
#define yytext_ptr cern_text
 
353
 
 
354
static yy_state_type yy_get_previous_state (void );
 
355
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
 
356
static int yy_get_next_buffer (void );
 
357
static void yy_fatal_error (yyconst char msg[]  );
295
358
 
296
359
/* Done after the current pattern has been matched and before the
297
 
 * corresponding action - sets up yytext.
 
360
 * corresponding action - sets up cern_text.
298
361
 */
299
362
#define YY_DO_BEFORE_ACTION \
300
 
        yytext_ptr = yy_bp; \
301
 
        yyleng = (int) (yy_cp - yy_bp); \
302
 
        yy_hold_char = *yy_cp; \
 
363
        (yytext_ptr) = yy_bp; \
 
364
        cern_leng = (size_t) (yy_cp - yy_bp); \
 
365
        (yy_hold_char) = *yy_cp; \
303
366
        *yy_cp = '\0'; \
304
 
        yy_c_buf_p = yy_cp;
 
367
        (yy_c_buf_p) = yy_cp;
305
368
 
306
369
#define YY_NUM_RULES 13
307
370
#define YY_END_OF_BUFFER 14
308
 
static yyconst short int yy_accept[94] =
 
371
/* This struct is not used in this scanner,
 
372
   but its presence is necessary. */
 
373
struct yy_trans_info
 
374
        {
 
375
        flex_int32_t yy_verify;
 
376
        flex_int32_t yy_nxt;
 
377
        };
 
378
static yyconst flex_int16_t yy_accept[94] =
309
379
    {   0,
310
380
       10,   10,    0,    0,   14,   12,   11,   11,   12,   10,
311
381
       10,   10,   12,   12,   10,   12,   12,   13,    4,    0,
320
390
 
321
391
    } ;
322
392
 
323
 
static yyconst int yy_ec[256] =
 
393
static yyconst flex_int32_t yy_ec[256] =
324
394
    {   0,
325
395
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
326
396
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
352
422
        1,    1,    1,    1,    1
353
423
    } ;
354
424
 
355
 
static yyconst int yy_meta[34] =
 
425
static yyconst flex_int32_t yy_meta[34] =
356
426
    {   0,
357
427
        1,    2,    3,    1,    1,    1,    1,    1,    2,    1,
358
428
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
360
430
        1,    1,    1
361
431
    } ;
362
432
 
363
 
static yyconst short int yy_base[98] =
 
433
static yyconst flex_int16_t yy_base[98] =
364
434
    {   0,
365
435
        0,    0,  200,  199,  201,  197,   32,   34,  204,   35,
366
436
       46,    0,   39,   49,   68,   37,   51,  196,  204,  195,
375
445
 
376
446
    } ;
377
447
 
378
 
static yyconst short int yy_def[98] =
 
448
static yyconst flex_int16_t yy_def[98] =
379
449
    {   0,
380
450
       93,    1,   94,   94,   93,   95,   93,   93,   93,   95,
381
451
       10,   10,   95,   95,   95,   95,   95,   96,   93,   95,
390
460
 
391
461
    } ;
392
462
 
393
 
static yyconst short int yy_nxt[238] =
 
463
static yyconst flex_int16_t yy_nxt[238] =
394
464
    {   0,
395
465
        6,    7,    8,    6,    6,    6,    6,    6,    9,   10,
396
466
       11,   12,   12,   12,   12,   12,    6,    6,   13,   14,
420
490
       93,   93,   93,   93,   93,   93,   93
421
491
    } ;
422
492
 
423
 
static yyconst short int yy_chk[238] =
 
493
static yyconst flex_int16_t yy_chk[238] =
424
494
    {   0,
425
495
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
426
496
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
453
523
static yy_state_type yy_last_accepting_state;
454
524
static char *yy_last_accepting_cpos;
455
525
 
 
526
extern int cern__flex_debug;
 
527
int cern__flex_debug = 0;
 
528
 
456
529
/* The intent behind this definition is that it'll catch
457
530
 * any uses of REJECT which flex missed.
458
531
 */
460
533
#define yymore() yymore_used_but_not_detected
461
534
#define YY_MORE_ADJ 0
462
535
#define YY_RESTORE_YY_MORE_OFFSET
463
 
char *yytext;
 
536
char *cern_text;
464
537
#line 1 "imap_cern.l"
465
 
#define INITIAL 0
466
538
#line 2 "imap_cern.l"
467
539
/*
468
540
 * This is a plug-in for the GIMP.
489
561
 
490
562
#include <string.h>
491
563
 
 
564
#include <glib.h>
 
565
 
492
566
#include "imap_cern_parse.h"
 
567
 
 
568
#ifdef FLEX_SCANNER
 
569
#define YY_NO_UNPUT
 
570
#endif /* FLEX_SCANNER */
 
571
 
 
572
 
 
573
#line 574 "<stdout>"
 
574
 
 
575
#define INITIAL 0
493
576
#define comment 1
494
577
 
495
 
#line 494 "imap_cern_lex.c"
 
578
#ifndef YY_NO_UNISTD_H
 
579
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 
580
 * down here because we want the user's section 1 to have been scanned first.
 
581
 * The user has a chance to override it with an option.
 
582
 */
 
583
#include <unistd.h>
 
584
#endif
 
585
 
 
586
#ifndef YY_EXTRA_TYPE
 
587
#define YY_EXTRA_TYPE void *
 
588
#endif
 
589
 
 
590
static int yy_init_globals (void );
496
591
 
497
592
/* Macros after this point can all be overridden by user definitions in
498
593
 * section 1.
500
595
 
501
596
#ifndef YY_SKIP_YYWRAP
502
597
#ifdef __cplusplus
503
 
extern "C" int yywrap YY_PROTO(( void ));
 
598
extern "C" int cern_wrap (void );
504
599
#else
505
 
extern int yywrap YY_PROTO(( void ));
506
 
#endif
507
 
#endif
508
 
 
509
 
#ifndef YY_NO_UNPUT
510
 
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
511
 
#endif
512
 
 
 
600
extern int cern_wrap (void );
 
601
#endif
 
602
#endif
 
603
 
 
604
    static void yyunput (int c,char *buf_ptr  );
 
605
    
513
606
#ifndef yytext_ptr
514
 
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
 
607
static void yy_flex_strncpy (char *,yyconst char *,int );
515
608
#endif
516
609
 
517
610
#ifdef YY_NEED_STRLEN
518
 
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
 
611
static int yy_flex_strlen (yyconst char * );
519
612
#endif
520
613
 
521
614
#ifndef YY_NO_INPUT
 
615
 
522
616
#ifdef __cplusplus
523
 
static int yyinput YY_PROTO(( void ));
524
 
#else
525
 
static int input YY_PROTO(( void ));
526
 
#endif
527
 
#endif
528
 
 
529
 
#if YY_STACK_USED
530
 
static int yy_start_stack_ptr = 0;
531
 
static int yy_start_stack_depth = 0;
532
 
static int *yy_start_stack = 0;
533
 
#ifndef YY_NO_PUSH_STATE
534
 
static void yy_push_state YY_PROTO(( int new_state ));
535
 
#endif
536
 
#ifndef YY_NO_POP_STATE
537
 
static void yy_pop_state YY_PROTO(( void ));
538
 
#endif
539
 
#ifndef YY_NO_TOP_STATE
540
 
static int yy_top_state YY_PROTO(( void ));
541
 
#endif
542
 
 
543
 
#else
544
 
#define YY_NO_PUSH_STATE 1
545
 
#define YY_NO_POP_STATE 1
546
 
#define YY_NO_TOP_STATE 1
547
 
#endif
548
 
 
549
 
#ifdef YY_MALLOC_DECL
550
 
YY_MALLOC_DECL
551
 
#else
552
 
#if __STDC__
553
 
#ifndef __cplusplus
554
 
#include <stdlib.h>
555
 
#endif
556
 
#else
557
 
/* Just try to get by without declaring the routines.  This will fail
558
 
 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
559
 
 * or sizeof(void*) != sizeof(int).
560
 
 */
561
 
#endif
 
617
static int yyinput (void );
 
618
#else
 
619
static int input (void );
 
620
#endif
 
621
 
562
622
#endif
563
623
 
564
624
/* Amount of stuff to slurp up with each read. */
567
627
#endif
568
628
 
569
629
/* Copy whatever the last rule matched to the standard output. */
570
 
 
571
630
#ifndef ECHO
572
631
/* This used to be an fputs(), but since the string might contain NUL's,
573
632
 * we now use fwrite().
574
633
 */
575
 
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
 
634
#define ECHO (void) fwrite( cern_text, cern_leng, 1, cern_out )
576
635
#endif
577
636
 
578
637
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
580
639
 */
581
640
#ifndef YY_INPUT
582
641
#define YY_INPUT(buf,result,max_size) \
583
 
        if ( yy_current_buffer->yy_is_interactive ) \
 
642
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
584
643
                { \
585
 
                int c = '*', n; \
 
644
                int c = '*'; \
 
645
                size_t n; \
586
646
                for ( n = 0; n < max_size && \
587
 
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
 
647
                             (c = getc( cern_in )) != EOF && c != '\n'; ++n ) \
588
648
                        buf[n] = (char) c; \
589
649
                if ( c == '\n' ) \
590
650
                        buf[n++] = (char) c; \
591
 
                if ( c == EOF && ferror( yyin ) ) \
 
651
                if ( c == EOF && ferror( cern_in ) ) \
592
652
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
593
653
                result = n; \
594
654
                } \
595
 
        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
596
 
                  && ferror( yyin ) ) \
597
 
                YY_FATAL_ERROR( "input in flex scanner failed" );
 
655
        else \
 
656
                { \
 
657
                errno=0; \
 
658
                while ( (result = fread(buf, 1, max_size, cern_in))==0 && ferror(cern_in)) \
 
659
                        { \
 
660
                        if( errno != EINTR) \
 
661
                                { \
 
662
                                YY_FATAL_ERROR( "input in flex scanner failed" ); \
 
663
                                break; \
 
664
                                } \
 
665
                        errno=0; \
 
666
                        clearerr(cern_in); \
 
667
                        } \
 
668
                }\
 
669
\
 
670
 
598
671
#endif
599
672
 
600
673
/* No semi-colon after return; correct usage is to write "yyterminate();" -
615
688
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
616
689
#endif
617
690
 
 
691
/* end tables serialization structures and prototypes */
 
692
 
618
693
/* Default declaration of generated scanner - a define so the user can
619
694
 * easily add parameters.
620
695
 */
621
696
#ifndef YY_DECL
622
 
#define YY_DECL int yylex YY_PROTO(( void ))
623
 
#endif
624
 
 
625
 
/* Code executed at the beginning of each rule, after yytext and yyleng
 
697
#define YY_DECL_IS_OURS 1
 
698
 
 
699
extern int cern_lex (void);
 
700
 
 
701
#define YY_DECL int cern_lex (void)
 
702
#endif /* !YY_DECL */
 
703
 
 
704
/* Code executed at the beginning of each rule, after cern_text and cern_leng
626
705
 * have been set up.
627
706
 */
628
707
#ifndef YY_USER_ACTION
637
716
#define YY_RULE_SETUP \
638
717
        YY_USER_ACTION
639
718
 
 
719
/** The main scanner function which does all the work.
 
720
 */
640
721
YY_DECL
641
 
        {
 
722
{
642
723
        register yy_state_type yy_current_state;
643
724
        register char *yy_cp, *yy_bp;
644
725
        register int yy_act;
645
 
 
646
 
#line 36 "imap_cern.l"
647
 
 
648
 
 
649
 
#line 648 "imap_cern_lex.c"
650
 
 
651
 
        if ( yy_init )
 
726
    
 
727
#line 45 "imap_cern.l"
 
728
 
 
729
 
 
730
#line 731 "<stdout>"
 
731
 
 
732
        if ( !(yy_init) )
652
733
                {
653
 
                yy_init = 0;
 
734
                (yy_init) = 1;
654
735
 
655
736
#ifdef YY_USER_INIT
656
737
                YY_USER_INIT;
657
738
#endif
658
739
 
659
 
                if ( ! yy_start )
660
 
                        yy_start = 1;   /* first start state */
661
 
 
662
 
                if ( ! yyin )
663
 
                        yyin = stdin;
664
 
 
665
 
                if ( ! yyout )
666
 
                        yyout = stdout;
667
 
 
668
 
                if ( ! yy_current_buffer )
669
 
                        yy_current_buffer =
670
 
                                yy_create_buffer( yyin, YY_BUF_SIZE );
671
 
 
672
 
                yy_load_buffer_state();
 
740
                if ( ! (yy_start) )
 
741
                        (yy_start) = 1; /* first start state */
 
742
 
 
743
                if ( ! cern_in )
 
744
                        cern_in = stdin;
 
745
 
 
746
                if ( ! cern_out )
 
747
                        cern_out = stdout;
 
748
 
 
749
                if ( ! YY_CURRENT_BUFFER ) {
 
750
                        cern_ensure_buffer_stack ();
 
751
                        YY_CURRENT_BUFFER_LVALUE =
 
752
                                cern__create_buffer(cern_in,YY_BUF_SIZE );
 
753
                }
 
754
 
 
755
                cern__load_buffer_state( );
673
756
                }
674
757
 
675
758
        while ( 1 )             /* loops until end-of-file is reached */
676
759
                {
677
 
                yy_cp = yy_c_buf_p;
 
760
                yy_cp = (yy_c_buf_p);
678
761
 
679
 
                /* Support of yytext. */
680
 
                *yy_cp = yy_hold_char;
 
762
                /* Support of cern_text. */
 
763
                *yy_cp = (yy_hold_char);
681
764
 
682
765
                /* yy_bp points to the position in yy_ch_buf of the start of
683
766
                 * the current run.
684
767
                 */
685
768
                yy_bp = yy_cp;
686
769
 
687
 
                yy_current_state = yy_start;
 
770
                yy_current_state = (yy_start);
688
771
yy_match:
689
772
                do
690
773
                        {
691
774
                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
692
775
                        if ( yy_accept[yy_current_state] )
693
776
                                {
694
 
                                yy_last_accepting_state = yy_current_state;
695
 
                                yy_last_accepting_cpos = yy_cp;
 
777
                                (yy_last_accepting_state) = yy_current_state;
 
778
                                (yy_last_accepting_cpos) = yy_cp;
696
779
                                }
697
780
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
698
781
                                {
709
792
                yy_act = yy_accept[yy_current_state];
710
793
                if ( yy_act == 0 )
711
794
                        { /* have to back up */
712
 
                        yy_cp = yy_last_accepting_cpos;
713
 
                        yy_current_state = yy_last_accepting_state;
 
795
                        yy_cp = (yy_last_accepting_cpos);
 
796
                        yy_current_state = (yy_last_accepting_state);
714
797
                        yy_act = yy_accept[yy_current_state];
715
798
                        }
716
799
 
717
800
                YY_DO_BEFORE_ACTION;
718
801
 
719
 
 
720
802
do_action:      /* This label is used only to access EOF actions. */
721
803
 
722
 
 
723
804
                switch ( yy_act )
724
805
        { /* beginning of action switch */
725
806
                        case 0: /* must back up */
726
807
                        /* undo the effects of YY_DO_BEFORE_ACTION */
727
 
                        *yy_cp = yy_hold_char;
728
 
                        yy_cp = yy_last_accepting_cpos;
729
 
                        yy_current_state = yy_last_accepting_state;
 
808
                        *yy_cp = (yy_hold_char);
 
809
                        yy_cp = (yy_last_accepting_cpos);
 
810
                        yy_current_state = (yy_last_accepting_state);
730
811
                        goto yy_find_action;
731
812
 
732
813
case 1:
 
814
/* rule 1 can match eol */
733
815
YY_RULE_SETUP
734
 
#line 38 "imap_cern.l"
 
816
#line 47 "imap_cern.l"
735
817
{
736
818
                                   BEGIN(comment);
737
819
                                   return AUTHOR;
738
820
                                }
739
821
        YY_BREAK
740
822
case 2:
 
823
/* rule 2 can match eol */
741
824
YY_RULE_SETUP
742
 
#line 43 "imap_cern.l"
 
825
#line 52 "imap_cern.l"
743
826
{
744
827
                                   BEGIN(comment);
745
828
                                   return DESCRIPTION;
746
829
                                }
747
830
        YY_BREAK
748
831
case 3:
 
832
/* rule 3 can match eol */
749
833
YY_RULE_SETUP
750
 
#line 48 "imap_cern.l"
 
834
#line 57 "imap_cern.l"
751
835
{
752
836
                                   BEGIN(comment);
753
837
                                   return BEGIN_COMMENT;
754
838
                                }
755
839
        YY_BREAK
756
840
case 4:
757
 
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
758
 
yy_c_buf_p = yy_cp -= 1;
759
 
YY_DO_BEFORE_ACTION; /* set up yytext again */
 
841
*yy_cp = (yy_hold_char); /* undo effects of setting up cern_text */
 
842
(yy_c_buf_p) = yy_cp -= 1;
 
843
YY_DO_BEFORE_ACTION; /* set up cern_text again */
760
844
YY_RULE_SETUP
761
 
#line 53 "imap_cern.l"
 
845
#line 62 "imap_cern.l"
762
846
{
763
847
                                   BEGIN(INITIAL);
764
 
                                   strcpy(cern_lval.id, yytext);
 
848
                                   strcpy(cern_lval.id, cern_text);
765
849
                                   return COMMENT;
766
850
                                }
767
851
        YY_BREAK
768
852
case 5:
769
853
YY_RULE_SETUP
770
 
#line 59 "imap_cern.l"
 
854
#line 68 "imap_cern.l"
771
855
return RECTANGLE;
772
856
        YY_BREAK
773
857
case 6:
774
858
YY_RULE_SETUP
775
 
#line 61 "imap_cern.l"
 
859
#line 70 "imap_cern.l"
776
860
return CIRCLE;
777
861
        YY_BREAK
778
862
case 7:
779
863
YY_RULE_SETUP
780
 
#line 63 "imap_cern.l"
 
864
#line 72 "imap_cern.l"
781
865
return POLYGON;
782
866
        YY_BREAK
783
867
case 8:
784
868
YY_RULE_SETUP
785
 
#line 65 "imap_cern.l"
 
869
#line 74 "imap_cern.l"
786
870
return DEFAULT;
787
871
        YY_BREAK
788
872
case 9:
789
 
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
790
 
yy_c_buf_p = yy_cp -= 1;
791
 
YY_DO_BEFORE_ACTION; /* set up yytext again */
 
873
*yy_cp = (yy_hold_char); /* undo effects of setting up cern_text */
 
874
(yy_c_buf_p) = yy_cp -= 1;
 
875
YY_DO_BEFORE_ACTION; /* set up cern_text again */
792
876
YY_RULE_SETUP
793
 
#line 67 "imap_cern.l"
 
877
#line 76 "imap_cern.l"
794
878
{
795
 
                                   strcpy(cern_lval.id, yytext);
 
879
                                   strcpy(cern_lval.id, cern_text);
796
880
                                   return LINK;
797
881
                                }
798
882
        YY_BREAK
799
883
case 10:
800
884
YY_RULE_SETUP
801
 
#line 72 "imap_cern.l"
 
885
#line 81 "imap_cern.l"
802
886
{
803
 
                                   cern_lval.value = atof(yytext);
 
887
                                   cern_lval.value = g_ascii_strtod (cern_text, NULL);
804
888
                                   return FLOAT;
805
889
                                }
806
890
        YY_BREAK
807
891
case 11:
 
892
/* rule 11 can match eol */
808
893
YY_RULE_SETUP
809
 
#line 77 "imap_cern.l"
 
894
#line 86 "imap_cern.l"
810
895
; /* Eat white space */
811
896
        YY_BREAK
812
897
case 12:
813
898
YY_RULE_SETUP
814
 
#line 79 "imap_cern.l"
815
 
return *yytext;
 
899
#line 88 "imap_cern.l"
 
900
return *cern_text;
816
901
        YY_BREAK
817
902
case 13:
818
903
YY_RULE_SETUP
819
 
#line 81 "imap_cern.l"
 
904
#line 90 "imap_cern.l"
820
905
ECHO;
821
906
        YY_BREAK
822
 
#line 821 "imap_cern_lex.c"
 
907
#line 908 "<stdout>"
823
908
case YY_STATE_EOF(INITIAL):
824
909
case YY_STATE_EOF(comment):
825
910
        yyterminate();
827
912
        case YY_END_OF_BUFFER:
828
913
                {
829
914
                /* Amount of text matched not including the EOB char. */
830
 
                int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
 
915
                int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
831
916
 
832
917
                /* Undo the effects of YY_DO_BEFORE_ACTION. */
833
 
                *yy_cp = yy_hold_char;
 
918
                *yy_cp = (yy_hold_char);
834
919
                YY_RESTORE_YY_MORE_OFFSET
835
920
 
836
 
                if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
 
921
                if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
837
922
                        {
838
923
                        /* We're scanning a new file or input source.  It's
839
924
                         * possible that this happened because the user
840
 
                         * just pointed yyin at a new source and called
841
 
                         * yylex().  If so, then we have to assure
842
 
                         * consistency between yy_current_buffer and our
 
925
                         * just pointed cern_in at a new source and called
 
926
                         * cern_lex().  If so, then we have to assure
 
927
                         * consistency between YY_CURRENT_BUFFER and our
843
928
                         * globals.  Here is the right place to do so, because
844
929
                         * this is the first action (other than possibly a
845
930
                         * back-up) that will match for the new input source.
846
931
                         */
847
 
                        yy_n_chars = yy_current_buffer->yy_n_chars;
848
 
                        yy_current_buffer->yy_input_file = yyin;
849
 
                        yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
 
932
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 
933
                        YY_CURRENT_BUFFER_LVALUE->yy_input_file = cern_in;
 
934
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
850
935
                        }
851
936
 
852
937
                /* Note that here we test for yy_c_buf_p "<=" to the position
856
941
                 * end-of-buffer state).  Contrast this with the test
857
942
                 * in input().
858
943
                 */
859
 
                if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
 
944
                if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
860
945
                        { /* This was really a NUL. */
861
946
                        yy_state_type yy_next_state;
862
947
 
863
 
                        yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
 
948
                        (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
864
949
 
865
 
                        yy_current_state = yy_get_previous_state();
 
950
                        yy_current_state = yy_get_previous_state(  );
866
951
 
867
952
                        /* Okay, we're now positioned to make the NUL
868
953
                         * transition.  We couldn't have
875
960
 
876
961
                        yy_next_state = yy_try_NUL_trans( yy_current_state );
877
962
 
878
 
                        yy_bp = yytext_ptr + YY_MORE_ADJ;
 
963
                        yy_bp = (yytext_ptr) + YY_MORE_ADJ;
879
964
 
880
965
                        if ( yy_next_state )
881
966
                                {
882
967
                                /* Consume the NUL. */
883
 
                                yy_cp = ++yy_c_buf_p;
 
968
                                yy_cp = ++(yy_c_buf_p);
884
969
                                yy_current_state = yy_next_state;
885
970
                                goto yy_match;
886
971
                                }
887
972
 
888
973
                        else
889
974
                                {
890
 
                                yy_cp = yy_c_buf_p;
 
975
                                yy_cp = (yy_c_buf_p);
891
976
                                goto yy_find_action;
892
977
                                }
893
978
                        }
894
979
 
895
 
                else switch ( yy_get_next_buffer() )
 
980
                else switch ( yy_get_next_buffer(  ) )
896
981
                        {
897
982
                        case EOB_ACT_END_OF_FILE:
898
983
                                {
899
 
                                yy_did_buffer_switch_on_eof = 0;
 
984
                                (yy_did_buffer_switch_on_eof) = 0;
900
985
 
901
 
                                if ( yywrap() )
 
986
                                if ( cern_wrap( ) )
902
987
                                        {
903
988
                                        /* Note: because we've taken care in
904
989
                                         * yy_get_next_buffer() to have set up
905
 
                                         * yytext, we can now set up
 
990
                                         * cern_text, we can now set up
906
991
                                         * yy_c_buf_p so that if some total
907
992
                                         * hoser (like flex itself) wants to
908
993
                                         * call the scanner after we return the
909
994
                                         * YY_NULL, it'll still work - another
910
995
                                         * YY_NULL will get returned.
911
996
                                         */
912
 
                                        yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
 
997
                                        (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
913
998
 
914
999
                                        yy_act = YY_STATE_EOF(YY_START);
915
1000
                                        goto do_action;
917
1002
 
918
1003
                                else
919
1004
                                        {
920
 
                                        if ( ! yy_did_buffer_switch_on_eof )
 
1005
                                        if ( ! (yy_did_buffer_switch_on_eof) )
921
1006
                                                YY_NEW_FILE;
922
1007
                                        }
923
1008
                                break;
924
1009
                                }
925
1010
 
926
1011
                        case EOB_ACT_CONTINUE_SCAN:
927
 
                                yy_c_buf_p =
928
 
                                        yytext_ptr + yy_amount_of_matched_text;
929
 
 
930
 
                                yy_current_state = yy_get_previous_state();
931
 
 
932
 
                                yy_cp = yy_c_buf_p;
933
 
                                yy_bp = yytext_ptr + YY_MORE_ADJ;
 
1012
                                (yy_c_buf_p) =
 
1013
                                        (yytext_ptr) + yy_amount_of_matched_text;
 
1014
 
 
1015
                                yy_current_state = yy_get_previous_state(  );
 
1016
 
 
1017
                                yy_cp = (yy_c_buf_p);
 
1018
                                yy_bp = (yytext_ptr) + YY_MORE_ADJ;
934
1019
                                goto yy_match;
935
1020
 
936
1021
                        case EOB_ACT_LAST_MATCH:
937
 
                                yy_c_buf_p =
938
 
                                &yy_current_buffer->yy_ch_buf[yy_n_chars];
939
 
 
940
 
                                yy_current_state = yy_get_previous_state();
941
 
 
942
 
                                yy_cp = yy_c_buf_p;
943
 
                                yy_bp = yytext_ptr + YY_MORE_ADJ;
 
1022
                                (yy_c_buf_p) =
 
1023
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
 
1024
 
 
1025
                                yy_current_state = yy_get_previous_state(  );
 
1026
 
 
1027
                                yy_cp = (yy_c_buf_p);
 
1028
                                yy_bp = (yytext_ptr) + YY_MORE_ADJ;
944
1029
                                goto yy_find_action;
945
1030
                        }
946
1031
                break;
951
1036
                        "fatal flex scanner internal error--no action found" );
952
1037
        } /* end of action switch */
953
1038
                } /* end of scanning one token */
954
 
        } /* end of yylex */
955
 
 
 
1039
} /* end of cern_lex */
956
1040
 
957
1041
/* yy_get_next_buffer - try to read in a new buffer
958
1042
 *
961
1045
 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
962
1046
 *      EOB_ACT_END_OF_FILE - end of file
963
1047
 */
964
 
 
965
 
static int yy_get_next_buffer()
966
 
        {
967
 
        register char *dest = yy_current_buffer->yy_ch_buf;
968
 
        register char *source = yytext_ptr;
 
1048
static int yy_get_next_buffer (void)
 
1049
{
 
1050
        register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
 
1051
        register char *source = (yytext_ptr);
969
1052
        register int number_to_move, i;
970
1053
        int ret_val;
971
1054
 
972
 
        if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
 
1055
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
973
1056
                YY_FATAL_ERROR(
974
1057
                "fatal flex scanner internal error--end of buffer missed" );
975
1058
 
976
 
        if ( yy_current_buffer->yy_fill_buffer == 0 )
 
1059
        if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
977
1060
                { /* Don't try to fill the buffer, so this is an EOF. */
978
 
                if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
 
1061
                if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
979
1062
                        {
980
1063
                        /* We matched a single character, the EOB, so
981
1064
                         * treat this as a final EOF.
995
1078
        /* Try to read more data. */
996
1079
 
997
1080
        /* First move last chars to start of buffer. */
998
 
        number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
 
1081
        number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
999
1082
 
1000
1083
        for ( i = 0; i < number_to_move; ++i )
1001
1084
                *(dest++) = *(source++);
1002
1085
 
1003
 
        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
 
1086
        if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1004
1087
                /* don't do the read, it's not guaranteed to return an EOF,
1005
1088
                 * just force an EOF
1006
1089
                 */
1007
 
                yy_current_buffer->yy_n_chars = yy_n_chars = 0;
 
1090
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1008
1091
 
1009
1092
        else
1010
1093
                {
1011
 
                int num_to_read =
1012
 
                        yy_current_buffer->yy_buf_size - number_to_move - 1;
 
1094
                        int num_to_read =
 
1095
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1013
1096
 
1014
1097
                while ( num_to_read <= 0 )
1015
1098
                        { /* Not enough room in the buffer - grow it. */
1016
 
#ifdef YY_USES_REJECT
1017
 
                        YY_FATAL_ERROR(
1018
 
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1019
 
#else
1020
1099
 
1021
1100
                        /* just a shorter name for the current buffer */
1022
 
                        YY_BUFFER_STATE b = yy_current_buffer;
 
1101
                        YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1023
1102
 
1024
1103
                        int yy_c_buf_p_offset =
1025
 
                                (int) (yy_c_buf_p - b->yy_ch_buf);
 
1104
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
1026
1105
 
1027
1106
                        if ( b->yy_is_our_buffer )
1028
1107
                                {
1035
1114
 
1036
1115
                                b->yy_ch_buf = (char *)
1037
1116
                                        /* Include room in for 2 EOB chars. */
1038
 
                                        yy_flex_realloc( (void *) b->yy_ch_buf,
1039
 
                                                         b->yy_buf_size + 2 );
 
1117
                                        cern_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1040
1118
                                }
1041
1119
                        else
1042
1120
                                /* Can't grow it, we don't own it. */
1046
1124
                                YY_FATAL_ERROR(
1047
1125
                                "fatal error - scanner input buffer overflow" );
1048
1126
 
1049
 
                        yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
 
1127
                        (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1050
1128
 
1051
 
                        num_to_read = yy_current_buffer->yy_buf_size -
 
1129
                        num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1052
1130
                                                number_to_move - 1;
1053
 
#endif
 
1131
 
1054
1132
                        }
1055
1133
 
1056
1134
                if ( num_to_read > YY_READ_BUF_SIZE )
1057
1135
                        num_to_read = YY_READ_BUF_SIZE;
1058
1136
 
1059
1137
                /* Read in more data. */
1060
 
                YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1061
 
                        yy_n_chars, num_to_read );
 
1138
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
 
1139
                        (yy_n_chars), (size_t) num_to_read );
1062
1140
 
1063
 
                yy_current_buffer->yy_n_chars = yy_n_chars;
 
1141
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1064
1142
                }
1065
1143
 
1066
 
        if ( yy_n_chars == 0 )
 
1144
        if ( (yy_n_chars) == 0 )
1067
1145
                {
1068
1146
                if ( number_to_move == YY_MORE_ADJ )
1069
1147
                        {
1070
1148
                        ret_val = EOB_ACT_END_OF_FILE;
1071
 
                        yyrestart( yyin );
 
1149
                        cern_restart(cern_in  );
1072
1150
                        }
1073
1151
 
1074
1152
                else
1075
1153
                        {
1076
1154
                        ret_val = EOB_ACT_LAST_MATCH;
1077
 
                        yy_current_buffer->yy_buffer_status =
 
1155
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1078
1156
                                YY_BUFFER_EOF_PENDING;
1079
1157
                        }
1080
1158
                }
1082
1160
        else
1083
1161
                ret_val = EOB_ACT_CONTINUE_SCAN;
1084
1162
 
1085
 
        yy_n_chars += number_to_move;
1086
 
        yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1087
 
        yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
 
1163
        (yy_n_chars) += number_to_move;
 
1164
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
 
1165
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1088
1166
 
1089
 
        yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
 
1167
        (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1090
1168
 
1091
1169
        return ret_val;
1092
 
        }
1093
 
 
 
1170
}
1094
1171
 
1095
1172
/* yy_get_previous_state - get the state just before the EOB char was reached */
1096
1173
 
1097
 
static yy_state_type yy_get_previous_state()
1098
 
        {
 
1174
    static yy_state_type yy_get_previous_state (void)
 
1175
{
1099
1176
        register yy_state_type yy_current_state;
1100
1177
        register char *yy_cp;
1101
 
 
1102
 
        yy_current_state = yy_start;
1103
 
 
1104
 
        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
 
1178
    
 
1179
        yy_current_state = (yy_start);
 
1180
 
 
1181
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1105
1182
                {
1106
1183
                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1107
1184
                if ( yy_accept[yy_current_state] )
1108
1185
                        {
1109
 
                        yy_last_accepting_state = yy_current_state;
1110
 
                        yy_last_accepting_cpos = yy_cp;
 
1186
                        (yy_last_accepting_state) = yy_current_state;
 
1187
                        (yy_last_accepting_cpos) = yy_cp;
1111
1188
                        }
1112
1189
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1113
1190
                        {
1119
1196
                }
1120
1197
 
1121
1198
        return yy_current_state;
1122
 
        }
1123
 
 
 
1199
}
1124
1200
 
1125
1201
/* yy_try_NUL_trans - try to make a transition on the NUL character
1126
1202
 *
1127
1203
 * synopsis
1128
1204
 *      next_state = yy_try_NUL_trans( current_state );
1129
1205
 */
1130
 
 
1131
 
#ifdef YY_USE_PROTOS
1132
 
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1133
 
#else
1134
 
static yy_state_type yy_try_NUL_trans( yy_current_state )
1135
 
yy_state_type yy_current_state;
1136
 
#endif
1137
 
        {
 
1206
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 
1207
{
1138
1208
        register int yy_is_jam;
1139
 
        register char *yy_cp = yy_c_buf_p;
 
1209
        register char *yy_cp = (yy_c_buf_p);
1140
1210
 
1141
1211
        register YY_CHAR yy_c = 1;
1142
1212
        if ( yy_accept[yy_current_state] )
1143
1213
                {
1144
 
                yy_last_accepting_state = yy_current_state;
1145
 
                yy_last_accepting_cpos = yy_cp;
 
1214
                (yy_last_accepting_state) = yy_current_state;
 
1215
                (yy_last_accepting_cpos) = yy_cp;
1146
1216
                }
1147
1217
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1148
1218
                {
1154
1224
        yy_is_jam = (yy_current_state == 93);
1155
1225
 
1156
1226
        return yy_is_jam ? 0 : yy_current_state;
1157
 
        }
1158
 
 
1159
 
 
1160
 
#ifndef YY_NO_UNPUT
1161
 
#ifdef YY_USE_PROTOS
1162
 
static void yyunput( int c, register char *yy_bp )
1163
 
#else
1164
 
static void yyunput( c, yy_bp )
1165
 
int c;
1166
 
register char *yy_bp;
1167
 
#endif
1168
 
        {
1169
 
        register char *yy_cp = yy_c_buf_p;
1170
 
 
1171
 
        /* undo effects of setting up yytext */
1172
 
        *yy_cp = yy_hold_char;
1173
 
 
1174
 
        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
 
1227
}
 
1228
 
 
1229
    static void yyunput (int c, register char * yy_bp )
 
1230
{
 
1231
        register char *yy_cp;
 
1232
    
 
1233
    yy_cp = (yy_c_buf_p);
 
1234
 
 
1235
        /* undo effects of setting up cern_text */
 
1236
        *yy_cp = (yy_hold_char);
 
1237
 
 
1238
        if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1175
1239
                { /* need to shift things up to make room */
1176
1240
                /* +2 for EOB chars. */
1177
 
                register int number_to_move = yy_n_chars + 2;
1178
 
                register char *dest = &yy_current_buffer->yy_ch_buf[
1179
 
                                        yy_current_buffer->yy_buf_size + 2];
 
1241
                register int number_to_move = (yy_n_chars) + 2;
 
1242
                register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
 
1243
                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1180
1244
                register char *source =
1181
 
                                &yy_current_buffer->yy_ch_buf[number_to_move];
 
1245
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1182
1246
 
1183
 
                while ( source > yy_current_buffer->yy_ch_buf )
 
1247
                while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1184
1248
                        *--dest = *--source;
1185
1249
 
1186
1250
                yy_cp += (int) (dest - source);
1187
1251
                yy_bp += (int) (dest - source);
1188
 
                yy_current_buffer->yy_n_chars =
1189
 
                        yy_n_chars = yy_current_buffer->yy_buf_size;
 
1252
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
 
1253
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1190
1254
 
1191
 
                if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
 
1255
                if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1192
1256
                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
1193
1257
                }
1194
1258
 
1195
1259
        *--yy_cp = (char) c;
1196
1260
 
1197
 
 
1198
 
        yytext_ptr = yy_bp;
1199
 
        yy_hold_char = *yy_cp;
1200
 
        yy_c_buf_p = yy_cp;
1201
 
        }
1202
 
#endif  /* ifndef YY_NO_UNPUT */
1203
 
 
1204
 
 
 
1261
        (yytext_ptr) = yy_bp;
 
1262
        (yy_hold_char) = *yy_cp;
 
1263
        (yy_c_buf_p) = yy_cp;
 
1264
}
 
1265
 
 
1266
#ifndef YY_NO_INPUT
1205
1267
#ifdef __cplusplus
1206
 
static int yyinput()
 
1268
    static int yyinput (void)
1207
1269
#else
1208
 
static int input()
 
1270
    static int input  (void)
1209
1271
#endif
1210
 
        {
 
1272
 
 
1273
{
1211
1274
        int c;
1212
 
 
1213
 
        *yy_c_buf_p = yy_hold_char;
1214
 
 
1215
 
        if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
 
1275
    
 
1276
        *(yy_c_buf_p) = (yy_hold_char);
 
1277
 
 
1278
        if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1216
1279
                {
1217
1280
                /* yy_c_buf_p now points to the character we want to return.
1218
1281
                 * If this occurs *before* the EOB characters, then it's a
1219
1282
                 * valid NUL; if not, then we've hit the end of the buffer.
1220
1283
                 */
1221
 
                if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
 
1284
                if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1222
1285
                        /* This was really a NUL. */
1223
 
                        *yy_c_buf_p = '\0';
 
1286
                        *(yy_c_buf_p) = '\0';
1224
1287
 
1225
1288
                else
1226
1289
                        { /* need more input */
1227
 
                        int offset = yy_c_buf_p - yytext_ptr;
1228
 
                        ++yy_c_buf_p;
 
1290
                        int offset = (yy_c_buf_p) - (yytext_ptr);
 
1291
                        ++(yy_c_buf_p);
1229
1292
 
1230
 
                        switch ( yy_get_next_buffer() )
 
1293
                        switch ( yy_get_next_buffer(  ) )
1231
1294
                                {
1232
1295
                                case EOB_ACT_LAST_MATCH:
1233
1296
                                        /* This happens because yy_g_n_b()
1241
1304
                                         */
1242
1305
 
1243
1306
                                        /* Reset buffer status. */
1244
 
                                        yyrestart( yyin );
 
1307
                                        cern_restart(cern_in );
1245
1308
 
1246
 
                                        /* fall through */
 
1309
                                        /*FALLTHROUGH*/
1247
1310
 
1248
1311
                                case EOB_ACT_END_OF_FILE:
1249
1312
                                        {
1250
 
                                        if ( yywrap() )
 
1313
                                        if ( cern_wrap( ) )
1251
1314
                                                return EOF;
1252
1315
 
1253
 
                                        if ( ! yy_did_buffer_switch_on_eof )
 
1316
                                        if ( ! (yy_did_buffer_switch_on_eof) )
1254
1317
                                                YY_NEW_FILE;
1255
1318
#ifdef __cplusplus
1256
1319
                                        return yyinput();
1260
1323
                                        }
1261
1324
 
1262
1325
                                case EOB_ACT_CONTINUE_SCAN:
1263
 
                                        yy_c_buf_p = yytext_ptr + offset;
 
1326
                                        (yy_c_buf_p) = (yytext_ptr) + offset;
1264
1327
                                        break;
1265
1328
                                }
1266
1329
                        }
1267
1330
                }
1268
1331
 
1269
 
        c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1270
 
        *yy_c_buf_p = '\0';     /* preserve yytext */
1271
 
        yy_hold_char = *++yy_c_buf_p;
1272
 
 
 
1332
        c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
 
1333
        *(yy_c_buf_p) = '\0';   /* preserve cern_text */
 
1334
        (yy_hold_char) = *++(yy_c_buf_p);
1273
1335
 
1274
1336
        return c;
1275
 
        }
1276
 
 
1277
 
 
1278
 
#ifdef YY_USE_PROTOS
1279
 
void yyrestart( FILE *input_file )
1280
 
#else
1281
 
void yyrestart( input_file )
1282
 
FILE *input_file;
1283
 
#endif
1284
 
        {
1285
 
        if ( ! yy_current_buffer )
1286
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1287
 
 
1288
 
        yy_init_buffer( yy_current_buffer, input_file );
1289
 
        yy_load_buffer_state();
1290
 
        }
1291
 
 
1292
 
 
1293
 
#ifdef YY_USE_PROTOS
1294
 
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1295
 
#else
1296
 
void yy_switch_to_buffer( new_buffer )
1297
 
YY_BUFFER_STATE new_buffer;
1298
 
#endif
1299
 
        {
1300
 
        if ( yy_current_buffer == new_buffer )
 
1337
}
 
1338
#endif  /* ifndef YY_NO_INPUT */
 
1339
 
 
1340
/** Immediately switch to a different input stream.
 
1341
 * @param input_file A readable stream.
 
1342
 * 
 
1343
 * @note This function does not reset the start condition to @c INITIAL .
 
1344
 */
 
1345
    void cern_restart  (FILE * input_file )
 
1346
{
 
1347
    
 
1348
        if ( ! YY_CURRENT_BUFFER ){
 
1349
        cern_ensure_buffer_stack ();
 
1350
                YY_CURRENT_BUFFER_LVALUE =
 
1351
            cern__create_buffer(cern_in,YY_BUF_SIZE );
 
1352
        }
 
1353
 
 
1354
        cern__init_buffer(YY_CURRENT_BUFFER,input_file );
 
1355
        cern__load_buffer_state( );
 
1356
}
 
1357
 
 
1358
/** Switch to a different input buffer.
 
1359
 * @param new_buffer The new input buffer.
 
1360
 * 
 
1361
 */
 
1362
    void cern__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 
1363
{
 
1364
    
 
1365
        /* TODO. We should be able to replace this entire function body
 
1366
         * with
 
1367
         *              cern_pop_buffer_state();
 
1368
         *              cern_push_buffer_state(new_buffer);
 
1369
     */
 
1370
        cern_ensure_buffer_stack ();
 
1371
        if ( YY_CURRENT_BUFFER == new_buffer )
1301
1372
                return;
1302
1373
 
1303
 
        if ( yy_current_buffer )
 
1374
        if ( YY_CURRENT_BUFFER )
1304
1375
                {
1305
1376
                /* Flush out information for old buffer. */
1306
 
                *yy_c_buf_p = yy_hold_char;
1307
 
                yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1308
 
                yy_current_buffer->yy_n_chars = yy_n_chars;
 
1377
                *(yy_c_buf_p) = (yy_hold_char);
 
1378
                YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 
1379
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1309
1380
                }
1310
1381
 
1311
 
        yy_current_buffer = new_buffer;
1312
 
        yy_load_buffer_state();
 
1382
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
1383
        cern__load_buffer_state( );
1313
1384
 
1314
1385
        /* We don't actually know whether we did this switch during
1315
 
         * EOF (yywrap()) processing, but the only time this flag
1316
 
         * is looked at is after yywrap() is called, so it's safe
 
1386
         * EOF (cern_wrap()) processing, but the only time this flag
 
1387
         * is looked at is after cern_wrap() is called, so it's safe
1317
1388
         * to go ahead and always set it.
1318
1389
         */
1319
 
        yy_did_buffer_switch_on_eof = 1;
1320
 
        }
1321
 
 
1322
 
 
1323
 
#ifdef YY_USE_PROTOS
1324
 
void yy_load_buffer_state( void )
1325
 
#else
1326
 
void yy_load_buffer_state()
1327
 
#endif
1328
 
        {
1329
 
        yy_n_chars = yy_current_buffer->yy_n_chars;
1330
 
        yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1331
 
        yyin = yy_current_buffer->yy_input_file;
1332
 
        yy_hold_char = *yy_c_buf_p;
1333
 
        }
1334
 
 
1335
 
 
1336
 
#ifdef YY_USE_PROTOS
1337
 
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1338
 
#else
1339
 
YY_BUFFER_STATE yy_create_buffer( file, size )
1340
 
FILE *file;
1341
 
int size;
1342
 
#endif
1343
 
        {
 
1390
        (yy_did_buffer_switch_on_eof) = 1;
 
1391
}
 
1392
 
 
1393
static void cern__load_buffer_state  (void)
 
1394
{
 
1395
        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 
1396
        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
 
1397
        cern_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
 
1398
        (yy_hold_char) = *(yy_c_buf_p);
 
1399
}
 
1400
 
 
1401
/** Allocate and initialize an input buffer state.
 
1402
 * @param file A readable stream.
 
1403
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 
1404
 * 
 
1405
 * @return the allocated buffer state.
 
1406
 */
 
1407
    YY_BUFFER_STATE cern__create_buffer  (FILE * file, int  size )
 
1408
{
1344
1409
        YY_BUFFER_STATE b;
1345
 
 
1346
 
        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
 
1410
    
 
1411
        b = (YY_BUFFER_STATE) cern_alloc(sizeof( struct yy_buffer_state )  );
1347
1412
        if ( ! b )
1348
 
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
1413
                YY_FATAL_ERROR( "out of dynamic memory in cern__create_buffer()" );
1349
1414
 
1350
1415
        b->yy_buf_size = size;
1351
1416
 
1352
1417
        /* yy_ch_buf has to be 2 characters longer than the size given because
1353
1418
         * we need to put in 2 end-of-buffer characters.
1354
1419
         */
1355
 
        b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
 
1420
        b->yy_ch_buf = (char *) cern_alloc(b->yy_buf_size + 2  );
1356
1421
        if ( ! b->yy_ch_buf )
1357
 
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
1422
                YY_FATAL_ERROR( "out of dynamic memory in cern__create_buffer()" );
1358
1423
 
1359
1424
        b->yy_is_our_buffer = 1;
1360
1425
 
1361
 
        yy_init_buffer( b, file );
 
1426
        cern__init_buffer(b,file );
1362
1427
 
1363
1428
        return b;
1364
 
        }
1365
 
 
1366
 
 
1367
 
#ifdef YY_USE_PROTOS
1368
 
void yy_delete_buffer( YY_BUFFER_STATE b )
1369
 
#else
1370
 
void yy_delete_buffer( b )
1371
 
YY_BUFFER_STATE b;
1372
 
#endif
1373
 
        {
 
1429
}
 
1430
 
 
1431
/** Destroy the buffer.
 
1432
 * @param b a buffer created with cern__create_buffer()
 
1433
 * 
 
1434
 */
 
1435
    void cern__delete_buffer (YY_BUFFER_STATE  b )
 
1436
{
 
1437
    
1374
1438
        if ( ! b )
1375
1439
                return;
1376
1440
 
1377
 
        if ( b == yy_current_buffer )
1378
 
                yy_current_buffer = (YY_BUFFER_STATE) 0;
 
1441
        if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
 
1442
                YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1379
1443
 
1380
1444
        if ( b->yy_is_our_buffer )
1381
 
                yy_flex_free( (void *) b->yy_ch_buf );
1382
 
 
1383
 
        yy_flex_free( (void *) b );
1384
 
        }
1385
 
 
1386
 
 
1387
 
#ifndef YY_ALWAYS_INTERACTIVE
1388
 
#ifndef YY_NEVER_INTERACTIVE
1389
 
extern int isatty YY_PROTO(( int ));
1390
 
#endif
1391
 
#endif
1392
 
 
1393
 
#ifdef YY_USE_PROTOS
1394
 
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1395
 
#else
1396
 
void yy_init_buffer( b, file )
1397
 
YY_BUFFER_STATE b;
1398
 
FILE *file;
1399
 
#endif
1400
 
 
1401
 
 
1402
 
        {
1403
 
        yy_flush_buffer( b );
 
1445
                cern_free((void *) b->yy_ch_buf  );
 
1446
 
 
1447
        cern_free((void *) b  );
 
1448
}
 
1449
 
 
1450
#ifndef __cplusplus
 
1451
extern int isatty (int );
 
1452
#endif /* __cplusplus */
 
1453
    
 
1454
/* Initializes or reinitializes a buffer.
 
1455
 * This function is sometimes called more than once on the same buffer,
 
1456
 * such as during a cern_restart() or at EOF.
 
1457
 */
 
1458
    static void cern__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 
1459
 
 
1460
{
 
1461
        int oerrno = errno;
 
1462
    
 
1463
        cern__flush_buffer(b );
1404
1464
 
1405
1465
        b->yy_input_file = file;
1406
1466
        b->yy_fill_buffer = 1;
1407
1467
 
1408
 
#if YY_ALWAYS_INTERACTIVE
1409
 
        b->yy_is_interactive = 1;
1410
 
#else
1411
 
#if YY_NEVER_INTERACTIVE
1412
 
        b->yy_is_interactive = 0;
1413
 
#else
1414
 
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1415
 
#endif
1416
 
#endif
1417
 
        }
1418
 
 
1419
 
 
1420
 
#ifdef YY_USE_PROTOS
1421
 
void yy_flush_buffer( YY_BUFFER_STATE b )
1422
 
#else
1423
 
void yy_flush_buffer( b )
1424
 
YY_BUFFER_STATE b;
1425
 
#endif
1426
 
 
1427
 
        {
1428
 
        if ( ! b )
 
1468
    /* If b is the current buffer, then cern__init_buffer was _probably_
 
1469
     * called from cern_restart() or through yy_get_next_buffer.
 
1470
     * In that case, we don't want to reset the lineno or column.
 
1471
     */
 
1472
    if (b != YY_CURRENT_BUFFER){
 
1473
        b->yy_bs_lineno = 1;
 
1474
        b->yy_bs_column = 0;
 
1475
    }
 
1476
 
 
1477
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
 
1478
    
 
1479
        errno = oerrno;
 
1480
}
 
1481
 
 
1482
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 
1483
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 
1484
 * 
 
1485
 */
 
1486
    void cern__flush_buffer (YY_BUFFER_STATE  b )
 
1487
{
 
1488
        if ( ! b )
1429
1489
                return;
1430
1490
 
1431
1491
        b->yy_n_chars = 0;
1442
1502
        b->yy_at_bol = 1;
1443
1503
        b->yy_buffer_status = YY_BUFFER_NEW;
1444
1504
 
1445
 
        if ( b == yy_current_buffer )
1446
 
                yy_load_buffer_state();
1447
 
        }
1448
 
 
1449
 
 
1450
 
#ifndef YY_NO_SCAN_BUFFER
1451
 
#ifdef YY_USE_PROTOS
1452
 
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1453
 
#else
1454
 
YY_BUFFER_STATE yy_scan_buffer( base, size )
1455
 
char *base;
1456
 
yy_size_t size;
1457
 
#endif
1458
 
        {
 
1505
        if ( b == YY_CURRENT_BUFFER )
 
1506
                cern__load_buffer_state( );
 
1507
}
 
1508
 
 
1509
/** Pushes the new state onto the stack. The new state becomes
 
1510
 *  the current state. This function will allocate the stack
 
1511
 *  if necessary.
 
1512
 *  @param new_buffer The new state.
 
1513
 *  
 
1514
 */
 
1515
void cern_push_buffer_state (YY_BUFFER_STATE new_buffer )
 
1516
{
 
1517
        if (new_buffer == NULL)
 
1518
                return;
 
1519
 
 
1520
        cern_ensure_buffer_stack();
 
1521
 
 
1522
        /* This block is copied from cern__switch_to_buffer. */
 
1523
        if ( YY_CURRENT_BUFFER )
 
1524
                {
 
1525
                /* Flush out information for old buffer. */
 
1526
                *(yy_c_buf_p) = (yy_hold_char);
 
1527
                YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 
1528
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 
1529
                }
 
1530
 
 
1531
        /* Only push if top exists. Otherwise, replace top. */
 
1532
        if (YY_CURRENT_BUFFER)
 
1533
                (yy_buffer_stack_top)++;
 
1534
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
1535
 
 
1536
        /* copied from cern__switch_to_buffer. */
 
1537
        cern__load_buffer_state( );
 
1538
        (yy_did_buffer_switch_on_eof) = 1;
 
1539
}
 
1540
 
 
1541
/** Removes and deletes the top of the stack, if present.
 
1542
 *  The next element becomes the new top.
 
1543
 *  
 
1544
 */
 
1545
void cern_pop_buffer_state (void)
 
1546
{
 
1547
        if (!YY_CURRENT_BUFFER)
 
1548
                return;
 
1549
 
 
1550
        cern__delete_buffer(YY_CURRENT_BUFFER );
 
1551
        YY_CURRENT_BUFFER_LVALUE = NULL;
 
1552
        if ((yy_buffer_stack_top) > 0)
 
1553
                --(yy_buffer_stack_top);
 
1554
 
 
1555
        if (YY_CURRENT_BUFFER) {
 
1556
                cern__load_buffer_state( );
 
1557
                (yy_did_buffer_switch_on_eof) = 1;
 
1558
        }
 
1559
}
 
1560
 
 
1561
/* Allocates the stack if it does not exist.
 
1562
 *  Guarantees space for at least one push.
 
1563
 */
 
1564
static void cern_ensure_buffer_stack (void)
 
1565
{
 
1566
        int num_to_alloc;
 
1567
    
 
1568
        if (!(yy_buffer_stack)) {
 
1569
 
 
1570
                /* First allocation is just for 2 elements, since we don't know if this
 
1571
                 * scanner will even need a stack. We use 2 instead of 1 to avoid an
 
1572
                 * immediate realloc on the next call.
 
1573
         */
 
1574
                num_to_alloc = 1;
 
1575
                (yy_buffer_stack) = (struct yy_buffer_state**)cern_alloc
 
1576
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
 
1577
                                                                );
 
1578
                
 
1579
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
 
1580
                                
 
1581
                (yy_buffer_stack_max) = num_to_alloc;
 
1582
                (yy_buffer_stack_top) = 0;
 
1583
                return;
 
1584
        }
 
1585
 
 
1586
        if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 
1587
 
 
1588
                /* Increase the buffer to prepare for a possible push. */
 
1589
                int grow_size = 8 /* arbitrary grow size */;
 
1590
 
 
1591
                num_to_alloc = (yy_buffer_stack_max) + grow_size;
 
1592
                (yy_buffer_stack) = (struct yy_buffer_state**)cern_realloc
 
1593
                                                                ((yy_buffer_stack),
 
1594
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
 
1595
                                                                );
 
1596
 
 
1597
                /* zero only the new slots.*/
 
1598
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
 
1599
                (yy_buffer_stack_max) = num_to_alloc;
 
1600
        }
 
1601
}
 
1602
 
 
1603
/** Setup the input buffer state to scan directly from a user-specified character buffer.
 
1604
 * @param base the character buffer
 
1605
 * @param size the size in bytes of the character buffer
 
1606
 * 
 
1607
 * @return the newly allocated buffer state object. 
 
1608
 */
 
1609
YY_BUFFER_STATE cern__scan_buffer  (char * base, yy_size_t  size )
 
1610
{
1459
1611
        YY_BUFFER_STATE b;
1460
 
 
 
1612
    
1461
1613
        if ( size < 2 ||
1462
1614
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
1463
1615
             base[size-1] != YY_END_OF_BUFFER_CHAR )
1464
1616
                /* They forgot to leave room for the EOB's. */
1465
1617
                return 0;
1466
1618
 
1467
 
        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
 
1619
        b = (YY_BUFFER_STATE) cern_alloc(sizeof( struct yy_buffer_state )  );
1468
1620
        if ( ! b )
1469
 
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
 
1621
                YY_FATAL_ERROR( "out of dynamic memory in cern__scan_buffer()" );
1470
1622
 
1471
1623
        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1472
1624
        b->yy_buf_pos = b->yy_ch_buf = base;
1478
1630
        b->yy_fill_buffer = 0;
1479
1631
        b->yy_buffer_status = YY_BUFFER_NEW;
1480
1632
 
1481
 
        yy_switch_to_buffer( b );
 
1633
        cern__switch_to_buffer(b  );
1482
1634
 
1483
1635
        return b;
1484
 
        }
1485
 
#endif
1486
 
 
1487
 
 
1488
 
#ifndef YY_NO_SCAN_STRING
1489
 
#ifdef YY_USE_PROTOS
1490
 
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1491
 
#else
1492
 
YY_BUFFER_STATE yy_scan_string( yy_str )
1493
 
yyconst char *yy_str;
1494
 
#endif
1495
 
        {
1496
 
        int len;
1497
 
        for ( len = 0; yy_str[len]; ++len )
1498
 
                ;
1499
 
 
1500
 
        return yy_scan_bytes( yy_str, len );
1501
 
        }
1502
 
#endif
1503
 
 
1504
 
 
1505
 
#ifndef YY_NO_SCAN_BYTES
1506
 
#ifdef YY_USE_PROTOS
1507
 
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1508
 
#else
1509
 
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1510
 
yyconst char *bytes;
1511
 
int len;
1512
 
#endif
1513
 
        {
 
1636
}
 
1637
 
 
1638
/** Setup the input buffer state to scan a string. The next call to cern_lex() will
 
1639
 * scan from a @e copy of @a str.
 
1640
 * @param yystr a NUL-terminated string to scan
 
1641
 * 
 
1642
 * @return the newly allocated buffer state object.
 
1643
 * @note If you want to scan bytes that may contain NUL values, then use
 
1644
 *       cern__scan_bytes() instead.
 
1645
 */
 
1646
YY_BUFFER_STATE cern__scan_string (yyconst char * yystr )
 
1647
{
 
1648
    
 
1649
        return cern__scan_bytes(yystr,strlen(yystr) );
 
1650
}
 
1651
 
 
1652
/** Setup the input buffer state to scan the given bytes. The next call to cern_lex() will
 
1653
 * scan from a @e copy of @a bytes.
 
1654
 * @param bytes the byte buffer to scan
 
1655
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 
1656
 * 
 
1657
 * @return the newly allocated buffer state object.
 
1658
 */
 
1659
YY_BUFFER_STATE cern__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 
1660
{
1514
1661
        YY_BUFFER_STATE b;
1515
1662
        char *buf;
1516
1663
        yy_size_t n;
1517
1664
        int i;
1518
 
 
 
1665
    
1519
1666
        /* Get memory for full buffer, including space for trailing EOB's. */
1520
 
        n = len + 2;
1521
 
        buf = (char *) yy_flex_alloc( n );
 
1667
        n = _yybytes_len + 2;
 
1668
        buf = (char *) cern_alloc(n  );
1522
1669
        if ( ! buf )
1523
 
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1524
 
 
1525
 
        for ( i = 0; i < len; ++i )
1526
 
                buf[i] = bytes[i];
1527
 
 
1528
 
        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1529
 
 
1530
 
        b = yy_scan_buffer( buf, n );
 
1670
                YY_FATAL_ERROR( "out of dynamic memory in cern__scan_bytes()" );
 
1671
 
 
1672
        for ( i = 0; i < _yybytes_len; ++i )
 
1673
                buf[i] = yybytes[i];
 
1674
 
 
1675
        buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 
1676
 
 
1677
        b = cern__scan_buffer(buf,n );
1531
1678
        if ( ! b )
1532
 
                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
 
1679
                YY_FATAL_ERROR( "bad buffer in cern__scan_bytes()" );
1533
1680
 
1534
1681
        /* It's okay to grow etc. this buffer, and we should throw it
1535
1682
         * away when we're done.
1537
1684
        b->yy_is_our_buffer = 1;
1538
1685
 
1539
1686
        return b;
1540
 
        }
1541
 
#endif
1542
 
 
1543
 
 
1544
 
#ifndef YY_NO_PUSH_STATE
1545
 
#ifdef YY_USE_PROTOS
1546
 
static void yy_push_state( int new_state )
1547
 
#else
1548
 
static void yy_push_state( new_state )
1549
 
int new_state;
1550
 
#endif
1551
 
        {
1552
 
        if ( yy_start_stack_ptr >= yy_start_stack_depth )
1553
 
                {
1554
 
                yy_size_t new_size;
1555
 
 
1556
 
                yy_start_stack_depth += YY_START_STACK_INCR;
1557
 
                new_size = yy_start_stack_depth * sizeof( int );
1558
 
 
1559
 
                if ( ! yy_start_stack )
1560
 
                        yy_start_stack = (int *) yy_flex_alloc( new_size );
1561
 
 
1562
 
                else
1563
 
                        yy_start_stack = (int *) yy_flex_realloc(
1564
 
                                        (void *) yy_start_stack, new_size );
1565
 
 
1566
 
                if ( ! yy_start_stack )
1567
 
                        YY_FATAL_ERROR(
1568
 
                        "out of memory expanding start-condition stack" );
1569
 
                }
1570
 
 
1571
 
        yy_start_stack[yy_start_stack_ptr++] = YY_START;
1572
 
 
1573
 
        BEGIN(new_state);
1574
 
        }
1575
 
#endif
1576
 
 
1577
 
 
1578
 
#ifndef YY_NO_POP_STATE
1579
 
static void yy_pop_state()
1580
 
        {
1581
 
        if ( --yy_start_stack_ptr < 0 )
1582
 
                YY_FATAL_ERROR( "start-condition stack underflow" );
1583
 
 
1584
 
        BEGIN(yy_start_stack[yy_start_stack_ptr]);
1585
 
        }
1586
 
#endif
1587
 
 
1588
 
 
1589
 
#ifndef YY_NO_TOP_STATE
1590
 
static int yy_top_state()
1591
 
        {
1592
 
        return yy_start_stack[yy_start_stack_ptr - 1];
1593
 
        }
1594
 
#endif
 
1687
}
1595
1688
 
1596
1689
#ifndef YY_EXIT_FAILURE
1597
1690
#define YY_EXIT_FAILURE 2
1598
1691
#endif
1599
1692
 
1600
 
#ifdef YY_USE_PROTOS
1601
 
static void yy_fatal_error( yyconst char msg[] )
1602
 
#else
1603
 
static void yy_fatal_error( msg )
1604
 
char msg[];
1605
 
#endif
1606
 
        {
1607
 
        (void) fprintf( stderr, "%s\n", msg );
 
1693
static void yy_fatal_error (yyconst char* msg )
 
1694
{
 
1695
        (void) fprintf( stderr, "%s\n", msg );
1608
1696
        exit( YY_EXIT_FAILURE );
1609
 
        }
1610
 
 
1611
 
 
 
1697
}
1612
1698
 
1613
1699
/* Redefine yyless() so it works in section 3 code. */
1614
1700
 
1616
1702
#define yyless(n) \
1617
1703
        do \
1618
1704
                { \
1619
 
                /* Undo effects of setting up yytext. */ \
1620
 
                yytext[yyleng] = yy_hold_char; \
1621
 
                yy_c_buf_p = yytext + n; \
1622
 
                yy_hold_char = *yy_c_buf_p; \
1623
 
                *yy_c_buf_p = '\0'; \
1624
 
                yyleng = n; \
 
1705
                /* Undo effects of setting up cern_text. */ \
 
1706
        int yyless_macro_arg = (n); \
 
1707
        YY_LESS_LINENO(yyless_macro_arg);\
 
1708
                cern_text[cern_leng] = (yy_hold_char); \
 
1709
                (yy_c_buf_p) = cern_text + yyless_macro_arg; \
 
1710
                (yy_hold_char) = *(yy_c_buf_p); \
 
1711
                *(yy_c_buf_p) = '\0'; \
 
1712
                cern_leng = yyless_macro_arg; \
1625
1713
                } \
1626
1714
        while ( 0 )
1627
1715
 
1628
 
 
1629
 
/* Internal utility routines. */
1630
 
 
1631
 
#ifndef yytext_ptr
1632
 
#ifdef YY_USE_PROTOS
1633
 
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
 
1716
/* Accessor  methods (get/set functions) to struct members. */
 
1717
 
 
1718
/** Get the current line number.
 
1719
 * 
 
1720
 */
 
1721
int cern_get_lineno  (void)
 
1722
{
 
1723
        
 
1724
    return cern_lineno;
 
1725
}
 
1726
 
 
1727
/** Get the input stream.
 
1728
 * 
 
1729
 */
 
1730
FILE *cern_get_in  (void)
 
1731
{
 
1732
        return cern_in;
 
1733
}
 
1734
 
 
1735
/** Get the output stream.
 
1736
 * 
 
1737
 */
 
1738
FILE *cern_get_out  (void)
 
1739
{
 
1740
        return cern_out;
 
1741
}
 
1742
 
 
1743
/** Get the length of the current token.
 
1744
 * 
 
1745
 */
 
1746
int cern_get_leng  (void)
 
1747
{
 
1748
        return cern_leng;
 
1749
}
 
1750
 
 
1751
/** Get the current token.
 
1752
 * 
 
1753
 */
 
1754
 
 
1755
char *cern_get_text  (void)
 
1756
{
 
1757
        return cern_text;
 
1758
}
 
1759
 
 
1760
/** Set the current line number.
 
1761
 * @param line_number
 
1762
 * 
 
1763
 */
 
1764
void cern_set_lineno (int  line_number )
 
1765
{
 
1766
    
 
1767
    cern_lineno = line_number;
 
1768
}
 
1769
 
 
1770
/** Set the input stream. This does not discard the current
 
1771
 * input buffer.
 
1772
 * @param in_str A readable stream.
 
1773
 * 
 
1774
 * @see cern__switch_to_buffer
 
1775
 */
 
1776
void cern_set_in (FILE *  in_str )
 
1777
{
 
1778
        cern_in = in_str ;
 
1779
}
 
1780
 
 
1781
void cern_set_out (FILE *  out_str )
 
1782
{
 
1783
        cern_out = out_str ;
 
1784
}
 
1785
 
 
1786
int cern_get_debug  (void)
 
1787
{
 
1788
        return cern__flex_debug;
 
1789
}
 
1790
 
 
1791
void cern_set_debug (int  bdebug )
 
1792
{
 
1793
        cern__flex_debug = bdebug ;
 
1794
}
 
1795
 
 
1796
static int yy_init_globals (void)
 
1797
{
 
1798
        /* Initialization is the same as for the non-reentrant scanner.
 
1799
     * This function is called from cern_lex_destroy(), so don't allocate here.
 
1800
     */
 
1801
 
 
1802
    (yy_buffer_stack) = 0;
 
1803
    (yy_buffer_stack_top) = 0;
 
1804
    (yy_buffer_stack_max) = 0;
 
1805
    (yy_c_buf_p) = (char *) 0;
 
1806
    (yy_init) = 0;
 
1807
    (yy_start) = 0;
 
1808
 
 
1809
/* Defined in main.c */
 
1810
#ifdef YY_STDINIT
 
1811
    cern_in = stdin;
 
1812
    cern_out = stdout;
1634
1813
#else
1635
 
static void yy_flex_strncpy( s1, s2, n )
1636
 
char *s1;
1637
 
yyconst char *s2;
1638
 
int n;
 
1814
    cern_in = (FILE *) 0;
 
1815
    cern_out = (FILE *) 0;
1639
1816
#endif
1640
 
        {
 
1817
 
 
1818
    /* For future reference: Set errno on error, since we are called by
 
1819
     * cern_lex_init()
 
1820
     */
 
1821
    return 0;
 
1822
}
 
1823
 
 
1824
/* cern_lex_destroy is for both reentrant and non-reentrant scanners. */
 
1825
int cern_lex_destroy  (void)
 
1826
{
 
1827
    
 
1828
    /* Pop the buffer stack, destroying each element. */
 
1829
        while(YY_CURRENT_BUFFER){
 
1830
                cern__delete_buffer(YY_CURRENT_BUFFER  );
 
1831
                YY_CURRENT_BUFFER_LVALUE = NULL;
 
1832
                cern_pop_buffer_state();
 
1833
        }
 
1834
 
 
1835
        /* Destroy the stack itself. */
 
1836
        cern_free((yy_buffer_stack) );
 
1837
        (yy_buffer_stack) = NULL;
 
1838
 
 
1839
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
 
1840
     * cern_lex() is called, initialization will occur. */
 
1841
    yy_init_globals( );
 
1842
 
 
1843
    return 0;
 
1844
}
 
1845
 
 
1846
/*
 
1847
 * Internal utility routines.
 
1848
 */
 
1849
 
 
1850
#ifndef yytext_ptr
 
1851
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 
1852
{
1641
1853
        register int i;
1642
1854
        for ( i = 0; i < n; ++i )
1643
1855
                s1[i] = s2[i];
1644
 
        }
 
1856
}
1645
1857
#endif
1646
1858
 
1647
1859
#ifdef YY_NEED_STRLEN
1648
 
#ifdef YY_USE_PROTOS
1649
 
static int yy_flex_strlen( yyconst char *s )
1650
 
#else
1651
 
static int yy_flex_strlen( s )
1652
 
yyconst char *s;
1653
 
#endif
1654
 
        {
 
1860
static int yy_flex_strlen (yyconst char * s )
 
1861
{
1655
1862
        register int n;
1656
1863
        for ( n = 0; s[n]; ++n )
1657
1864
                ;
1658
1865
 
1659
1866
        return n;
1660
 
        }
1661
 
#endif
1662
 
 
1663
 
 
1664
 
#ifdef YY_USE_PROTOS
1665
 
static void *yy_flex_alloc( yy_size_t size )
1666
 
#else
1667
 
static void *yy_flex_alloc( size )
1668
 
yy_size_t size;
1669
 
#endif
1670
 
        {
 
1867
}
 
1868
#endif
 
1869
 
 
1870
void *cern_alloc (yy_size_t  size )
 
1871
{
1671
1872
        return (void *) malloc( size );
1672
 
        }
 
1873
}
1673
1874
 
1674
 
#ifdef YY_USE_PROTOS
1675
 
static void *yy_flex_realloc( void *ptr, yy_size_t size )
1676
 
#else
1677
 
static void *yy_flex_realloc( ptr, size )
1678
 
void *ptr;
1679
 
yy_size_t size;
1680
 
#endif
1681
 
        {
 
1875
void *cern_realloc  (void * ptr, yy_size_t  size )
 
1876
{
1682
1877
        /* The cast to (char *) in the following accommodates both
1683
1878
         * implementations that use char* generic pointers, and those
1684
1879
         * that use void* generic pointers.  It works with the latter
1687
1882
         * as though doing an assignment.
1688
1883
         */
1689
1884
        return (void *) realloc( (char *) ptr, size );
1690
 
        }
1691
 
 
1692
 
#ifdef YY_USE_PROTOS
1693
 
static void yy_flex_free( void *ptr )
1694
 
#else
1695
 
static void yy_flex_free( ptr )
1696
 
void *ptr;
1697
 
#endif
1698
 
        {
1699
 
        free( ptr );
1700
 
        }
1701
 
 
1702
 
#if YY_MAIN
1703
 
int main()
1704
 
        {
1705
 
        yylex();
1706
 
        return 0;
1707
 
        }
1708
 
#endif
1709
 
#line 81 "imap_cern.l"
 
1885
}
 
1886
 
 
1887
void cern_free (void * ptr )
 
1888
{
 
1889
        free( (char *) ptr );   /* see cern_realloc() for (char *) cast */
 
1890
}
 
1891
 
 
1892
#define YYTABLES_NAME "yytables"
 
1893
 
 
1894
#line 90 "imap_cern.l"
 
1895
 
 
1896
 
 
1897
 
 
1898
 
 
1899