Line data Source code
1 : #line 1 "lexer.c"
2 :
3 : #line 3 "lexer.c"
4 :
5 : #define YY_INT_ALIGNED short int
6 :
7 : /* A lexical scanner generated by flex */
8 :
9 : /* %not-for-header */
10 : /* %if-c-only */
11 : /* %if-not-reentrant */
12 : /* %endif */
13 : /* %endif */
14 : /* %ok-for-header */
15 :
16 : #define FLEX_SCANNER
17 : #define YY_FLEX_MAJOR_VERSION 2
18 : #define YY_FLEX_MINOR_VERSION 6
19 : #define YY_FLEX_SUBMINOR_VERSION 4
20 : #if YY_FLEX_SUBMINOR_VERSION > 0
21 : #define FLEX_BETA
22 : #endif
23 :
24 : /* %if-c++-only */
25 : /* %endif */
26 :
27 : /* %if-c-only */
28 :
29 : /* %endif */
30 :
31 : #ifdef yyget_lval
32 : #define yyget_lval_ALREADY_DEFINED
33 : #else
34 : #define yyget_lval yyget_lval
35 : #endif
36 :
37 : #ifdef yyset_lval
38 : #define yyset_lval_ALREADY_DEFINED
39 : #else
40 : #define yyset_lval yyset_lval
41 : #endif
42 :
43 : /* %if-c-only */
44 :
45 : /* %endif */
46 :
47 : /* First, we deal with platform-specific or compiler-specific issues. */
48 :
49 : /* begin standard C headers. */
50 : /* %if-c-only */
51 : #include <stdio.h>
52 : #include <string.h>
53 : #include <errno.h>
54 : #include <stdlib.h>
55 : /* %endif */
56 :
57 : /* %if-tables-serialization */
58 : /* %endif */
59 : /* end standard C headers. */
60 :
61 : /* %if-c-or-c++ */
62 : /* flex integer type definitions */
63 :
64 : #ifndef FLEXINT_H
65 : #define FLEXINT_H
66 :
67 : /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
68 :
69 : #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
70 :
71 : /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
72 : * if you want the limit (max/min) macros for int types.
73 : */
74 : #ifndef __STDC_LIMIT_MACROS
75 : #define __STDC_LIMIT_MACROS 1
76 : #endif
77 :
78 : #include <inttypes.h>
79 : typedef int8_t flex_int8_t;
80 : typedef uint8_t flex_uint8_t;
81 : typedef int16_t flex_int16_t;
82 : typedef uint16_t flex_uint16_t;
83 : typedef int32_t flex_int32_t;
84 : typedef uint32_t flex_uint32_t;
85 : #else
86 : typedef signed char flex_int8_t;
87 : typedef short int flex_int16_t;
88 : typedef int flex_int32_t;
89 : typedef unsigned char flex_uint8_t;
90 : typedef unsigned short int flex_uint16_t;
91 : typedef unsigned int flex_uint32_t;
92 :
93 : /* Limits of integral types. */
94 : #ifndef INT8_MIN
95 : #define INT8_MIN (-128)
96 : #endif
97 : #ifndef INT16_MIN
98 : #define INT16_MIN (-32767-1)
99 : #endif
100 : #ifndef INT32_MIN
101 : #define INT32_MIN (-2147483647-1)
102 : #endif
103 : #ifndef INT8_MAX
104 : #define INT8_MAX (127)
105 : #endif
106 : #ifndef INT16_MAX
107 : #define INT16_MAX (32767)
108 : #endif
109 : #ifndef INT32_MAX
110 : #define INT32_MAX (2147483647)
111 : #endif
112 : #ifndef UINT8_MAX
113 : #define UINT8_MAX (255U)
114 : #endif
115 : #ifndef UINT16_MAX
116 : #define UINT16_MAX (65535U)
117 : #endif
118 : #ifndef UINT32_MAX
119 : #define UINT32_MAX (4294967295U)
120 : #endif
121 :
122 : #ifndef SIZE_MAX
123 : #define SIZE_MAX (~(size_t)0)
124 : #endif
125 :
126 : #endif /* ! C99 */
127 :
128 : #endif /* ! FLEXINT_H */
129 :
130 : /* %endif */
131 :
132 : /* begin standard C++ headers. */
133 : /* %if-c++-only */
134 : /* %endif */
135 :
136 : /* TODO: this is always defined, so inline it */
137 : #define yyconst const
138 :
139 : #if defined(__GNUC__) && __GNUC__ >= 3
140 : #define yynoreturn __attribute__((__noreturn__))
141 : #else
142 : #define yynoreturn
143 : #endif
144 :
145 : /* %not-for-header */
146 : /* Returned upon end-of-file. */
147 : #define YY_NULL 0
148 : /* %ok-for-header */
149 :
150 : /* %not-for-header */
151 : /* Promotes a possibly negative, possibly signed char to an
152 : * integer in range [0..255] for use as an array index.
153 : */
154 : #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
155 : /* %ok-for-header */
156 :
157 : /* %if-reentrant */
158 :
159 : /* An opaque pointer. */
160 : #ifndef YY_TYPEDEF_YY_SCANNER_T
161 : #define YY_TYPEDEF_YY_SCANNER_T
162 : typedef void* yyscan_t;
163 : #endif
164 :
165 : /* For convenience, these vars (plus the bison vars far below)
166 : are macros in the reentrant scanner. */
167 : #define yyin yyg->yyin_r
168 : #define yyout yyg->yyout_r
169 : #define yyextra yyg->yyextra_r
170 : #define yyleng yyg->yyleng_r
171 : #define yytext yyg->yytext_r
172 : #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
173 : #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
174 : #define yy_flex_debug yyg->yy_flex_debug_r
175 :
176 : /* %endif */
177 :
178 : /* %if-not-reentrant */
179 : /* %endif */
180 :
181 : /* Enter a start condition. This macro really ought to take a parameter,
182 : * but we do it the disgusting crufty way forced on us by the ()-less
183 : * definition of BEGIN.
184 : */
185 : #define BEGIN yyg->yy_start = 1 + 2 *
186 : /* Translate the current start state into a value that can be later handed
187 : * to BEGIN to return to the state. The YYSTATE alias is for lex
188 : * compatibility.
189 : */
190 : #define YY_START ((yyg->yy_start - 1) / 2)
191 : #define YYSTATE YY_START
192 : /* Action number for EOF rule of a given start state. */
193 : #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
194 : /* Special action meaning "start processing a new file". */
195 : #define YY_NEW_FILE yyrestart( yyin , yyscanner )
196 : #define YY_END_OF_BUFFER_CHAR 0
197 :
198 : /* Size of default input buffer. */
199 : #ifndef YY_BUF_SIZE
200 : #ifdef __ia64__
201 : /* On IA-64, the buffer size is 16k, not 8k.
202 : * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
203 : * Ditto for the __ia64__ case accordingly.
204 : */
205 : #define YY_BUF_SIZE 32768
206 : #else
207 : #define YY_BUF_SIZE 16384
208 : #endif /* __ia64__ */
209 : #endif
210 :
211 : /* The state buf must be large enough to hold one state per character in the main buffer.
212 : */
213 : #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
214 :
215 : #ifndef YY_TYPEDEF_YY_BUFFER_STATE
216 : #define YY_TYPEDEF_YY_BUFFER_STATE
217 : typedef struct yy_buffer_state *YY_BUFFER_STATE;
218 : #endif
219 :
220 : #ifndef YY_TYPEDEF_YY_SIZE_T
221 : #define YY_TYPEDEF_YY_SIZE_T
222 : typedef size_t yy_size_t;
223 : #endif
224 :
225 : /* %if-not-reentrant */
226 : /* %endif */
227 :
228 : /* %if-c-only */
229 : /* %if-not-reentrant */
230 : /* %endif */
231 : /* %endif */
232 :
233 : #define EOB_ACT_CONTINUE_SCAN 0
234 : #define EOB_ACT_END_OF_FILE 1
235 : #define EOB_ACT_LAST_MATCH 2
236 :
237 : #define YY_LESS_LINENO(n)
238 : #define YY_LINENO_REWIND_TO(ptr)
239 :
240 : /* Return all but the first "n" matched characters back to the input stream. */
241 : #define yyless(n) \
242 : do \
243 : { \
244 : /* Undo effects of setting up yytext. */ \
245 : int yyless_macro_arg = (n); \
246 : YY_LESS_LINENO(yyless_macro_arg);\
247 : *yy_cp = yyg->yy_hold_char; \
248 : YY_RESTORE_YY_MORE_OFFSET \
249 : yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
250 : YY_DO_BEFORE_ACTION; /* set up yytext again */ \
251 : } \
252 : while ( 0 )
253 : #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
254 :
255 : #ifndef YY_STRUCT_YY_BUFFER_STATE
256 : #define YY_STRUCT_YY_BUFFER_STATE
257 : struct yy_buffer_state
258 : {
259 : /* %if-c-only */
260 : FILE *yy_input_file;
261 : /* %endif */
262 :
263 : /* %if-c++-only */
264 : /* %endif */
265 :
266 : char *yy_ch_buf; /* input buffer */
267 : char *yy_buf_pos; /* current position in input buffer */
268 :
269 : /* Size of input buffer in bytes, not including room for EOB
270 : * characters.
271 : */
272 : int yy_buf_size;
273 :
274 : /* Number of characters read into yy_ch_buf, not including EOB
275 : * characters.
276 : */
277 : int yy_n_chars;
278 :
279 : /* Whether we "own" the buffer - i.e., we know we created it,
280 : * and can realloc() it to grow it, and should free() it to
281 : * delete it.
282 : */
283 : int yy_is_our_buffer;
284 :
285 : /* Whether this is an "interactive" input source; if so, and
286 : * if we're using stdio for input, then we want to use getc()
287 : * instead of fread(), to make sure we stop fetching input after
288 : * each newline.
289 : */
290 : int yy_is_interactive;
291 :
292 : /* Whether we're considered to be at the beginning of a line.
293 : * If so, '^' rules will be active on the next match, otherwise
294 : * not.
295 : */
296 : int yy_at_bol;
297 :
298 : int yy_bs_lineno; /**< The line count. */
299 : int yy_bs_column; /**< The column count. */
300 :
301 : /* Whether to try to fill the input buffer when we reach the
302 : * end of it.
303 : */
304 : int yy_fill_buffer;
305 :
306 : int yy_buffer_status;
307 :
308 : #define YY_BUFFER_NEW 0
309 : #define YY_BUFFER_NORMAL 1
310 : /* When an EOF's been seen but there's still some text to process
311 : * then we mark the buffer as YY_EOF_PENDING, to indicate that we
312 : * shouldn't try reading from the input source any more. We might
313 : * still have a bunch of tokens to match, though, because of
314 : * possible backing-up.
315 : *
316 : * When we actually see the EOF, we change the status to "new"
317 : * (via yyrestart()), so that the user can continue scanning by
318 : * just pointing yyin at a new input file.
319 : */
320 : #define YY_BUFFER_EOF_PENDING 2
321 :
322 : };
323 : #endif /* !YY_STRUCT_YY_BUFFER_STATE */
324 :
325 : /* %if-c-only Standard (non-C++) definition */
326 : /* %not-for-header */
327 : /* %if-not-reentrant */
328 : /* %endif */
329 : /* %ok-for-header */
330 :
331 : /* %endif */
332 :
333 : /* We provide macros for accessing buffer states in case in the
334 : * future we want to put the buffer states in a more general
335 : * "scanner state".
336 : *
337 : * Returns the top of the stack, or NULL.
338 : */
339 : #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
340 : ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
341 : : NULL)
342 : /* Same as previous macro, but useful when we know that the buffer stack is not
343 : * NULL or when we need an lvalue. For internal use only.
344 : */
345 : #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
346 :
347 : /* %if-c-only Standard (non-C++) definition */
348 :
349 : /* %if-not-reentrant */
350 : /* %not-for-header */
351 : /* %ok-for-header */
352 :
353 : /* %endif */
354 :
355 : void yyrestart ( FILE *input_file , yyscan_t yyscanner );
356 : void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
357 : YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
358 : void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
359 : void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
360 : void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
361 : void yypop_buffer_state ( yyscan_t yyscanner );
362 :
363 : static void yyensure_buffer_stack ( yyscan_t yyscanner );
364 : static void yy_load_buffer_state ( yyscan_t yyscanner );
365 : static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
366 : #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
367 :
368 : YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
369 : YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
370 : YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
371 :
372 : /* %endif */
373 :
374 : void *yyalloc ( yy_size_t , yyscan_t yyscanner );
375 : void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
376 : void yyfree ( void * , yyscan_t yyscanner );
377 :
378 : #define yy_new_buffer yy_create_buffer
379 : #define yy_set_interactive(is_interactive) \
380 : { \
381 : if ( ! YY_CURRENT_BUFFER ){ \
382 : yyensure_buffer_stack (yyscanner); \
383 : YY_CURRENT_BUFFER_LVALUE = \
384 : yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
385 : } \
386 : YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
387 : }
388 : #define yy_set_bol(at_bol) \
389 : { \
390 : if ( ! YY_CURRENT_BUFFER ){\
391 : yyensure_buffer_stack (yyscanner); \
392 : YY_CURRENT_BUFFER_LVALUE = \
393 : yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
394 : } \
395 : YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
396 : }
397 : #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
398 :
399 : /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
400 : /* Begin user sect3 */
401 :
402 : #define yywrap(yyscanner) (/*CONSTCOND*/1)
403 : #define YY_SKIP_YYWRAP
404 :
405 : #define FLEX_DEBUG
406 : typedef flex_uint8_t YY_CHAR;
407 :
408 : typedef int yy_state_type;
409 :
410 : #define yytext_ptr yytext_r
411 :
412 : /* %% [1.5] DFA */
413 :
414 : /* %if-c-only Standard (non-C++) definition */
415 :
416 : static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
417 : static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
418 : static int yy_get_next_buffer ( yyscan_t yyscanner );
419 : static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
420 :
421 : /* %endif */
422 :
423 : /* Done after the current pattern has been matched and before the
424 : * corresponding action - sets up yytext.
425 : */
426 : #define YY_DO_BEFORE_ACTION \
427 : yyg->yytext_ptr = yy_bp; \
428 : /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
429 : yyleng = (int) (yy_cp - yy_bp); \
430 : yyg->yy_hold_char = *yy_cp; \
431 : *yy_cp = '\0'; \
432 : /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
433 : yyg->yy_c_buf_p = yy_cp;
434 : /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
435 : #define YY_NUM_RULES 20
436 : #define YY_END_OF_BUFFER 21
437 : /* This struct is not used in this scanner,
438 : but its presence is necessary. */
439 : struct yy_trans_info
440 : {
441 : flex_int32_t yy_verify;
442 : flex_int32_t yy_nxt;
443 : };
444 : static const flex_int16_t yy_accept[57] =
445 : { 0,
446 : 0, 0, 21, 19, 18, 17, 19, 19, 19, 5,
447 : 19, 19, 14, 14, 6, 7, 15, 3, 4, 15,
448 : 15, 1, 2, 18, 0, 16, 0, 12, 0, 0,
449 : 0, 13, 13, 14, 14, 0, 0, 15, 15, 15,
450 : 15, 0, 11, 0, 12, 0, 0, 14, 9, 8,
451 : 15, 11, 13, 15, 10, 0
452 : } ;
453 :
454 : static const YY_CHAR yy_ec[256] =
455 : { 0,
456 : 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
457 : 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
458 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 : 1, 2, 1, 1, 4, 1, 1, 1, 5, 1,
460 : 1, 1, 6, 7, 8, 9, 10, 11, 12, 12,
461 : 12, 12, 12, 12, 12, 12, 12, 13, 14, 1,
462 : 1, 1, 1, 1, 15, 15, 15, 15, 15, 15,
463 : 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
464 : 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
465 : 17, 18, 19, 1, 16, 1, 20, 15, 15, 15,
466 :
467 : 21, 15, 22, 16, 16, 16, 16, 16, 16, 16,
468 : 16, 16, 16, 16, 23, 24, 16, 16, 16, 25,
469 : 16, 16, 26, 1, 27, 1, 1, 1, 1, 1,
470 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 :
478 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
481 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 : 1, 1, 1, 1, 1
484 : } ;
485 :
486 : static const YY_CHAR yy_meta[28] =
487 : { 0,
488 : 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
489 : 3, 3, 1, 1, 3, 2, 1, 1, 1, 3,
490 : 3, 2, 2, 2, 2, 1, 1
491 : } ;
492 :
493 : static const flex_int16_t yy_base[64] =
494 : { 0,
495 : 0, 0, 98, 99, 95, 99, 93, 23, 23, 99,
496 : 18, 85, 25, 27, 99, 99, 0, 99, 99, 73,
497 : 19, 99, 99, 91, 89, 99, 27, 99, 37, 39,
498 : 35, 37, 40, 42, 47, 88, 0, 0, 51, 48,
499 : 51, 51, 99, 55, 56, 0, 67, 0, 0, 0,
500 : 44, 58, 0, 45, 0, 99, 76, 79, 81, 84,
501 : 87, 62, 61
502 : } ;
503 :
504 : static const flex_int16_t yy_def[64] =
505 : { 0,
506 : 56, 1, 56, 56, 56, 56, 57, 58, 56, 56,
507 : 56, 56, 56, 56, 56, 56, 59, 56, 56, 59,
508 : 59, 56, 56, 56, 57, 56, 58, 56, 60, 58,
509 : 56, 56, 56, 56, 56, 61, 62, 59, 59, 59,
510 : 59, 60, 56, 60, 58, 63, 61, 62, 59, 59,
511 : 59, 60, 63, 59, 59, 0, 56, 56, 56, 56,
512 : 56, 56, 56
513 : } ;
514 :
515 : static const flex_int16_t yy_nxt[127] =
516 : { 0,
517 : 4, 5, 6, 7, 8, 9, 10, 11, 4, 12,
518 : 13, 14, 15, 16, 17, 17, 18, 4, 19, 17,
519 : 17, 20, 21, 17, 17, 22, 23, 28, 34, 35,
520 : 31, 28, 29, 32, 33, 35, 35, 35, 35, 40,
521 : 30, 43, 41, 45, 30, 32, 33, 33, 33, 37,
522 : 33, 33, 35, 35, 44, 43, 30, 35, 35, 52,
523 : 28, 46, 43, 53, 48, 55, 37, 54, 44, 26,
524 : 51, 50, 44, 30, 49, 44, 25, 25, 25, 27,
525 : 27, 27, 38, 38, 42, 42, 42, 47, 47, 47,
526 : 26, 26, 24, 39, 36, 26, 24, 56, 3, 56,
527 :
528 : 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
529 : 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
530 : 56, 56, 56, 56, 56, 56
531 : } ;
532 :
533 : static const flex_int16_t yy_chk[127] =
534 : { 0,
535 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
536 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
537 : 1, 1, 1, 1, 1, 1, 1, 8, 11, 11,
538 : 9, 27, 8, 9, 9, 13, 13, 14, 14, 21,
539 : 8, 29, 21, 30, 27, 31, 31, 32, 32, 13,
540 : 33, 33, 34, 34, 29, 42, 30, 35, 35, 44,
541 : 45, 32, 52, 63, 62, 54, 34, 51, 42, 47,
542 : 41, 40, 44, 45, 39, 52, 57, 57, 57, 58,
543 : 58, 58, 59, 59, 60, 60, 60, 61, 61, 61,
544 : 36, 25, 24, 20, 12, 7, 5, 3, 56, 56,
545 :
546 : 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
547 : 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
548 : 56, 56, 56, 56, 56, 56
549 : } ;
550 :
551 : static const flex_int16_t yy_rule_linenum[20] =
552 : { 0,
553 : 43, 46, 49, 52, 55, 58, 61, 64, 67, 70,
554 : 73, 77, 81, 84, 87, 90, 97, 101, 102
555 : } ;
556 :
557 : /* The intent behind this definition is that it'll catch
558 : * any uses of REJECT which flex missed.
559 : */
560 : #define REJECT reject_used_but_not_detected
561 : #define yymore() yymore_used_but_not_detected
562 : #define YY_MORE_ADJ 0
563 : #define YY_RESTORE_YY_MORE_OFFSET
564 : #line 1 "lexer.l"
565 : #line 2 "lexer.l"
566 : #include "lang.h"
567 : #include "parser.h"
568 :
569 : #define EXTRA ((struct lgfs2_lang_state *)yyextra)
570 :
571 : #define P(token, type, text) do {\
572 : *(yylval) = ast_new(type, text);\
573 : if (*(yylval) == NULL) {\
574 : EXTRA->ls_errnum = errno;\
575 : return 1;\
576 : }\
577 : return (TOK_##token);\
578 : } while(0)
579 :
580 : #define COLNUM EXTRA->ls_colnum
581 : #define YY_USER_ACTION COLNUM += yyleng;
582 :
583 : #line 583 "lexer.c"
584 : #define YY_NO_INPUT 1
585 : #line 585 "lexer.c"
586 :
587 : #define INITIAL 0
588 :
589 : #ifndef YY_NO_UNISTD_H
590 : /* Special case for "unistd.h", since it is non-ANSI. We include it way
591 : * down here because we want the user's section 1 to have been scanned first.
592 : * The user has a chance to override it with an option.
593 : */
594 : /* %if-c-only */
595 : #include <unistd.h>
596 : /* %endif */
597 : /* %if-c++-only */
598 : /* %endif */
599 : #endif
600 :
601 : #define YY_EXTRA_TYPE struct lgfs2_lang_state *
602 :
603 : /* %if-c-only Reentrant structure and macros (non-C++). */
604 : /* %if-reentrant */
605 :
606 : /* Holds the entire state of the reentrant scanner. */
607 : struct yyguts_t
608 : {
609 :
610 : /* User-defined. Not touched by flex. */
611 : YY_EXTRA_TYPE yyextra_r;
612 :
613 : /* The rest are the same as the globals declared in the non-reentrant scanner. */
614 : FILE *yyin_r, *yyout_r;
615 : size_t yy_buffer_stack_top; /**< index of top of stack. */
616 : size_t yy_buffer_stack_max; /**< capacity of stack. */
617 : YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
618 : char yy_hold_char;
619 : int yy_n_chars;
620 : int yyleng_r;
621 : char *yy_c_buf_p;
622 : int yy_init;
623 : int yy_start;
624 : int yy_did_buffer_switch_on_eof;
625 : int yy_start_stack_ptr;
626 : int yy_start_stack_depth;
627 : int *yy_start_stack;
628 : yy_state_type yy_last_accepting_state;
629 : char* yy_last_accepting_cpos;
630 :
631 : int yylineno_r;
632 : int yy_flex_debug_r;
633 :
634 : char *yytext_r;
635 : int yy_more_flag;
636 : int yy_more_len;
637 :
638 : YYSTYPE * yylval_r;
639 :
640 : }; /* end struct yyguts_t */
641 :
642 : /* %if-c-only */
643 :
644 : static int yy_init_globals ( yyscan_t yyscanner );
645 :
646 : /* %endif */
647 :
648 : /* %if-reentrant */
649 :
650 : /* This must go here because YYSTYPE and YYLTYPE are included
651 : * from bison output in section 1.*/
652 : # define yylval yyg->yylval_r
653 :
654 : int yylex_init (yyscan_t* scanner);
655 :
656 : int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
657 :
658 : /* %endif */
659 :
660 : /* %endif End reentrant structures and macros. */
661 :
662 : /* Accessor methods to globals.
663 : These are made visible to non-reentrant scanners for convenience. */
664 :
665 : int yylex_destroy ( yyscan_t yyscanner );
666 :
667 : int yyget_debug ( yyscan_t yyscanner );
668 :
669 : void yyset_debug ( int debug_flag , yyscan_t yyscanner );
670 :
671 : YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
672 :
673 : void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
674 :
675 : FILE *yyget_in ( yyscan_t yyscanner );
676 :
677 : void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
678 :
679 : FILE *yyget_out ( yyscan_t yyscanner );
680 :
681 : void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
682 :
683 : int yyget_leng ( yyscan_t yyscanner );
684 :
685 : char *yyget_text ( yyscan_t yyscanner );
686 :
687 : int yyget_lineno ( yyscan_t yyscanner );
688 :
689 : void yyset_lineno ( int _line_number , yyscan_t yyscanner );
690 :
691 : int yyget_column ( yyscan_t yyscanner );
692 :
693 : void yyset_column ( int _column_no , yyscan_t yyscanner );
694 :
695 : /* %if-bison-bridge */
696 :
697 : YYSTYPE * yyget_lval ( yyscan_t yyscanner );
698 :
699 : void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
700 :
701 : /* %endif */
702 :
703 : /* Macros after this point can all be overridden by user definitions in
704 : * section 1.
705 : */
706 :
707 : #ifndef YY_SKIP_YYWRAP
708 : #ifdef __cplusplus
709 : extern "C" int yywrap ( yyscan_t yyscanner );
710 : #else
711 : extern int yywrap ( yyscan_t yyscanner );
712 : #endif
713 : #endif
714 :
715 : /* %not-for-header */
716 : #ifndef YY_NO_UNPUT
717 :
718 : #endif
719 : /* %ok-for-header */
720 :
721 : /* %endif */
722 :
723 : #ifndef yytext_ptr
724 : static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
725 : #endif
726 :
727 : #ifdef YY_NEED_STRLEN
728 : static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
729 : #endif
730 :
731 : #ifndef YY_NO_INPUT
732 : /* %if-c-only Standard (non-C++) definition */
733 : /* %not-for-header */
734 : #ifdef __cplusplus
735 : static int yyinput ( yyscan_t yyscanner );
736 : #else
737 : static int input ( yyscan_t yyscanner );
738 : #endif
739 : /* %ok-for-header */
740 :
741 : /* %endif */
742 : #endif
743 :
744 : /* %if-c-only */
745 :
746 : /* %endif */
747 :
748 : /* Amount of stuff to slurp up with each read. */
749 : #ifndef YY_READ_BUF_SIZE
750 : #ifdef __ia64__
751 : /* On IA-64, the buffer size is 16k, not 8k */
752 : #define YY_READ_BUF_SIZE 16384
753 : #else
754 : #define YY_READ_BUF_SIZE 8192
755 : #endif /* __ia64__ */
756 : #endif
757 :
758 : /* Copy whatever the last rule matched to the standard output. */
759 : #ifndef ECHO
760 : /* %if-c-only Standard (non-C++) definition */
761 : /* This used to be an fputs(), but since the string might contain NUL's,
762 : * we now use fwrite().
763 : */
764 : #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
765 : /* %endif */
766 : /* %if-c++-only C++ definition */
767 : /* %endif */
768 : #endif
769 :
770 : /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
771 : * is returned in "result".
772 : */
773 : #ifndef YY_INPUT
774 : #define YY_INPUT(buf,result,max_size) \
775 : /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
776 : if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
777 : { \
778 : int c = '*'; \
779 : int n; \
780 : for ( n = 0; n < max_size && \
781 : (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
782 : buf[n] = (char) c; \
783 : if ( c == '\n' ) \
784 : buf[n++] = (char) c; \
785 : if ( c == EOF && ferror( yyin ) ) \
786 : YY_FATAL_ERROR( "input in flex scanner failed" ); \
787 : result = n; \
788 : } \
789 : else \
790 : { \
791 : errno=0; \
792 : while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
793 : { \
794 : if( errno != EINTR) \
795 : { \
796 : YY_FATAL_ERROR( "input in flex scanner failed" ); \
797 : break; \
798 : } \
799 : errno=0; \
800 : clearerr(yyin); \
801 : } \
802 : }\
803 : \
804 : /* %if-c++-only C++ definition \ */\
805 : /* %endif */
806 :
807 : #endif
808 :
809 : /* No semi-colon after return; correct usage is to write "yyterminate();" -
810 : * we don't want an extra ';' after the "return" because that will cause
811 : * some compilers to complain about unreachable statements.
812 : */
813 : #ifndef yyterminate
814 : #define yyterminate() return YY_NULL
815 : #endif
816 :
817 : /* Number of entries by which start-condition stack grows. */
818 : #ifndef YY_START_STACK_INCR
819 : #define YY_START_STACK_INCR 25
820 : #endif
821 :
822 : /* Report a fatal error. */
823 : #ifndef YY_FATAL_ERROR
824 : /* %if-c-only */
825 : #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
826 : /* %endif */
827 : /* %if-c++-only */
828 : /* %endif */
829 : #endif
830 :
831 : /* %if-tables-serialization structures and prototypes */
832 : /* %not-for-header */
833 : /* %ok-for-header */
834 :
835 : /* %not-for-header */
836 : /* %tables-yydmap generated elements */
837 : /* %endif */
838 : /* end tables serialization structures and prototypes */
839 :
840 : /* %ok-for-header */
841 :
842 : /* Default declaration of generated scanner - a define so the user can
843 : * easily add parameters.
844 : */
845 : #ifndef YY_DECL
846 : #define YY_DECL_IS_OURS 1
847 : /* %if-c-only Standard (non-C++) definition */
848 :
849 : extern int yylex \
850 : (YYSTYPE * yylval_param , yyscan_t yyscanner);
851 :
852 : #define YY_DECL int yylex \
853 : (YYSTYPE * yylval_param , yyscan_t yyscanner)
854 : /* %endif */
855 : /* %if-c++-only C++ definition */
856 : /* %endif */
857 : #endif /* !YY_DECL */
858 :
859 : /* Code executed at the beginning of each rule, after yytext and yyleng
860 : * have been set up.
861 : */
862 : #ifndef YY_USER_ACTION
863 : #define YY_USER_ACTION
864 : #endif
865 :
866 : /* Code executed at the end of each rule. */
867 : #ifndef YY_BREAK
868 : #define YY_BREAK /*LINTED*/break;
869 : #endif
870 :
871 : /* %% [6.0] YY_RULE_SETUP definition goes here */
872 : #define YY_RULE_SETUP \
873 : YY_USER_ACTION
874 :
875 : /* %not-for-header */
876 : /** The main scanner function which does all the work.
877 64 : */
878 : YY_DECL
879 : {
880 : yy_state_type yy_current_state;
881 : char *yy_cp, *yy_bp;
882 64 : int yy_act;
883 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
884 64 :
885 : yylval = yylval_param;
886 64 :
887 : if ( !yyg->yy_init )
888 8 : {
889 : yyg->yy_init = 1;
890 :
891 : #ifdef YY_USER_INIT
892 : YY_USER_INIT;
893 : #endif
894 8 :
895 8 : if ( ! yyg->yy_start )
896 : yyg->yy_start = 1; /* first start state */
897 8 :
898 : if ( ! yyin )
899 0 : /* %if-c-only */
900 : yyin = stdin;
901 : /* %endif */
902 : /* %if-c++-only */
903 : /* %endif */
904 8 :
905 : if ( ! yyout )
906 8 : /* %if-c-only */
907 : yyout = stdout;
908 : /* %endif */
909 : /* %if-c++-only */
910 : /* %endif */
911 8 :
912 8 : if ( ! YY_CURRENT_BUFFER ) {
913 8 : yyensure_buffer_stack (yyscanner);
914 8 : YY_CURRENT_BUFFER_LVALUE =
915 : yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
916 : }
917 8 :
918 : yy_load_buffer_state( yyscanner );
919 : }
920 :
921 : {
922 : /* %% [7.0] user's declarations go here */
923 : #line 41 "lexer.l"
924 :
925 :
926 : #line 926 "lexer.c"
927 :
928 : while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
929 : {
930 112 : /* %% [8.0] yymore()-related code goes here */
931 : yy_cp = yyg->yy_c_buf_p;
932 :
933 112 : /* Support of yytext. */
934 : *yy_cp = yyg->yy_hold_char;
935 :
936 : /* yy_bp points to the position in yy_ch_buf of the start of
937 : * the current run.
938 112 : */
939 : yy_bp = yy_cp;
940 :
941 112 : /* %% [9.0] code to set up and find next match goes here */
942 8 : yy_current_state = yyg->yy_start;
943 : yy_match:
944 : do
945 314 : {
946 314 : YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
947 : if ( yy_accept[yy_current_state] )
948 193 : {
949 193 : yyg->yy_last_accepting_state = yy_current_state;
950 : yyg->yy_last_accepting_cpos = yy_cp;
951 499 : }
952 : while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
953 185 : {
954 185 : yy_current_state = (int) yy_def[yy_current_state];
955 98 : if ( yy_current_state >= 57 )
956 : yy_c = yy_meta[yy_c];
957 314 : }
958 314 : yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
959 : ++yy_cp;
960 314 : }
961 : while ( yy_base[yy_current_state] != 99 );
962 120 :
963 : yy_find_action:
964 120 : /* %% [10.0] code to find the action number goes here */
965 120 : yy_act = yy_accept[yy_current_state];
966 : if ( yy_act == 0 )
967 87 : { /* have to back up */
968 87 : yy_cp = yyg->yy_last_accepting_cpos;
969 87 : yy_current_state = yyg->yy_last_accepting_state;
970 : yy_act = yy_accept[yy_current_state];
971 : }
972 120 :
973 : YY_DO_BEFORE_ACTION;
974 :
975 : /* %% [11.0] code for yylineno update goes here */
976 128 :
977 : do_action: /* This label is used only to access EOF actions. */
978 :
979 128 : /* %% [12.0] debug code goes here */
980 : if ( yy_flex_debug )
981 0 : {
982 0 : if ( yy_act == 0 )
983 0 : fprintf( stderr, "--scanner backing up\n" );
984 0 : else if ( yy_act < 20 )
985 0 : fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
986 0 : (long)yy_rule_linenum[yy_act], yytext );
987 0 : else if ( yy_act == 20 )
988 : fprintf( stderr, "--accepting default rule (\"%s\")\n",
989 0 : yytext );
990 0 : else if ( yy_act == 21 )
991 : fprintf( stderr, "--(end of buffer or a NUL)\n" );
992 0 : else
993 : fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
994 : }
995 128 :
996 : switch ( yy_act )
997 : { /* beginning of action switch */
998 0 : /* %% [13.0] actions go here */
999 : case 0: /* must back up */
1000 0 : /* undo the effects of YY_DO_BEFORE_ACTION */
1001 0 : *yy_cp = yyg->yy_hold_char;
1002 0 : yy_cp = yyg->yy_last_accepting_cpos;
1003 0 : yy_current_state = yyg->yy_last_accepting_state;
1004 : goto yy_find_action;
1005 8 :
1006 8 : case 1:
1007 : YY_RULE_SETUP
1008 : #line 43 "lexer.l"
1009 : {
1010 : return TOK_LBRACE;
1011 : }
1012 : YY_BREAK
1013 : case 2:
1014 : YY_RULE_SETUP
1015 : #line 46 "lexer.l"
1016 : {
1017 : return TOK_RBRACE;
1018 : }
1019 : YY_BREAK
1020 : case 3:
1021 : YY_RULE_SETUP
1022 : #line 49 "lexer.l"
1023 : {
1024 : return TOK_LBRACKET;
1025 : }
1026 : YY_BREAK
1027 : case 4:
1028 : YY_RULE_SETUP
1029 : #line 52 "lexer.l"
1030 : {
1031 : P(RBRACKET, AST_EX_SUBSCRIPT, "[ ]");
1032 : }
1033 : YY_BREAK
1034 : case 5:
1035 : YY_RULE_SETUP
1036 : #line 55 "lexer.l"
1037 : {
1038 : return TOK_COMMA;
1039 : }
1040 : YY_BREAK
1041 : case 6:
1042 : YY_RULE_SETUP
1043 : #line 58 "lexer.l"
1044 : {
1045 : P(COLON, AST_EX_FIELDSPEC, yytext);
1046 : }
1047 : YY_BREAK
1048 : case 7:
1049 : YY_RULE_SETUP
1050 : #line 61 "lexer.l"
1051 : {
1052 : return TOK_SEMI;
1053 : }
1054 : YY_BREAK
1055 : case 8:
1056 : YY_RULE_SETUP
1057 : #line 64 "lexer.l"
1058 : {
1059 : P(SET, AST_ST_SET, yytext);
1060 : }
1061 : YY_BREAK
1062 : case 9:
1063 : YY_RULE_SETUP
1064 : #line 67 "lexer.l"
1065 : {
1066 : P(GET, AST_ST_GET, yytext);
1067 : }
1068 : YY_BREAK
1069 : case 10:
1070 : YY_RULE_SETUP
1071 : #line 70 "lexer.l"
1072 : {
1073 : P(STATE, AST_KW_STATE, yytext);
1074 : }
1075 : YY_BREAK
1076 : case 11:
1077 : /* rule 11 can match eol */
1078 : YY_RULE_SETUP
1079 : #line 73 "lexer.l"
1080 : {
1081 : yytext[yyleng-1] = '\0';
1082 : P(PATH, AST_EX_PATH, yytext + 1);
1083 : }
1084 : YY_BREAK
1085 : case 12:
1086 : /* rule 12 can match eol */
1087 : YY_RULE_SETUP
1088 : #line 77 "lexer.l"
1089 : {
1090 : yytext[yyleng-1] = '\0';
1091 : P(STRING, AST_EX_STRING, yytext + 1);
1092 : }
1093 : YY_BREAK
1094 : case 13:
1095 : YY_RULE_SETUP
1096 : #line 81 "lexer.l"
1097 : {
1098 : P(OFFSET, AST_EX_OFFSET, yytext);
1099 : }
1100 : YY_BREAK
1101 : case 14:
1102 : YY_RULE_SETUP
1103 : #line 84 "lexer.l"
1104 : {
1105 : P(NUMBER, AST_EX_NUMBER, yytext);
1106 : }
1107 : YY_BREAK
1108 : case 15:
1109 : YY_RULE_SETUP
1110 : #line 87 "lexer.l"
1111 : {
1112 : P(ID, AST_EX_ID, yytext);
1113 : }
1114 : YY_BREAK
1115 : case 16:
1116 : /* rule 16 can match eol */
1117 : YY_RULE_SETUP
1118 : #line 90 "lexer.l"
1119 : {
1120 : COLNUM = 0;
1121 : EXTRA->ls_linenum++;
1122 : }
1123 : YY_BREAK
1124 : case YY_STATE_EOF(INITIAL):
1125 : #line 94 "lexer.l"
1126 : {
1127 : return 0;
1128 : }
1129 : YY_BREAK
1130 : case 17:
1131 : /* rule 17 can match eol */
1132 : YY_RULE_SETUP
1133 : #line 97 "lexer.l"
1134 : {
1135 : COLNUM = 0;
1136 : EXTRA->ls_linenum++;
1137 : }
1138 : YY_BREAK
1139 : case 18:
1140 : YY_RULE_SETUP
1141 : #line 101 "lexer.l"
1142 : ;
1143 : YY_BREAK
1144 : case 19:
1145 : YY_RULE_SETUP
1146 : #line 102 "lexer.l"
1147 : {
1148 : printf("Unexpected character '%s' on line %d column %d\n",
1149 : yytext, yylineno, COLNUM);
1150 : return 1;
1151 : }
1152 : YY_BREAK
1153 : case 20:
1154 : YY_RULE_SETUP
1155 : #line 108 "lexer.l"
1156 : ECHO;
1157 : YY_BREAK
1158 : #line 1158 "lexer.c"
1159 16 :
1160 : case YY_END_OF_BUFFER:
1161 : {
1162 16 : /* Amount of text matched not including the EOB char. */
1163 : int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1164 :
1165 16 : /* Undo the effects of YY_DO_BEFORE_ACTION. */
1166 : *yy_cp = yyg->yy_hold_char;
1167 : YY_RESTORE_YY_MORE_OFFSET
1168 16 :
1169 : if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1170 : {
1171 : /* We're scanning a new file or input source. It's
1172 : * possible that this happened because the user
1173 : * just pointed yyin at a new source and called
1174 : * yylex(). If so, then we have to assure
1175 : * consistency between YY_CURRENT_BUFFER and our
1176 : * globals. Here is the right place to do so, because
1177 : * this is the first action (other than possibly a
1178 : * back-up) that will match for the new input source.
1179 8 : */
1180 : yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1181 8 : /* %if-c-only */
1182 : YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1183 : /* %endif */
1184 : /* %if-c++-only */
1185 8 : /* %endif */
1186 : YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1187 : }
1188 :
1189 : /* Note that here we test for yy_c_buf_p "<=" to the position
1190 : * of the first EOB in the buffer, since yy_c_buf_p will
1191 : * already have been incremented past the NUL character
1192 : * (since all states make transitions on EOB to the
1193 : * end-of-buffer state). Contrast this with the test
1194 : * in input().
1195 16 : */
1196 : if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1197 : { /* This was really a NUL. */
1198 : yy_state_type yy_next_state;
1199 0 :
1200 : yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1201 0 :
1202 : yy_current_state = yy_get_previous_state( yyscanner );
1203 :
1204 : /* Okay, we're now positioned to make the NUL
1205 : * transition. We couldn't have
1206 : * yy_get_previous_state() go ahead and do it
1207 : * for us because it doesn't know how to deal
1208 : * with the possibility of jamming (and we don't
1209 : * want to build jamming into it because then it
1210 : * will run more slowly).
1211 : */
1212 0 :
1213 : yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1214 0 :
1215 : yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1216 0 :
1217 : if ( yy_next_state )
1218 : {
1219 0 : /* Consume the NUL. */
1220 0 : yy_cp = ++yyg->yy_c_buf_p;
1221 0 : yy_current_state = yy_next_state;
1222 : goto yy_match;
1223 : }
1224 :
1225 : else
1226 : {
1227 0 : /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1228 0 : yy_cp = yyg->yy_c_buf_p;
1229 : goto yy_find_action;
1230 : }
1231 : }
1232 16 :
1233 : else switch ( yy_get_next_buffer( yyscanner ) )
1234 8 : {
1235 : case EOB_ACT_END_OF_FILE:
1236 8 : {
1237 : yyg->yy_did_buffer_switch_on_eof = 0;
1238 :
1239 : if ( yywrap( yyscanner ) )
1240 : {
1241 : /* Note: because we've taken care in
1242 : * yy_get_next_buffer() to have set up
1243 : * yytext, we can now set up
1244 : * yy_c_buf_p so that if some total
1245 : * hoser (like flex itself) wants to
1246 : * call the scanner after we return the
1247 : * YY_NULL, it'll still work - another
1248 : * YY_NULL will get returned.
1249 8 : */
1250 : yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1251 8 :
1252 8 : yy_act = YY_STATE_EOF(YY_START);
1253 : goto do_action;
1254 : }
1255 :
1256 : else
1257 : {
1258 : if ( ! yyg->yy_did_buffer_switch_on_eof )
1259 : YY_NEW_FILE;
1260 : }
1261 : break;
1262 : }
1263 8 :
1264 8 : case EOB_ACT_CONTINUE_SCAN:
1265 8 : yyg->yy_c_buf_p =
1266 : yyg->yytext_ptr + yy_amount_of_matched_text;
1267 8 :
1268 : yy_current_state = yy_get_previous_state( yyscanner );
1269 8 :
1270 8 : yy_cp = yyg->yy_c_buf_p;
1271 8 : yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1272 : goto yy_match;
1273 0 :
1274 0 : case EOB_ACT_LAST_MATCH:
1275 0 : yyg->yy_c_buf_p =
1276 : &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1277 0 :
1278 : yy_current_state = yy_get_previous_state( yyscanner );
1279 0 :
1280 0 : yy_cp = yyg->yy_c_buf_p;
1281 0 : yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1282 : goto yy_find_action;
1283 0 : }
1284 : break;
1285 : }
1286 0 :
1287 0 : default:
1288 : YY_FATAL_ERROR(
1289 : "fatal flex scanner internal error--no action found" );
1290 : } /* end of action switch */
1291 : } /* end of scanning one token */
1292 : } /* end of user's declarations */
1293 : } /* end of yylex */
1294 : /* %ok-for-header */
1295 :
1296 : /* %if-c++-only */
1297 : /* %not-for-header */
1298 : /* %ok-for-header */
1299 :
1300 : /* %endif */
1301 :
1302 : /* yy_get_next_buffer - try to read in a new buffer
1303 : *
1304 : * Returns a code representing an action:
1305 : * EOB_ACT_LAST_MATCH -
1306 : * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1307 : * EOB_ACT_END_OF_FILE - end of file
1308 : */
1309 16 : /* %if-c-only */
1310 : static int yy_get_next_buffer (yyscan_t yyscanner)
1311 : /* %endif */
1312 : /* %if-c++-only */
1313 : /* %endif */
1314 16 : {
1315 16 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1316 16 : char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1317 : char *source = yyg->yytext_ptr;
1318 : int number_to_move, i;
1319 : int ret_val;
1320 16 :
1321 0 : if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1322 : YY_FATAL_ERROR(
1323 : "fatal flex scanner internal error--end of buffer missed" );
1324 16 :
1325 : if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1326 0 : { /* Don't try to fill the buffer, so this is an EOF. */
1327 : if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1328 : {
1329 : /* We matched a single character, the EOB, so
1330 : * treat this as a final EOF.
1331 0 : */
1332 : return EOB_ACT_END_OF_FILE;
1333 : }
1334 :
1335 : else
1336 : {
1337 : /* We matched some text prior to the EOB, first
1338 : * process it.
1339 0 : */
1340 : return EOB_ACT_LAST_MATCH;
1341 : }
1342 : }
1343 :
1344 : /* Try to read more data. */
1345 :
1346 16 : /* First move last chars to start of buffer. */
1347 : number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1348 16 :
1349 0 : for ( i = 0; i < number_to_move; ++i )
1350 : *(dest++) = *(source++);
1351 16 :
1352 : if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1353 : /* don't do the read, it's not guaranteed to return an EOF,
1354 : * just force an EOF
1355 0 : */
1356 : YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1357 :
1358 : else
1359 16 : {
1360 16 : int num_to_read =
1361 : YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1362 16 :
1363 : while ( num_to_read <= 0 )
1364 : { /* Not enough room in the buffer - grow it. */
1365 :
1366 0 : /* just a shorter name for the current buffer */
1367 : YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1368 0 :
1369 0 : int yy_c_buf_p_offset =
1370 : (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1371 0 :
1372 : if ( b->yy_is_our_buffer )
1373 0 : {
1374 : int new_size = b->yy_buf_size * 2;
1375 0 :
1376 0 : if ( new_size <= 0 )
1377 : b->yy_buf_size += b->yy_buf_size / 8;
1378 0 : else
1379 : b->yy_buf_size *= 2;
1380 0 :
1381 : b->yy_ch_buf = (char *)
1382 0 : /* Include room in for 2 EOB chars. */
1383 0 : yyrealloc( (void *) b->yy_ch_buf,
1384 : (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1385 : }
1386 : else
1387 0 : /* Can't grow it, we don't own it. */
1388 : b->yy_ch_buf = NULL;
1389 0 :
1390 0 : if ( ! b->yy_ch_buf )
1391 : YY_FATAL_ERROR(
1392 : "fatal error - scanner input buffer overflow" );
1393 0 :
1394 : yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1395 0 :
1396 : num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1397 : number_to_move - 1;
1398 :
1399 : }
1400 16 :
1401 16 : if ( num_to_read > YY_READ_BUF_SIZE )
1402 : num_to_read = YY_READ_BUF_SIZE;
1403 :
1404 16 : /* Read in more data. */
1405 : YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1406 : yyg->yy_n_chars, num_to_read );
1407 16 :
1408 : YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1409 : }
1410 16 :
1411 : if ( yyg->yy_n_chars == 0 )
1412 8 : {
1413 : if ( number_to_move == YY_MORE_ADJ )
1414 8 : {
1415 8 : ret_val = EOB_ACT_END_OF_FILE;
1416 : yyrestart( yyin , yyscanner);
1417 : }
1418 :
1419 : else
1420 0 : {
1421 0 : ret_val = EOB_ACT_LAST_MATCH;
1422 : YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1423 : YY_BUFFER_EOF_PENDING;
1424 : }
1425 : }
1426 :
1427 8 : else
1428 : ret_val = EOB_ACT_CONTINUE_SCAN;
1429 16 :
1430 : if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1431 0 : /* Extend the array by 50%, plus the number we really need. */
1432 0 : int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1433 0 : YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1434 0 : (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1435 0 : if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1436 : YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1437 0 : /* "- 2" to take care of EOB's */
1438 : YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1439 : }
1440 16 :
1441 16 : yyg->yy_n_chars += number_to_move;
1442 16 : YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1443 : YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1444 16 :
1445 : yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1446 16 :
1447 : return ret_val;
1448 : }
1449 :
1450 : /* yy_get_previous_state - get the state just before the EOB char was reached */
1451 :
1452 : /* %if-c-only */
1453 8 : /* %not-for-header */
1454 : static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1455 : /* %endif */
1456 : /* %if-c++-only */
1457 : /* %endif */
1458 : {
1459 : yy_state_type yy_current_state;
1460 8 : char *yy_cp;
1461 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1462 :
1463 8 : /* %% [15.0] code to get the start state into yy_current_state goes here */
1464 : yy_current_state = yyg->yy_start;
1465 8 :
1466 : for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1467 : {
1468 0 : /* %% [16.0] code to find the next state goes here */
1469 0 : YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1470 : if ( yy_accept[yy_current_state] )
1471 0 : {
1472 0 : yyg->yy_last_accepting_state = yy_current_state;
1473 : yyg->yy_last_accepting_cpos = yy_cp;
1474 0 : }
1475 : while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1476 0 : {
1477 0 : yy_current_state = (int) yy_def[yy_current_state];
1478 0 : if ( yy_current_state >= 57 )
1479 : yy_c = yy_meta[yy_c];
1480 0 : }
1481 : yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1482 : }
1483 8 :
1484 : return yy_current_state;
1485 : }
1486 :
1487 : /* yy_try_NUL_trans - try to make a transition on the NUL character
1488 : *
1489 : * synopsis
1490 : * next_state = yy_try_NUL_trans( current_state );
1491 : */
1492 0 : /* %if-c-only */
1493 : static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1494 : /* %endif */
1495 : /* %if-c++-only */
1496 : /* %endif */
1497 : {
1498 0 : int yy_is_jam;
1499 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1500 0 : /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
1501 : char *yy_cp = yyg->yy_c_buf_p;
1502 0 :
1503 0 : YY_CHAR yy_c = 1;
1504 : if ( yy_accept[yy_current_state] )
1505 0 : {
1506 0 : yyg->yy_last_accepting_state = yy_current_state;
1507 : yyg->yy_last_accepting_cpos = yy_cp;
1508 0 : }
1509 : while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1510 0 : {
1511 0 : yy_current_state = (int) yy_def[yy_current_state];
1512 0 : if ( yy_current_state >= 57 )
1513 : yy_c = yy_meta[yy_c];
1514 0 : }
1515 0 : yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1516 : yy_is_jam = (yy_current_state == 56);
1517 :
1518 0 : (void)yyg;
1519 : return yy_is_jam ? 0 : yy_current_state;
1520 : }
1521 :
1522 : #ifndef YY_NO_UNPUT
1523 : /* %if-c-only */
1524 :
1525 : /* %endif */
1526 : #endif
1527 :
1528 : /* %if-c-only */
1529 : #ifndef YY_NO_INPUT
1530 : #ifdef __cplusplus
1531 : static int yyinput (yyscan_t yyscanner)
1532 : #else
1533 : static int input (yyscan_t yyscanner)
1534 : #endif
1535 :
1536 : /* %endif */
1537 : /* %if-c++-only */
1538 : /* %endif */
1539 : {
1540 : int c;
1541 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1542 :
1543 : *yyg->yy_c_buf_p = yyg->yy_hold_char;
1544 :
1545 : if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1546 : {
1547 : /* yy_c_buf_p now points to the character we want to return.
1548 : * If this occurs *before* the EOB characters, then it's a
1549 : * valid NUL; if not, then we've hit the end of the buffer.
1550 : */
1551 : if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1552 : /* This was really a NUL. */
1553 : *yyg->yy_c_buf_p = '\0';
1554 :
1555 : else
1556 : { /* need more input */
1557 : int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
1558 : ++yyg->yy_c_buf_p;
1559 :
1560 : switch ( yy_get_next_buffer( yyscanner ) )
1561 : {
1562 : case EOB_ACT_LAST_MATCH:
1563 : /* This happens because yy_g_n_b()
1564 : * sees that we've accumulated a
1565 : * token and flags that we need to
1566 : * try matching the token before
1567 : * proceeding. But for input(),
1568 : * there's no matching to consider.
1569 : * So convert the EOB_ACT_LAST_MATCH
1570 : * to EOB_ACT_END_OF_FILE.
1571 : */
1572 :
1573 : /* Reset buffer status. */
1574 : yyrestart( yyin , yyscanner);
1575 :
1576 : /*FALLTHROUGH*/
1577 :
1578 : case EOB_ACT_END_OF_FILE:
1579 : {
1580 : if ( yywrap( yyscanner ) )
1581 : return 0;
1582 :
1583 : if ( ! yyg->yy_did_buffer_switch_on_eof )
1584 : YY_NEW_FILE;
1585 : #ifdef __cplusplus
1586 : return yyinput(yyscanner);
1587 : #else
1588 : return input(yyscanner);
1589 : #endif
1590 : }
1591 :
1592 : case EOB_ACT_CONTINUE_SCAN:
1593 : yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1594 : break;
1595 : }
1596 : }
1597 : }
1598 :
1599 : c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1600 : *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1601 : yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1602 :
1603 : /* %% [19.0] update BOL and yylineno */
1604 :
1605 : return c;
1606 : }
1607 : /* %if-c-only */
1608 : #endif /* ifndef YY_NO_INPUT */
1609 : /* %endif */
1610 :
1611 : /** Immediately switch to a different input stream.
1612 : * @param input_file A readable stream.
1613 : * @param yyscanner The scanner object.
1614 : * @note This function does not reset the start condition to @c INITIAL .
1615 : */
1616 8 : /* %if-c-only */
1617 : void yyrestart (FILE * input_file , yyscan_t yyscanner)
1618 : /* %endif */
1619 : /* %if-c++-only */
1620 : /* %endif */
1621 8 : {
1622 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1623 8 :
1624 0 : if ( ! YY_CURRENT_BUFFER ){
1625 0 : yyensure_buffer_stack (yyscanner);
1626 0 : YY_CURRENT_BUFFER_LVALUE =
1627 : yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1628 : }
1629 8 :
1630 8 : yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
1631 8 : yy_load_buffer_state( yyscanner );
1632 : }
1633 :
1634 : /* %if-c++-only */
1635 : /* %endif */
1636 :
1637 : /** Switch to a different input buffer.
1638 : * @param new_buffer The new input buffer.
1639 : * @param yyscanner The scanner object.
1640 : */
1641 0 : /* %if-c-only */
1642 : void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1643 : /* %endif */
1644 : /* %if-c++-only */
1645 : /* %endif */
1646 0 : {
1647 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1648 :
1649 : /* TODO. We should be able to replace this entire function body
1650 : * with
1651 : * yypop_buffer_state();
1652 : * yypush_buffer_state(new_buffer);
1653 0 : */
1654 0 : yyensure_buffer_stack (yyscanner);
1655 0 : if ( YY_CURRENT_BUFFER == new_buffer )
1656 : return;
1657 0 :
1658 : if ( YY_CURRENT_BUFFER )
1659 : {
1660 0 : /* Flush out information for old buffer. */
1661 0 : *yyg->yy_c_buf_p = yyg->yy_hold_char;
1662 0 : YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1663 : YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1664 : }
1665 0 :
1666 0 : YY_CURRENT_BUFFER_LVALUE = new_buffer;
1667 : yy_load_buffer_state( yyscanner );
1668 :
1669 : /* We don't actually know whether we did this switch during
1670 : * EOF (yywrap()) processing, but the only time this flag
1671 : * is looked at is after yywrap() is called, so it's safe
1672 : * to go ahead and always set it.
1673 0 : */
1674 : yyg->yy_did_buffer_switch_on_eof = 1;
1675 : }
1676 :
1677 24 : /* %if-c-only */
1678 : static void yy_load_buffer_state (yyscan_t yyscanner)
1679 : /* %endif */
1680 : /* %if-c++-only */
1681 : /* %endif */
1682 24 : {
1683 24 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1684 24 : yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1685 : yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1686 24 : /* %if-c-only */
1687 : yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1688 : /* %endif */
1689 : /* %if-c++-only */
1690 24 : /* %endif */
1691 24 : yyg->yy_hold_char = *yyg->yy_c_buf_p;
1692 : }
1693 :
1694 : /** Allocate and initialize an input buffer state.
1695 : * @param file A readable stream.
1696 : * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1697 : * @param yyscanner The scanner object.
1698 : * @return the allocated buffer state.
1699 : */
1700 8 : /* %if-c-only */
1701 : YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1702 : /* %endif */
1703 : /* %if-c++-only */
1704 : /* %endif */
1705 : {
1706 : YY_BUFFER_STATE b;
1707 8 :
1708 8 : b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1709 0 : if ( ! b )
1710 : YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1711 8 :
1712 : b->yy_buf_size = size;
1713 :
1714 : /* yy_ch_buf has to be 2 characters longer than the size given because
1715 : * we need to put in 2 end-of-buffer characters.
1716 8 : */
1717 8 : b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1718 0 : if ( ! b->yy_ch_buf )
1719 : YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1720 8 :
1721 : b->yy_is_our_buffer = 1;
1722 8 :
1723 : yy_init_buffer( b, file , yyscanner);
1724 8 :
1725 : return b;
1726 : }
1727 :
1728 : /* %if-c++-only */
1729 : /* %endif */
1730 :
1731 : /** Destroy the buffer.
1732 : * @param b a buffer created with yy_create_buffer()
1733 : * @param yyscanner The scanner object.
1734 : */
1735 8 : /* %if-c-only */
1736 : void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1737 : /* %endif */
1738 : /* %if-c++-only */
1739 : /* %endif */
1740 8 : {
1741 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1742 8 :
1743 0 : if ( ! b )
1744 : return;
1745 8 :
1746 8 : if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1747 : YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1748 8 :
1749 8 : if ( b->yy_is_our_buffer )
1750 : yyfree( (void *) b->yy_ch_buf , yyscanner );
1751 8 :
1752 : yyfree( (void *) b , yyscanner );
1753 : }
1754 :
1755 : /* Initializes or reinitializes a buffer.
1756 : * This function is sometimes called more than once on the same buffer,
1757 : * such as during a yyrestart() or at EOF.
1758 : */
1759 16 : /* %if-c-only */
1760 : static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1761 : /* %endif */
1762 : /* %if-c++-only */
1763 : /* %endif */
1764 :
1765 16 : {
1766 16 : int oerrno = errno;
1767 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1768 16 :
1769 : yy_flush_buffer( b , yyscanner);
1770 :
1771 16 : /* %if-c-only */
1772 : b->yy_input_file = file;
1773 : /* %endif */
1774 : /* %if-c++-only */
1775 16 : /* %endif */
1776 : b->yy_fill_buffer = 1;
1777 :
1778 : /* If b is the current buffer, then yy_init_buffer was _probably_
1779 : * called from yyrestart() or through yy_get_next_buffer.
1780 : * In that case, we don't want to reset the lineno or column.
1781 16 : */
1782 8 : if (b != YY_CURRENT_BUFFER){
1783 8 : b->yy_bs_lineno = 1;
1784 : b->yy_bs_column = 0;
1785 : }
1786 :
1787 : /* %if-c-only */
1788 16 :
1789 : b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1790 :
1791 : /* %endif */
1792 : /* %if-c++-only */
1793 16 : /* %endif */
1794 16 : errno = oerrno;
1795 : }
1796 :
1797 : /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1798 : * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1799 : * @param yyscanner The scanner object.
1800 : */
1801 16 : /* %if-c-only */
1802 : void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1803 : /* %endif */
1804 : /* %if-c++-only */
1805 : /* %endif */
1806 16 : {
1807 16 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1808 0 : if ( ! b )
1809 : return;
1810 16 :
1811 : b->yy_n_chars = 0;
1812 :
1813 : /* We always need two end-of-buffer characters. The first causes
1814 : * a transition to the end-of-buffer state. The second causes
1815 : * a jam in that state.
1816 16 : */
1817 16 : b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1818 : b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1819 16 :
1820 : b->yy_buf_pos = &b->yy_ch_buf[0];
1821 16 :
1822 16 : b->yy_at_bol = 1;
1823 : b->yy_buffer_status = YY_BUFFER_NEW;
1824 16 :
1825 8 : if ( b == YY_CURRENT_BUFFER )
1826 : yy_load_buffer_state( yyscanner );
1827 : }
1828 :
1829 : /* %if-c-or-c++ */
1830 : /** Pushes the new state onto the stack. The new state becomes
1831 : * the current state. This function will allocate the stack
1832 : * if necessary.
1833 : * @param new_buffer The new state.
1834 : * @param yyscanner The scanner object.
1835 : */
1836 0 : /* %if-c-only */
1837 : void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1838 : /* %endif */
1839 : /* %if-c++-only */
1840 : /* %endif */
1841 0 : {
1842 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1843 0 : if (new_buffer == NULL)
1844 : return;
1845 0 :
1846 : yyensure_buffer_stack(yyscanner);
1847 :
1848 0 : /* This block is copied from yy_switch_to_buffer. */
1849 : if ( YY_CURRENT_BUFFER )
1850 : {
1851 0 : /* Flush out information for old buffer. */
1852 0 : *yyg->yy_c_buf_p = yyg->yy_hold_char;
1853 0 : YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1854 : YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1855 : }
1856 :
1857 0 : /* Only push if top exists. Otherwise, replace top. */
1858 0 : if (YY_CURRENT_BUFFER)
1859 0 : yyg->yy_buffer_stack_top++;
1860 : YY_CURRENT_BUFFER_LVALUE = new_buffer;
1861 :
1862 0 : /* copied from yy_switch_to_buffer. */
1863 0 : yy_load_buffer_state( yyscanner );
1864 : yyg->yy_did_buffer_switch_on_eof = 1;
1865 : }
1866 : /* %endif */
1867 :
1868 : /* %if-c-or-c++ */
1869 : /** Removes and deletes the top of the stack, if present.
1870 : * The next element becomes the new top.
1871 : * @param yyscanner The scanner object.
1872 : */
1873 8 : /* %if-c-only */
1874 : void yypop_buffer_state (yyscan_t yyscanner)
1875 : /* %endif */
1876 : /* %if-c++-only */
1877 : /* %endif */
1878 8 : {
1879 8 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1880 8 : if (!YY_CURRENT_BUFFER)
1881 : return;
1882 0 :
1883 0 : yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
1884 0 : YY_CURRENT_BUFFER_LVALUE = NULL;
1885 0 : if (yyg->yy_buffer_stack_top > 0)
1886 : --yyg->yy_buffer_stack_top;
1887 0 :
1888 0 : if (YY_CURRENT_BUFFER) {
1889 0 : yy_load_buffer_state( yyscanner );
1890 : yyg->yy_did_buffer_switch_on_eof = 1;
1891 : }
1892 : }
1893 : /* %endif */
1894 :
1895 : /* %if-c-or-c++ */
1896 : /* Allocates the stack if it does not exist.
1897 : * Guarantees space for at least one push.
1898 : */
1899 8 : /* %if-c-only */
1900 : static void yyensure_buffer_stack (yyscan_t yyscanner)
1901 : /* %endif */
1902 : /* %if-c++-only */
1903 : /* %endif */
1904 : {
1905 8 : yy_size_t num_to_alloc;
1906 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1907 8 :
1908 : if (!yyg->yy_buffer_stack) {
1909 :
1910 : /* First allocation is just for 2 elements, since we don't know if this
1911 : * scanner will even need a stack. We use 2 instead of 1 to avoid an
1912 : * immediate realloc on the next call.
1913 8 : */
1914 8 : num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1915 : yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
1916 : (num_to_alloc * sizeof(struct yy_buffer_state*)
1917 8 : , yyscanner);
1918 0 : if ( ! yyg->yy_buffer_stack )
1919 : YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1920 8 :
1921 : memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1922 8 :
1923 8 : yyg->yy_buffer_stack_max = num_to_alloc;
1924 8 : yyg->yy_buffer_stack_top = 0;
1925 : return;
1926 : }
1927 0 :
1928 : if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1929 :
1930 0 : /* Increase the buffer to prepare for a possible push. */
1931 : yy_size_t grow_size = 8 /* arbitrary grow size */;
1932 0 :
1933 0 : num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1934 0 : yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
1935 : (yyg->yy_buffer_stack,
1936 : num_to_alloc * sizeof(struct yy_buffer_state*)
1937 0 : , yyscanner);
1938 0 : if ( ! yyg->yy_buffer_stack )
1939 : YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1940 :
1941 0 : /* zero only the new slots.*/
1942 0 : memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1943 : yyg->yy_buffer_stack_max = num_to_alloc;
1944 : }
1945 : }
1946 : /* %endif */
1947 :
1948 : /* %if-c-only */
1949 : /** Setup the input buffer state to scan directly from a user-specified character buffer.
1950 : * @param base the character buffer
1951 : * @param size the size in bytes of the character buffer
1952 : * @param yyscanner The scanner object.
1953 : * @return the newly allocated buffer state object.
1954 0 : */
1955 : YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1956 : {
1957 : YY_BUFFER_STATE b;
1958 0 :
1959 0 : if ( size < 2 ||
1960 0 : base[size-2] != YY_END_OF_BUFFER_CHAR ||
1961 : base[size-1] != YY_END_OF_BUFFER_CHAR )
1962 0 : /* They forgot to leave room for the EOB's. */
1963 : return NULL;
1964 0 :
1965 0 : b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1966 0 : if ( ! b )
1967 : YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1968 0 :
1969 0 : b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
1970 0 : b->yy_buf_pos = b->yy_ch_buf = base;
1971 0 : b->yy_is_our_buffer = 0;
1972 0 : b->yy_input_file = NULL;
1973 0 : b->yy_n_chars = b->yy_buf_size;
1974 0 : b->yy_is_interactive = 0;
1975 0 : b->yy_at_bol = 1;
1976 0 : b->yy_fill_buffer = 0;
1977 : b->yy_buffer_status = YY_BUFFER_NEW;
1978 0 :
1979 : yy_switch_to_buffer( b , yyscanner );
1980 0 :
1981 : return b;
1982 : }
1983 : /* %endif */
1984 :
1985 : /* %if-c-only */
1986 : /** Setup the input buffer state to scan a string. The next call to yylex() will
1987 : * scan from a @e copy of @a str.
1988 : * @param yystr a NUL-terminated string to scan
1989 : * @param yyscanner The scanner object.
1990 : * @return the newly allocated buffer state object.
1991 : * @note If you want to scan bytes that may contain NUL values, then use
1992 : * yy_scan_bytes() instead.
1993 0 : */
1994 : YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
1995 : {
1996 0 :
1997 : return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
1998 : }
1999 : /* %endif */
2000 :
2001 : /* %if-c-only */
2002 : /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2003 : * scan from a @e copy of @a bytes.
2004 : * @param yybytes the byte buffer to scan
2005 : * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2006 : * @param yyscanner The scanner object.
2007 : * @return the newly allocated buffer state object.
2008 0 : */
2009 : YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2010 : {
2011 : YY_BUFFER_STATE b;
2012 : char *buf;
2013 : yy_size_t n;
2014 : int i;
2015 :
2016 0 : /* Get memory for full buffer, including space for trailing EOB's. */
2017 0 : n = (yy_size_t) (_yybytes_len + 2);
2018 0 : buf = (char *) yyalloc( n , yyscanner );
2019 0 : if ( ! buf )
2020 : YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2021 0 :
2022 0 : for ( i = 0; i < _yybytes_len; ++i )
2023 : buf[i] = yybytes[i];
2024 0 :
2025 : buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2026 0 :
2027 0 : b = yy_scan_buffer( buf, n , yyscanner);
2028 0 : if ( ! b )
2029 : YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2030 :
2031 : /* It's okay to grow etc. this buffer, and we should throw it
2032 : * away when we're done.
2033 0 : */
2034 : b->yy_is_our_buffer = 1;
2035 0 :
2036 : return b;
2037 : }
2038 : /* %endif */
2039 :
2040 : #ifndef YY_EXIT_FAILURE
2041 : #define YY_EXIT_FAILURE 2
2042 : #endif
2043 :
2044 0 : /* %if-c-only */
2045 : static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2046 0 : {
2047 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2048 0 : (void)yyg;
2049 0 : fprintf( stderr, "%s\n", msg );
2050 : exit( YY_EXIT_FAILURE );
2051 : }
2052 : /* %endif */
2053 : /* %if-c++-only */
2054 : /* %endif */
2055 :
2056 : /* Redefine yyless() so it works in section 3 code. */
2057 :
2058 : #undef yyless
2059 : #define yyless(n) \
2060 : do \
2061 : { \
2062 : /* Undo effects of setting up yytext. */ \
2063 : int yyless_macro_arg = (n); \
2064 : YY_LESS_LINENO(yyless_macro_arg);\
2065 : yytext[yyleng] = yyg->yy_hold_char; \
2066 : yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2067 : yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2068 : *yyg->yy_c_buf_p = '\0'; \
2069 : yyleng = yyless_macro_arg; \
2070 : } \
2071 : while ( 0 )
2072 :
2073 : /* Accessor methods (get/set functions) to struct members. */
2074 :
2075 : /* %if-c-only */
2076 : /* %if-reentrant */
2077 :
2078 : /** Get the user-defined data for this scanner.
2079 : * @param yyscanner The scanner object.
2080 0 : */
2081 : YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
2082 0 : {
2083 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2084 : return yyextra;
2085 : }
2086 :
2087 : /* %endif */
2088 :
2089 : /** Get the current line number.
2090 : * @param yyscanner The scanner object.
2091 0 : */
2092 : int yyget_lineno (yyscan_t yyscanner)
2093 0 : {
2094 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2095 0 :
2096 0 : if (! YY_CURRENT_BUFFER)
2097 : return 0;
2098 0 :
2099 : return yylineno;
2100 : }
2101 :
2102 : /** Get the current column number.
2103 : * @param yyscanner The scanner object.
2104 0 : */
2105 : int yyget_column (yyscan_t yyscanner)
2106 0 : {
2107 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2108 0 :
2109 0 : if (! YY_CURRENT_BUFFER)
2110 : return 0;
2111 0 :
2112 : return yycolumn;
2113 : }
2114 :
2115 : /** Get the input stream.
2116 : * @param yyscanner The scanner object.
2117 0 : */
2118 : FILE *yyget_in (yyscan_t yyscanner)
2119 0 : {
2120 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2121 : return yyin;
2122 : }
2123 :
2124 : /** Get the output stream.
2125 : * @param yyscanner The scanner object.
2126 0 : */
2127 : FILE *yyget_out (yyscan_t yyscanner)
2128 0 : {
2129 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2130 : return yyout;
2131 : }
2132 :
2133 : /** Get the length of the current token.
2134 : * @param yyscanner The scanner object.
2135 0 : */
2136 : int yyget_leng (yyscan_t yyscanner)
2137 0 : {
2138 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2139 : return yyleng;
2140 : }
2141 :
2142 : /** Get the current token.
2143 : * @param yyscanner The scanner object.
2144 : */
2145 0 :
2146 : char *yyget_text (yyscan_t yyscanner)
2147 0 : {
2148 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2149 : return yytext;
2150 : }
2151 :
2152 : /* %if-reentrant */
2153 :
2154 : /** Set the user-defined data. This data is never touched by the scanner.
2155 : * @param user_defined The data to be associated with this scanner.
2156 : * @param yyscanner The scanner object.
2157 16 : */
2158 : void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2159 16 : {
2160 16 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2161 16 : yyextra = user_defined ;
2162 : }
2163 :
2164 : /* %endif */
2165 :
2166 : /** Set the current line number.
2167 : * @param _line_number line number
2168 : * @param yyscanner The scanner object.
2169 0 : */
2170 : void yyset_lineno (int _line_number , yyscan_t yyscanner)
2171 0 : {
2172 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2173 :
2174 0 : /* lineno is only valid if an input buffer exists. */
2175 0 : if (! YY_CURRENT_BUFFER )
2176 : YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2177 0 :
2178 0 : yylineno = _line_number;
2179 : }
2180 :
2181 : /** Set the current column.
2182 : * @param _column_no column number
2183 : * @param yyscanner The scanner object.
2184 0 : */
2185 : void yyset_column (int _column_no , yyscan_t yyscanner)
2186 0 : {
2187 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2188 :
2189 0 : /* column is only valid if an input buffer exists. */
2190 0 : if (! YY_CURRENT_BUFFER )
2191 : YY_FATAL_ERROR( "yyset_column called with no buffer" );
2192 0 :
2193 0 : yycolumn = _column_no;
2194 : }
2195 :
2196 : /** Set the input stream. This does not discard the current
2197 : * input buffer.
2198 : * @param _in_str A readable stream.
2199 : * @param yyscanner The scanner object.
2200 : * @see yy_switch_to_buffer
2201 8 : */
2202 : void yyset_in (FILE * _in_str , yyscan_t yyscanner)
2203 8 : {
2204 8 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2205 8 : yyin = _in_str ;
2206 : }
2207 0 :
2208 : void yyset_out (FILE * _out_str , yyscan_t yyscanner)
2209 0 : {
2210 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2211 0 : yyout = _out_str ;
2212 : }
2213 0 :
2214 : int yyget_debug (yyscan_t yyscanner)
2215 0 : {
2216 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2217 : return yy_flex_debug;
2218 : }
2219 0 :
2220 : void yyset_debug (int _bdebug , yyscan_t yyscanner)
2221 0 : {
2222 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2223 0 : yy_flex_debug = _bdebug ;
2224 : }
2225 :
2226 : /* %endif */
2227 :
2228 : /* %if-reentrant */
2229 : /* Accessor methods for yylval and yylloc */
2230 :
2231 : /* %if-bison-bridge */
2232 0 :
2233 : YYSTYPE * yyget_lval (yyscan_t yyscanner)
2234 0 : {
2235 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2236 : return yylval;
2237 : }
2238 0 :
2239 : void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
2240 0 : {
2241 0 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2242 0 : yylval = yylval_param;
2243 : }
2244 :
2245 : /* %endif */
2246 :
2247 : /* User-visible API */
2248 :
2249 : /* yylex_init is special because it creates the scanner itself, so it is
2250 : * the ONLY reentrant function that doesn't take the scanner as the last argument.
2251 : * That's why we explicitly handle the declaration, instead of using our macros.
2252 0 : */
2253 : int yylex_init(yyscan_t* ptr_yy_globals)
2254 0 : {
2255 0 : if (ptr_yy_globals == NULL){
2256 0 : errno = EINVAL;
2257 : return 1;
2258 : }
2259 0 :
2260 : *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2261 0 :
2262 0 : if (*ptr_yy_globals == NULL){
2263 0 : errno = ENOMEM;
2264 : return 1;
2265 : }
2266 :
2267 0 : /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2268 : memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2269 0 :
2270 : return yy_init_globals ( *ptr_yy_globals );
2271 : }
2272 :
2273 : /* yylex_init_extra has the same functionality as yylex_init, but follows the
2274 : * convention of taking the scanner as the last argument. Note however, that
2275 : * this is a *pointer* to a scanner, as it will be allocated by this call (and
2276 : * is the reason, too, why this function also must handle its own declaration).
2277 : * The user defined value in the first argument will be available to yyalloc in
2278 : * the yyextra field.
2279 8 : */
2280 : int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2281 : {
2282 : struct yyguts_t dummy_yyguts;
2283 8 :
2284 : yyset_extra (yy_user_defined, &dummy_yyguts);
2285 8 :
2286 0 : if (ptr_yy_globals == NULL){
2287 0 : errno = EINVAL;
2288 : return 1;
2289 : }
2290 8 :
2291 : *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2292 8 :
2293 0 : if (*ptr_yy_globals == NULL){
2294 0 : errno = ENOMEM;
2295 : return 1;
2296 : }
2297 :
2298 : /* By setting to 0xAA, we expose bugs in
2299 8 : yy_init_globals. Leave at 0x00 for releases. */
2300 : memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2301 8 :
2302 : yyset_extra (yy_user_defined, *ptr_yy_globals);
2303 8 :
2304 : return yy_init_globals ( *ptr_yy_globals );
2305 : }
2306 :
2307 : /* %endif if-c-only */
2308 :
2309 16 : /* %if-c-only */
2310 : static int yy_init_globals (yyscan_t yyscanner)
2311 16 : {
2312 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2313 : /* Initialization is the same as for the non-reentrant scanner.
2314 : * This function is called from yylex_destroy(), so don't allocate here.
2315 : */
2316 16 :
2317 16 : yyg->yy_buffer_stack = NULL;
2318 16 : yyg->yy_buffer_stack_top = 0;
2319 16 : yyg->yy_buffer_stack_max = 0;
2320 16 : yyg->yy_c_buf_p = NULL;
2321 16 : yyg->yy_init = 0;
2322 : yyg->yy_start = 0;
2323 16 :
2324 16 : yyg->yy_start_stack_ptr = 0;
2325 16 : yyg->yy_start_stack_depth = 0;
2326 : yyg->yy_start_stack = NULL;
2327 :
2328 : /* Defined in main.c */
2329 : #ifdef YY_STDINIT
2330 : yyin = stdin;
2331 : yyout = stdout;
2332 16 : #else
2333 16 : yyin = NULL;
2334 : yyout = NULL;
2335 : #endif
2336 :
2337 : /* For future reference: Set errno on error, since we are called by
2338 : * yylex_init()
2339 16 : */
2340 : return 0;
2341 : }
2342 : /* %endif */
2343 :
2344 : /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
2345 8 : /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2346 : int yylex_destroy (yyscan_t yyscanner)
2347 8 : {
2348 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2349 :
2350 16 : /* Pop the buffer stack, destroying each element. */
2351 8 : while(YY_CURRENT_BUFFER){
2352 8 : yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2353 8 : YY_CURRENT_BUFFER_LVALUE = NULL;
2354 : yypop_buffer_state(yyscanner);
2355 : }
2356 :
2357 8 : /* Destroy the stack itself. */
2358 8 : yyfree(yyg->yy_buffer_stack , yyscanner);
2359 : yyg->yy_buffer_stack = NULL;
2360 :
2361 8 : /* Destroy the start condition stack. */
2362 8 : yyfree( yyg->yy_start_stack , yyscanner );
2363 : yyg->yy_start_stack = NULL;
2364 :
2365 : /* Reset the globals. This is important in a non-reentrant scanner so the next time
2366 8 : * yylex() is called, initialization will occur. */
2367 : yy_init_globals( yyscanner);
2368 :
2369 : /* %if-reentrant */
2370 8 : /* Destroy the main struct (reentrant only). */
2371 8 : yyfree ( yyscanner , yyscanner );
2372 : yyscanner = NULL;
2373 8 : /* %endif */
2374 : return 0;
2375 : }
2376 : /* %endif */
2377 :
2378 : /*
2379 : * Internal utility routines.
2380 : */
2381 :
2382 : #ifndef yytext_ptr
2383 : static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2384 : {
2385 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2386 : (void)yyg;
2387 :
2388 : int i;
2389 : for ( i = 0; i < n; ++i )
2390 : s1[i] = s2[i];
2391 : }
2392 : #endif
2393 :
2394 : #ifdef YY_NEED_STRLEN
2395 : static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2396 : {
2397 : int n;
2398 : for ( n = 0; s[n]; ++n )
2399 : ;
2400 :
2401 : return n;
2402 : }
2403 : #endif
2404 32 :
2405 : void *yyalloc (yy_size_t size , yyscan_t yyscanner)
2406 32 : {
2407 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2408 32 : (void)yyg;
2409 : return malloc(size);
2410 : }
2411 0 :
2412 : void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2413 0 : {
2414 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2415 : (void)yyg;
2416 :
2417 : /* The cast to (char *) in the following accommodates both
2418 : * implementations that use char* generic pointers, and those
2419 : * that use void* generic pointers. It works with the latter
2420 : * because both ANSI C and C++ allow castless assignment from
2421 : * any pointer type to void*, and deal with argument conversions
2422 : * as though doing an assignment.
2423 0 : */
2424 : return realloc(ptr, size);
2425 : }
2426 40 :
2427 : void yyfree (void * ptr , yyscan_t yyscanner)
2428 40 : {
2429 : struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2430 40 : (void)yyg;
2431 40 : free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2432 : }
2433 :
2434 : /* %if-tables-serialization definitions */
2435 : /* %define-yytables The name for this specific scanner's tables. */
2436 : #define YYTABLES_NAME "yytables"
2437 : /* %endif */
2438 :
2439 : /* %ok-for-header */
2440 :
2441 : #line 108 "lexer.l"
2442 :
2443 :
|