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
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
18
#line 19 "imap_cern_lex.c"
19
/* A lexical scanner generated by flex */
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 $
26
#define YY_FLEX_MAJOR_VERSION 2
27
#define YY_FLEX_MINOR_VERSION 5
32
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
45
/* Use prototypes in function declarations. */
48
/* The "const" storage-class-modifier is valid. */
51
#else /* ! __cplusplus */
59
#endif /* ! __cplusplus */
78
#define YY_PROTO(proto) proto
80
#define YY_PROTO(proto) ()
83
/* Returned upon end-of-file. */
86
/* Promotes a possibly negative, possibly signed char to an unsigned
87
* integer for use as an array index. If the signed char is negative,
88
* we want to instead treat it as an 8-bit unsigned char, hence the
91
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
93
/* Enter a start condition. This macro really ought to take a parameter,
94
* but we do it the disgusting crufty way forced on us by the ()-less
95
* definition of BEGIN.
97
#define BEGIN yy_start = 1 + 2 *
99
/* Translate the current start state into a value that can be later handed
100
* to BEGIN to return to the state. The YYSTATE alias is for lex
103
#define YY_START ((yy_start - 1) / 2)
104
#define YYSTATE YY_START
106
/* Action number for EOF rule of a given start state. */
107
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
109
/* Special action meaning "start processing a new file". */
110
#define YY_NEW_FILE yyrestart( yyin )
112
#define YY_END_OF_BUFFER_CHAR 0
114
/* Size of default input buffer. */
115
#define YY_BUF_SIZE 16384
117
typedef struct yy_buffer_state *YY_BUFFER_STATE;
120
extern FILE *yyin, *yyout;
122
#define EOB_ACT_CONTINUE_SCAN 0
123
#define EOB_ACT_END_OF_FILE 1
124
#define EOB_ACT_LAST_MATCH 2
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:
130
* if ( condition_holds )
133
* do_something_else();
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.
140
/* Return all but the first 'n' matched characters back to the input stream. */
145
/* Undo effects of setting up yytext. */ \
146
*yy_cp = yy_hold_char; \
147
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 */ \
153
#define unput(c) yyunput( c, yytext_ptr )
155
/* The following is because we cannot portably get our hands on size_t
156
* (without autoconf's help, which isn't available because we want
157
* flex-generated scanners to compile on their own).
159
typedef unsigned int yy_size_t;
162
struct yy_buffer_state
166
char *yy_ch_buf; /* input buffer */
167
char *yy_buf_pos; /* current position in input buffer */
169
/* Size of input buffer in bytes, not including room for EOB
172
yy_size_t yy_buf_size;
174
/* Number of characters read into yy_ch_buf, not including EOB
179
/* Whether we "own" the buffer - i.e., we know we created it,
180
* and can realloc() it to grow it, and should free() it to
183
int yy_is_our_buffer;
185
/* Whether this is an "interactive" input source; if so, and
186
* if we're using stdio for input, then we want to use getc()
187
* instead of fread(), to make sure we stop fetching input after
190
int yy_is_interactive;
192
/* Whether we're considered to be at the beginning of a line.
193
* If so, '^' rules will be active on the next match, otherwise
198
/* Whether to try to fill the input buffer when we reach the
203
int yy_buffer_status;
204
#define YY_BUFFER_NEW 0
205
#define YY_BUFFER_NORMAL 1
206
/* When an EOF's been seen but there's still some text to process
207
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
208
* shouldn't try reading from the input source any more. We might
209
* still have a bunch of tokens to match, though, because of
210
* possible backing-up.
212
* 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.
216
#define YY_BUFFER_EOF_PENDING 2
219
static YY_BUFFER_STATE yy_current_buffer = 0;
221
/* We provide macros for accessing buffer states in case in the
222
* future we want to put the buffer states in a more general
225
#define YY_CURRENT_BUFFER yy_current_buffer
228
/* yy_hold_char holds the character lost when yytext is formed. */
229
static char yy_hold_char;
231
static int yy_n_chars; /* number of characters read into yy_ch_buf */
236
/* Points to current character in buffer. */
237
static char *yy_c_buf_p = (char *) 0;
238
static int yy_init = 1; /* whether we need to initialize */
239
static int yy_start = 0; /* start state number */
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 ...
244
static int yy_did_buffer_switch_on_eof;
246
void yyrestart YY_PROTO(( FILE *input_file ));
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 )
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 ));
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 * ));
264
#define yy_new_buffer yy_create_buffer
266
#define yy_set_interactive(is_interactive) \
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; \
273
#define yy_set_bol(at_bol) \
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; \
280
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
284
#define YY_SKIP_YYWRAP
285
typedef unsigned char YY_CHAR;
286
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
287
typedef int yy_state_type;
289
#define yytext_ptr yytext
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[] ));
296
/* Done after the current pattern has been matched and before the
297
* corresponding action - sets up yytext.
299
#define YY_DO_BEFORE_ACTION \
300
yytext_ptr = yy_bp; \
301
yyleng = (int) (yy_cp - yy_bp); \
302
yy_hold_char = *yy_cp; \
306
#define YY_NUM_RULES 13
307
#define YY_END_OF_BUFFER 14
308
static yyconst short int yy_accept[94] =
310
10, 10, 0, 0, 14, 12, 11, 11, 12, 10,
311
10, 10, 12, 12, 10, 12, 12, 13, 4, 0,
312
9, 11, 10, 10, 10, 10, 0, 0, 10, 10,
313
0, 0, 0, 4, 0, 0, 0, 0, 6, 0,
314
7, 5, 0, 0, 9, 0, 0, 8, 0, 0,
315
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
316
0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
317
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
318
0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
323
static yyconst int yy_ec[256] =
325
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
326
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328
1, 2, 1, 1, 4, 5, 1, 1, 1, 6,
329
7, 1, 8, 9, 10, 11, 1, 12, 13, 13,
330
13, 14, 13, 15, 13, 13, 16, 17, 1, 1,
331
1, 1, 1, 1, 18, 1, 19, 20, 21, 22,
332
1, 23, 24, 1, 1, 25, 1, 26, 27, 28,
333
1, 29, 30, 31, 32, 1, 1, 1, 33, 1,
334
1, 1, 1, 1, 1, 1, 18, 1, 19, 20,
336
21, 22, 1, 23, 24, 1, 1, 25, 1, 26,
337
27, 28, 1, 29, 30, 31, 32, 1, 1, 1,
338
33, 1, 1, 1, 1, 1, 1, 1, 1, 1,
339
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
340
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
341
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
342
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
343
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
344
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
345
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
347
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
348
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
349
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
350
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
351
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
355
static yyconst int yy_meta[34] =
357
1, 2, 3, 1, 1, 1, 1, 1, 2, 1,
358
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
359
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363
static yyconst short int yy_base[98] =
365
0, 0, 200, 199, 201, 197, 32, 34, 204, 35,
366
46, 0, 39, 49, 68, 37, 51, 196, 204, 195,
367
204, 41, 74, 0, 0, 80, 36, 52, 58, 59,
368
50, 94, 194, 204, 95, 97, 70, 74, 193, 76,
369
192, 99, 96, 104, 114, 101, 180, 190, 180, 175,
370
175, 180, 174, 175, 170, 170, 177, 109, 116, 169,
371
170, 165, 165, 164, 152, 151, 142, 142, 146, 148,
372
146, 119, 121, 105, 122, 123, 125, 124, 126, 129,
373
130, 131, 127, 132, 134, 41, 136, 140, 138, 142,
374
144, 37, 204, 168, 171, 174, 177
378
static yyconst short int yy_def[98] =
380
93, 1, 94, 94, 93, 95, 93, 93, 93, 95,
381
10, 10, 95, 95, 95, 95, 95, 96, 93, 95,
382
93, 93, 10, 10, 15, 10, 95, 95, 15, 15,
383
95, 95, 96, 93, 95, 95, 95, 95, 95, 95,
384
95, 95, 95, 93, 93, 95, 93, 95, 93, 93,
385
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
386
93, 93, 93, 93, 93, 93, 93, 93, 93, 97,
387
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
388
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
389
97, 97, 0, 93, 93, 93, 93
393
static yyconst short int yy_nxt[238] =
395
6, 7, 8, 6, 6, 6, 6, 6, 9, 10,
396
11, 12, 12, 12, 12, 12, 6, 6, 13, 14,
397
15, 6, 6, 6, 6, 6, 6, 16, 17, 6,
398
6, 6, 6, 22, 22, 22, 22, 21, 21, 21,
399
72, 21, 22, 22, 72, 23, 24, 24, 24, 24,
400
24, 21, 21, 21, 21, 25, 20, 26, 26, 26,
401
26, 26, 27, 31, 35, 20, 20, 20, 20, 28,
402
21, 32, 21, 36, 37, 29, 21, 29, 21, 30,
403
30, 30, 30, 30, 20, 26, 26, 26, 26, 26,
404
20, 26, 26, 26, 26, 26, 21, 21, 21, 21,
406
44, 45, 41, 21, 42, 44, 44, 43, 72, 47,
407
59, 59, 38, 39, 40, 44, 44, 59, 59, 47,
408
46, 60, 72, 73, 72, 72, 72, 72, 72, 72,
409
72, 48, 72, 72, 72, 72, 76, 72, 74, 72,
410
75, 72, 77, 72, 81, 72, 80, 72, 86, 72,
411
85, 72, 70, 78, 79, 82, 69, 68, 83, 84,
412
92, 87, 67, 89, 90, 66, 88, 91, 18, 18,
413
18, 20, 65, 20, 33, 33, 33, 71, 71, 64,
414
63, 62, 61, 58, 57, 56, 55, 54, 53, 52,
415
51, 50, 21, 49, 21, 21, 34, 21, 34, 21,
417
93, 19, 19, 5, 93, 93, 93, 93, 93, 93,
418
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
419
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
420
93, 93, 93, 93, 93, 93, 93
423
static yyconst short int yy_chk[238] =
425
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428
1, 1, 1, 7, 7, 8, 8, 10, 27, 16,
429
92, 13, 22, 22, 86, 10, 10, 10, 10, 10,
430
10, 14, 31, 17, 28, 10, 11, 11, 11, 11,
431
11, 11, 13, 16, 27, 29, 30, 29, 30, 14,
432
15, 17, 37, 28, 31, 15, 38, 15, 40, 15,
433
15, 15, 15, 15, 23, 23, 23, 23, 23, 23,
434
26, 26, 26, 26, 26, 26, 32, 35, 43, 36,
436
42, 42, 37, 46, 38, 44, 44, 40, 74, 44,
437
58, 58, 32, 35, 36, 45, 45, 59, 59, 45,
438
43, 59, 72, 72, 73, 75, 76, 78, 77, 79,
439
83, 46, 80, 81, 82, 84, 74, 85, 73, 87,
440
73, 89, 75, 88, 79, 90, 78, 91, 84, 71,
441
83, 70, 69, 76, 77, 80, 68, 67, 81, 82,
442
91, 85, 66, 88, 89, 65, 87, 90, 94, 94,
443
94, 95, 64, 95, 96, 96, 96, 97, 97, 63,
444
62, 61, 60, 57, 56, 55, 54, 53, 52, 51,
445
50, 49, 48, 47, 41, 39, 33, 20, 18, 6,
447
5, 4, 3, 93, 93, 93, 93, 93, 93, 93,
448
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
449
93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
450
93, 93, 93, 93, 93, 93, 93
453
static yy_state_type yy_last_accepting_state;
454
static char *yy_last_accepting_cpos;
456
/* The intent behind this definition is that it'll catch
457
* any uses of REJECT which flex missed.
459
#define REJECT reject_used_but_not_detected
460
#define yymore() yymore_used_but_not_detected
461
#define YY_MORE_ADJ 0
462
#define YY_RESTORE_YY_MORE_OFFSET
464
#line 1 "imap_cern.l"
466
#line 2 "imap_cern.l"
468
* This is a plug-in for the GIMP.
470
* Generates clickable image maps.
472
* Copyright (C) 1998-1999 Maurits Rijk lpeek.mrijk@consunet.nl
474
* This program is free software; you can redistribute it and/or modify
475
* it under the terms of the GNU General Public License as published by
476
* the Free Software Foundation; either version 2 of the License, or
477
* (at your option) any later version.
479
* This program is distributed in the hope that it will be useful,
480
* but WITHOUT ANY WARRANTY; without even the implied warranty of
481
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
482
* GNU General Public License for more details.
484
* You should have received a copy of the GNU General Public License
485
* along with this program; if not, write to the Free Software
486
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
492
#include "imap_cern_parse.h"
495
#line 494 "imap_cern_lex.c"
497
/* Macros after this point can all be overridden by user definitions in
501
#ifndef YY_SKIP_YYWRAP
503
extern "C" int yywrap YY_PROTO(( void ));
505
extern int yywrap YY_PROTO(( void ));
510
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
514
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
517
#ifdef YY_NEED_STRLEN
518
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
523
static int yyinput YY_PROTO(( void ));
525
static int input YY_PROTO(( void ));
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 ));
536
#ifndef YY_NO_POP_STATE
537
static void yy_pop_state YY_PROTO(( void ));
539
#ifndef YY_NO_TOP_STATE
540
static int yy_top_state YY_PROTO(( void ));
544
#define YY_NO_PUSH_STATE 1
545
#define YY_NO_POP_STATE 1
546
#define YY_NO_TOP_STATE 1
549
#ifdef YY_MALLOC_DECL
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).
564
/* Amount of stuff to slurp up with each read. */
565
#ifndef YY_READ_BUF_SIZE
566
#define YY_READ_BUF_SIZE 8192
569
/* Copy whatever the last rule matched to the standard output. */
572
/* This used to be an fputs(), but since the string might contain NUL's,
573
* we now use fwrite().
575
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
578
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
579
* is returned in "result".
582
#define YY_INPUT(buf,result,max_size) \
583
if ( yy_current_buffer->yy_is_interactive ) \
586
for ( n = 0; n < max_size && \
587
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
590
buf[n++] = (char) c; \
591
if ( c == EOF && ferror( yyin ) ) \
592
YY_FATAL_ERROR( "input in flex scanner failed" ); \
595
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
596
&& ferror( yyin ) ) \
597
YY_FATAL_ERROR( "input in flex scanner failed" );
600
/* No semi-colon after return; correct usage is to write "yyterminate();" -
601
* we don't want an extra ';' after the "return" because that will cause
602
* some compilers to complain about unreachable statements.
605
#define yyterminate() return YY_NULL
608
/* Number of entries by which start-condition stack grows. */
609
#ifndef YY_START_STACK_INCR
610
#define YY_START_STACK_INCR 25
613
/* Report a fatal error. */
614
#ifndef YY_FATAL_ERROR
615
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
618
/* Default declaration of generated scanner - a define so the user can
619
* easily add parameters.
622
#define YY_DECL int yylex YY_PROTO(( void ))
625
/* Code executed at the beginning of each rule, after yytext and yyleng
628
#ifndef YY_USER_ACTION
629
#define YY_USER_ACTION
632
/* Code executed at the end of each rule. */
634
#define YY_BREAK break;
637
#define YY_RULE_SETUP \
642
register yy_state_type yy_current_state;
643
register char *yy_cp, *yy_bp;
646
#line 36 "imap_cern.l"
649
#line 648 "imap_cern_lex.c"
660
yy_start = 1; /* first start state */
668
if ( ! yy_current_buffer )
670
yy_create_buffer( yyin, YY_BUF_SIZE );
672
yy_load_buffer_state();
675
while ( 1 ) /* loops until end-of-file is reached */
679
/* Support of yytext. */
680
*yy_cp = yy_hold_char;
682
/* yy_bp points to the position in yy_ch_buf of the start of
687
yy_current_state = yy_start;
691
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
692
if ( yy_accept[yy_current_state] )
694
yy_last_accepting_state = yy_current_state;
695
yy_last_accepting_cpos = yy_cp;
697
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
699
yy_current_state = (int) yy_def[yy_current_state];
700
if ( yy_current_state >= 94 )
701
yy_c = yy_meta[(unsigned int) yy_c];
703
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
706
while ( yy_base[yy_current_state] != 204 );
709
yy_act = yy_accept[yy_current_state];
711
{ /* have to back up */
712
yy_cp = yy_last_accepting_cpos;
713
yy_current_state = yy_last_accepting_state;
714
yy_act = yy_accept[yy_current_state];
720
do_action: /* This label is used only to access EOF actions. */
724
{ /* beginning of action switch */
725
case 0: /* must back up */
726
/* 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;
734
#line 38 "imap_cern.l"
742
#line 43 "imap_cern.l"
750
#line 48 "imap_cern.l"
753
return BEGIN_COMMENT;
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 */
761
#line 53 "imap_cern.l"
764
strcpy(cern_lval.id, yytext);
770
#line 59 "imap_cern.l"
775
#line 61 "imap_cern.l"
780
#line 63 "imap_cern.l"
785
#line 65 "imap_cern.l"
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 */
793
#line 67 "imap_cern.l"
795
strcpy(cern_lval.id, yytext);
801
#line 72 "imap_cern.l"
803
cern_lval.value = atof(yytext);
809
#line 77 "imap_cern.l"
810
; /* Eat white space */
814
#line 79 "imap_cern.l"
819
#line 81 "imap_cern.l"
822
#line 821 "imap_cern_lex.c"
823
case YY_STATE_EOF(INITIAL):
824
case YY_STATE_EOF(comment):
827
case YY_END_OF_BUFFER:
829
/* Amount of text matched not including the EOB char. */
830
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
832
/* Undo the effects of YY_DO_BEFORE_ACTION. */
833
*yy_cp = yy_hold_char;
834
YY_RESTORE_YY_MORE_OFFSET
836
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
838
/* We're scanning a new file or input source. It's
839
* 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
843
* globals. Here is the right place to do so, because
844
* this is the first action (other than possibly a
845
* back-up) that will match for the new input source.
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;
852
/* Note that here we test for yy_c_buf_p "<=" to the position
853
* of the first EOB in the buffer, since yy_c_buf_p will
854
* already have been incremented past the NUL character
855
* (since all states make transitions on EOB to the
856
* end-of-buffer state). Contrast this with the test
859
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
860
{ /* This was really a NUL. */
861
yy_state_type yy_next_state;
863
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
865
yy_current_state = yy_get_previous_state();
867
/* Okay, we're now positioned to make the NUL
868
* transition. We couldn't have
869
* yy_get_previous_state() go ahead and do it
870
* for us because it doesn't know how to deal
871
* with the possibility of jamming (and we don't
872
* want to build jamming into it because then it
873
* will run more slowly).
876
yy_next_state = yy_try_NUL_trans( yy_current_state );
878
yy_bp = yytext_ptr + YY_MORE_ADJ;
882
/* Consume the NUL. */
883
yy_cp = ++yy_c_buf_p;
884
yy_current_state = yy_next_state;
895
else switch ( yy_get_next_buffer() )
897
case EOB_ACT_END_OF_FILE:
899
yy_did_buffer_switch_on_eof = 0;
903
/* Note: because we've taken care in
904
* yy_get_next_buffer() to have set up
905
* yytext, we can now set up
906
* yy_c_buf_p so that if some total
907
* hoser (like flex itself) wants to
908
* call the scanner after we return the
909
* YY_NULL, it'll still work - another
910
* YY_NULL will get returned.
912
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
914
yy_act = YY_STATE_EOF(YY_START);
920
if ( ! yy_did_buffer_switch_on_eof )
926
case EOB_ACT_CONTINUE_SCAN:
928
yytext_ptr + yy_amount_of_matched_text;
930
yy_current_state = yy_get_previous_state();
933
yy_bp = yytext_ptr + YY_MORE_ADJ;
936
case EOB_ACT_LAST_MATCH:
938
&yy_current_buffer->yy_ch_buf[yy_n_chars];
940
yy_current_state = yy_get_previous_state();
943
yy_bp = yytext_ptr + YY_MORE_ADJ;
951
"fatal flex scanner internal error--no action found" );
952
} /* end of action switch */
953
} /* end of scanning one token */
957
/* yy_get_next_buffer - try to read in a new buffer
959
* Returns a code representing an action:
960
* EOB_ACT_LAST_MATCH -
961
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
962
* EOB_ACT_END_OF_FILE - end of file
965
static int yy_get_next_buffer()
967
register char *dest = yy_current_buffer->yy_ch_buf;
968
register char *source = yytext_ptr;
969
register int number_to_move, i;
972
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
974
"fatal flex scanner internal error--end of buffer missed" );
976
if ( yy_current_buffer->yy_fill_buffer == 0 )
977
{ /* Don't try to fill the buffer, so this is an EOF. */
978
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
980
/* We matched a single character, the EOB, so
981
* treat this as a final EOF.
983
return EOB_ACT_END_OF_FILE;
988
/* We matched some text prior to the EOB, first
991
return EOB_ACT_LAST_MATCH;
995
/* Try to read more data. */
997
/* First move last chars to start of buffer. */
998
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1000
for ( i = 0; i < number_to_move; ++i )
1001
*(dest++) = *(source++);
1003
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1004
/* don't do the read, it's not guaranteed to return an EOF,
1007
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1012
yy_current_buffer->yy_buf_size - number_to_move - 1;
1014
while ( num_to_read <= 0 )
1015
{ /* Not enough room in the buffer - grow it. */
1016
#ifdef YY_USES_REJECT
1018
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1021
/* just a shorter name for the current buffer */
1022
YY_BUFFER_STATE b = yy_current_buffer;
1024
int yy_c_buf_p_offset =
1025
(int) (yy_c_buf_p - b->yy_ch_buf);
1027
if ( b->yy_is_our_buffer )
1029
int new_size = b->yy_buf_size * 2;
1031
if ( new_size <= 0 )
1032
b->yy_buf_size += b->yy_buf_size / 8;
1034
b->yy_buf_size *= 2;
1036
b->yy_ch_buf = (char *)
1037
/* Include room in for 2 EOB chars. */
1038
yy_flex_realloc( (void *) b->yy_ch_buf,
1039
b->yy_buf_size + 2 );
1042
/* Can't grow it, we don't own it. */
1045
if ( ! b->yy_ch_buf )
1047
"fatal error - scanner input buffer overflow" );
1049
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1051
num_to_read = yy_current_buffer->yy_buf_size -
1056
if ( num_to_read > YY_READ_BUF_SIZE )
1057
num_to_read = YY_READ_BUF_SIZE;
1059
/* Read in more data. */
1060
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1061
yy_n_chars, num_to_read );
1063
yy_current_buffer->yy_n_chars = yy_n_chars;
1066
if ( yy_n_chars == 0 )
1068
if ( number_to_move == YY_MORE_ADJ )
1070
ret_val = EOB_ACT_END_OF_FILE;
1076
ret_val = EOB_ACT_LAST_MATCH;
1077
yy_current_buffer->yy_buffer_status =
1078
YY_BUFFER_EOF_PENDING;
1083
ret_val = EOB_ACT_CONTINUE_SCAN;
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;
1089
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1095
/* yy_get_previous_state - get the state just before the EOB char was reached */
1097
static yy_state_type yy_get_previous_state()
1099
register yy_state_type yy_current_state;
1100
register char *yy_cp;
1102
yy_current_state = yy_start;
1104
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1106
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1107
if ( yy_accept[yy_current_state] )
1109
yy_last_accepting_state = yy_current_state;
1110
yy_last_accepting_cpos = yy_cp;
1112
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1114
yy_current_state = (int) yy_def[yy_current_state];
1115
if ( yy_current_state >= 94 )
1116
yy_c = yy_meta[(unsigned int) yy_c];
1118
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1121
return yy_current_state;
1125
/* yy_try_NUL_trans - try to make a transition on the NUL character
1128
* next_state = yy_try_NUL_trans( current_state );
1131
#ifdef YY_USE_PROTOS
1132
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1134
static yy_state_type yy_try_NUL_trans( yy_current_state )
1135
yy_state_type yy_current_state;
1138
register int yy_is_jam;
1139
register char *yy_cp = yy_c_buf_p;
1141
register YY_CHAR yy_c = 1;
1142
if ( yy_accept[yy_current_state] )
1144
yy_last_accepting_state = yy_current_state;
1145
yy_last_accepting_cpos = yy_cp;
1147
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1149
yy_current_state = (int) yy_def[yy_current_state];
1150
if ( yy_current_state >= 94 )
1151
yy_c = yy_meta[(unsigned int) yy_c];
1153
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1154
yy_is_jam = (yy_current_state == 93);
1156
return yy_is_jam ? 0 : yy_current_state;
1161
#ifdef YY_USE_PROTOS
1162
static void yyunput( int c, register char *yy_bp )
1164
static void yyunput( c, yy_bp )
1166
register char *yy_bp;
1169
register char *yy_cp = yy_c_buf_p;
1171
/* undo effects of setting up yytext */
1172
*yy_cp = yy_hold_char;
1174
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1175
{ /* need to shift things up to make room */
1176
/* +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];
1180
register char *source =
1181
&yy_current_buffer->yy_ch_buf[number_to_move];
1183
while ( source > yy_current_buffer->yy_ch_buf )
1184
*--dest = *--source;
1186
yy_cp += (int) (dest - source);
1187
yy_bp += (int) (dest - source);
1188
yy_current_buffer->yy_n_chars =
1189
yy_n_chars = yy_current_buffer->yy_buf_size;
1191
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1192
YY_FATAL_ERROR( "flex scanner push-back overflow" );
1195
*--yy_cp = (char) c;
1199
yy_hold_char = *yy_cp;
1202
#endif /* ifndef YY_NO_UNPUT */
1206
static int yyinput()
1213
*yy_c_buf_p = yy_hold_char;
1215
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1217
/* yy_c_buf_p now points to the character we want to return.
1218
* If this occurs *before* the EOB characters, then it's a
1219
* valid NUL; if not, then we've hit the end of the buffer.
1221
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1222
/* This was really a NUL. */
1226
{ /* need more input */
1227
int offset = yy_c_buf_p - yytext_ptr;
1230
switch ( yy_get_next_buffer() )
1232
case EOB_ACT_LAST_MATCH:
1233
/* This happens because yy_g_n_b()
1234
* sees that we've accumulated a
1235
* token and flags that we need to
1236
* try matching the token before
1237
* proceeding. But for input(),
1238
* there's no matching to consider.
1239
* So convert the EOB_ACT_LAST_MATCH
1240
* to EOB_ACT_END_OF_FILE.
1243
/* Reset buffer status. */
1248
case EOB_ACT_END_OF_FILE:
1253
if ( ! yy_did_buffer_switch_on_eof )
1262
case EOB_ACT_CONTINUE_SCAN:
1263
yy_c_buf_p = yytext_ptr + offset;
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;
1278
#ifdef YY_USE_PROTOS
1279
void yyrestart( FILE *input_file )
1281
void yyrestart( input_file )
1285
if ( ! yy_current_buffer )
1286
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1288
yy_init_buffer( yy_current_buffer, input_file );
1289
yy_load_buffer_state();
1293
#ifdef YY_USE_PROTOS
1294
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1296
void yy_switch_to_buffer( new_buffer )
1297
YY_BUFFER_STATE new_buffer;
1300
if ( yy_current_buffer == new_buffer )
1303
if ( yy_current_buffer )
1305
/* 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;
1311
yy_current_buffer = new_buffer;
1312
yy_load_buffer_state();
1314
/* 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
1317
* to go ahead and always set it.
1319
yy_did_buffer_switch_on_eof = 1;
1323
#ifdef YY_USE_PROTOS
1324
void yy_load_buffer_state( void )
1326
void yy_load_buffer_state()
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;
1336
#ifdef YY_USE_PROTOS
1337
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1339
YY_BUFFER_STATE yy_create_buffer( file, size )
1346
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1348
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1350
b->yy_buf_size = size;
1352
/* yy_ch_buf has to be 2 characters longer than the size given because
1353
* we need to put in 2 end-of-buffer characters.
1355
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1356
if ( ! b->yy_ch_buf )
1357
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1359
b->yy_is_our_buffer = 1;
1361
yy_init_buffer( b, file );
1367
#ifdef YY_USE_PROTOS
1368
void yy_delete_buffer( YY_BUFFER_STATE b )
1370
void yy_delete_buffer( b )
1377
if ( b == yy_current_buffer )
1378
yy_current_buffer = (YY_BUFFER_STATE) 0;
1380
if ( b->yy_is_our_buffer )
1381
yy_flex_free( (void *) b->yy_ch_buf );
1383
yy_flex_free( (void *) b );
1387
#ifndef YY_ALWAYS_INTERACTIVE
1388
#ifndef YY_NEVER_INTERACTIVE
1389
extern int isatty YY_PROTO(( int ));
1393
#ifdef YY_USE_PROTOS
1394
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1396
void yy_init_buffer( b, file )
1403
yy_flush_buffer( b );
1405
b->yy_input_file = file;
1406
b->yy_fill_buffer = 1;
1408
#if YY_ALWAYS_INTERACTIVE
1409
b->yy_is_interactive = 1;
1411
#if YY_NEVER_INTERACTIVE
1412
b->yy_is_interactive = 0;
1414
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1420
#ifdef YY_USE_PROTOS
1421
void yy_flush_buffer( YY_BUFFER_STATE b )
1423
void yy_flush_buffer( b )
1433
/* We always need two end-of-buffer characters. The first causes
1434
* a transition to the end-of-buffer state. The second causes
1435
* a jam in that state.
1437
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1438
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1440
b->yy_buf_pos = &b->yy_ch_buf[0];
1443
b->yy_buffer_status = YY_BUFFER_NEW;
1445
if ( b == yy_current_buffer )
1446
yy_load_buffer_state();
1450
#ifndef YY_NO_SCAN_BUFFER
1451
#ifdef YY_USE_PROTOS
1452
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1454
YY_BUFFER_STATE yy_scan_buffer( base, size )
1462
base[size-2] != YY_END_OF_BUFFER_CHAR ||
1463
base[size-1] != YY_END_OF_BUFFER_CHAR )
1464
/* They forgot to leave room for the EOB's. */
1467
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1469
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1471
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1472
b->yy_buf_pos = b->yy_ch_buf = base;
1473
b->yy_is_our_buffer = 0;
1474
b->yy_input_file = 0;
1475
b->yy_n_chars = b->yy_buf_size;
1476
b->yy_is_interactive = 0;
1478
b->yy_fill_buffer = 0;
1479
b->yy_buffer_status = YY_BUFFER_NEW;
1481
yy_switch_to_buffer( b );
1488
#ifndef YY_NO_SCAN_STRING
1489
#ifdef YY_USE_PROTOS
1490
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1492
YY_BUFFER_STATE yy_scan_string( yy_str )
1493
yyconst char *yy_str;
1497
for ( len = 0; yy_str[len]; ++len )
1500
return yy_scan_bytes( yy_str, len );
1505
#ifndef YY_NO_SCAN_BYTES
1506
#ifdef YY_USE_PROTOS
1507
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1509
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1510
yyconst char *bytes;
1519
/* Get memory for full buffer, including space for trailing EOB's. */
1521
buf = (char *) yy_flex_alloc( n );
1523
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1525
for ( i = 0; i < len; ++i )
1528
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1530
b = yy_scan_buffer( buf, n );
1532
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1534
/* It's okay to grow etc. this buffer, and we should throw it
1535
* away when we're done.
1537
b->yy_is_our_buffer = 1;
1544
#ifndef YY_NO_PUSH_STATE
1545
#ifdef YY_USE_PROTOS
1546
static void yy_push_state( int new_state )
1548
static void yy_push_state( new_state )
1552
if ( yy_start_stack_ptr >= yy_start_stack_depth )
1556
yy_start_stack_depth += YY_START_STACK_INCR;
1557
new_size = yy_start_stack_depth * sizeof( int );
1559
if ( ! yy_start_stack )
1560
yy_start_stack = (int *) yy_flex_alloc( new_size );
1563
yy_start_stack = (int *) yy_flex_realloc(
1564
(void *) yy_start_stack, new_size );
1566
if ( ! yy_start_stack )
1568
"out of memory expanding start-condition stack" );
1571
yy_start_stack[yy_start_stack_ptr++] = YY_START;
1578
#ifndef YY_NO_POP_STATE
1579
static void yy_pop_state()
1581
if ( --yy_start_stack_ptr < 0 )
1582
YY_FATAL_ERROR( "start-condition stack underflow" );
1584
BEGIN(yy_start_stack[yy_start_stack_ptr]);
1589
#ifndef YY_NO_TOP_STATE
1590
static int yy_top_state()
1592
return yy_start_stack[yy_start_stack_ptr - 1];
1596
#ifndef YY_EXIT_FAILURE
1597
#define YY_EXIT_FAILURE 2
1600
#ifdef YY_USE_PROTOS
1601
static void yy_fatal_error( yyconst char msg[] )
1603
static void yy_fatal_error( msg )
1607
(void) fprintf( stderr, "%s\n", msg );
1608
exit( YY_EXIT_FAILURE );
1613
/* Redefine yyless() so it works in section 3 code. */
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'; \
1629
/* Internal utility routines. */
1632
#ifdef YY_USE_PROTOS
1633
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1635
static void yy_flex_strncpy( s1, s2, n )
1642
for ( i = 0; i < n; ++i )
1647
#ifdef YY_NEED_STRLEN
1648
#ifdef YY_USE_PROTOS
1649
static int yy_flex_strlen( yyconst char *s )
1651
static int yy_flex_strlen( s )
1656
for ( n = 0; s[n]; ++n )
1664
#ifdef YY_USE_PROTOS
1665
static void *yy_flex_alloc( yy_size_t size )
1667
static void *yy_flex_alloc( size )
1671
return (void *) malloc( size );
1674
#ifdef YY_USE_PROTOS
1675
static void *yy_flex_realloc( void *ptr, yy_size_t size )
1677
static void *yy_flex_realloc( ptr, size )
1682
/* The cast to (char *) in the following accommodates both
1683
* implementations that use char* generic pointers, and those
1684
* that use void* generic pointers. It works with the latter
1685
* because both ANSI C and C++ allow castless assignment from
1686
* any pointer type to void*, and deal with argument conversions
1687
* as though doing an assignment.
1689
return (void *) realloc( (char *) ptr, size );
1692
#ifdef YY_USE_PROTOS
1693
static void yy_flex_free( void *ptr )
1695
static void yy_flex_free( ptr )
1709
#line 81 "imap_cern.l"