My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
scan_citi.cpp
Go to the documentation of this file.
1 #line 2 "scan_citi.cpp"
2 
3 #line 4 "scan_citi.cpp"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define yy_create_buffer citi__create_buffer
10 #define yy_delete_buffer citi__delete_buffer
11 #define yy_flex_debug citi__flex_debug
12 #define yy_init_buffer citi__init_buffer
13 #define yy_flush_buffer citi__flush_buffer
14 #define yy_load_buffer_state citi__load_buffer_state
15 #define yy_switch_to_buffer citi__switch_to_buffer
16 #define yyin citi_in
17 #define yyleng citi_leng
18 #define yylex citi_lex
19 #define yylineno citi_lineno
20 #define yyout citi_out
21 #define yyrestart citi_restart
22 #define yytext citi_text
23 #define yywrap citi_wrap
24 #define yyalloc citi_alloc
25 #define yyrealloc citi_realloc
26 #define yyfree citi_free
27 
28 #define FLEX_SCANNER
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 5
31 #define YY_FLEX_SUBMINOR_VERSION 35
32 #if YY_FLEX_SUBMINOR_VERSION > 0
33 #define FLEX_BETA
34 #endif
35 
36 /* First, we deal with platform-specific or compiler-specific issues. */
37 
38 /* begin standard C headers. */
39 #include <stdio.h>
40 #include <string.h>
41 #include <errno.h>
42 #include <stdlib.h>
43 
44 /* end standard C headers. */
45 
46 /* flex integer type definitions */
47 
48 #ifndef FLEXINT_H
49 #define FLEXINT_H
50 
51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 
55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56  * if you want the limit (max/min) macros for int types.
57  */
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
60 #endif
61 
62 #include <inttypes.h>
63 typedef int8_t flex_int8_t;
64 typedef uint8_t flex_uint8_t;
65 typedef int16_t flex_int16_t;
66 typedef uint16_t flex_uint16_t;
67 typedef int32_t flex_int32_t;
68 typedef uint32_t flex_uint32_t;
69 #else
70 typedef signed char flex_int8_t;
71 typedef short int flex_int16_t;
72 typedef int flex_int32_t;
73 typedef unsigned char flex_uint8_t;
74 typedef unsigned short int flex_uint16_t;
75 typedef unsigned int flex_uint32_t;
76 
77 /* Limits of integral types. */
78 #ifndef INT8_MIN
79 #define INT8_MIN (-128)
80 #endif
81 #ifndef INT16_MIN
82 #define INT16_MIN (-32767-1)
83 #endif
84 #ifndef INT32_MIN
85 #define INT32_MIN (-2147483647-1)
86 #endif
87 #ifndef INT8_MAX
88 #define INT8_MAX (127)
89 #endif
90 #ifndef INT16_MAX
91 #define INT16_MAX (32767)
92 #endif
93 #ifndef INT32_MAX
94 #define INT32_MAX (2147483647)
95 #endif
96 #ifndef UINT8_MAX
97 #define UINT8_MAX (255U)
98 #endif
99 #ifndef UINT16_MAX
100 #define UINT16_MAX (65535U)
101 #endif
102 #ifndef UINT32_MAX
103 #define UINT32_MAX (4294967295U)
104 #endif
105 
106 #endif /* ! C99 */
107 
108 #endif /* ! FLEXINT_H */
109 
110 #ifdef __cplusplus
111 
112 /* The "const" storage-class-modifier is valid. */
113 #define YY_USE_CONST
114 
115 #else /* ! __cplusplus */
116 
117 /* C99 requires __STDC__ to be defined as 1. */
118 #if defined (__STDC__)
119 
120 #define YY_USE_CONST
121 
122 #endif /* defined (__STDC__) */
123 #endif /* ! __cplusplus */
124 
125 #ifdef YY_USE_CONST
126 #define yyconst const
127 #else
128 #define yyconst
129 #endif
130 
131 /* Returned upon end-of-file. */
132 #define YY_NULL 0
133 
134 /* Promotes a possibly negative, possibly signed char to an unsigned
135  * integer for use as an array index. If the signed char is negative,
136  * we want to instead treat it as an 8-bit unsigned char, hence the
137  * double cast.
138  */
139 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 
141 /* Enter a start condition. This macro really ought to take a parameter,
142  * but we do it the disgusting crufty way forced on us by the ()-less
143  * definition of BEGIN.
144  */
145 #define BEGIN (yy_start) = 1 + 2 *
146 
147 /* Translate the current start state into a value that can be later handed
148  * to BEGIN to return to the state. The YYSTATE alias is for lex
149  * compatibility.
150  */
151 #define YY_START (((yy_start) - 1) / 2)
152 #define YYSTATE YY_START
153 
154 /* Action number for EOF rule of a given start state. */
155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 
157 /* Special action meaning "start processing a new file". */
158 #define YY_NEW_FILE citi_restart(citi_in )
159 
160 #define YY_END_OF_BUFFER_CHAR 0
161 
162 /* Size of default input buffer. */
163 #ifndef YY_BUF_SIZE
164 #ifdef __ia64__
165 /* On IA-64, the buffer size is 16k, not 8k.
166  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
167  * Ditto for the __ia64__ case accordingly.
168  */
169 #define YY_BUF_SIZE 32768
170 #else
171 #define YY_BUF_SIZE 16384
172 #endif /* __ia64__ */
173 #endif
174 
175 /* The state buf must be large enough to hold one state per character in the main buffer.
176  */
177 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
178 
179 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
180 #define YY_TYPEDEF_YY_BUFFER_STATE
182 #endif
183 
184 extern int citi_leng;
185 
186 extern FILE *citi_in, *citi_out;
187 
188 #define EOB_ACT_CONTINUE_SCAN 0
189 #define EOB_ACT_END_OF_FILE 1
190 #define EOB_ACT_LAST_MATCH 2
191 
192  /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
193  * access to the local variable yy_act. Since yyless() is a macro, it would break
194  * existing scanners that call yyless() from OUTSIDE citi_lex.
195  * One obvious solution it to make yy_act a global. I tried that, and saw
196  * a 5% performance hit in a non-citi_lineno scanner, because yy_act is
197  * normally declared as a register variable-- so it is not worth it.
198  */
199  #define YY_LESS_LINENO(n) \
200  do { \
201  int yyl;\
202  for ( yyl = n; yyl < citi_leng; ++yyl )\
203  if ( citi_text[yyl] == '\n' )\
204  --citi_lineno;\
205  }while(0)
206 
207 /* Return all but the first "n" matched characters back to the input stream. */
208 #define yyless(n) \
209  do \
210  { \
211  /* Undo effects of setting up citi_text. */ \
212  int yyless_macro_arg = (n); \
213  YY_LESS_LINENO(yyless_macro_arg);\
214  *yy_cp = (yy_hold_char); \
215  YY_RESTORE_YY_MORE_OFFSET \
216  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
217  YY_DO_BEFORE_ACTION; /* set up citi_text again */ \
218  } \
219  while ( 0 )
220 
221 #define unput(c) yyunput( c, (yytext_ptr) )
222 
223 #ifndef YY_TYPEDEF_YY_SIZE_T
224 #define YY_TYPEDEF_YY_SIZE_T
225 typedef size_t yy_size_t;
226 #endif
227 
228 #ifndef YY_STRUCT_YY_BUFFER_STATE
229 #define YY_STRUCT_YY_BUFFER_STATE
230 struct yy_buffer_state
231  {
232  FILE *yy_input_file;
233 
234  char *yy_ch_buf; /* input buffer */
235  char *yy_buf_pos; /* current position in input buffer */
236 
237  /* Size of input buffer in bytes, not including room for EOB
238  * characters.
239  */
241 
242  /* Number of characters read into yy_ch_buf, not including EOB
243  * characters.
244  */
245  int yy_n_chars;
246 
247  /* Whether we "own" the buffer - i.e., we know we created it,
248  * and can realloc() it to grow it, and should free() it to
249  * delete it.
250  */
251  int yy_is_our_buffer;
252 
253  /* Whether this is an "interactive" input source; if so, and
254  * if we're using stdio for input, then we want to use getc()
255  * instead of fread(), to make sure we stop fetching input after
256  * each newline.
257  */
258  int yy_is_interactive;
259 
260  /* Whether we're considered to be at the beginning of a line.
261  * If so, '^' rules will be active on the next match, otherwise
262  * not.
263  */
264  int yy_at_bol;
265 
266  int yy_bs_lineno;
267  int yy_bs_column;
269  /* Whether to try to fill the input buffer when we reach the
270  * end of it.
271  */
272  int yy_fill_buffer;
273 
274  int yy_buffer_status;
275 
276 #define YY_BUFFER_NEW 0
277 #define YY_BUFFER_NORMAL 1
278  /* When an EOF's been seen but there's still some text to process
279  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
280  * shouldn't try reading from the input source any more. We might
281  * still have a bunch of tokens to match, though, because of
282  * possible backing-up.
283  *
284  * When we actually see the EOF, we change the status to "new"
285  * (via citi_restart()), so that the user can continue scanning by
286  * just pointing citi_in at a new input file.
287  */
288 #define YY_BUFFER_EOF_PENDING 2
289 
290  };
291 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
292 
293 /* Stack of input buffers. */
294 static size_t yy_buffer_stack_top = 0;
295 static size_t yy_buffer_stack_max = 0;
296 static YY_BUFFER_STATE * yy_buffer_stack = 0;
298 /* We provide macros for accessing buffer states in case in the
299  * future we want to put the buffer states in a more general
300  * "scanner state".
301  *
302  * Returns the top of the stack, or NULL.
303  */
304 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
305  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
306  : NULL)
307 
308 /* Same as previous macro, but useful when we know that the buffer stack is not
309  * NULL or when we need an lvalue. For internal use only.
310  */
311 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
312 
313 /* yy_hold_char holds the character lost when citi_text is formed. */
314 static char yy_hold_char;
315 static int yy_n_chars; /* number of characters read into yy_ch_buf */
317 
318 /* Points to current character in buffer. */
319 static char *yy_c_buf_p = (char *) 0;
320 static int yy_init = 0; /* whether we need to initialize */
321 static int yy_start = 0; /* start state number */
322 
323 /* Flag which is used to allow citi_wrap()'s to do buffer switches
324  * instead of setting up a fresh citi_in. A bit of a hack ...
325  */
326 static int yy_did_buffer_switch_on_eof;
327 
328 void citi_restart (FILE *input_file );
329 void citi__switch_to_buffer (YY_BUFFER_STATE new_buffer );
330 YY_BUFFER_STATE citi__create_buffer (FILE *file,int size );
331 void citi__delete_buffer (YY_BUFFER_STATE b );
332 void citi__flush_buffer (YY_BUFFER_STATE b );
333 void citi_push_buffer_state (YY_BUFFER_STATE new_buffer );
334 void citi_pop_buffer_state (void );
335 
336 static void citi_ensure_buffer_stack (void );
337 static void citi__load_buffer_state (void );
338 static void citi__init_buffer (YY_BUFFER_STATE b,FILE *file );
339 
340 #define YY_FLUSH_BUFFER citi__flush_buffer(YY_CURRENT_BUFFER )
341 
342 YY_BUFFER_STATE citi__scan_buffer (char *base,yy_size_t size );
343 YY_BUFFER_STATE citi__scan_string (yyconst char *yy_str );
344 YY_BUFFER_STATE citi__scan_bytes (yyconst char *bytes,int len );
345 
346 void *citi_alloc (yy_size_t );
347 void *citi_realloc (void *,yy_size_t );
348 void citi_free (void * );
349 
350 #define yy_new_buffer citi__create_buffer
351 
352 #define yy_set_interactive(is_interactive) \
353  { \
354  if ( ! YY_CURRENT_BUFFER ){ \
355  citi_ensure_buffer_stack (); \
356  YY_CURRENT_BUFFER_LVALUE = \
357  citi__create_buffer(citi_in,YY_BUF_SIZE ); \
358  } \
359  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
360  }
361 
362 #define yy_set_bol(at_bol) \
363  { \
364  if ( ! YY_CURRENT_BUFFER ){\
365  citi_ensure_buffer_stack (); \
366  YY_CURRENT_BUFFER_LVALUE = \
367  citi__create_buffer(citi_in,YY_BUF_SIZE ); \
368  } \
369  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
370  }
371 
372 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
373 
374 /* Begin user sect3 */
375 
376 #define citi_wrap(n) 1
377 #define YY_SKIP_YYWRAP
378 
379 typedef unsigned char YY_CHAR;
380 
381 FILE *citi_in = (FILE *) 0, *citi_out = (FILE *) 0;
382 
383 typedef int yy_state_type;
384 
385 extern int citi_lineno;
386 
387 int citi_lineno = 1;
388 
389 extern char *citi_text;
390 #define yytext_ptr citi_text
391 
392 static yy_state_type yy_get_previous_state (void );
393 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
394 static int yy_get_next_buffer (void );
395 static void yy_fatal_error (yyconst char msg[] );
396 
397 /* Done after the current pattern has been matched and before the
398  * corresponding action - sets up citi_text.
399  */
400 #define YY_DO_BEFORE_ACTION \
401  (yytext_ptr) = yy_bp; \
402  citi_leng = (size_t) (yy_cp - yy_bp); \
403  (yy_hold_char) = *yy_cp; \
404  *yy_cp = '\0'; \
405  (yy_c_buf_p) = yy_cp;
406 
407 #define YY_NUM_RULES 31
408 #define YY_END_OF_BUFFER 32
409 /* This struct is not used in this scanner,
410  but its presence is necessary. */
411 struct yy_trans_info
412  {
415  };
416 static yyconst flex_int16_t yy_accept[168] =
417  { 0,
418  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
419  0, 0, 32, 30, 2, 1, 30, 30, 3, 18,
420  18, 18, 18, 18, 27, 18, 18, 18, 18, 18,
421  18, 28, 2, 29, 28, 30, 25, 30, 19, 30,
422  30, 30, 24, 30, 21, 18, 18, 18, 22, 23,
423  20, 30, 1, 0, 3, 18, 18, 18, 18, 5,
424  18, 18, 18, 18, 18, 18, 18, 29, 0, 0,
425  19, 19, 0, 0, 0, 0, 24, 0, 20, 0,
426  18, 18, 5, 18, 18, 18, 18, 18, 18, 18,
427  7, 0, 0, 19, 26, 17, 0, 18, 18, 18,
428 
429  18, 18, 18, 18, 8, 9, 18, 18, 0, 19,
430  0, 0, 4, 18, 18, 10, 18, 18, 18, 18,
431  18, 0, 0, 18, 18, 18, 18, 18, 18, 18,
432  0, 0, 18, 18, 12, 18, 18, 18, 0, 0,
433  6, 11, 18, 18, 0, 0, 18, 18, 0, 0,
434  18, 18, 0, 0, 18, 18, 0, 0, 18, 18,
435  15, 16, 18, 18, 13, 14, 0
436  } ;
437 
438 static yyconst flex_int32_t yy_ec[256] =
439  { 0,
440  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
441  1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
442  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443  1, 2, 1, 1, 5, 1, 1, 1, 1, 1,
444  1, 1, 6, 7, 6, 8, 1, 9, 9, 9,
445  9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
446  1, 1, 1, 1, 10, 11, 12, 13, 14, 15,
447  16, 17, 18, 17, 17, 19, 20, 21, 22, 17,
448  17, 23, 24, 25, 17, 26, 17, 17, 17, 17,
449  27, 1, 28, 1, 29, 1, 17, 17, 17, 17,
450 
451  30, 17, 17, 17, 17, 17, 17, 17, 17, 17,
452  17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
453  17, 17, 1, 1, 1, 1, 1, 1, 1, 1,
454  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461 
462  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467  1, 1, 1, 1, 1
468  } ;
469 
470 static yyconst flex_int32_t yy_meta[31] =
471  { 0,
472  1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
473  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474  2, 2, 2, 2, 2, 2, 1, 1, 2, 2
475  } ;
476 
477 static yyconst flex_int16_t yy_base[171] =
478  { 0,
479  0, 26, 30, 38, 51, 59, 29, 57, 83, 0,
480  111, 0, 273, 274, 274, 41, 269, 262, 261, 261,
481  38, 62, 61, 0, 274, 66, 108, 67, 113, 68,
482  117, 274, 274, 125, 265, 124, 274, 258, 127, 245,
483  251, 254, 139, 260, 274, 251, 251, 242, 274, 274,
484  141, 256, 143, 255, 248, 247, 0, 245, 238, 0,
485  237, 227, 128, 226, 230, 233, 225, 147, 244, 237,
486  144, 145, 42, 232, 228, 220, 152, 239, 157, 238,
487  154, 219, 229, 220, 219, 216, 211, 224, 219, 203,
488  202, 131, 221, 220, 274, 199, 198, 217, 209, 203,
489 
490  202, 207, 207, 195, 0, 0, 200, 199, 208, 207,
491  196, 195, 204, 193, 195, 0, 192, 188, 198, 189,
492  188, 187, 186, 189, 183, 182, 175, 178, 174, 173,
493  172, 171, 180, 179, 0, 167, 166, 165, 164, 163,
494  0, 0, 158, 157, 156, 155, 172, 171, 167, 166,
495  159, 158, 150, 149, 153, 152, 154, 153, 147, 146,
496  274, 274, 101, 35, 0, 0, 274, 175, 177, 33
497  } ;
498 
499 static yyconst flex_int16_t yy_def[171] =
500  { 0,
501  167, 1, 168, 168, 169, 169, 6, 6, 167, 9,
502  9, 11, 167, 167, 167, 167, 167, 167, 167, 170,
503  170, 170, 170, 170, 167, 170, 170, 170, 170, 170,
504  170, 167, 167, 167, 167, 167, 167, 167, 167, 167,
505  167, 167, 167, 167, 167, 170, 170, 170, 167, 167,
506  167, 167, 167, 167, 167, 170, 170, 170, 170, 170,
507  170, 170, 170, 170, 170, 170, 170, 167, 167, 167,
508  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
509  170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
510  170, 167, 167, 167, 167, 167, 167, 170, 170, 170,
511 
512  170, 170, 170, 170, 170, 170, 170, 170, 167, 167,
513  167, 167, 170, 170, 170, 170, 170, 170, 170, 170,
514  170, 167, 167, 170, 170, 170, 170, 170, 170, 170,
515  167, 167, 170, 170, 170, 170, 170, 170, 167, 167,
516  170, 170, 170, 170, 167, 167, 170, 170, 167, 167,
517  170, 170, 167, 167, 170, 170, 167, 167, 170, 170,
518  167, 167, 170, 170, 170, 170, 0, 167, 167, 167
519  } ;
520 
521 static yyconst flex_int16_t yy_nxt[305] =
522  { 0,
523  14, 15, 16, 17, 14, 18, 14, 14, 19, 20,
524  20, 20, 21, 20, 20, 20, 20, 20, 20, 22,
525  20, 20, 23, 20, 20, 20, 14, 14, 24, 20,
526  25, 33, 34, 35, 57, 14, 26, 27, 28, 33,
527  34, 35, 14, 53, 54, 56, 29, 93, 58, 30,
528  94, 31, 15, 16, 17, 166, 36, 37, 38, 39,
529  15, 16, 17, 14, 36, 37, 38, 39, 56, 56,
530  14, 59, 40, 56, 56, 56, 64, 58, 60, 61,
531  41, 66, 42, 14, 15, 43, 44, 14, 18, 45,
532  14, 19, 24, 24, 24, 46, 24, 24, 24, 24,
533 
534  24, 24, 47, 24, 24, 48, 24, 24, 24, 49,
535  50, 24, 24, 51, 52, 56, 36, 14, 38, 39,
536  56, 165, 65, 24, 56, 62, 67, 68, 69, 63,
537  24, 70, 71, 24, 70, 71, 109, 14, 14, 110,
538  73, 77, 78, 79, 80, 53, 54, 86, 87, 68,
539  69, 70, 71, 72, 77, 78, 73, 73, 92, 79,
540  80, 98, 81, 164, 163, 162, 161, 160, 159, 158,
541  157, 156, 155, 73, 92, 32, 32, 14, 14, 154,
542  153, 152, 151, 150, 149, 148, 147, 146, 145, 144,
543  143, 142, 141, 60, 140, 139, 138, 137, 136, 135,
544 
545  134, 133, 60, 132, 131, 130, 129, 128, 127, 126,
546  125, 124, 113, 123, 122, 110, 110, 121, 120, 119,
547  118, 117, 116, 115, 114, 113, 112, 111, 94, 94,
548  108, 107, 106, 105, 104, 103, 102, 101, 100, 99,
549  79, 77, 97, 96, 95, 72, 68, 91, 90, 89,
550  88, 85, 84, 83, 82, 81, 55, 53, 79, 60,
551  59, 58, 77, 76, 75, 74, 72, 68, 56, 55,
552  55, 53, 167, 13, 167, 167, 167, 167, 167, 167,
553  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
554  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
555 
556  167, 167, 167, 167
557  } ;
558 
559 static yyconst flex_int16_t yy_chk[305] =
560  { 0,
561  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
562  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
563  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
564  2, 3, 3, 3, 170, 7, 2, 2, 2, 4,
565  4, 4, 7, 16, 16, 21, 2, 73, 21, 2,
566  73, 2, 5, 5, 5, 164, 5, 5, 5, 5,
567  6, 6, 6, 8, 6, 6, 6, 6, 23, 22,
568  8, 22, 6, 26, 28, 30, 28, 28, 23, 26,
569  8, 30, 8, 9, 9, 9, 9, 9, 9, 9,
570  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
571 
572  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
573  9, 9, 9, 11, 11, 27, 11, 11, 11, 11,
574  29, 163, 29, 11, 31, 27, 31, 34, 34, 27,
575  11, 36, 36, 11, 39, 39, 92, 11, 11, 92,
576  39, 43, 43, 51, 51, 53, 53, 63, 63, 68,
577  68, 71, 71, 72, 77, 77, 39, 71, 72, 79,
578  79, 81, 81, 160, 159, 158, 157, 156, 155, 154,
579  153, 152, 151, 71, 72, 168, 168, 169, 169, 150,
580  149, 148, 147, 146, 145, 144, 143, 140, 139, 138,
581  137, 136, 134, 133, 132, 131, 130, 129, 128, 127,
582 
583  126, 125, 124, 123, 122, 121, 120, 119, 118, 117,
584  115, 114, 113, 112, 111, 110, 109, 108, 107, 104,
585  103, 102, 101, 100, 99, 98, 97, 96, 94, 93,
586  91, 90, 89, 88, 87, 86, 85, 84, 83, 82,
587  80, 78, 76, 75, 74, 70, 69, 67, 66, 65,
588  64, 62, 61, 59, 58, 56, 55, 54, 52, 48,
589  47, 46, 44, 42, 41, 40, 38, 35, 20, 19,
590  18, 17, 13, 167, 167, 167, 167, 167, 167, 167,
591  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
592  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
593 
594  167, 167, 167, 167
595  } ;
596 
597 /* Table of booleans, true if rule could match eol. */
598 static yyconst flex_int32_t yy_rule_can_match_eol[32] =
599  { 0,
600 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
601  1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, };
602 
603 static yy_state_type yy_last_accepting_state;
604 static char *yy_last_accepting_cpos;
605 
606 extern int citi__flex_debug;
607 int citi__flex_debug = 0;
608 
609 /* The intent behind this definition is that it'll catch
610  * any uses of REJECT which flex missed.
611  */
612 #define REJECT reject_used_but_not_detected
613 #define yymore() yymore_used_but_not_detected
614 #define YY_MORE_ADJ 0
615 #define YY_RESTORE_YY_MORE_OFFSET
616 char *citi_text;
617 #line 1 "scan_citi.l"
618 /* -*-c-*- */
619 #line 4 "scan_citi.l"
620 /*
621  * scan_citi.l - scanner for CITIfiles
622  *
623  * Copyright (C) 2006 Stefan Jahn <stefan@lkcc.org>
624  *
625  * This is free software; you can redistribute it and/or modify
626  * it under the terms of the GNU General Public License as published by
627  * the Free Software Foundation; either version 2, or (at your option)
628  * any later version.
629  *
630  * This software is distributed in the hope that it will be useful,
631  * but WITHOUT ANY WARRANTY; without even the implied warranty of
632  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
633  * GNU General Public License for more details.
634  *
635  * You should have received a copy of the GNU General Public License
636  * along with this package; see the file COPYING. If not, write to
637  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
638  * Boston, MA 02110-1301, USA.
639  *
640  * $Id: scan_citi.l 1825 2011-03-11 20:42:14Z ela $
641  *
642  */
643 
644 #if HAVE_CONFIG_H
645 # include <config.h>
646 #endif
647 
648 #include <stdio.h>
649 #include <stdlib.h>
650 #include <string.h>
651 #include <ctype.h>
652 
653 #ifdef __MINGW32__
654 #include <io.h>
655 #endif
656 
657 #ifdef HAVE_UNISTD_H
658 #include <unistd.h>
659 #endif
660 
661 #include "logging.h"
662 #include "complex.h"
663 #include "object.h"
664 #include "vector.h"
665 #include "dataset.h"
666 #include "check_citi.h"
667 #include "tokens_citi.h"
668 
669 
670 #line 671 "scan_citi.cpp"
671 
672 #define INITIAL 0
673 #define COMMENTS 1
674 #define FLOATS 2
675 #define LISTS 3
676 #define DATAS 4
677 #define VALUES 5
678 
679 #ifndef YY_EXTRA_TYPE
680 #define YY_EXTRA_TYPE void *
681 #endif
682 
683 static int yy_init_globals (void );
684 
685 /* Accessor methods to globals.
686  These are made visible to non-reentrant scanners for convenience. */
687 
688 int citi_lex_destroy (void );
689 
690 int citi_get_debug (void );
691 
692 void citi_set_debug (int debug_flag );
693 
695 
696 void citi_set_extra (YY_EXTRA_TYPE user_defined );
697 
698 FILE *citi_get_in (void );
699 
700 void citi_set_in (FILE * in_str );
701 
702 FILE *citi_get_out (void );
703 
704 void citi_set_out (FILE * out_str );
705 
706 int citi_get_leng (void );
707 
708 char *citi_get_text (void );
709 
710 int citi_get_lineno (void );
711 
712 void citi_set_lineno (int line_number );
713 
714 /* Macros after this point can all be overridden by user definitions in
715  * section 1.
716  */
717 
718 #ifndef YY_SKIP_YYWRAP
719 #ifdef __cplusplus
720 extern "C" int citi_wrap (void );
721 #else
722 extern int citi_wrap (void );
723 #endif
724 #endif
725 
726 #ifndef yytext_ptr
727 static void yy_flex_strncpy (char *,yyconst char *,int );
728 #endif
729 
730 #ifdef YY_NEED_STRLEN
731 static int yy_flex_strlen (yyconst char * );
732 #endif
733 
734 #ifndef YY_NO_INPUT
735 
736 #ifdef __cplusplus
737 static int yyinput (void );
738 #else
739 static int input (void );
740 #endif
741 
742 #endif
743 
744 /* Amount of stuff to slurp up with each read. */
745 #ifndef YY_READ_BUF_SIZE
746 #ifdef __ia64__
747 /* On IA-64, the buffer size is 16k, not 8k */
748 #define YY_READ_BUF_SIZE 16384
749 #else
750 #define YY_READ_BUF_SIZE 8192
751 #endif /* __ia64__ */
752 #endif
753 
754 /* Copy whatever the last rule matched to the standard output. */
755 #ifndef ECHO
756 /* This used to be an fputs(), but since the string might contain NUL's,
757  * we now use fwrite().
758  */
759 #define ECHO do { if (fwrite( citi_text, citi_leng, 1, citi_out )) {} } while (0)
760 #endif
761 
762 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
763  * is returned in "result".
764  */
765 #ifndef YY_INPUT
766 #define YY_INPUT(buf,result,max_size) \
767  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
768  { \
769  int c = '*'; \
770  size_t n; \
771  for ( n = 0; n < max_size && \
772  (c = getc( citi_in )) != EOF && c != '\n'; ++n ) \
773  buf[n] = (char) c; \
774  if ( c == '\n' ) \
775  buf[n++] = (char) c; \
776  if ( c == EOF && ferror( citi_in ) ) \
777  YY_FATAL_ERROR( "input in flex scanner failed" ); \
778  result = n; \
779  } \
780  else \
781  { \
782  errno=0; \
783  while ( (result = fread(buf, 1, max_size, citi_in))==0 && ferror(citi_in)) \
784  { \
785  if( errno != EINTR) \
786  { \
787  YY_FATAL_ERROR( "input in flex scanner failed" ); \
788  break; \
789  } \
790  errno=0; \
791  clearerr(citi_in); \
792  } \
793  }\
794 \
795 
796 #endif
797 
798 /* No semi-colon after return; correct usage is to write "yyterminate();" -
799  * we don't want an extra ';' after the "return" because that will cause
800  * some compilers to complain about unreachable statements.
801  */
802 #ifndef yyterminate
803 #define yyterminate() return YY_NULL
804 #endif
805 
806 /* Number of entries by which start-condition stack grows. */
807 #ifndef YY_START_STACK_INCR
808 #define YY_START_STACK_INCR 25
809 #endif
810 
811 /* Report a fatal error. */
812 #ifndef YY_FATAL_ERROR
813 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
814 #endif
815 
816 /* end tables serialization structures and prototypes */
817 
818 /* Default declaration of generated scanner - a define so the user can
819  * easily add parameters.
820  */
821 #ifndef YY_DECL
822 #define YY_DECL_IS_OURS 1
823 
824 extern int citi_lex (void);
825 
826 #define YY_DECL int citi_lex (void)
827 #endif /* !YY_DECL */
828 
829 /* Code executed at the beginning of each rule, after citi_text and citi_leng
830  * have been set up.
831  */
832 #ifndef YY_USER_ACTION
833 #define YY_USER_ACTION
834 #endif
835 
836 /* Code executed at the end of each rule. */
837 #ifndef YY_BREAK
838 #define YY_BREAK break;
839 #endif
840 
841 #define YY_RULE_SETUP \
842  if ( citi_leng > 0 ) \
843  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
844  (citi_text[citi_leng - 1] == '\n'); \
845  YY_USER_ACTION
846 
849 YY_DECL
850 {
851  register yy_state_type yy_current_state;
852  register char *yy_cp, *yy_bp;
853  register int yy_act;
854 
855 #line 68 "scan_citi.l"
856 
857 
858 #line 859 "scan_citi.cpp"
859 
860  if ( !(yy_init) )
861  {
862  (yy_init) = 1;
863 
864 #ifdef YY_USER_INIT
865  YY_USER_INIT;
866 #endif
867 
868  if ( ! (yy_start) )
869  (yy_start) = 1; /* first start state */
870 
871  if ( ! citi_in )
872  citi_in = stdin;
873 
874  if ( ! citi_out )
875  citi_out = stdout;
876 
877  if ( ! YY_CURRENT_BUFFER ) {
878  citi_ensure_buffer_stack ();
881  }
882 
883  citi__load_buffer_state( );
884  }
885 
886  while ( 1 ) /* loops until end-of-file is reached */
887  {
888  yy_cp = (yy_c_buf_p);
889 
890  /* Support of citi_text. */
891  *yy_cp = (yy_hold_char);
892 
893  /* yy_bp points to the position in yy_ch_buf of the start of
894  * the current run.
895  */
896  yy_bp = yy_cp;
897 
898  yy_current_state = (yy_start);
899  yy_current_state += YY_AT_BOL();
900 yy_match:
901  do
902  {
903  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
904  if ( yy_accept[yy_current_state] )
905  {
906  (yy_last_accepting_state) = yy_current_state;
907  (yy_last_accepting_cpos) = yy_cp;
908  }
909  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
910  {
911  yy_current_state = (int) yy_def[yy_current_state];
912  if ( yy_current_state >= 168 )
913  yy_c = yy_meta[(unsigned int) yy_c];
914  }
915  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
916  ++yy_cp;
917  }
918  while ( yy_base[yy_current_state] != 274 );
919 
920 yy_find_action:
921  yy_act = yy_accept[yy_current_state];
922  if ( yy_act == 0 )
923  { /* have to back up */
924  yy_cp = (yy_last_accepting_cpos);
925  yy_current_state = (yy_last_accepting_state);
926  yy_act = yy_accept[yy_current_state];
927  }
928 
930 
931  if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
932  {
933  int yyl;
934  for ( yyl = 0; yyl < citi_leng; ++yyl )
935  if ( citi_text[yyl] == '\n' )
936 
937  citi_lineno++;
938 ;
939  }
940 
941 do_action: /* This label is used only to access EOF actions. */
942 
943  switch ( yy_act )
944  { /* beginning of action switch */
945  case 0: /* must back up */
946  /* undo the effects of YY_DO_BEFORE_ACTION */
947  *yy_cp = (yy_hold_char);
948  yy_cp = (yy_last_accepting_cpos);
949  yy_current_state = (yy_last_accepting_state);
950  goto yy_find_action;
951 
952 case 1:
953 /* rule 1 can match eol */
955 #line 70 "scan_citi.l"
956 { /* detect end of line */ return Eol; }
957  YY_BREAK
958 case 2:
960 #line 72 "scan_citi.l"
961 /* skip spaces */
962  YY_BREAK
963 case 3:
965 #line 74 "scan_citi.l"
966 { /* identify integer */
967  citi_lval.d = strtol (citi_text, NULL, 10);
968  return Integer;
969  }
970  YY_BREAK
971 case 4:
973 #line 79 "scan_citi.l"
974 {
975  return Version;
976  }
977  YY_BREAK
978 case 5:
980 #line 83 "scan_citi.l"
981 {
982  citi_lval.ident = strdup (citi_text);
983  return VarType;
984  }
985  YY_BREAK
986 case 6:
988 #line 88 "scan_citi.l"
989 { return CITIFILE; }
990  YY_BREAK
991 case 7:
993 #line 89 "scan_citi.l"
994 { return VAR; }
995  YY_BREAK
996 case 8:
998 #line 90 "scan_citi.l"
999 { BEGIN(DATAS); return DATA; }
1000  YY_BREAK
1001 case 9:
1003 #line 91 "scan_citi.l"
1004 { return NAME; }
1005  YY_BREAK
1006 case 10:
1008 #line 92 "scan_citi.l"
1009 { BEGIN(FLOATS); return Begin; }
1010  YY_BREAK
1011 case 11:
1013 #line 93 "scan_citi.l"
1014 { BEGIN(VALUES); return CONSTANT; }
1015  YY_BREAK
1016 case 12:
1018 #line 94 "scan_citi.l"
1019 { BEGIN(COMMENTS); }
1020  YY_BREAK
1021 case 13:
1023 #line 96 "scan_citi.l"
1024 { BEGIN(LISTS); return SegListBegin; }
1025  YY_BREAK
1026 case 14:
1028 #line 97 "scan_citi.l"
1029 { BEGIN(LISTS); return VarListBegin; }
1030  YY_BREAK
1031 case 15:
1033 #line 98 "scan_citi.l"
1034 { BEGIN(INITIAL); return SegListEnd; }
1035  YY_BREAK
1036 case 16:
1038 #line 99 "scan_citi.l"
1039 { BEGIN(INITIAL); return VarListEnd; }
1040  YY_BREAK
1041 case 17:
1043 #line 100 "scan_citi.l"
1044 { return SEG; }
1045  YY_BREAK
1046 case 18:
1048 #line 102 "scan_citi.l"
1049 { /* identify identifier */
1050  citi_lval.ident = strdup (citi_text);
1051  return Identifier;
1052  }
1053  YY_BREAK
1054 case 19:
1056 #line 107 "scan_citi.l"
1057 { /* identify float */
1058  citi_lval.f = strtod (citi_text, NULL);
1059  return Float;
1060  }
1061  YY_BREAK
1062 case 20:
1063 /* rule 20 can match eol */
1065 #line 112 "scan_citi.l"
1066 { BEGIN(INITIAL); return Eol; }
1067  YY_BREAK
1068 case 21:
1070 #line 114 "scan_citi.l"
1071 { /* pass the ',' to the parser */ return ','; }
1072  YY_BREAK
1073 case 22:
1075 #line 115 "scan_citi.l"
1076 { /* pass the '[' to the parser */ return '['; }
1077  YY_BREAK
1078 case 23:
1080 #line 116 "scan_citi.l"
1081 { /* pass the ']' to the parser */ BEGIN(INITIAL); return ']'; }
1082  YY_BREAK
1083 case 24:
1084 /* rule 24 can match eol */
1086 #line 117 "scan_citi.l"
1087 { BEGIN(INITIAL); return Eol; }
1088  YY_BREAK
1089 case 25:
1091 #line 119 "scan_citi.l"
1092 { /* pass the ',' to the parser */ return ','; }
1093  YY_BREAK
1094 case 26:
1096 #line 121 "scan_citi.l"
1097 { BEGIN(INITIAL); return End; }
1098  YY_BREAK
1099 case 27:
1101 #line 123 "scan_citi.l"
1102 { /* leave these characters */
1103  BEGIN(COMMENTS);
1104  }
1105  YY_BREAK
1106 case 28:
1108 #line 127 "scan_citi.l"
1109 { /* skip any character in here */ }
1110  YY_BREAK
1111 case 29:
1112 /* rule 29 can match eol */
1114 #line 128 "scan_citi.l"
1115 { BEGIN(INITIAL); /* skipping ends here */ }
1116  YY_BREAK
1117 case 30:
1119 #line 130 "scan_citi.l"
1120 { /* any other character in invalid */
1121  logprint (LOG_ERROR,
1122  "line %d: syntax error, unrecognized character: `%s'\n",
1123  citi_lineno, citi_text);
1124  return InvalidCharacter;
1125  }
1126  YY_BREAK
1127 case 31:
1129 #line 137 "scan_citi.l"
1130 ECHO;
1131  YY_BREAK
1132 #line 1133 "scan_citi.cpp"
1133 case YY_STATE_EOF(INITIAL):
1134 case YY_STATE_EOF(COMMENTS):
1135 case YY_STATE_EOF(FLOATS):
1136 case YY_STATE_EOF(LISTS):
1137 case YY_STATE_EOF(DATAS):
1138 case YY_STATE_EOF(VALUES):
1139  yyterminate();
1140 
1141  case YY_END_OF_BUFFER:
1142  {
1143  /* Amount of text matched not including the EOB char. */
1144  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1145 
1146  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1147  *yy_cp = (yy_hold_char);
1149 
1150  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1151  {
1152  /* We're scanning a new file or input source. It's
1153  * possible that this happened because the user
1154  * just pointed citi_in at a new source and called
1155  * citi_lex(). If so, then we have to assure
1156  * consistency between YY_CURRENT_BUFFER and our
1157  * globals. Here is the right place to do so, because
1158  * this is the first action (other than possibly a
1159  * back-up) that will match for the new input source.
1160  */
1161  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1162  YY_CURRENT_BUFFER_LVALUE->yy_input_file = citi_in;
1163  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1164  }
1165 
1166  /* Note that here we test for yy_c_buf_p "<=" to the position
1167  * of the first EOB in the buffer, since yy_c_buf_p will
1168  * already have been incremented past the NUL character
1169  * (since all states make transitions on EOB to the
1170  * end-of-buffer state). Contrast this with the test
1171  * in input().
1172  */
1173  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1174  { /* This was really a NUL. */
1175  yy_state_type yy_next_state;
1176 
1177  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1178 
1179  yy_current_state = yy_get_previous_state( );
1180 
1181  /* Okay, we're now positioned to make the NUL
1182  * transition. We couldn't have
1183  * yy_get_previous_state() go ahead and do it
1184  * for us because it doesn't know how to deal
1185  * with the possibility of jamming (and we don't
1186  * want to build jamming into it because then it
1187  * will run more slowly).
1188  */
1189 
1190  yy_next_state = yy_try_NUL_trans( yy_current_state );
1191 
1192  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1193 
1194  if ( yy_next_state )
1195  {
1196  /* Consume the NUL. */
1197  yy_cp = ++(yy_c_buf_p);
1198  yy_current_state = yy_next_state;
1199  goto yy_match;
1200  }
1201 
1202  else
1203  {
1204  yy_cp = (yy_c_buf_p);
1205  goto yy_find_action;
1206  }
1207  }
1208 
1209  else switch ( yy_get_next_buffer( ) )
1210  {
1211  case EOB_ACT_END_OF_FILE:
1212  {
1213  (yy_did_buffer_switch_on_eof) = 0;
1214 
1215  if ( citi_wrap( ) )
1216  {
1217  /* Note: because we've taken care in
1218  * yy_get_next_buffer() to have set up
1219  * citi_text, we can now set up
1220  * yy_c_buf_p so that if some total
1221  * hoser (like flex itself) wants to
1222  * call the scanner after we return the
1223  * YY_NULL, it'll still work - another
1224  * YY_NULL will get returned.
1225  */
1226  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1227 
1228  yy_act = YY_STATE_EOF(YY_START);
1229  goto do_action;
1230  }
1231 
1232  else
1233  {
1234  if ( ! (yy_did_buffer_switch_on_eof) )
1235  YY_NEW_FILE;
1236  }
1237  break;
1238  }
1239 
1240  case EOB_ACT_CONTINUE_SCAN:
1241  (yy_c_buf_p) =
1242  (yytext_ptr) + yy_amount_of_matched_text;
1243 
1244  yy_current_state = yy_get_previous_state( );
1245 
1246  yy_cp = (yy_c_buf_p);
1247  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1248  goto yy_match;
1249 
1250  case EOB_ACT_LAST_MATCH:
1251  (yy_c_buf_p) =
1252  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1253 
1254  yy_current_state = yy_get_previous_state( );
1255 
1256  yy_cp = (yy_c_buf_p);
1257  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1258  goto yy_find_action;
1259  }
1260  break;
1261  }
1262 
1263  default:
1265  "fatal flex scanner internal error--no action found" );
1266  } /* end of action switch */
1267  } /* end of scanning one token */
1268 } /* end of citi_lex */
1269 
1270 /* yy_get_next_buffer - try to read in a new buffer
1271  *
1272  * Returns a code representing an action:
1273  * EOB_ACT_LAST_MATCH -
1274  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1275  * EOB_ACT_END_OF_FILE - end of file
1276  */
1277 static int yy_get_next_buffer (void)
1278 {
1279  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1280  register char *source = (yytext_ptr);
1281  register int number_to_move, i;
1282  int ret_val;
1283 
1284  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1286  "fatal flex scanner internal error--end of buffer missed" );
1287 
1288  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1289  { /* Don't try to fill the buffer, so this is an EOF. */
1290  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1291  {
1292  /* We matched a single character, the EOB, so
1293  * treat this as a final EOF.
1294  */
1295  return EOB_ACT_END_OF_FILE;
1296  }
1297 
1298  else
1299  {
1300  /* We matched some text prior to the EOB, first
1301  * process it.
1302  */
1303  return EOB_ACT_LAST_MATCH;
1304  }
1305  }
1306 
1307  /* Try to read more data. */
1308 
1309  /* First move last chars to start of buffer. */
1310  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1311 
1312  for ( i = 0; i < number_to_move; ++i )
1313  *(dest++) = *(source++);
1314 
1315  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1316  /* don't do the read, it's not guaranteed to return an EOF,
1317  * just force an EOF
1318  */
1319  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1320 
1321  else
1322  {
1323  int num_to_read =
1324  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1325 
1326  while ( num_to_read <= 0 )
1327  { /* Not enough room in the buffer - grow it. */
1328 
1329  /* just a shorter name for the current buffer */
1330  YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1331 
1332  int yy_c_buf_p_offset =
1333  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1334 
1335  if ( b->yy_is_our_buffer )
1336  {
1337  int new_size = b->yy_buf_size * 2;
1338 
1339  if ( new_size <= 0 )
1340  b->yy_buf_size += b->yy_buf_size / 8;
1341  else
1342  b->yy_buf_size *= 2;
1343 
1344  b->yy_ch_buf = (char *)
1345  /* Include room in for 2 EOB chars. */
1346  citi_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1347  }
1348  else
1349  /* Can't grow it, we don't own it. */
1350  b->yy_ch_buf = 0;
1351 
1352  if ( ! b->yy_ch_buf )
1354  "fatal error - scanner input buffer overflow" );
1355 
1356  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1357 
1358  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1359  number_to_move - 1;
1360 
1361  }
1362 
1363  if ( num_to_read > YY_READ_BUF_SIZE )
1364  num_to_read = YY_READ_BUF_SIZE;
1365 
1366  /* Read in more data. */
1367  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1368  (yy_n_chars), (size_t) num_to_read );
1369 
1370  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1371  }
1372 
1373  if ( (yy_n_chars) == 0 )
1374  {
1375  if ( number_to_move == YY_MORE_ADJ )
1376  {
1377  ret_val = EOB_ACT_END_OF_FILE;
1379  }
1380 
1381  else
1382  {
1383  ret_val = EOB_ACT_LAST_MATCH;
1384  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1386  }
1387  }
1388 
1389  else
1390  ret_val = EOB_ACT_CONTINUE_SCAN;
1391 
1392  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1393  /* Extend the array by 50%, plus the number we really need. */
1394  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1395  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) citi_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1396  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1397  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1398  }
1399 
1400  (yy_n_chars) += number_to_move;
1401  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1402  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1403 
1404  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1405 
1406  return ret_val;
1407 }
1408 
1409 /* yy_get_previous_state - get the state just before the EOB char was reached */
1410 
1411  static yy_state_type yy_get_previous_state (void)
1412 {
1413  register yy_state_type yy_current_state;
1414  register char *yy_cp;
1415 
1416  yy_current_state = (yy_start);
1417  yy_current_state += YY_AT_BOL();
1418 
1419  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1420  {
1421  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1422  if ( yy_accept[yy_current_state] )
1423  {
1424  (yy_last_accepting_state) = yy_current_state;
1425  (yy_last_accepting_cpos) = yy_cp;
1426  }
1427  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1428  {
1429  yy_current_state = (int) yy_def[yy_current_state];
1430  if ( yy_current_state >= 168 )
1431  yy_c = yy_meta[(unsigned int) yy_c];
1432  }
1433  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1434  }
1435 
1436  return yy_current_state;
1437 }
1438 
1439 /* yy_try_NUL_trans - try to make a transition on the NUL character
1440  *
1441  * synopsis
1442  * next_state = yy_try_NUL_trans( current_state );
1443  */
1444  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1445 {
1446  register int yy_is_jam;
1447  register char *yy_cp = (yy_c_buf_p);
1448 
1449  register YY_CHAR yy_c = 1;
1450  if ( yy_accept[yy_current_state] )
1451  {
1452  (yy_last_accepting_state) = yy_current_state;
1453  (yy_last_accepting_cpos) = yy_cp;
1454  }
1455  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1456  {
1457  yy_current_state = (int) yy_def[yy_current_state];
1458  if ( yy_current_state >= 168 )
1459  yy_c = yy_meta[(unsigned int) yy_c];
1460  }
1461  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1462  yy_is_jam = (yy_current_state == 167);
1463 
1464  return yy_is_jam ? 0 : yy_current_state;
1465 }
1466 
1467 #ifndef YY_NO_INPUT
1468 #ifdef __cplusplus
1469  static int yyinput (void)
1470 #else
1471  static int input (void)
1472 #endif
1473 
1474 {
1475  int c;
1476 
1477  *(yy_c_buf_p) = (yy_hold_char);
1478 
1479  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1480  {
1481  /* yy_c_buf_p now points to the character we want to return.
1482  * If this occurs *before* the EOB characters, then it's a
1483  * valid NUL; if not, then we've hit the end of the buffer.
1484  */
1485  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1486  /* This was really a NUL. */
1487  *(yy_c_buf_p) = '\0';
1488 
1489  else
1490  { /* need more input */
1491  int offset = (yy_c_buf_p) - (yytext_ptr);
1492  ++(yy_c_buf_p);
1493 
1494  switch ( yy_get_next_buffer( ) )
1495  {
1496  case EOB_ACT_LAST_MATCH:
1497  /* This happens because yy_g_n_b()
1498  * sees that we've accumulated a
1499  * token and flags that we need to
1500  * try matching the token before
1501  * proceeding. But for input(),
1502  * there's no matching to consider.
1503  * So convert the EOB_ACT_LAST_MATCH
1504  * to EOB_ACT_END_OF_FILE.
1505  */
1506 
1507  /* Reset buffer status. */
1509 
1510  /*FALLTHROUGH*/
1511 
1512  case EOB_ACT_END_OF_FILE:
1513  {
1514  if ( citi_wrap( ) )
1515  return EOF;
1516 
1517  if ( ! (yy_did_buffer_switch_on_eof) )
1518  YY_NEW_FILE;
1519 #ifdef __cplusplus
1520  return yyinput();
1521 #else
1522  return input();
1523 #endif
1524  }
1525 
1526  case EOB_ACT_CONTINUE_SCAN:
1527  (yy_c_buf_p) = (yytext_ptr) + offset;
1528  break;
1529  }
1530  }
1531  }
1532 
1533  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1534  *(yy_c_buf_p) = '\0'; /* preserve citi_text */
1535  (yy_hold_char) = *++(yy_c_buf_p);
1536 
1537  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1538  if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1539 
1540  citi_lineno++;
1541 ;
1542 
1543  return c;
1544 }
1545 #endif /* ifndef YY_NO_INPUT */
1546 
1552  void citi_restart (FILE * input_file )
1553 {
1554 
1555  if ( ! YY_CURRENT_BUFFER ){
1556  citi_ensure_buffer_stack ();
1559  }
1560 
1561  citi__init_buffer(YY_CURRENT_BUFFER,input_file );
1562  citi__load_buffer_state( );
1563 }
1564 
1569  void citi__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1570 {
1571 
1572  /* TODO. We should be able to replace this entire function body
1573  * with
1574  * citi_pop_buffer_state();
1575  * citi_push_buffer_state(new_buffer);
1576  */
1577  citi_ensure_buffer_stack ();
1578  if ( YY_CURRENT_BUFFER == new_buffer )
1579  return;
1580 
1581  if ( YY_CURRENT_BUFFER )
1582  {
1583  /* Flush out information for old buffer. */
1584  *(yy_c_buf_p) = (yy_hold_char);
1585  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1586  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1587  }
1588 
1589  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1590  citi__load_buffer_state( );
1591 
1592  /* We don't actually know whether we did this switch during
1593  * EOF (citi_wrap()) processing, but the only time this flag
1594  * is looked at is after citi_wrap() is called, so it's safe
1595  * to go ahead and always set it.
1596  */
1597  (yy_did_buffer_switch_on_eof) = 1;
1598 }
1599 
1600 static void citi__load_buffer_state (void)
1601 {
1602  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1603  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1604  citi_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1605  (yy_hold_char) = *(yy_c_buf_p);
1606 }
1607 
1614  YY_BUFFER_STATE citi__create_buffer (FILE * file, int size )
1615 {
1616  YY_BUFFER_STATE b;
1617 
1618  b = (YY_BUFFER_STATE) citi_alloc(sizeof( struct yy_buffer_state ) );
1619  if ( ! b )
1620  YY_FATAL_ERROR( "out of dynamic memory in citi__create_buffer()" );
1621 
1622  b->yy_buf_size = size;
1623 
1624  /* yy_ch_buf has to be 2 characters longer than the size given because
1625  * we need to put in 2 end-of-buffer characters.
1626  */
1627  b->yy_ch_buf = (char *) citi_alloc(b->yy_buf_size + 2 );
1628  if ( ! b->yy_ch_buf )
1629  YY_FATAL_ERROR( "out of dynamic memory in citi__create_buffer()" );
1630 
1631  b->yy_is_our_buffer = 1;
1632 
1633  citi__init_buffer(b,file );
1634 
1635  return b;
1636 }
1637 
1642  void citi__delete_buffer (YY_BUFFER_STATE b )
1643 {
1644 
1645  if ( ! b )
1646  return;
1647 
1648  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1650 
1651  if ( b->yy_is_our_buffer )
1652  citi_free((void *) b->yy_ch_buf );
1653 
1654  citi_free((void *) b );
1655 }
1656 
1657 #ifndef __cplusplus
1658 extern int isatty (int );
1659 #endif /* __cplusplus */
1660 
1661 /* Initializes or reinitializes a buffer.
1662  * This function is sometimes called more than once on the same buffer,
1663  * such as during a citi_restart() or at EOF.
1664  */
1665  static void citi__init_buffer (YY_BUFFER_STATE b, FILE * file )
1666 
1667 {
1668  int oerrno = errno;
1669 
1670  citi__flush_buffer(b );
1671 
1672  b->yy_input_file = file;
1673  b->yy_fill_buffer = 1;
1674 
1675  /* If b is the current buffer, then citi__init_buffer was _probably_
1676  * called from citi_restart() or through yy_get_next_buffer.
1677  * In that case, we don't want to reset the lineno or column.
1678  */
1679  if (b != YY_CURRENT_BUFFER){
1680  b->yy_bs_lineno = 1;
1681  b->yy_bs_column = 0;
1682  }
1683 
1684  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1685 
1686  errno = oerrno;
1687 }
1688 
1693  void citi__flush_buffer (YY_BUFFER_STATE b )
1694 {
1695  if ( ! b )
1696  return;
1697 
1698  b->yy_n_chars = 0;
1699 
1700  /* We always need two end-of-buffer characters. The first causes
1701  * a transition to the end-of-buffer state. The second causes
1702  * a jam in that state.
1703  */
1706 
1707  b->yy_buf_pos = &b->yy_ch_buf[0];
1708 
1709  b->yy_at_bol = 1;
1711 
1712  if ( b == YY_CURRENT_BUFFER )
1713  citi__load_buffer_state( );
1714 }
1715 
1722 void citi_push_buffer_state (YY_BUFFER_STATE new_buffer )
1723 {
1724  if (new_buffer == NULL)
1725  return;
1726 
1727  citi_ensure_buffer_stack();
1728 
1729  /* This block is copied from citi__switch_to_buffer. */
1730  if ( YY_CURRENT_BUFFER )
1731  {
1732  /* Flush out information for old buffer. */
1733  *(yy_c_buf_p) = (yy_hold_char);
1734  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1735  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1736  }
1737 
1738  /* Only push if top exists. Otherwise, replace top. */
1739  if (YY_CURRENT_BUFFER)
1740  (yy_buffer_stack_top)++;
1741  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1742 
1743  /* copied from citi__switch_to_buffer. */
1744  citi__load_buffer_state( );
1745  (yy_did_buffer_switch_on_eof) = 1;
1746 }
1747 
1753 {
1754  if (!YY_CURRENT_BUFFER)
1755  return;
1756 
1758  YY_CURRENT_BUFFER_LVALUE = NULL;
1759  if ((yy_buffer_stack_top) > 0)
1760  --(yy_buffer_stack_top);
1761 
1762  if (YY_CURRENT_BUFFER) {
1763  citi__load_buffer_state( );
1764  (yy_did_buffer_switch_on_eof) = 1;
1765  }
1766 }
1767 
1768 /* Allocates the stack if it does not exist.
1769  * Guarantees space for at least one push.
1770  */
1771 static void citi_ensure_buffer_stack (void)
1772 {
1773  int num_to_alloc;
1774 
1775  if (!(yy_buffer_stack)) {
1776 
1777  /* First allocation is just for 2 elements, since we don't know if this
1778  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1779  * immediate realloc on the next call.
1780  */
1781  num_to_alloc = 1;
1782  (yy_buffer_stack) = (struct yy_buffer_state**)citi_alloc
1783  (num_to_alloc * sizeof(struct yy_buffer_state*)
1784  );
1785  if ( ! (yy_buffer_stack) )
1786  YY_FATAL_ERROR( "out of dynamic memory in citi_ensure_buffer_stack()" );
1787 
1788  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1789 
1790  (yy_buffer_stack_max) = num_to_alloc;
1791  (yy_buffer_stack_top) = 0;
1792  return;
1793  }
1794 
1795  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1796 
1797  /* Increase the buffer to prepare for a possible push. */
1798  int grow_size = 8 /* arbitrary grow size */;
1799 
1800  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1801  (yy_buffer_stack) = (struct yy_buffer_state**)citi_realloc
1802  ((yy_buffer_stack),
1803  num_to_alloc * sizeof(struct yy_buffer_state*)
1804  );
1805  if ( ! (yy_buffer_stack) )
1806  YY_FATAL_ERROR( "out of dynamic memory in citi_ensure_buffer_stack()" );
1807 
1808  /* zero only the new slots.*/
1809  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1810  (yy_buffer_stack_max) = num_to_alloc;
1811  }
1812 }
1813 
1820 YY_BUFFER_STATE citi__scan_buffer (char * base, yy_size_t size )
1821 {
1822  YY_BUFFER_STATE b;
1823 
1824  if ( size < 2 ||
1825  base[size-2] != YY_END_OF_BUFFER_CHAR ||
1826  base[size-1] != YY_END_OF_BUFFER_CHAR )
1827  /* They forgot to leave room for the EOB's. */
1828  return 0;
1829 
1830  b = (YY_BUFFER_STATE) citi_alloc(sizeof( struct yy_buffer_state ) );
1831  if ( ! b )
1832  YY_FATAL_ERROR( "out of dynamic memory in citi__scan_buffer()" );
1833 
1834  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1835  b->yy_buf_pos = b->yy_ch_buf = base;
1836  b->yy_is_our_buffer = 0;
1837  b->yy_input_file = 0;
1838  b->yy_n_chars = b->yy_buf_size;
1839  b->yy_is_interactive = 0;
1840  b->yy_at_bol = 1;
1841  b->yy_fill_buffer = 0;
1843 
1845 
1846  return b;
1847 }
1848 
1857 YY_BUFFER_STATE citi__scan_string (yyconst char * yystr )
1858 {
1859 
1860  return citi__scan_bytes(yystr,strlen(yystr) );
1861 }
1862 
1870 YY_BUFFER_STATE citi__scan_bytes (yyconst char * yybytes, int _yybytes_len )
1871 {
1872  YY_BUFFER_STATE b;
1873  char *buf;
1874  yy_size_t n;
1875  int i;
1876 
1877  /* Get memory for full buffer, including space for trailing EOB's. */
1878  n = _yybytes_len + 2;
1879  buf = (char *) citi_alloc(n );
1880  if ( ! buf )
1881  YY_FATAL_ERROR( "out of dynamic memory in citi__scan_bytes()" );
1882 
1883  for ( i = 0; i < _yybytes_len; ++i )
1884  buf[i] = yybytes[i];
1885 
1886  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1887 
1888  b = citi__scan_buffer(buf,n );
1889  if ( ! b )
1890  YY_FATAL_ERROR( "bad buffer in citi__scan_bytes()" );
1891 
1892  /* It's okay to grow etc. this buffer, and we should throw it
1893  * away when we're done.
1894  */
1895  b->yy_is_our_buffer = 1;
1896 
1897  return b;
1898 }
1899 
1900 #ifndef YY_EXIT_FAILURE
1901 #define YY_EXIT_FAILURE 2
1902 #endif
1903 
1904 static void yy_fatal_error (yyconst char* msg )
1905 {
1906  (void) fprintf( stderr, "%s\n", msg );
1907  exit( YY_EXIT_FAILURE );
1908 }
1909 
1910 /* Redefine yyless() so it works in section 3 code. */
1911 
1912 #undef yyless
1913 #define yyless(n) \
1914  do \
1915  { \
1916  /* Undo effects of setting up citi_text. */ \
1917  int yyless_macro_arg = (n); \
1918  YY_LESS_LINENO(yyless_macro_arg);\
1919  citi_text[citi_leng] = (yy_hold_char); \
1920  (yy_c_buf_p) = citi_text + yyless_macro_arg; \
1921  (yy_hold_char) = *(yy_c_buf_p); \
1922  *(yy_c_buf_p) = '\0'; \
1923  citi_leng = yyless_macro_arg; \
1924  } \
1925  while ( 0 )
1926 
1927 /* Accessor methods (get/set functions) to struct members. */
1928 
1933 {
1934 
1935  return citi_lineno;
1936 }
1937 
1941 FILE *citi_get_in (void)
1942 {
1943  return citi_in;
1944 }
1945 
1949 FILE *citi_get_out (void)
1950 {
1951  return citi_out;
1952 }
1953 
1957 int citi_get_leng (void)
1958 {
1959  return citi_leng;
1960 }
1961 
1966 char *citi_get_text (void)
1967 {
1968  return citi_text;
1969 }
1970 
1975 void citi_set_lineno (int line_number )
1976 {
1977 
1978  citi_lineno = line_number;
1979 }
1980 
1987 void citi_set_in (FILE * in_str )
1988 {
1989  citi_in = in_str ;
1990 }
1991 
1992 void citi_set_out (FILE * out_str )
1993 {
1994  citi_out = out_str ;
1995 }
1996 
1997 int citi_get_debug (void)
1998 {
1999  return citi__flex_debug;
2000 }
2001 
2002 void citi_set_debug (int bdebug )
2003 {
2004  citi__flex_debug = bdebug ;
2005 }
2006 
2007 static int yy_init_globals (void)
2008 {
2009  /* Initialization is the same as for the non-reentrant scanner.
2010  * This function is called from citi_lex_destroy(), so don't allocate here.
2011  */
2012 
2013  /* We do not touch citi_lineno unless the option is enabled. */
2014  citi_lineno = 1;
2015 
2016  (yy_buffer_stack) = 0;
2017  (yy_buffer_stack_top) = 0;
2018  (yy_buffer_stack_max) = 0;
2019  (yy_c_buf_p) = (char *) 0;
2020  (yy_init) = 0;
2021  (yy_start) = 0;
2022 
2023 /* Defined in main.c */
2024 #ifdef YY_STDINIT
2025  citi_in = stdin;
2026  citi_out = stdout;
2027 #else
2028  citi_in = (FILE *) 0;
2029  citi_out = (FILE *) 0;
2030 #endif
2031 
2032  /* For future reference: Set errno on error, since we are called by
2033  * citi_lex_init()
2034  */
2035  return 0;
2036 }
2037 
2038 /* citi_lex_destroy is for both reentrant and non-reentrant scanners. */
2040 {
2041 
2042  /* Pop the buffer stack, destroying each element. */
2043  while(YY_CURRENT_BUFFER){
2045  YY_CURRENT_BUFFER_LVALUE = NULL;
2047  }
2048 
2049  /* Destroy the stack itself. */
2050  citi_free((yy_buffer_stack) );
2051  (yy_buffer_stack) = NULL;
2052 
2053  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2054  * citi_lex() is called, initialization will occur. */
2055  yy_init_globals( );
2056 
2057  return 0;
2058 }
2059 
2060 /*
2061  * Internal utility routines.
2062  */
2063 
2064 #ifndef yytext_ptr
2065 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2066 {
2067  register int i;
2068  for ( i = 0; i < n; ++i )
2069  s1[i] = s2[i];
2070 }
2071 #endif
2072 
2073 #ifdef YY_NEED_STRLEN
2074 static int yy_flex_strlen (yyconst char * s )
2075 {
2076  register int n;
2077  for ( n = 0; s[n]; ++n )
2078  ;
2079 
2080  return n;
2081 }
2082 #endif
2083 
2084 void *citi_alloc (yy_size_t size )
2085 {
2086  return (void *) malloc( size );
2087 }
2088 
2089 void *citi_realloc (void * ptr, yy_size_t size )
2090 {
2091  /* The cast to (char *) in the following accommodates both
2092  * implementations that use char* generic pointers, and those
2093  * that use void* generic pointers. It works with the latter
2094  * because both ANSI C and C++ allow castless assignment from
2095  * any pointer type to void*, and deal with argument conversions
2096  * as though doing an assignment.
2097  */
2098  return (void *) realloc( (char *) ptr, size );
2099 }
2100 
2101 void citi_free (void * ptr )
2102 {
2103  free( (char *) ptr ); /* see citi_realloc() for (char *) cast */
2104 }
2105 
2106 #define YYTABLES_NAME "yytables"
2107 
2108 #line 137 "scan_citi.l"
2109 
2110 
2111