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"
4
#define YY_INT_ALIGNED short int
19
6
/* 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 $
25
8
#define FLEX_SCANNER
26
9
#define YY_FLEX_MAJOR_VERSION 2
27
10
#define YY_FLEX_MINOR_VERSION 5
11
#define YY_FLEX_SUBMINOR_VERSION 33
12
#if YY_FLEX_SUBMINOR_VERSION > 0
16
/* First, we deal with platform-specific or compiler-specific issues. */
18
/* begin standard C headers. */
32
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
24
/* end standard C headers. */
26
/* flex integer type definitions */
31
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
#if __STDC_VERSION__ >= 199901L
35
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36
* if you want the limit (max/min) macros for int types.
38
#ifndef __STDC_LIMIT_MACROS
39
#define __STDC_LIMIT_MACROS 1
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;
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;
58
/* Limits of integral types. */
60
#define INT8_MIN (-128)
63
#define INT16_MIN (-32767-1)
66
#define INT32_MIN (-2147483647-1)
69
#define INT8_MAX (127)
72
#define INT16_MAX (32767)
75
#define INT32_MAX (2147483647)
78
#define UINT8_MAX (255U)
81
#define UINT16_MAX (65535U)
84
#define UINT32_MAX (4294967295U)
87
#endif /* ! FLEXINT_H */
45
/* Use prototypes in function declarations. */
48
91
/* The "const" storage-class-modifier is valid. */
49
92
#define YY_USE_CONST
94
120
* but we do it the disgusting crufty way forced on us by the ()-less
95
121
* definition of BEGIN.
97
#define BEGIN yy_start = 1 + 2 *
123
#define BEGIN (yy_start) = 1 + 2 *
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
103
#define YY_START ((yy_start - 1) / 2)
129
#define YY_START (((yy_start) - 1) / 2)
104
130
#define YYSTATE YY_START
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)
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 )
112
138
#define YY_END_OF_BUFFER_CHAR 0
114
140
/* Size of default input buffer. */
115
142
#define YY_BUF_SIZE 16384
145
/* The state buf must be large enough to hold one state per character in the main buffer.
147
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
150
#define YY_TYPEDEF_YY_BUFFER_STATE
117
151
typedef struct yy_buffer_state *YY_BUFFER_STATE;
120
extern FILE *yyin, *yyout;
154
extern int cern_leng;
156
extern FILE *cern_in, *cern_out;
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
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. */
162
#define YY_LESS_LINENO(n)
164
/* Return all but the first "n" matched characters back to the input stream. */
142
165
#define yyless(n) \
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 */ \
153
#define unput(c) yyunput( c, yytext_ptr )
178
#define unput(c) yyunput( c, (yytext_ptr) )
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).
185
#ifndef YY_TYPEDEF_YY_SIZE_T
186
#define YY_TYPEDEF_YY_SIZE_T
159
187
typedef unsigned int yy_size_t;
190
#ifndef YY_STRUCT_YY_BUFFER_STATE
191
#define YY_STRUCT_YY_BUFFER_STATE
162
192
struct yy_buffer_state
164
194
FILE *yy_input_file;
210
244
* possible backing-up.
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.
216
250
#define YY_BUFFER_EOF_PENDING 2
253
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
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. */
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".
225
#define YY_CURRENT_BUFFER yy_current_buffer
228
/* yy_hold_char holds the character lost when yytext is formed. */
264
* Returns the top of the stack, or NULL.
266
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
267
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
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.
273
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
275
/* yy_hold_char holds the character lost when cern_text is formed. */
229
276
static char yy_hold_char;
231
277
static int yy_n_chars; /* number of characters read into yy_ch_buf */
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 */
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 ...
244
288
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
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 );
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 );
302
#define YY_FLUSH_BUFFER cern__flush_buffer(YY_CURRENT_BUFFER )
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 );
308
void *cern_alloc (yy_size_t );
309
void *cern_realloc (void *,yy_size_t );
310
void cern_free (void * );
312
#define yy_new_buffer cern__create_buffer
266
314
#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; \
316
if ( ! YY_CURRENT_BUFFER ){ \
317
cern_ensure_buffer_stack (); \
318
YY_CURRENT_BUFFER_LVALUE = \
319
cern__create_buffer(cern_in,YY_BUF_SIZE ); \
321
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
273
324
#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; \
326
if ( ! YY_CURRENT_BUFFER ){\
327
cern_ensure_buffer_stack (); \
328
YY_CURRENT_BUFFER_LVALUE = \
329
cern__create_buffer(cern_in,YY_BUF_SIZE ); \
331
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
280
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
334
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
336
/* Begin user sect3 */
338
#define cern_wrap() 1
284
339
#define YY_SKIP_YYWRAP
285
341
typedef unsigned char YY_CHAR;
286
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
343
FILE *cern_in = (FILE *) 0, *cern_out = (FILE *) 0;
287
345
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[] ));
347
extern int cern_lineno;
351
extern char *cern_text;
352
#define yytext_ptr cern_text
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[] );
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.
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; \
367
(yy_c_buf_p) = yy_cp;
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. */
375
flex_int32_t yy_verify;
378
static yyconst flex_int16_t yy_accept[94] =
310
380
10, 10, 0, 0, 14, 12, 11, 11, 12, 10,
311
381
10, 10, 12, 12, 10, 12, 12, 13, 4, 0,
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 );
505
extern int yywrap YY_PROTO(( void ));
510
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
600
extern int cern_wrap (void );
604
static void yyunput (int c,char *buf_ptr );
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 );
517
610
#ifdef YY_NEED_STRLEN
518
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
611
static int yy_flex_strlen (yyconst char * );
521
614
#ifndef YY_NO_INPUT
522
616
#ifdef __cplusplus
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).
617
static int yyinput (void );
619
static int input (void );
564
624
/* Amount of stuff to slurp up with each read. */
637
716
#define YY_RULE_SETUP \
719
/** The main scanner function which does all the work.
642
723
register yy_state_type yy_current_state;
643
724
register char *yy_cp, *yy_bp;
644
725
register int yy_act;
646
#line 36 "imap_cern.l"
649
#line 648 "imap_cern_lex.c"
727
#line 45 "imap_cern.l"
655
736
#ifdef YY_USER_INIT
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();
741
(yy_start) = 1; /* first start state */
749
if ( ! YY_CURRENT_BUFFER ) {
750
cern_ensure_buffer_stack ();
751
YY_CURRENT_BUFFER_LVALUE =
752
cern__create_buffer(cern_in,YY_BUF_SIZE );
755
cern__load_buffer_state( );
675
758
while ( 1 ) /* loops until end-of-file is reached */
760
yy_cp = (yy_c_buf_p);
679
/* Support of yytext. */
680
*yy_cp = yy_hold_char;
762
/* Support of cern_text. */
763
*yy_cp = (yy_hold_char);
682
765
/* yy_bp points to the position in yy_ch_buf of the start of
683
766
* the current run.
687
yy_current_state = yy_start;
770
yy_current_state = (yy_start);
691
774
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
692
775
if ( yy_accept[yy_current_state] )
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;
697
780
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
717
800
YY_DO_BEFORE_ACTION;
720
802
do_action: /* This label is used only to access EOF actions. */
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;
814
/* rule 1 can match eol */
734
#line 38 "imap_cern.l"
816
#line 47 "imap_cern.l"
823
/* rule 2 can match eol */
742
#line 43 "imap_cern.l"
825
#line 52 "imap_cern.l"
745
828
return DESCRIPTION;
832
/* rule 3 can match eol */
750
#line 48 "imap_cern.l"
834
#line 57 "imap_cern.l"
753
837
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 */
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 */
761
#line 53 "imap_cern.l"
845
#line 62 "imap_cern.l"
764
strcpy(cern_lval.id, yytext);
848
strcpy(cern_lval.id, cern_text);
770
#line 59 "imap_cern.l"
854
#line 68 "imap_cern.l"
771
855
return RECTANGLE;
775
#line 61 "imap_cern.l"
859
#line 70 "imap_cern.l"
780
#line 63 "imap_cern.l"
864
#line 72 "imap_cern.l"
785
#line 65 "imap_cern.l"
869
#line 74 "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 */
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 */
793
#line 67 "imap_cern.l"
877
#line 76 "imap_cern.l"
795
strcpy(cern_lval.id, yytext);
879
strcpy(cern_lval.id, cern_text);
801
#line 72 "imap_cern.l"
885
#line 81 "imap_cern.l"
803
cern_lval.value = atof(yytext);
887
cern_lval.value = g_ascii_strtod (cern_text, NULL);
892
/* rule 11 can match eol */
809
#line 77 "imap_cern.l"
894
#line 86 "imap_cern.l"
810
895
; /* Eat white space */
814
#line 79 "imap_cern.l"
899
#line 88 "imap_cern.l"
819
#line 81 "imap_cern.l"
904
#line 90 "imap_cern.l"
822
#line 821 "imap_cern_lex.c"
823
908
case YY_STATE_EOF(INITIAL):
824
909
case YY_STATE_EOF(comment):
827
912
case YY_END_OF_BUFFER:
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;
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
836
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
921
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
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.
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;
852
937
/* Note that here we test for yy_c_buf_p "<=" to the position
1083
1161
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;
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;
1089
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1167
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1091
1169
return ret_val;
1095
1172
/* yy_get_previous_state - get the state just before the EOB char was reached */
1097
static yy_state_type yy_get_previous_state()
1174
static yy_state_type yy_get_previous_state (void)
1099
1176
register yy_state_type yy_current_state;
1100
1177
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 )
1179
yy_current_state = (yy_start);
1181
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
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] )
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;
1112
1189
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1154
1224
yy_is_jam = (yy_current_state == 93);
1156
1226
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 )
1229
static void yyunput (int c, register char * yy_bp )
1231
register char *yy_cp;
1233
yy_cp = (yy_c_buf_p);
1235
/* undo effects of setting up cern_text */
1236
*yy_cp = (yy_hold_char);
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];
1183
while ( source > yy_current_buffer->yy_ch_buf )
1247
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1184
1248
*--dest = *--source;
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;
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" );
1195
1259
*--yy_cp = (char) c;
1199
yy_hold_char = *yy_cp;
1202
#endif /* ifndef YY_NO_UNPUT */
1261
(yytext_ptr) = yy_bp;
1262
(yy_hold_char) = *yy_cp;
1263
(yy_c_buf_p) = yy_cp;
1205
1267
#ifdef __cplusplus
1206
static int yyinput()
1268
static int yyinput (void)
1270
static int input (void)
1213
*yy_c_buf_p = yy_hold_char;
1215
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1276
*(yy_c_buf_p) = (yy_hold_char);
1278
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
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.
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. */
1286
*(yy_c_buf_p) = '\0';
1226
1289
{ /* need more input */
1227
int offset = yy_c_buf_p - yytext_ptr;
1290
int offset = (yy_c_buf_p) - (yytext_ptr);
1230
switch ( yy_get_next_buffer() )
1293
switch ( yy_get_next_buffer( ) )
1232
1295
case EOB_ACT_LAST_MATCH:
1233
1296
/* This happens because yy_g_n_b()
1262
1325
case EOB_ACT_CONTINUE_SCAN:
1263
yy_c_buf_p = yytext_ptr + offset;
1326
(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;
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);
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 )
1338
#endif /* ifndef YY_NO_INPUT */
1340
/** Immediately switch to a different input stream.
1341
* @param input_file A readable stream.
1343
* @note This function does not reset the start condition to @c INITIAL .
1345
void cern_restart (FILE * input_file )
1348
if ( ! YY_CURRENT_BUFFER ){
1349
cern_ensure_buffer_stack ();
1350
YY_CURRENT_BUFFER_LVALUE =
1351
cern__create_buffer(cern_in,YY_BUF_SIZE );
1354
cern__init_buffer(YY_CURRENT_BUFFER,input_file );
1355
cern__load_buffer_state( );
1358
/** Switch to a different input buffer.
1359
* @param new_buffer The new input buffer.
1362
void cern__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1365
/* TODO. We should be able to replace this entire function body
1367
* cern_pop_buffer_state();
1368
* cern_push_buffer_state(new_buffer);
1370
cern_ensure_buffer_stack ();
1371
if ( YY_CURRENT_BUFFER == new_buffer )
1303
if ( yy_current_buffer )
1374
if ( YY_CURRENT_BUFFER )
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);
1311
yy_current_buffer = new_buffer;
1312
yy_load_buffer_state();
1382
YY_CURRENT_BUFFER_LVALUE = new_buffer;
1383
cern__load_buffer_state( );
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.
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 )
1390
(yy_did_buffer_switch_on_eof) = 1;
1393
static void cern__load_buffer_state (void)
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);
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.
1405
* @return the allocated buffer state.
1407
YY_BUFFER_STATE cern__create_buffer (FILE * file, int size )
1344
1409
YY_BUFFER_STATE b;
1346
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1411
b = (YY_BUFFER_STATE) cern_alloc(sizeof( struct yy_buffer_state ) );
1348
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1413
YY_FATAL_ERROR( "out of dynamic memory in cern__create_buffer()" );
1350
1415
b->yy_buf_size = size;
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.
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()" );
1359
1424
b->yy_is_our_buffer = 1;
1361
yy_init_buffer( b, file );
1426
cern__init_buffer(b,file );
1367
#ifdef YY_USE_PROTOS
1368
void yy_delete_buffer( YY_BUFFER_STATE b )
1370
void yy_delete_buffer( b )
1431
/** Destroy the buffer.
1432
* @param b a buffer created with cern__create_buffer()
1435
void cern__delete_buffer (YY_BUFFER_STATE b )
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;
1380
1444
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 );
1445
cern_free((void *) b->yy_ch_buf );
1447
cern_free((void *) b );
1451
extern int isatty (int );
1452
#endif /* __cplusplus */
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.
1458
static void cern__init_buffer (YY_BUFFER_STATE b, FILE * file )
1463
cern__flush_buffer(b );
1405
1465
b->yy_input_file = file;
1406
1466
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 )
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.
1472
if (b != YY_CURRENT_BUFFER){
1473
b->yy_bs_lineno = 1;
1474
b->yy_bs_column = 0;
1477
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
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.
1486
void cern__flush_buffer (YY_BUFFER_STATE b )
1431
1491
b->yy_n_chars = 0;
1442
1502
b->yy_at_bol = 1;
1443
1503
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 )
1505
if ( b == YY_CURRENT_BUFFER )
1506
cern__load_buffer_state( );
1509
/** Pushes the new state onto the stack. The new state becomes
1510
* the current state. This function will allocate the stack
1512
* @param new_buffer The new state.
1515
void cern_push_buffer_state (YY_BUFFER_STATE new_buffer )
1517
if (new_buffer == NULL)
1520
cern_ensure_buffer_stack();
1522
/* This block is copied from cern__switch_to_buffer. */
1523
if ( YY_CURRENT_BUFFER )
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);
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;
1536
/* copied from cern__switch_to_buffer. */
1537
cern__load_buffer_state( );
1538
(yy_did_buffer_switch_on_eof) = 1;
1541
/** Removes and deletes the top of the stack, if present.
1542
* The next element becomes the new top.
1545
void cern_pop_buffer_state (void)
1547
if (!YY_CURRENT_BUFFER)
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);
1555
if (YY_CURRENT_BUFFER) {
1556
cern__load_buffer_state( );
1557
(yy_did_buffer_switch_on_eof) = 1;
1561
/* Allocates the stack if it does not exist.
1562
* Guarantees space for at least one push.
1564
static void cern_ensure_buffer_stack (void)
1568
if (!(yy_buffer_stack)) {
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.
1575
(yy_buffer_stack) = (struct yy_buffer_state**)cern_alloc
1576
(num_to_alloc * sizeof(struct yy_buffer_state*)
1579
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1581
(yy_buffer_stack_max) = num_to_alloc;
1582
(yy_buffer_stack_top) = 0;
1586
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1588
/* Increase the buffer to prepare for a possible push. */
1589
int grow_size = 8 /* arbitrary grow size */;
1591
num_to_alloc = (yy_buffer_stack_max) + grow_size;
1592
(yy_buffer_stack) = (struct yy_buffer_state**)cern_realloc
1594
num_to_alloc * sizeof(struct yy_buffer_state*)
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;
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
1607
* @return the newly allocated buffer state object.
1609
YY_BUFFER_STATE cern__scan_buffer (char * base, yy_size_t size )
1459
1611
YY_BUFFER_STATE b;
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. */
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 ) );
1469
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1621
YY_FATAL_ERROR( "out of dynamic memory in cern__scan_buffer()" );
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;
1481
yy_switch_to_buffer( b );
1633
cern__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;
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
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.
1646
YY_BUFFER_STATE cern__scan_string (yyconst char * yystr )
1649
return cern__scan_bytes(yystr,strlen(yystr) );
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.
1657
* @return the newly allocated buffer state object.
1659
YY_BUFFER_STATE cern__scan_bytes (yyconst char * yybytes, int _yybytes_len )
1514
1661
YY_BUFFER_STATE b;
1519
1666
/* Get memory for full buffer, including space for trailing EOB's. */
1521
buf = (char *) yy_flex_alloc( n );
1667
n = _yybytes_len + 2;
1668
buf = (char *) cern_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 );
1670
YY_FATAL_ERROR( "out of dynamic memory in cern__scan_bytes()" );
1672
for ( i = 0; i < _yybytes_len; ++i )
1673
buf[i] = yybytes[i];
1675
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1677
b = cern__scan_buffer(buf,n );
1532
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1679
YY_FATAL_ERROR( "bad buffer in cern__scan_bytes()" );
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;
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
1689
#ifndef YY_EXIT_FAILURE
1597
1690
#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 );
1693
static void yy_fatal_error (yyconst char* msg )
1695
(void) fprintf( stderr, "%s\n", msg );
1608
1696
exit( YY_EXIT_FAILURE );
1613
1699
/* Redefine yyless() so it works in section 3 code. */
1616
1702
#define yyless(n) \
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'; \
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; \
1629
/* Internal utility routines. */
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. */
1718
/** Get the current line number.
1721
int cern_get_lineno (void)
1727
/** Get the input stream.
1730
FILE *cern_get_in (void)
1735
/** Get the output stream.
1738
FILE *cern_get_out (void)
1743
/** Get the length of the current token.
1746
int cern_get_leng (void)
1751
/** Get the current token.
1755
char *cern_get_text (void)
1760
/** Set the current line number.
1761
* @param line_number
1764
void cern_set_lineno (int line_number )
1767
cern_lineno = line_number;
1770
/** Set the input stream. This does not discard the current
1772
* @param in_str A readable stream.
1774
* @see cern__switch_to_buffer
1776
void cern_set_in (FILE * in_str )
1781
void cern_set_out (FILE * out_str )
1783
cern_out = out_str ;
1786
int cern_get_debug (void)
1788
return cern__flex_debug;
1791
void cern_set_debug (int bdebug )
1793
cern__flex_debug = bdebug ;
1796
static int yy_init_globals (void)
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.
1802
(yy_buffer_stack) = 0;
1803
(yy_buffer_stack_top) = 0;
1804
(yy_buffer_stack_max) = 0;
1805
(yy_c_buf_p) = (char *) 0;
1809
/* Defined in main.c */
1635
static void yy_flex_strncpy( s1, s2, n )
1814
cern_in = (FILE *) 0;
1815
cern_out = (FILE *) 0;
1818
/* For future reference: Set errno on error, since we are called by
1824
/* cern_lex_destroy is for both reentrant and non-reentrant scanners. */
1825
int cern_lex_destroy (void)
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();
1835
/* Destroy the stack itself. */
1836
cern_free((yy_buffer_stack) );
1837
(yy_buffer_stack) = NULL;
1839
/* Reset the globals. This is important in a non-reentrant scanner so the next time
1840
* cern_lex() is called, initialization will occur. */
1847
* Internal utility routines.
1851
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1641
1853
register int i;
1642
1854
for ( i = 0; i < n; ++i )
1647
1859
#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 )
1860
static int yy_flex_strlen (yyconst char * s )
1655
1862
register int n;
1656
1863
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 )
1870
void *cern_alloc (yy_size_t size )
1671
1872
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 )
1875
void *cern_realloc (void * ptr, yy_size_t size )
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