1 #line 1 "mk-scanner.c"
2 
3 #line 3 "mk-scanner.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 #ifdef yy_create_buffer
29 #define mkp_mk_yy_create_buffer_ALREADY_DEFINED
30 #else
31 #define yy_create_buffer mkp_mk_yy_create_buffer
32 #endif
33 
34 #ifdef yy_delete_buffer
35 #define mkp_mk_yy_delete_buffer_ALREADY_DEFINED
36 #else
37 #define yy_delete_buffer mkp_mk_yy_delete_buffer
38 #endif
39 
40 #ifdef yy_scan_buffer
41 #define mkp_mk_yy_scan_buffer_ALREADY_DEFINED
42 #else
43 #define yy_scan_buffer mkp_mk_yy_scan_buffer
44 #endif
45 
46 #ifdef yy_scan_string
47 #define mkp_mk_yy_scan_string_ALREADY_DEFINED
48 #else
49 #define yy_scan_string mkp_mk_yy_scan_string
50 #endif
51 
52 #ifdef yy_scan_bytes
53 #define mkp_mk_yy_scan_bytes_ALREADY_DEFINED
54 #else
55 #define yy_scan_bytes mkp_mk_yy_scan_bytes
56 #endif
57 
58 #ifdef yy_init_buffer
59 #define mkp_mk_yy_init_buffer_ALREADY_DEFINED
60 #else
61 #define yy_init_buffer mkp_mk_yy_init_buffer
62 #endif
63 
64 #ifdef yy_flush_buffer
65 #define mkp_mk_yy_flush_buffer_ALREADY_DEFINED
66 #else
67 #define yy_flush_buffer mkp_mk_yy_flush_buffer
68 #endif
69 
70 #ifdef yy_load_buffer_state
71 #define mkp_mk_yy_load_buffer_state_ALREADY_DEFINED
72 #else
73 #define yy_load_buffer_state mkp_mk_yy_load_buffer_state
74 #endif
75 
76 #ifdef yy_switch_to_buffer
77 #define mkp_mk_yy_switch_to_buffer_ALREADY_DEFINED
78 #else
79 #define yy_switch_to_buffer mkp_mk_yy_switch_to_buffer
80 #endif
81 
82 #ifdef yypush_buffer_state
83 #define mkp_mk_yypush_buffer_state_ALREADY_DEFINED
84 #else
85 #define yypush_buffer_state mkp_mk_yypush_buffer_state
86 #endif
87 
88 #ifdef yypop_buffer_state
89 #define mkp_mk_yypop_buffer_state_ALREADY_DEFINED
90 #else
91 #define yypop_buffer_state mkp_mk_yypop_buffer_state
92 #endif
93 
94 #ifdef yyensure_buffer_stack
95 #define mkp_mk_yyensure_buffer_stack_ALREADY_DEFINED
96 #else
97 #define yyensure_buffer_stack mkp_mk_yyensure_buffer_stack
98 #endif
99 
100 #ifdef yylex
101 #define mkp_mk_yylex_ALREADY_DEFINED
102 #else
103 #define yylex mkp_mk_yylex
104 #endif
105 
106 #ifdef yyrestart
107 #define mkp_mk_yyrestart_ALREADY_DEFINED
108 #else
109 #define yyrestart mkp_mk_yyrestart
110 #endif
111 
112 #ifdef yylex_init
113 #define mkp_mk_yylex_init_ALREADY_DEFINED
114 #else
115 #define yylex_init mkp_mk_yylex_init
116 #endif
117 
118 #ifdef yylex_init_extra
119 #define mkp_mk_yylex_init_extra_ALREADY_DEFINED
120 #else
121 #define yylex_init_extra mkp_mk_yylex_init_extra
122 #endif
123 
124 #ifdef yylex_destroy
125 #define mkp_mk_yylex_destroy_ALREADY_DEFINED
126 #else
127 #define yylex_destroy mkp_mk_yylex_destroy
128 #endif
129 
130 #ifdef yyget_debug
131 #define mkp_mk_yyget_debug_ALREADY_DEFINED
132 #else
133 #define yyget_debug mkp_mk_yyget_debug
134 #endif
135 
136 #ifdef yyset_debug
137 #define mkp_mk_yyset_debug_ALREADY_DEFINED
138 #else
139 #define yyset_debug mkp_mk_yyset_debug
140 #endif
141 
142 #ifdef yyget_extra
143 #define mkp_mk_yyget_extra_ALREADY_DEFINED
144 #else
145 #define yyget_extra mkp_mk_yyget_extra
146 #endif
147 
148 #ifdef yyset_extra
149 #define mkp_mk_yyset_extra_ALREADY_DEFINED
150 #else
151 #define yyset_extra mkp_mk_yyset_extra
152 #endif
153 
154 #ifdef yyget_in
155 #define mkp_mk_yyget_in_ALREADY_DEFINED
156 #else
157 #define yyget_in mkp_mk_yyget_in
158 #endif
159 
160 #ifdef yyset_in
161 #define mkp_mk_yyset_in_ALREADY_DEFINED
162 #else
163 #define yyset_in mkp_mk_yyset_in
164 #endif
165 
166 #ifdef yyget_out
167 #define mkp_mk_yyget_out_ALREADY_DEFINED
168 #else
169 #define yyget_out mkp_mk_yyget_out
170 #endif
171 
172 #ifdef yyset_out
173 #define mkp_mk_yyset_out_ALREADY_DEFINED
174 #else
175 #define yyset_out mkp_mk_yyset_out
176 #endif
177 
178 #ifdef yyget_leng
179 #define mkp_mk_yyget_leng_ALREADY_DEFINED
180 #else
181 #define yyget_leng mkp_mk_yyget_leng
182 #endif
183 
184 #ifdef yyget_text
185 #define mkp_mk_yyget_text_ALREADY_DEFINED
186 #else
187 #define yyget_text mkp_mk_yyget_text
188 #endif
189 
190 #ifdef yyget_lineno
191 #define mkp_mk_yyget_lineno_ALREADY_DEFINED
192 #else
193 #define yyget_lineno mkp_mk_yyget_lineno
194 #endif
195 
196 #ifdef yyset_lineno
197 #define mkp_mk_yyset_lineno_ALREADY_DEFINED
198 #else
199 #define yyset_lineno mkp_mk_yyset_lineno
200 #endif
201 
202 #ifdef yyget_column
203 #define mkp_mk_yyget_column_ALREADY_DEFINED
204 #else
205 #define yyget_column mkp_mk_yyget_column
206 #endif
207 
208 #ifdef yyset_column
209 #define mkp_mk_yyset_column_ALREADY_DEFINED
210 #else
211 #define yyset_column mkp_mk_yyset_column
212 #endif
213 
214 #ifdef yywrap
215 #define mkp_mk_yywrap_ALREADY_DEFINED
216 #else
217 #define yywrap mkp_mk_yywrap
218 #endif
219 
220 /* %endif */
221 
222 #ifdef yyget_lval
223 #define mkp_mk_yyget_lval_ALREADY_DEFINED
224 #else
225 #define yyget_lval mkp_mk_yyget_lval
226 #endif
227 
228 #ifdef yyset_lval
229 #define mkp_mk_yyset_lval_ALREADY_DEFINED
230 #else
231 #define yyset_lval mkp_mk_yyset_lval
232 #endif
233 
234 #ifdef yyget_lloc
235 #define mkp_mk_yyget_lloc_ALREADY_DEFINED
236 #else
237 #define yyget_lloc mkp_mk_yyget_lloc
238 #endif
239 
240 #ifdef yyset_lloc
241 #define mkp_mk_yyset_lloc_ALREADY_DEFINED
242 #else
243 #define yyset_lloc mkp_mk_yyset_lloc
244 #endif
245 
246 #ifdef yyalloc
247 #define mkp_mk_yyalloc_ALREADY_DEFINED
248 #else
249 #define yyalloc mkp_mk_yyalloc
250 #endif
251 
252 #ifdef yyrealloc
253 #define mkp_mk_yyrealloc_ALREADY_DEFINED
254 #else
255 #define yyrealloc mkp_mk_yyrealloc
256 #endif
257 
258 #ifdef yyfree
259 #define mkp_mk_yyfree_ALREADY_DEFINED
260 #else
261 #define yyfree mkp_mk_yyfree
262 #endif
263 
264 /* %if-c-only */
265 
266 /* %endif */
267 
268 /* First, we deal with  platform-specific or compiler-specific issues. */
269 
270 /* begin standard C headers. */
271 /* %if-c-only */
272 #include <stdio.h>
273 #include <string.h>
274 #include <errno.h>
275 #include <stdlib.h>
276 /* %endif */
277 
278 /* %if-tables-serialization */
279 /* %endif */
280 /* end standard C headers. */
281 
282 /* %if-c-or-c++ */
283 /* flex integer type definitions */
284 
285 #ifndef FLEXINT_H
286 #define FLEXINT_H
287 
288 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
289 
290 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
291 
292 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
293  * if you want the limit (max/min) macros for int types.
294  */
295 #ifndef __STDC_LIMIT_MACROS
296 #define __STDC_LIMIT_MACROS 1
297 #endif
298 
299 #include <inttypes.h>
300 typedef int8_t flex_int8_t;
301 typedef uint8_t flex_uint8_t;
302 typedef int16_t flex_int16_t;
303 typedef uint16_t flex_uint16_t;
304 typedef int32_t flex_int32_t;
305 typedef uint32_t flex_uint32_t;
306 #else
307 typedef signed char flex_int8_t;
308 typedef short int flex_int16_t;
309 typedef int flex_int32_t;
310 typedef unsigned char flex_uint8_t;
311 typedef unsigned short int flex_uint16_t;
312 typedef unsigned int flex_uint32_t;
313 
314 /* Limits of integral types. */
315 #ifndef INT8_MIN
316 #define INT8_MIN               (-128)
317 #endif
318 #ifndef INT16_MIN
319 #define INT16_MIN              (-32767-1)
320 #endif
321 #ifndef INT32_MIN
322 #define INT32_MIN              (-2147483647-1)
323 #endif
324 #ifndef INT8_MAX
325 #define INT8_MAX               (127)
326 #endif
327 #ifndef INT16_MAX
328 #define INT16_MAX              (32767)
329 #endif
330 #ifndef INT32_MAX
331 #define INT32_MAX              (2147483647)
332 #endif
333 #ifndef UINT8_MAX
334 #define UINT8_MAX              (255U)
335 #endif
336 #ifndef UINT16_MAX
337 #define UINT16_MAX             (65535U)
338 #endif
339 #ifndef UINT32_MAX
340 #define UINT32_MAX             (4294967295U)
341 #endif
342 
343 #ifndef SIZE_MAX
344 #define SIZE_MAX               (~(size_t)0)
345 #endif
346 
347 #endif /* ! C99 */
348 
349 #endif /* ! FLEXINT_H */
350 
351 /* %endif */
352 
353 /* begin standard C++ headers. */
354 /* %if-c++-only */
355 /* %endif */
356 
357 /* TODO: this is always defined, so inline it */
358 #define yyconst const
359 
360 #if defined(__GNUC__) && __GNUC__ >= 3
361 #define yynoreturn __attribute__((__noreturn__))
362 #else
363 #define yynoreturn
364 #endif
365 
366 /* %not-for-header */
367 /* Returned upon end-of-file. */
368 #define YY_NULL 0
369 /* %ok-for-header */
370 
371 /* %not-for-header */
372 /* Promotes a possibly negative, possibly signed char to an
373  *   integer in range [0..255] for use as an array index.
374  */
375 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
376 /* %ok-for-header */
377 
378 /* %if-reentrant */
379 
380 /* An opaque pointer. */
381 #ifndef YY_TYPEDEF_YY_SCANNER_T
382 #define YY_TYPEDEF_YY_SCANNER_T
383 typedef void* yyscan_t;
384 #endif
385 
386 /* For convenience, these vars (plus the bison vars far below)
387    are macros in the reentrant scanner. */
388 #define yyin yyg->yyin_r
389 #define yyout yyg->yyout_r
390 #define yyextra yyg->yyextra_r
391 #define yyleng yyg->yyleng_r
392 #define yytext yyg->yytext_r
393 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
394 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
395 #define yy_flex_debug yyg->yy_flex_debug_r
396 
397 /* %endif */
398 
399 /* %if-not-reentrant */
400 /* %endif */
401 
402 /* Enter a start condition.  This macro really ought to take a parameter,
403  * but we do it the disgusting crufty way forced on us by the ()-less
404  * definition of BEGIN.
405  */
406 #define BEGIN yyg->yy_start = 1 + 2 *
407 /* Translate the current start state into a value that can be later handed
408  * to BEGIN to return to the state.  The YYSTATE alias is for lex
409  * compatibility.
410  */
411 #define YY_START ((yyg->yy_start - 1) / 2)
412 #define YYSTATE YY_START
413 /* Action number for EOF rule of a given start state. */
414 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
415 /* Special action meaning "start processing a new file". */
416 #define YY_NEW_FILE yyrestart( yyin , yyscanner )
417 #define YY_END_OF_BUFFER_CHAR 0
418 
419 /* Size of default input buffer. */
420 #ifndef YY_BUF_SIZE
421 #ifdef __ia64__
422 /* On IA-64, the buffer size is 16k, not 8k.
423  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
424  * Ditto for the __ia64__ case accordingly.
425  */
426 #define YY_BUF_SIZE 32768
427 #else
428 #define YY_BUF_SIZE 16384
429 #endif /* __ia64__ */
430 #endif
431 
432 /* The state buf must be large enough to hold one state per character in the main buffer.
433  */
434 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
435 
436 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
437 #define YY_TYPEDEF_YY_BUFFER_STATE
438 typedef struct yy_buffer_state *YY_BUFFER_STATE;
439 #endif
440 
441 #ifndef YY_TYPEDEF_YY_SIZE_T
442 #define YY_TYPEDEF_YY_SIZE_T
443 typedef size_t yy_size_t;
444 #endif
445 
446 /* %if-not-reentrant */
447 /* %endif */
448 
449 /* %if-c-only */
450 /* %if-not-reentrant */
451 /* %endif */
452 /* %endif */
453 
454 #define EOB_ACT_CONTINUE_SCAN 0
455 #define EOB_ACT_END_OF_FILE 1
456 #define EOB_ACT_LAST_MATCH 2
457 
458     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
459      *       access to the local variable yy_act. Since yyless() is a macro, it would break
460      *       existing scanners that call yyless() from OUTSIDE yylex.
461      *       One obvious solution it to make yy_act a global. I tried that, and saw
462      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
463      *       normally declared as a register variable-- so it is not worth it.
464      */
465     #define  YY_LESS_LINENO(n) \
466             do { \
467                 int yyl;\
468                 for ( yyl = n; yyl < yyleng; ++yyl )\
469                     if ( yytext[yyl] == '\n' )\
470                         --yylineno;\
471             }while(0)
472     #define YY_LINENO_REWIND_TO(dst) \
473             do {\
474                 const char *p;\
475                 for ( p = yy_cp-1; p >= (dst); --p)\
476                     if ( *p == '\n' )\
477                         --yylineno;\
478             }while(0)
479 
480 /* Return all but the first "n" matched characters back to the input stream. */
481 #define yyless(n) \
482 	do \
483 		{ \
484 		/* Undo effects of setting up yytext. */ \
485         int yyless_macro_arg = (n); \
486         YY_LESS_LINENO(yyless_macro_arg);\
487 		*yy_cp = yyg->yy_hold_char; \
488 		YY_RESTORE_YY_MORE_OFFSET \
489 		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
490 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
491 		} \
492 	while ( 0 )
493 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
494 
495 #ifndef YY_STRUCT_YY_BUFFER_STATE
496 #define YY_STRUCT_YY_BUFFER_STATE
497 struct yy_buffer_state
498 	{
499 /* %if-c-only */
500 	FILE *yy_input_file;
501 /* %endif */
502 
503 /* %if-c++-only */
504 /* %endif */
505 
506 	char *yy_ch_buf;		/* input buffer */
507 	char *yy_buf_pos;		/* current position in input buffer */
508 
509 	/* Size of input buffer in bytes, not including room for EOB
510 	 * characters.
511 	 */
512 	int yy_buf_size;
513 
514 	/* Number of characters read into yy_ch_buf, not including EOB
515 	 * characters.
516 	 */
517 	int yy_n_chars;
518 
519 	/* Whether we "own" the buffer - i.e., we know we created it,
520 	 * and can realloc() it to grow it, and should free() it to
521 	 * delete it.
522 	 */
523 	int yy_is_our_buffer;
524 
525 	/* Whether this is an "interactive" input source; if so, and
526 	 * if we're using stdio for input, then we want to use getc()
527 	 * instead of fread(), to make sure we stop fetching input after
528 	 * each newline.
529 	 */
530 	int yy_is_interactive;
531 
532 	/* Whether we're considered to be at the beginning of a line.
533 	 * If so, '^' rules will be active on the next match, otherwise
534 	 * not.
535 	 */
536 	int yy_at_bol;
537 
538     int yy_bs_lineno; /**< The line count. */
539     int yy_bs_column; /**< The column count. */
540 
541 	/* Whether to try to fill the input buffer when we reach the
542 	 * end of it.
543 	 */
544 	int yy_fill_buffer;
545 
546 	int yy_buffer_status;
547 
548 #define YY_BUFFER_NEW 0
549 #define YY_BUFFER_NORMAL 1
550 	/* When an EOF's been seen but there's still some text to process
551 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
552 	 * shouldn't try reading from the input source any more.  We might
553 	 * still have a bunch of tokens to match, though, because of
554 	 * possible backing-up.
555 	 *
556 	 * When we actually see the EOF, we change the status to "new"
557 	 * (via yyrestart()), so that the user can continue scanning by
558 	 * just pointing yyin at a new input file.
559 	 */
560 #define YY_BUFFER_EOF_PENDING 2
561 
562 	};
563 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
564 
565 /* %if-c-only Standard (non-C++) definition */
566 /* %not-for-header */
567 /* %if-not-reentrant */
568 /* %endif */
569 /* %ok-for-header */
570 
571 /* %endif */
572 
573 /* We provide macros for accessing buffer states in case in the
574  * future we want to put the buffer states in a more general
575  * "scanner state".
576  *
577  * Returns the top of the stack, or NULL.
578  */
579 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
580                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
581                           : NULL)
582 /* Same as previous macro, but useful when we know that the buffer stack is not
583  * NULL or when we need an lvalue. For internal use only.
584  */
585 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
586 
587 /* %if-c-only Standard (non-C++) definition */
588 
589 /* %if-not-reentrant */
590 /* %not-for-header */
591 /* %ok-for-header */
592 
593 /* %endif */
594 
595 void yyrestart ( FILE *input_file , yyscan_t yyscanner );
596 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
597 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
598 void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
599 void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
600 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
601 void yypop_buffer_state ( yyscan_t yyscanner );
602 
603 static void yyensure_buffer_stack ( yyscan_t yyscanner );
604 static void yy_load_buffer_state ( yyscan_t yyscanner );
605 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
606 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
607 
608 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
609 YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
610 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
611 
612 /* %endif */
613 
614 void *yyalloc ( yy_size_t , yyscan_t yyscanner );
615 void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
616 void yyfree ( void * , yyscan_t yyscanner );
617 
618 #define yy_new_buffer yy_create_buffer
619 #define yy_set_interactive(is_interactive) \
620 	{ \
621 	if ( ! YY_CURRENT_BUFFER ){ \
622         yyensure_buffer_stack (yyscanner); \
623 		YY_CURRENT_BUFFER_LVALUE =    \
624             yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
625 	} \
626 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
627 	}
628 #define yy_set_bol(at_bol) \
629 	{ \
630 	if ( ! YY_CURRENT_BUFFER ){\
631         yyensure_buffer_stack (yyscanner); \
632 		YY_CURRENT_BUFFER_LVALUE =    \
633             yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
634 	} \
635 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
636 	}
637 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
638 
639 /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
640 /* Begin user sect3 */
641 
642 #define mkp_mk_yywrap(yyscanner) (/*CONSTCOND*/1)
643 #define YY_SKIP_YYWRAP
644 
645 #define FLEX_DEBUG
646 typedef flex_uint8_t YY_CHAR;
647 
648 typedef int yy_state_type;
649 
650 #define yytext_ptr yytext_r
651 
652 /* %% [1.5] DFA */
653 
654 /* %if-c-only Standard (non-C++) definition */
655 
656 static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
657 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  , yyscan_t yyscanner);
658 static int yy_get_next_buffer ( yyscan_t yyscanner );
659 static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
660 
661 /* %endif */
662 
663 /* Done after the current pattern has been matched and before the
664  * corresponding action - sets up yytext.
665  */
666 #define YY_DO_BEFORE_ACTION \
667 	yyg->yytext_ptr = yy_bp; \
668 /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
669 	yyleng = (int) (yy_cp - yy_bp); \
670 	yyg->yy_hold_char = *yy_cp; \
671 	*yy_cp = '\0'; \
672 /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
673 	yyg->yy_c_buf_p = yy_cp;
674 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
675 #define YY_NUM_RULES 39
676 #define YY_END_OF_BUFFER 40
677 /* This struct is not used in this scanner,
678    but its presence is necessary. */
679 struct yy_trans_info
680 	{
681 	flex_int32_t yy_verify;
682 	flex_int32_t yy_nxt;
683 	};
684 static const flex_int16_t yy_accept[316] =
685     {   0,
686        37,   37,   40,   37,    4,    1,   38,    2,    3,   38,
687        37,    8,    9,   11,   13,   37,   38,   37,   37,   12,
688        37,   37,   37,   37,   37,   37,   37,   37,    0,    0,
689         0,    0,    0,    0,    0,    2,    0,    7,    0,    7,
690         7,    7,    7,    7,    7,    7,    0,   16,   10,   14,
691        15,    2,   17,   20,   18,   19,   37,   37,   37,   37,
692        37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
693         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
694         0,    0,    0,   37,   37,   37,   37,   37,   37,   37,
695        37,   37,   37,   37,   37,   37,   37,   37,    0,    0,
696 
697         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
698         5,    6,   35,   37,   34,   37,   37,   37,   37,   37,
699        37,   37,   37,   37,   37,   37,   37,    0,    0,    0,
700         0,    0,    0,    0,    0,    0,    0,    0,    0,   36,
701        37,   37,   37,   37,   37,   37,   37,   21,   37,   37,
702        37,   37,    0,    0,    0,    0,    0,    0,    0,   21,
703         0,    0,    0,    0,   37,   37,   37,   29,   37,   37,
704        37,   37,   37,   31,   37,    0,    0,    0,   29,    0,
705         0,    0,    0,    0,   31,    0,   23,   37,   37,   37,
706        37,   37,   37,   37,   37,   37,   23,    0,    0,    0,
707 
708         0,    0,    0,    0,    0,    0,   37,   37,   37,   37,
709        37,   24,   37,   37,   22,    0,    0,    0,    0,    0,
710        24,    0,    0,   22,   37,   37,   37,   37,   37,   26,
711        37,    0,    0,    0,    0,    0,   26,    0,   37,   37,
712        37,   37,   37,   37,    0,    0,    0,    0,    0,    0,
713        37,   37,   37,   37,   33,   37,    0,    0,    0,    0,
714        33,    0,   37,   37,   25,   37,   37,    0,    0,   25,
715         0,    0,   37,   37,   37,   37,    0,    0,    0,    0,
716        37,   37,   37,   37,    0,    0,    0,    0,   28,   37,
717        37,   27,   28,    0,    0,   27,   37,   37,    0,    0,
718 
719        37,   37,    0,    0,   37,   37,    0,    0,   37,   30,
720         0,   30,   32,   32,    0
721     } ;
722 
723 static const YY_CHAR yy_ec[256] =
724     {   0,
725         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
726         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
727         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
728         1,    5,    1,    6,    7,    8,    1,    6,    6,    9,
729        10,    1,   11,   12,    1,    1,    1,    1,    1,    1,
730         1,    1,    1,    1,    1,    1,    1,   13,   14,    1,
731        15,    1,   16,    6,   17,   18,   19,   20,   21,   22,
732        23,   24,   25,    1,    1,   26,   27,   28,   29,   30,
733         1,   31,   32,   33,   34,   35,   36,   37,   38,    1,
734         1,   39,    1,    1,   40,    6,    1,    1,    1,   41,
735 
736        42,   43,    1,    1,   44,    1,    1,   45,    1,   46,
737         1,    1,   47,    1,   48,    1,    1,    1,    1,    1,
738         1,    1,   49,   50,   51,    1,    1,    1,    1,    1,
739         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
740         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
741         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
742         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
743         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
744         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
745         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
746 
747         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
748         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
749         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
750         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
751         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
752         1,    1,    1,    1,    1
753     } ;
754 
755 static const YY_CHAR yy_meta[52] =
756     {   0,
757         1,    2,    2,    2,    2,    3,    4,    4,    1,    5,
758         1,    1,    4,    1,    4,    1,    1,    1,    1,    1,
759         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
760         1,    1,    1,    1,    1,    1,    1,    1,    3,    1,
761         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
762         6
763     } ;
764 
765 static const flex_int16_t yy_base[321] =
766     {   0,
767         0,   49,  443,    0,   15,  444,   46,   98,   64,  129,
768       164,   81,  184,  114,  142,  202,  107,  215,    3,   13,
769         0,  421,  404,    1,  411,  410,    3,   48,  417,  400,
770        10,  407,  406,   44,   83,   93,  431,  444,    0,  412,
771       395,   58,  402,  401,   46,  122,    0,  444,  444,  444,
772       444,  143,  444,  444,  444,  444,  381,  387,  385,   57,
773       396,  397,  391,  387,  389,  392,  399,  400,  392,  395,
774        99,  386,  387,  381,  377,  379,  382,  389,  390,  382,
775       385,  396,  354,  362,  359,  355,  384,  379,  370,  369,
776       376,  356,  365,  366,  374,  363,  370,  368,  372,  367,
777 
778       358,  357,  364,  344,  353,  354,  362,  351,  358,  356,
779       444,  444,    0,  334,    0,  342,  342,  343,  342,  341,
780       340,  353,  331,  343,  339,  338,  340,  330,  330,  331,
781       330,  329,  328,  341,  319,  331,  327,  326,  328,    0,
782       326,  330,  317,  328,  321,  326,  315,    0,  316,  324,
783       310,  305,  315,  319,  306,  317,  310,  315,  304,  444,
784       305,  313,  299,  294,  297,  289,  288,    0,  306,  294,
785       308,  290,    1,    0,  302,  289,  281,  280,  444,  298,
786       286,  300,  282,    2,  444,  294,    0,  285,  296,  292,
787       282,  284,  277,  277,  270,  274,  444,  276,  287,  283,
788 
789       273,  275,  268,  268,  261,  265,  268,  269,  269,  267,
790       266,    0,  253,  259,    0,  259,  258,  258,  255,  249,
791       444,  233,  240,  444,  229,  233,  241,  223,  235,    0,
792       238,  214,  227,  235,  217,  229,  444,  232,  227,  206,
793       211,  209,  213,  210,  216,  193,  198,  196,  200,  197,
794       193,  186,  199,  194,    0,  186,  184,  178,  190,  183,
795       444,  175,  175,  186,    0,  173,  176,  169,  181,  444,
796       166,  168,  162,  157,  159,  157,  154,  150,  152,  148,
797       145,  150,  133,  143,  138,  141,  125,  136,    0,  143,
798       125,    0,  444,  136,  119,  444,  133,  116,  118,  108,
799 
800       105,  102,  101,   89,   94,   84,   76,   66,   48,    0,
801         5,  444,    0,  444,  444,  261,  267,  273,  279,  285
802     } ;
803 
804 static const flex_int16_t yy_def[321] =
805     {   0,
806       316,  316,  315,  317,  315,  315,  315,  315,  315,  318,
807       317,  317,  315,  317,  315,  317,   13,  317,   18,   18,
808       317,  317,  317,  317,  317,  317,  317,  317,  315,  315,
809       315,  315,  315,  315,  315,  315,  315,  315,  319,  315,
810       315,  315,  315,  315,  315,  315,  320,  315,  315,  315,
811       315,  315,  315,  315,  315,  315,  317,  317,  317,  317,
812       317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
813       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
814       315,  319,  320,  317,  317,  317,  317,  317,  317,  317,
815       317,  317,  317,  317,  317,  317,  317,  317,  315,  315,
816 
817       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
818       315,  315,  317,  317,  317,  317,  317,  317,  317,  317,
819       317,  317,  317,  317,  317,  317,  317,  315,  315,  315,
820       315,  315,  315,  315,  315,  315,  315,  315,  315,  317,
821       317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
822       317,  317,  315,  315,  315,  315,  315,  315,  315,  315,
823       315,  315,  315,  315,  317,  317,  317,  317,  317,  317,
824       317,  317,  317,  317,  317,  315,  315,  315,  315,  315,
825       315,  315,  315,  315,  315,  315,  317,  317,  317,  317,
826       317,  317,  317,  317,  317,  317,  315,  315,  315,  315,
827 
828       315,  315,  315,  315,  315,  315,  317,  317,  317,  317,
829       317,  317,  317,  317,  317,  315,  315,  315,  315,  315,
830       315,  315,  315,  315,  317,  317,  317,  317,  317,  317,
831       317,  315,  315,  315,  315,  315,  315,  315,  317,  317,
832       317,  317,  317,  317,  315,  315,  315,  315,  315,  315,
833       317,  317,  317,  317,  317,  317,  315,  315,  315,  315,
834       315,  315,  317,  317,  317,  317,  317,  315,  315,  315,
835       315,  315,  317,  317,  317,  317,  315,  315,  315,  315,
836       317,  317,  317,  317,  315,  315,  315,  315,  317,  317,
837       317,  317,  315,  315,  315,  315,  317,  317,  315,  315,
838 
839       317,  317,  315,  315,  317,  317,  315,  315,  317,  317,
840       315,  315,  317,  315,    0,  315,  315,  315,  315,  315
841     } ;
842 
843 static const flex_int16_t yy_nxt[496] =
844     {   0,
845       315,    5,    6,    7,    8,    7,    9,   10,  315,  315,
846        11,   12,   13,   14,   15,   16,  315,  194,  204,   22,
847        23,  195,  205,   62,   24,   25,   66,   26,   63,   27,
848       315,   28,   73,   67,   29,   30,  314,   74,   17,   31,
849        32,   18,   33,   19,   34,   59,   35,   21,   21,   20,
850         5,    6,    7,    8,    7,    9,   10,   21,   21,   11,
851        12,   13,   14,   15,   16,   29,   30,   77,   68,   77,
852        31,   32,   69,   33,   78,   34,   78,   35,   87,  313,
853        73,   70,   88,   29,   30,   74,  312,   17,   31,   32,
854        18,   33,   19,   34,   36,   35,  311,   36,   20,   36,
855 
856        22,   23,   36,   79,  310,   24,   25,   80,   26,   52,
857        27,   53,   28,   54,  309,  308,   81,   29,   30,   55,
858        99,   56,   31,   32,  100,   33,  307,   34,  306,   35,
859       305,   37,  304,   22,   23,  303,   37,   39,   24,   25,
860       302,   26,   79,   27,   36,   28,   80,   36,   40,   41,
861       301,  300,  299,   42,   43,   81,   44,  298,   45,  297,
862        46,   29,   30,  296,  295,  294,   31,   32,  293,   33,
863       292,   34,  291,   35,  290,  289,  288,   47,   48,  287,
864       286,   37,  285,   22,   23,  284,  283,  282,   24,   25,
865       281,   26,  280,   27,  279,   28,   49,  278,   50,  277,
866 
867       276,  275,  274,   29,   30,  273,  272,  271,   31,   32,
868       270,   33,  269,   34,  268,   35,   51,  267,  266,  265,
869       264,   22,   23,  263,  262,  261,   24,   25,  260,   26,
870       259,   27,  258,   28,   22,   23,  257,  256,  255,   24,
871        25,  254,   26,  253,   27,  252,   28,  251,  250,  249,
872       248,  247,  246,  245,  244,  243,  242,  241,  240,   57,
873        58,    4,    4,    4,    4,    4,    4,   21,  239,  238,
874       237,   21,   21,   38,  236,   38,   38,   38,   38,   82,
875       235,   82,  234,  233,   82,   83,  232,   83,  231,   83,
876       230,  229,  228,  227,  226,  225,  224,  223,  222,  221,
877 
878       220,  219,  218,  217,  216,  215,  214,  213,  212,  211,
879       210,  209,  208,  207,  206,  203,  202,  201,  200,  199,
880       198,  197,  196,  193,  192,  191,  190,  189,  188,  187,
881       186,  185,  184,  183,  182,  181,  180,  179,  178,  177,
882       176,  175,  174,  173,  172,  171,  170,  169,  168,  167,
883       166,  165,  164,  163,  162,  161,  160,  159,  158,  157,
884       156,  155,  154,  153,  152,  151,  150,  149,  148,  147,
885       146,  145,  144,  143,  142,  141,  140,  139,  138,  137,
886       136,  135,  134,  133,  132,  131,  130,  129,  128,  127,
887       126,  125,  124,  123,  122,  121,  120,  119,  118,  117,
888 
889       116,  115,  114,  113,  112,  111,  110,  109,  108,  107,
890       106,  105,  104,  103,  102,  101,   98,   97,   96,   95,
891        94,   93,   92,   91,   90,   89,   86,   85,   84,   76,
892        75,   72,   71,   36,   76,   75,   72,   71,   65,   64,
893        61,   60,  315,    3,  315,  315,  315,  315,  315,  315,
894       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
895       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
896       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
897       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
898       315,  315,  315,  315,  315
899 
900     } ;
901 
902 static const flex_int16_t yy_chk[496] =
903     {   0,
904         0,    1,    1,    1,    1,    1,    1,    1,    0,    0,
905         1,    1,    1,    1,    1,    1,    0,  173,  184,    4,
906         4,  173,  184,   24,    4,    4,   27,    4,   24,    4,
907         0,    4,   31,   27,    5,    5,  311,   31,    1,    5,
908         5,    1,    5,    1,    5,   19,    5,   19,   19,    1,
909         2,    2,    2,    2,    2,    2,    2,   20,   20,    2,
910         2,    2,    2,    2,    2,    7,    7,   34,   28,   45,
911         7,    7,   28,    7,   34,    7,   45,    7,   60,  309,
912        42,   28,   60,    9,    9,   42,  308,    2,    9,    9,
913         2,    9,    2,    9,   36,    9,  307,   36,    2,    8,
914 
915        12,   12,    8,   35,  306,   12,   12,   35,   12,   17,
916        12,   17,   12,   17,  305,  304,   35,    8,    8,   17,
917        71,   17,    8,    8,   71,    8,  303,    8,  302,    8,
918       301,   36,  300,   14,   14,  299,    8,   10,   14,   14,
919       298,   14,   46,   14,   52,   14,   46,   52,   10,   10,
920       297,  295,  294,   10,   10,   46,   10,  291,   10,  290,
921        10,   15,   15,  288,  287,  286,   15,   15,  285,   15,
922       284,   15,  283,   15,  282,  281,  280,   10,   11,  279,
923       278,   52,  277,   11,   11,  276,  275,  274,   11,   11,
924       273,   11,  272,   11,  271,   11,   13,  269,   13,  268,
925 
926       267,  266,  264,   13,   13,  263,  262,  260,   13,   13,
927       259,   13,  258,   13,  257,   13,   16,  256,  254,  253,
928       252,   16,   16,  251,  250,  249,   16,   16,  248,   16,
929       247,   16,  246,   16,   18,   18,  245,  244,  243,   18,
930        18,  242,   18,  241,   18,  240,   18,  239,  238,  236,
931       235,  234,  233,  232,  231,  229,  228,  227,  226,   18,
932        18,  316,  316,  316,  316,  316,  316,  317,  225,  223,
933       222,  317,  317,  318,  220,  318,  318,  318,  318,  319,
934       219,  319,  218,  217,  319,  320,  216,  320,  214,  320,
935       213,  211,  210,  209,  208,  207,  206,  205,  204,  203,
936 
937       202,  201,  200,  199,  198,  196,  195,  194,  193,  192,
938       191,  190,  189,  188,  186,  183,  182,  181,  180,  178,
939       177,  176,  175,  172,  171,  170,  169,  167,  166,  165,
940       164,  163,  162,  161,  159,  158,  157,  156,  155,  154,
941       153,  152,  151,  150,  149,  147,  146,  145,  144,  143,
942       142,  141,  139,  138,  137,  136,  135,  134,  133,  132,
943       131,  130,  129,  128,  127,  126,  125,  124,  123,  122,
944       121,  120,  119,  118,  117,  116,  114,  110,  109,  108,
945       107,  106,  105,  104,  103,  102,  101,  100,   99,   98,
946        97,   96,   95,   94,   93,   92,   91,   90,   89,   88,
947 
948        87,   86,   85,   84,   83,   82,   81,   80,   79,   78,
949        77,   76,   75,   74,   73,   72,   70,   69,   68,   67,
950        66,   65,   64,   63,   62,   61,   59,   58,   57,   44,
951        43,   41,   40,   37,   33,   32,   30,   29,   26,   25,
952        23,   22,    3,  315,  315,  315,  315,  315,  315,  315,
953       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
954       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
955       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
956       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
957       315,  315,  315,  315,  315
958 
959     } ;
960 
961 /* Table of booleans, true if rule could match eol. */
962 static const flex_int32_t yy_rule_can_match_eol[40] =
963     {   0,
964 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
965     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
966         };
967 
968 static const flex_int16_t yy_rule_linenum[39] =
969     {   0,
970        73,   76,   78,   80,   82,   84,   86,   88,   90,   92,
971        94,   96,   98,  100,  102,  104,  106,  108,  110,  112,
972       114,  116,  118,  120,  122,  124,  126,  128,  130,  132,
973       134,  136,  138,  140,  142,  144,  146,  148
974     } ;
975 
976 /* The intent behind this definition is that it'll catch
977  * any uses of REJECT which flex missed.
978  */
979 #define REJECT reject_used_but_not_detected
980 #define yymore() yymore_used_but_not_detected
981 #define YY_MORE_ADJ 0
982 #define YY_RESTORE_YY_MORE_OFFSET
983 #line 1 "mk-scanner.l"
984 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
985 /*
986  * mk-scanner.l
987  * Copyright (C) Sébastien Granjoux 2009 <seb.sfo@free.fr>
988  *
989  * main.c is free software: you can redistribute it and/or modify it
990  * under the terms of the GNU General Public License as published by the
991  * Free Software Foundation, either version 3 of the License, or
992  * (at your option) any later version.
993  *
994  * main.c is distributed in the hope that it will be useful, but
995  * WITHOUT ANY WARRANTY; without even the implied warranty of
996  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
997  * See the GNU General Public License for more details.
998  *
999  * You should have received a copy of the GNU General Public License along
1000  * with this program.  If not, see <http://www.gnu.org/licenses/>.
1001  */
1002 #line 21 "mk-scanner.l"
1003 
1004 #include "mk-scanner.h"
1005 #include "mk-parser.h"
1006 #include "mk-rule.h"
1007 
1008 #include "libanjuta/anjuta-debug.h"
1009 #include "libanjuta/anjuta-token-stream.h"
1010 
1011 #include <stdlib.h>
1012 #include <string.h>
1013 
1014 #define YY_INPUT(buffer, result, max_size) result = anjuta_token_stream_read (yyextra->stream, buffer, max_size)
1015 
1016 #define YY_EXTRA_TYPE  MkpScanner*
1017 
1018 //#define YY_USER_INIT {yy_flex_debug = 1;}
1019 
1020 static gint mkp_scanner_parse_end (MkpScanner *scanner);
1021 
1022 #define RETURN(tok) *yylval = anjuta_token_stream_tokenize (yyextra->stream, tok, yyleng); \
1023                     return tok
1024 
1025 struct _MkpScanner
1026 {
1027     yyscan_t scanner;
1028 
1029     AnjutaTokenStream *stream;
1030 
1031     MkpProject *project;
1032 };
1033 
1034 #line 1034 "mk-scanner.c"
1035 /* Remove some warnings */
1036 #define YY_NO_INPUT 1
1037 #line 1037 "mk-scanner.c"
1038 
1039 #define INITIAL 0
1040 
1041 #ifndef YY_NO_UNISTD_H
1042 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1043  * down here because we want the user's section 1 to have been scanned first.
1044  * The user has a chance to override it with an option.
1045  */
1046 /* %if-c-only */
1047 #include <unistd.h>
1048 /* %endif */
1049 /* %if-c++-only */
1050 /* %endif */
1051 #endif
1052 
1053 #ifndef YY_EXTRA_TYPE
1054 #define YY_EXTRA_TYPE void *
1055 #endif
1056 
1057 /* %if-c-only Reentrant structure and macros (non-C++). */
1058 /* %if-reentrant */
1059 
1060 /* Holds the entire state of the reentrant scanner. */
1061 struct yyguts_t
1062     {
1063 
1064     /* User-defined. Not touched by flex. */
1065     YY_EXTRA_TYPE yyextra_r;
1066 
1067     /* The rest are the same as the globals declared in the non-reentrant scanner. */
1068     FILE *yyin_r, *yyout_r;
1069     size_t yy_buffer_stack_top; /**< index of top of stack. */
1070     size_t yy_buffer_stack_max; /**< capacity of stack. */
1071     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1072     char yy_hold_char;
1073     int yy_n_chars;
1074     int yyleng_r;
1075     char *yy_c_buf_p;
1076     int yy_init;
1077     int yy_start;
1078     int yy_did_buffer_switch_on_eof;
1079     int yy_start_stack_ptr;
1080     int yy_start_stack_depth;
1081     int *yy_start_stack;
1082     yy_state_type yy_last_accepting_state;
1083     char* yy_last_accepting_cpos;
1084 
1085     int yylineno_r;
1086     int yy_flex_debug_r;
1087 
1088     char *yytext_r;
1089     int yy_more_flag;
1090     int yy_more_len;
1091 
1092     YYSTYPE * yylval_r;
1093 
1094     YYLTYPE * yylloc_r;
1095 
1096     }; /* end struct yyguts_t */
1097 
1098 /* %if-c-only */
1099 
1100 static int yy_init_globals ( yyscan_t yyscanner );
1101 
1102 /* %endif */
1103 
1104 /* %if-reentrant */
1105 
1106     /* This must go here because YYSTYPE and YYLTYPE are included
1107      * from bison output in section 1.*/
1108     #    define yylval yyg->yylval_r
1109 
1110     #    define yylloc yyg->yylloc_r
1111 
1112 int yylex_init (yyscan_t* scanner);
1113 
1114 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1115 
1116 /* %endif */
1117 
1118 /* %endif End reentrant structures and macros. */
1119 
1120 /* Accessor methods to globals.
1121    These are made visible to non-reentrant scanners for convenience. */
1122 
1123 int yylex_destroy ( yyscan_t yyscanner );
1124 
1125 int yyget_debug ( yyscan_t yyscanner );
1126 
1127 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1128 
1129 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1130 
1131 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1132 
1133 FILE *yyget_in ( yyscan_t yyscanner );
1134 
1135 void yyset_in  ( FILE * _in_str , yyscan_t yyscanner );
1136 
1137 FILE *yyget_out ( yyscan_t yyscanner );
1138 
1139 void yyset_out  ( FILE * _out_str , yyscan_t yyscanner );
1140 
1141 			int yyget_leng ( yyscan_t yyscanner );
1142 
1143 char *yyget_text ( yyscan_t yyscanner );
1144 
1145 int yyget_lineno ( yyscan_t yyscanner );
1146 
1147 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1148 
1149 int yyget_column  ( yyscan_t yyscanner );
1150 
1151 void yyset_column ( int _column_no , yyscan_t yyscanner );
1152 
1153 /* %if-bison-bridge */
1154 
1155 YYSTYPE * yyget_lval ( yyscan_t yyscanner );
1156 
1157 void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1158 
1159        YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
1160 
1161         void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
1162 
1163 /* %endif */
1164 
1165 /* Macros after this point can all be overridden by user definitions in
1166  * section 1.
1167  */
1168 
1169 #ifndef YY_SKIP_YYWRAP
1170 #ifdef __cplusplus
1171 extern "C" int yywrap ( yyscan_t yyscanner );
1172 #else
1173 extern int yywrap ( yyscan_t yyscanner );
1174 #endif
1175 #endif
1176 
1177 /* %not-for-header */
1178 #ifndef YY_NO_UNPUT
1179 
1180 #endif
1181 /* %ok-for-header */
1182 
1183 /* %endif */
1184 
1185 #ifndef yytext_ptr
1186 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1187 #endif
1188 
1189 #ifdef YY_NEED_STRLEN
1190 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1191 #endif
1192 
1193 #ifndef YY_NO_INPUT
1194 /* %if-c-only Standard (non-C++) definition */
1195 /* %not-for-header */
1196 #ifdef __cplusplus
1197 static int yyinput ( yyscan_t yyscanner );
1198 #else
1199 static int input ( yyscan_t yyscanner );
1200 #endif
1201 /* %ok-for-header */
1202 
1203 /* %endif */
1204 #endif
1205 
1206 /* %if-c-only */
1207 
1208 /* %endif */
1209 
1210 /* Amount of stuff to slurp up with each read. */
1211 #ifndef YY_READ_BUF_SIZE
1212 #ifdef __ia64__
1213 /* On IA-64, the buffer size is 16k, not 8k */
1214 #define YY_READ_BUF_SIZE 16384
1215 #else
1216 #define YY_READ_BUF_SIZE 8192
1217 #endif /* __ia64__ */
1218 #endif
1219 
1220 /* Copy whatever the last rule matched to the standard output. */
1221 #ifndef ECHO
1222 /* %if-c-only Standard (non-C++) definition */
1223 /* This used to be an fputs(), but since the string might contain NUL's,
1224  * we now use fwrite().
1225  */
1226 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1227 /* %endif */
1228 /* %if-c++-only C++ definition */
1229 /* %endif */
1230 #endif
1231 
1232 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1233  * is returned in "result".
1234  */
1235 #ifndef YY_INPUT
1236 #define YY_INPUT(buf,result,max_size) \
1237 /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
1238 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1239 		{ \
1240 		int c = '*'; \
1241 		int n; \
1242 		for ( n = 0; n < max_size && \
1243 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1244 			buf[n] = (char) c; \
1245 		if ( c == '\n' ) \
1246 			buf[n++] = (char) c; \
1247 		if ( c == EOF && ferror( yyin ) ) \
1248 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
1249 		result = n; \
1250 		} \
1251 	else \
1252 		{ \
1253 		errno=0; \
1254 		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1255 			{ \
1256 			if( errno != EINTR) \
1257 				{ \
1258 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
1259 				break; \
1260 				} \
1261 			errno=0; \
1262 			clearerr(yyin); \
1263 			} \
1264 		}\
1265 \
1266 /* %if-c++-only C++ definition \ */\
1267 /* %endif */
1268 
1269 #endif
1270 
1271 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1272  * we don't want an extra ';' after the "return" because that will cause
1273  * some compilers to complain about unreachable statements.
1274  */
1275 #ifndef yyterminate
1276 #define yyterminate() return YY_NULL
1277 #endif
1278 
1279 /* Number of entries by which start-condition stack grows. */
1280 #ifndef YY_START_STACK_INCR
1281 #define YY_START_STACK_INCR 25
1282 #endif
1283 
1284 /* Report a fatal error. */
1285 #ifndef YY_FATAL_ERROR
1286 /* %if-c-only */
1287 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1288 /* %endif */
1289 /* %if-c++-only */
1290 /* %endif */
1291 #endif
1292 
1293 /* %if-tables-serialization structures and prototypes */
1294 /* %not-for-header */
1295 /* %ok-for-header */
1296 
1297 /* %not-for-header */
1298 /* %tables-yydmap generated elements */
1299 /* %endif */
1300 /* end tables serialization structures and prototypes */
1301 
1302 /* %ok-for-header */
1303 
1304 /* Default declaration of generated scanner - a define so the user can
1305  * easily add parameters.
1306  */
1307 #ifndef YY_DECL
1308 #define YY_DECL_IS_OURS 1
1309 /* %if-c-only Standard (non-C++) definition */
1310 
1311 extern int yylex \
1312                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
1313 
1314 #define YY_DECL int yylex \
1315                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1316 /* %endif */
1317 /* %if-c++-only C++ definition */
1318 /* %endif */
1319 #endif /* !YY_DECL */
1320 
1321 /* Code executed at the beginning of each rule, after yytext and yyleng
1322  * have been set up.
1323  */
1324 #ifndef YY_USER_ACTION
1325 #define YY_USER_ACTION
1326 #endif
1327 
1328 /* Code executed at the end of each rule. */
1329 #ifndef YY_BREAK
1330 #define YY_BREAK /*LINTED*/break;
1331 #endif
1332 
1333 /* %% [6.0] YY_RULE_SETUP definition goes here */
1334 #define YY_RULE_SETUP \
1335 	YY_USER_ACTION
1336 
1337 /* %not-for-header */
1338 /** The main scanner function which does all the work.
1339  */
1340 YY_DECL
1341 {
1342 	yy_state_type yy_current_state;
1343 	char *yy_cp, *yy_bp;
1344 	int yy_act;
1345     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1346 
1347     yylval = yylval_param;
1348 
1349     yylloc = yylloc_param;
1350 
1351 	if ( !yyg->yy_init )
1352 		{
1353 		yyg->yy_init = 1;
1354 
1355 #ifdef YY_USER_INIT
1356 		YY_USER_INIT;
1357 #endif
1358 
1359 		if ( ! yyg->yy_start )
1360 			yyg->yy_start = 1;	/* first start state */
1361 
1362 		if ( ! yyin )
1363 /* %if-c-only */
1364 			yyin = stdin;
1365 /* %endif */
1366 /* %if-c++-only */
1367 /* %endif */
1368 
1369 		if ( ! yyout )
1370 /* %if-c-only */
1371 			yyout = stdout;
1372 /* %endif */
1373 /* %if-c++-only */
1374 /* %endif */
1375 
1376 		if ( ! YY_CURRENT_BUFFER ) {
1377 			yyensure_buffer_stack (yyscanner);
1378 			YY_CURRENT_BUFFER_LVALUE =
1379 				yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1380 		}
1381 
1382 		yy_load_buffer_state( yyscanner );
1383 		}
1384 
1385 	{
1386 /* %% [7.0] user's declarations go here */
1387 #line 71 "mk-scanner.l"
1388 
1389 
1390 #line 1390 "mk-scanner.c"
1391 
1392 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
1393 		{
1394 /* %% [8.0] yymore()-related code goes here */
1395 		yy_cp = yyg->yy_c_buf_p;
1396 
1397 		/* Support of yytext. */
1398 		*yy_cp = yyg->yy_hold_char;
1399 
1400 		/* yy_bp points to the position in yy_ch_buf of the start of
1401 		 * the current run.
1402 		 */
1403 		yy_bp = yy_cp;
1404 
1405 /* %% [9.0] code to set up and find next match goes here */
1406 		yy_current_state = yyg->yy_start;
1407 yy_match:
1408 		do
1409 			{
1410 			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1411 			if ( yy_accept[yy_current_state] )
1412 				{
1413 				yyg->yy_last_accepting_state = yy_current_state;
1414 				yyg->yy_last_accepting_cpos = yy_cp;
1415 				}
1416 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1417 				{
1418 				yy_current_state = (int) yy_def[yy_current_state];
1419 				if ( yy_current_state >= 316 )
1420 					yy_c = yy_meta[yy_c];
1421 				}
1422 			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1423 			++yy_cp;
1424 			}
1425 		while ( yy_current_state != 315 );
1426 		yy_cp = yyg->yy_last_accepting_cpos;
1427 		yy_current_state = yyg->yy_last_accepting_state;
1428 
1429 yy_find_action:
1430 /* %% [10.0] code to find the action number goes here */
1431 		yy_act = yy_accept[yy_current_state];
1432 
1433 		YY_DO_BEFORE_ACTION;
1434 
1435 /* %% [11.0] code for yylineno update goes here */
1436 
1437 		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1438 			{
1439 			int yyl;
1440 			for ( yyl = 0; yyl < yyleng; ++yyl )
1441 				if ( yytext[yyl] == '\n' )
1442 
1443     do{ yylineno++;
1444         yycolumn=0;
1445     }while(0)
1446 ;
1447 			}
1448 
1449 do_action:	/* This label is used only to access EOF actions. */
1450 
1451 /* %% [12.0] debug code goes here */
1452 		if ( yy_flex_debug )
1453 			{
1454 			if ( yy_act == 0 )
1455 				fprintf( stderr, "--scanner backing up\n" );
1456 			else if ( yy_act < 39 )
1457 				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
1458 				         (long)yy_rule_linenum[yy_act], yytext );
1459 			else if ( yy_act == 39 )
1460 				fprintf( stderr, "--accepting default rule (\"%s\")\n",
1461 				         yytext );
1462 			else if ( yy_act == 40 )
1463 				fprintf( stderr, "--(end of buffer or a NUL)\n" );
1464 			else
1465 				fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
1466 			}
1467 
1468 		switch ( yy_act )
1469 	{ /* beginning of action switch */
1470 /* %% [13.0] actions go here */
1471 			case 0: /* must back up */
1472 			/* undo the effects of YY_DO_BEFORE_ACTION */
1473 			*yy_cp = yyg->yy_hold_char;
1474 			yy_cp = yyg->yy_last_accepting_cpos;
1475 			yy_current_state = yyg->yy_last_accepting_state;
1476 			goto yy_find_action;
1477 
1478 case 1:
1479 /* rule 1 can match eol */
1480 YY_RULE_SETUP
1481 #line 73 "mk-scanner.l"
1482 { RETURN (EOL); }
1483 	YY_BREAK
1484 case 2:
1485 /* rule 2 can match eol */
1486 YY_RULE_SETUP
1487 #line 76 "mk-scanner.l"
1488 { RETURN (SPACE); }
1489 	YY_BREAK
1490 case 3:
1491 YY_RULE_SETUP
1492 #line 78 "mk-scanner.l"
1493 { RETURN (HASH); }
1494 	YY_BREAK
1495 case 4:
1496 YY_RULE_SETUP
1497 #line 80 "mk-scanner.l"
1498 { RETURN (TAB); }
1499 	YY_BREAK
1500 case 5:
1501 YY_RULE_SETUP
1502 #line 82 "mk-scanner.l"
1503 { RETURN (VARIABLE); }
1504 	YY_BREAK
1505 case 6:
1506 YY_RULE_SETUP
1507 #line 84 "mk-scanner.l"
1508 { RETURN (VARIABLE); }
1509 	YY_BREAK
1510 case 7:
1511 YY_RULE_SETUP
1512 #line 86 "mk-scanner.l"
1513 { RETURN (VARIABLE); }
1514 	YY_BREAK
1515 case 8:
1516 YY_RULE_SETUP
1517 #line 88 "mk-scanner.l"
1518 { RETURN (COMMA); }
1519 	YY_BREAK
1520 case 9:
1521 YY_RULE_SETUP
1522 #line 90 "mk-scanner.l"
1523 { RETURN (COLON); }
1524 	YY_BREAK
1525 case 10:
1526 YY_RULE_SETUP
1527 #line 92 "mk-scanner.l"
1528 { RETURN (DOUBLE_COLON); }
1529 	YY_BREAK
1530 case 11:
1531 YY_RULE_SETUP
1532 #line 94 "mk-scanner.l"
1533 { RETURN (SEMI_COLON); }
1534 	YY_BREAK
1535 case 12:
1536 YY_RULE_SETUP
1537 #line 96 "mk-scanner.l"
1538 { RETURN (ORDER); }
1539 	YY_BREAK
1540 case 13:
1541 YY_RULE_SETUP
1542 #line 98 "mk-scanner.l"
1543 { RETURN (EQUAL); }
1544 	YY_BREAK
1545 case 14:
1546 YY_RULE_SETUP
1547 #line 100 "mk-scanner.l"
1548 { RETURN (IMMEDIATE_EQUAL); }
1549 	YY_BREAK
1550 case 15:
1551 YY_RULE_SETUP
1552 #line 102 "mk-scanner.l"
1553 { RETURN (CONDITIONAL_EQUAL); }
1554 	YY_BREAK
1555 case 16:
1556 YY_RULE_SETUP
1557 #line 104 "mk-scanner.l"
1558 { RETURN (APPEND); }
1559 	YY_BREAK
1560 case 17:
1561 YY_RULE_SETUP
1562 #line 106 "mk-scanner.l"
1563 { RETURN (CHARACTER); }
1564 	YY_BREAK
1565 case 18:
1566 YY_RULE_SETUP
1567 #line 108 "mk-scanner.l"
1568 { RETURN (CHARACTER); }
1569 	YY_BREAK
1570 case 19:
1571 YY_RULE_SETUP
1572 #line 110 "mk-scanner.l"
1573 { RETURN (CHARACTER); }
1574 	YY_BREAK
1575 case 20:
1576 YY_RULE_SETUP
1577 #line 112 "mk-scanner.l"
1578 { RETURN (CHARACTER); }
1579 	YY_BREAK
1580 case 21:
1581 YY_RULE_SETUP
1582 #line 114 "mk-scanner.l"
1583 { RETURN (_PHONY); }
1584 	YY_BREAK
1585 case 22:
1586 YY_RULE_SETUP
1587 #line 116 "mk-scanner.l"
1588 { RETURN (_SUFFIXES); }
1589 	YY_BREAK
1590 case 23:
1591 YY_RULE_SETUP
1592 #line 118 "mk-scanner.l"
1593 { RETURN (_DEFAULT); }
1594 	YY_BREAK
1595 case 24:
1596 YY_RULE_SETUP
1597 #line 120 "mk-scanner.l"
1598 { RETURN (_PRECIOUS); }
1599 	YY_BREAK
1600 case 25:
1601 YY_RULE_SETUP
1602 #line 122 "mk-scanner.l"
1603 { RETURN (_INTERMEDIATE); }
1604 	YY_BREAK
1605 case 26:
1606 YY_RULE_SETUP
1607 #line 124 "mk-scanner.l"
1608 { RETURN (_SECONDARY); }
1609 	YY_BREAK
1610 case 27:
1611 YY_RULE_SETUP
1612 #line 126 "mk-scanner.l"
1613 { RETURN (_SECONDEXPANSION); }
1614 	YY_BREAK
1615 case 28:
1616 YY_RULE_SETUP
1617 #line 128 "mk-scanner.l"
1618 { RETURN (_DELETE_ON_ERROR); }
1619 	YY_BREAK
1620 case 29:
1621 YY_RULE_SETUP
1622 #line 130 "mk-scanner.l"
1623 { RETURN (_IGNORE); }
1624 	YY_BREAK
1625 case 30:
1626 YY_RULE_SETUP
1627 #line 132 "mk-scanner.l"
1628 { RETURN (_LOW_RESOLUTION_TIME); }
1629 	YY_BREAK
1630 case 31:
1631 YY_RULE_SETUP
1632 #line 134 "mk-scanner.l"
1633 { RETURN (_SILENT); }
1634 	YY_BREAK
1635 case 32:
1636 YY_RULE_SETUP
1637 #line 136 "mk-scanner.l"
1638 { RETURN (_EXPORT_ALL_VARIABLES); }
1639 	YY_BREAK
1640 case 33:
1641 YY_RULE_SETUP
1642 #line 138 "mk-scanner.l"
1643 { RETURN (_NOTPARALLEL); }
1644 	YY_BREAK
1645 case 34:
1646 YY_RULE_SETUP
1647 #line 140 "mk-scanner.l"
1648 { RETURN (IFEQ); }
1649 	YY_BREAK
1650 case 35:
1651 YY_RULE_SETUP
1652 #line 142 "mk-scanner.l"
1653 { RETURN (ELSE); }
1654 	YY_BREAK
1655 case 36:
1656 YY_RULE_SETUP
1657 #line 144 "mk-scanner.l"
1658 { RETURN (ENDIF); }
1659 	YY_BREAK
1660 case 37:
1661 YY_RULE_SETUP
1662 #line 146 "mk-scanner.l"
1663 { RETURN (NAME); }
1664 	YY_BREAK
1665 case 38:
1666 YY_RULE_SETUP
1667 #line 148 "mk-scanner.l"
1668 { RETURN (CHARACTER); }
1669 	YY_BREAK
1670 case YY_STATE_EOF(INITIAL):
1671 #line 150 "mk-scanner.l"
1672 { if (mkp_scanner_parse_end (yyextra) == YY_NULL) return YY_NULL; }
1673 	YY_BREAK
1674 case 39:
1675 YY_RULE_SETUP
1676 #line 153 "mk-scanner.l"
1677 ECHO;
1678 	YY_BREAK
1679 #line 1679 "mk-scanner.c"
1680 
1681 	case YY_END_OF_BUFFER:
1682 		{
1683 		/* Amount of text matched not including the EOB char. */
1684 		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1685 
1686 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1687 		*yy_cp = yyg->yy_hold_char;
1688 		YY_RESTORE_YY_MORE_OFFSET
1689 
1690 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1691 			{
1692 			/* We're scanning a new file or input source.  It's
1693 			 * possible that this happened because the user
1694 			 * just pointed yyin at a new source and called
1695 			 * yylex().  If so, then we have to assure
1696 			 * consistency between YY_CURRENT_BUFFER and our
1697 			 * globals.  Here is the right place to do so, because
1698 			 * this is the first action (other than possibly a
1699 			 * back-up) that will match for the new input source.
1700 			 */
1701 			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1702 /* %if-c-only */
1703 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1704 /* %endif */
1705 /* %if-c++-only */
1706 /* %endif */
1707 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1708 			}
1709 
1710 		/* Note that here we test for yy_c_buf_p "<=" to the position
1711 		 * of the first EOB in the buffer, since yy_c_buf_p will
1712 		 * already have been incremented past the NUL character
1713 		 * (since all states make transitions on EOB to the
1714 		 * end-of-buffer state).  Contrast this with the test
1715 		 * in input().
1716 		 */
1717 		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1718 			{ /* This was really a NUL. */
1719 			yy_state_type yy_next_state;
1720 
1721 			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1722 
1723 			yy_current_state = yy_get_previous_state( yyscanner );
1724 
1725 			/* Okay, we're now positioned to make the NUL
1726 			 * transition.  We couldn't have
1727 			 * yy_get_previous_state() go ahead and do it
1728 			 * for us because it doesn't know how to deal
1729 			 * with the possibility of jamming (and we don't
1730 			 * want to build jamming into it because then it
1731 			 * will run more slowly).
1732 			 */
1733 
1734 			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1735 
1736 			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1737 
1738 			if ( yy_next_state )
1739 				{
1740 				/* Consume the NUL. */
1741 				yy_cp = ++yyg->yy_c_buf_p;
1742 				yy_current_state = yy_next_state;
1743 				goto yy_match;
1744 				}
1745 
1746 			else
1747 				{
1748 /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1749 				yy_cp = yyg->yy_last_accepting_cpos;
1750 				yy_current_state = yyg->yy_last_accepting_state;
1751 				goto yy_find_action;
1752 				}
1753 			}
1754 
1755 		else switch ( yy_get_next_buffer( yyscanner ) )
1756 			{
1757 			case EOB_ACT_END_OF_FILE:
1758 				{
1759 				yyg->yy_did_buffer_switch_on_eof = 0;
1760 
1761 				if ( yywrap( yyscanner ) )
1762 					{
1763 					/* Note: because we've taken care in
1764 					 * yy_get_next_buffer() to have set up
1765 					 * yytext, we can now set up
1766 					 * yy_c_buf_p so that if some total
1767 					 * hoser (like flex itself) wants to
1768 					 * call the scanner after we return the
1769 					 * YY_NULL, it'll still work - another
1770 					 * YY_NULL will get returned.
1771 					 */
1772 					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1773 
1774 					yy_act = YY_STATE_EOF(YY_START);
1775 					goto do_action;
1776 					}
1777 
1778 				else
1779 					{
1780 					if ( ! yyg->yy_did_buffer_switch_on_eof )
1781 						YY_NEW_FILE;
1782 					}
1783 				break;
1784 				}
1785 
1786 			case EOB_ACT_CONTINUE_SCAN:
1787 				yyg->yy_c_buf_p =
1788 					yyg->yytext_ptr + yy_amount_of_matched_text;
1789 
1790 				yy_current_state = yy_get_previous_state( yyscanner );
1791 
1792 				yy_cp = yyg->yy_c_buf_p;
1793 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1794 				goto yy_match;
1795 
1796 			case EOB_ACT_LAST_MATCH:
1797 				yyg->yy_c_buf_p =
1798 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1799 
1800 				yy_current_state = yy_get_previous_state( yyscanner );
1801 
1802 				yy_cp = yyg->yy_c_buf_p;
1803 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1804 				goto yy_find_action;
1805 			}
1806 		break;
1807 		}
1808 
1809 	default:
1810 		YY_FATAL_ERROR(
1811 			"fatal flex scanner internal error--no action found" );
1812 	} /* end of action switch */
1813 		} /* end of scanning one token */
1814 	} /* end of user's declarations */
1815 } /* end of yylex */
1816 /* %ok-for-header */
1817 
1818 /* %if-c++-only */
1819 /* %not-for-header */
1820 /* %ok-for-header */
1821 
1822 /* %endif */
1823 
1824 /* yy_get_next_buffer - try to read in a new buffer
1825  *
1826  * Returns a code representing an action:
1827  *	EOB_ACT_LAST_MATCH -
1828  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1829  *	EOB_ACT_END_OF_FILE - end of file
1830  */
1831 /* %if-c-only */
yy_get_next_buffer(yyscan_t yyscanner)1832 static int yy_get_next_buffer (yyscan_t yyscanner)
1833 /* %endif */
1834 /* %if-c++-only */
1835 /* %endif */
1836 {
1837     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1838 	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1839 	char *source = yyg->yytext_ptr;
1840 	int number_to_move, i;
1841 	int ret_val;
1842 
1843 	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1844 		YY_FATAL_ERROR(
1845 		"fatal flex scanner internal error--end of buffer missed" );
1846 
1847 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1848 		{ /* Don't try to fill the buffer, so this is an EOF. */
1849 		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1850 			{
1851 			/* We matched a single character, the EOB, so
1852 			 * treat this as a final EOF.
1853 			 */
1854 			return EOB_ACT_END_OF_FILE;
1855 			}
1856 
1857 		else
1858 			{
1859 			/* We matched some text prior to the EOB, first
1860 			 * process it.
1861 			 */
1862 			return EOB_ACT_LAST_MATCH;
1863 			}
1864 		}
1865 
1866 	/* Try to read more data. */
1867 
1868 	/* First move last chars to start of buffer. */
1869 	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1870 
1871 	for ( i = 0; i < number_to_move; ++i )
1872 		*(dest++) = *(source++);
1873 
1874 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1875 		/* don't do the read, it's not guaranteed to return an EOF,
1876 		 * just force an EOF
1877 		 */
1878 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1879 
1880 	else
1881 		{
1882 			int num_to_read =
1883 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1884 
1885 		while ( num_to_read <= 0 )
1886 			{ /* Not enough room in the buffer - grow it. */
1887 
1888 			/* just a shorter name for the current buffer */
1889 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1890 
1891 			int yy_c_buf_p_offset =
1892 				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1893 
1894 			if ( b->yy_is_our_buffer )
1895 				{
1896 				int new_size = b->yy_buf_size * 2;
1897 
1898 				if ( new_size <= 0 )
1899 					b->yy_buf_size += b->yy_buf_size / 8;
1900 				else
1901 					b->yy_buf_size *= 2;
1902 
1903 				b->yy_ch_buf = (char *)
1904 					/* Include room in for 2 EOB chars. */
1905 					yyrealloc( (void *) b->yy_ch_buf,
1906 							 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1907 				}
1908 			else
1909 				/* Can't grow it, we don't own it. */
1910 				b->yy_ch_buf = NULL;
1911 
1912 			if ( ! b->yy_ch_buf )
1913 				YY_FATAL_ERROR(
1914 				"fatal error - scanner input buffer overflow" );
1915 
1916 			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1917 
1918 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1919 						number_to_move - 1;
1920 
1921 			}
1922 
1923 		if ( num_to_read > YY_READ_BUF_SIZE )
1924 			num_to_read = YY_READ_BUF_SIZE;
1925 
1926 		/* Read in more data. */
1927 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1928 			yyg->yy_n_chars, num_to_read );
1929 
1930 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1931 		}
1932 
1933 	if ( yyg->yy_n_chars == 0 )
1934 		{
1935 		if ( number_to_move == YY_MORE_ADJ )
1936 			{
1937 			ret_val = EOB_ACT_END_OF_FILE;
1938 			yyrestart( yyin  , yyscanner);
1939 			}
1940 
1941 		else
1942 			{
1943 			ret_val = EOB_ACT_LAST_MATCH;
1944 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1945 				YY_BUFFER_EOF_PENDING;
1946 			}
1947 		}
1948 
1949 	else
1950 		ret_val = EOB_ACT_CONTINUE_SCAN;
1951 
1952 	if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1953 		/* Extend the array by 50%, plus the number we really need. */
1954 		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1955 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1956 			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1957 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1958 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1959 		/* "- 2" to take care of EOB's */
1960 		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1961 	}
1962 
1963 	yyg->yy_n_chars += number_to_move;
1964 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1965 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1966 
1967 	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1968 
1969 	return ret_val;
1970 }
1971 
1972 /* yy_get_previous_state - get the state just before the EOB char was reached */
1973 
1974 /* %if-c-only */
1975 /* %not-for-header */
yy_get_previous_state(yyscan_t yyscanner)1976     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1977 /* %endif */
1978 /* %if-c++-only */
1979 /* %endif */
1980 {
1981 	yy_state_type yy_current_state;
1982 	char *yy_cp;
1983     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1984 
1985 /* %% [15.0] code to get the start state into yy_current_state goes here */
1986 	yy_current_state = yyg->yy_start;
1987 
1988 	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1989 		{
1990 /* %% [16.0] code to find the next state goes here */
1991 		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1992 		if ( yy_accept[yy_current_state] )
1993 			{
1994 			yyg->yy_last_accepting_state = yy_current_state;
1995 			yyg->yy_last_accepting_cpos = yy_cp;
1996 			}
1997 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1998 			{
1999 			yy_current_state = (int) yy_def[yy_current_state];
2000 			if ( yy_current_state >= 316 )
2001 				yy_c = yy_meta[yy_c];
2002 			}
2003 		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2004 		}
2005 
2006 	return yy_current_state;
2007 }
2008 
2009 /* yy_try_NUL_trans - try to make a transition on the NUL character
2010  *
2011  * synopsis
2012  *	next_state = yy_try_NUL_trans( current_state );
2013  */
2014 /* %if-c-only */
yy_try_NUL_trans(yy_state_type yy_current_state,yyscan_t yyscanner)2015     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
2016 /* %endif */
2017 /* %if-c++-only */
2018 /* %endif */
2019 {
2020 	int yy_is_jam;
2021     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2022 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
2023 	char *yy_cp = yyg->yy_c_buf_p;
2024 
2025 	YY_CHAR yy_c = 1;
2026 	if ( yy_accept[yy_current_state] )
2027 		{
2028 		yyg->yy_last_accepting_state = yy_current_state;
2029 		yyg->yy_last_accepting_cpos = yy_cp;
2030 		}
2031 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2032 		{
2033 		yy_current_state = (int) yy_def[yy_current_state];
2034 		if ( yy_current_state >= 316 )
2035 			yy_c = yy_meta[yy_c];
2036 		}
2037 	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2038 	yy_is_jam = (yy_current_state == 315);
2039 
2040 	(void)yyg;
2041 	return yy_is_jam ? 0 : yy_current_state;
2042 }
2043 
2044 #ifndef YY_NO_UNPUT
2045 /* %if-c-only */
2046 
2047 /* %endif */
2048 #endif
2049 
2050 /* %if-c-only */
2051 #ifndef YY_NO_INPUT
2052 #ifdef __cplusplus
yyinput(yyscan_t yyscanner)2053     static int yyinput (yyscan_t yyscanner)
2054 #else
2055     static int input  (yyscan_t yyscanner)
2056 #endif
2057 
2058 /* %endif */
2059 /* %if-c++-only */
2060 /* %endif */
2061 {
2062 	int c;
2063     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2064 
2065 	*yyg->yy_c_buf_p = yyg->yy_hold_char;
2066 
2067 	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2068 		{
2069 		/* yy_c_buf_p now points to the character we want to return.
2070 		 * If this occurs *before* the EOB characters, then it's a
2071 		 * valid NUL; if not, then we've hit the end of the buffer.
2072 		 */
2073 		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2074 			/* This was really a NUL. */
2075 			*yyg->yy_c_buf_p = '\0';
2076 
2077 		else
2078 			{ /* need more input */
2079 			int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
2080 			++yyg->yy_c_buf_p;
2081 
2082 			switch ( yy_get_next_buffer( yyscanner ) )
2083 				{
2084 				case EOB_ACT_LAST_MATCH:
2085 					/* This happens because yy_g_n_b()
2086 					 * sees that we've accumulated a
2087 					 * token and flags that we need to
2088 					 * try matching the token before
2089 					 * proceeding.  But for input(),
2090 					 * there's no matching to consider.
2091 					 * So convert the EOB_ACT_LAST_MATCH
2092 					 * to EOB_ACT_END_OF_FILE.
2093 					 */
2094 
2095 					/* Reset buffer status. */
2096 					yyrestart( yyin , yyscanner);
2097 
2098 					/*FALLTHROUGH*/
2099 
2100 				case EOB_ACT_END_OF_FILE:
2101 					{
2102 					if ( yywrap( yyscanner ) )
2103 						return 0;
2104 
2105 					if ( ! yyg->yy_did_buffer_switch_on_eof )
2106 						YY_NEW_FILE;
2107 #ifdef __cplusplus
2108 					return yyinput(yyscanner);
2109 #else
2110 					return input(yyscanner);
2111 #endif
2112 					}
2113 
2114 				case EOB_ACT_CONTINUE_SCAN:
2115 					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2116 					break;
2117 				}
2118 			}
2119 		}
2120 
2121 	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
2122 	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
2123 	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2124 
2125 /* %% [19.0] update BOL and yylineno */
2126 	if ( c == '\n' )
2127 
2128     do{ yylineno++;
2129         yycolumn=0;
2130     }while(0)
2131 ;
2132 
2133 	return c;
2134 }
2135 /* %if-c-only */
2136 #endif	/* ifndef YY_NO_INPUT */
2137 /* %endif */
2138 
2139 /** Immediately switch to a different input stream.
2140  * @param input_file A readable stream.
2141  * @param yyscanner The scanner object.
2142  * @note This function does not reset the start condition to @c INITIAL .
2143  */
2144 /* %if-c-only */
yyrestart(FILE * input_file,yyscan_t yyscanner)2145     void yyrestart  (FILE * input_file , yyscan_t yyscanner)
2146 /* %endif */
2147 /* %if-c++-only */
2148 /* %endif */
2149 {
2150     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2151 
2152 	if ( ! YY_CURRENT_BUFFER ){
2153         yyensure_buffer_stack (yyscanner);
2154 		YY_CURRENT_BUFFER_LVALUE =
2155             yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2156 	}
2157 
2158 	yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2159 	yy_load_buffer_state( yyscanner );
2160 }
2161 
2162 /* %if-c++-only */
2163 /* %endif */
2164 
2165 /** Switch to a different input buffer.
2166  * @param new_buffer The new input buffer.
2167  * @param yyscanner The scanner object.
2168  */
2169 /* %if-c-only */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2170     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
2171 /* %endif */
2172 /* %if-c++-only */
2173 /* %endif */
2174 {
2175     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2176 
2177 	/* TODO. We should be able to replace this entire function body
2178 	 * with
2179 	 *		yypop_buffer_state();
2180 	 *		yypush_buffer_state(new_buffer);
2181      */
2182 	yyensure_buffer_stack (yyscanner);
2183 	if ( YY_CURRENT_BUFFER == new_buffer )
2184 		return;
2185 
2186 	if ( YY_CURRENT_BUFFER )
2187 		{
2188 		/* Flush out information for old buffer. */
2189 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
2190 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2191 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2192 		}
2193 
2194 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2195 	yy_load_buffer_state( yyscanner );
2196 
2197 	/* We don't actually know whether we did this switch during
2198 	 * EOF (yywrap()) processing, but the only time this flag
2199 	 * is looked at is after yywrap() is called, so it's safe
2200 	 * to go ahead and always set it.
2201 	 */
2202 	yyg->yy_did_buffer_switch_on_eof = 1;
2203 }
2204 
2205 /* %if-c-only */
yy_load_buffer_state(yyscan_t yyscanner)2206 static void yy_load_buffer_state  (yyscan_t yyscanner)
2207 /* %endif */
2208 /* %if-c++-only */
2209 /* %endif */
2210 {
2211     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2212 	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2213 	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2214 /* %if-c-only */
2215 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2216 /* %endif */
2217 /* %if-c++-only */
2218 /* %endif */
2219 	yyg->yy_hold_char = *yyg->yy_c_buf_p;
2220 }
2221 
2222 /** Allocate and initialize an input buffer state.
2223  * @param file A readable stream.
2224  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2225  * @param yyscanner The scanner object.
2226  * @return the allocated buffer state.
2227  */
2228 /* %if-c-only */
yy_create_buffer(FILE * file,int size,yyscan_t yyscanner)2229     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
2230 /* %endif */
2231 /* %if-c++-only */
2232 /* %endif */
2233 {
2234 	YY_BUFFER_STATE b;
2235 
2236 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2237 	if ( ! b )
2238 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2239 
2240 	b->yy_buf_size = size;
2241 
2242 	/* yy_ch_buf has to be 2 characters longer than the size given because
2243 	 * we need to put in 2 end-of-buffer characters.
2244 	 */
2245 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2246 	if ( ! b->yy_ch_buf )
2247 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2248 
2249 	b->yy_is_our_buffer = 1;
2250 
2251 	yy_init_buffer( b, file , yyscanner);
2252 
2253 	return b;
2254 }
2255 
2256 /* %if-c++-only */
2257 /* %endif */
2258 
2259 /** Destroy the buffer.
2260  * @param b a buffer created with yy_create_buffer()
2261  * @param yyscanner The scanner object.
2262  */
2263 /* %if-c-only */
yy_delete_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2264     void yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
2265 /* %endif */
2266 /* %if-c++-only */
2267 /* %endif */
2268 {
2269     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2270 
2271 	if ( ! b )
2272 		return;
2273 
2274 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2275 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2276 
2277 	if ( b->yy_is_our_buffer )
2278 		yyfree( (void *) b->yy_ch_buf , yyscanner );
2279 
2280 	yyfree( (void *) b , yyscanner );
2281 }
2282 
2283 /* Initializes or reinitializes a buffer.
2284  * This function is sometimes called more than once on the same buffer,
2285  * such as during a yyrestart() or at EOF.
2286  */
2287 /* %if-c-only */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file,yyscan_t yyscanner)2288     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
2289 /* %endif */
2290 /* %if-c++-only */
2291 /* %endif */
2292 
2293 {
2294 	int oerrno = errno;
2295     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2296 
2297 	yy_flush_buffer( b , yyscanner);
2298 
2299 /* %if-c-only */
2300 	b->yy_input_file = file;
2301 /* %endif */
2302 /* %if-c++-only */
2303 /* %endif */
2304 	b->yy_fill_buffer = 1;
2305 
2306     /* If b is the current buffer, then yy_init_buffer was _probably_
2307      * called from yyrestart() or through yy_get_next_buffer.
2308      * In that case, we don't want to reset the lineno or column.
2309      */
2310     if (b != YY_CURRENT_BUFFER){
2311         b->yy_bs_lineno = 1;
2312         b->yy_bs_column = 0;
2313     }
2314 
2315 /* %if-c-only */
2316 
2317         b->yy_is_interactive = 0;
2318 
2319 /* %endif */
2320 /* %if-c++-only */
2321 /* %endif */
2322 	errno = oerrno;
2323 }
2324 
2325 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2326  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2327  * @param yyscanner The scanner object.
2328  */
2329 /* %if-c-only */
yy_flush_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2330     void yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
2331 /* %endif */
2332 /* %if-c++-only */
2333 /* %endif */
2334 {
2335     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2336 	if ( ! b )
2337 		return;
2338 
2339 	b->yy_n_chars = 0;
2340 
2341 	/* We always need two end-of-buffer characters.  The first causes
2342 	 * a transition to the end-of-buffer state.  The second causes
2343 	 * a jam in that state.
2344 	 */
2345 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2346 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2347 
2348 	b->yy_buf_pos = &b->yy_ch_buf[0];
2349 
2350 	b->yy_at_bol = 1;
2351 	b->yy_buffer_status = YY_BUFFER_NEW;
2352 
2353 	if ( b == YY_CURRENT_BUFFER )
2354 		yy_load_buffer_state( yyscanner );
2355 }
2356 
2357 /* %if-c-or-c++ */
2358 /** Pushes the new state onto the stack. The new state becomes
2359  *  the current state. This function will allocate the stack
2360  *  if necessary.
2361  *  @param new_buffer The new state.
2362  *  @param yyscanner The scanner object.
2363  */
2364 /* %if-c-only */
yypush_buffer_state(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2365 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2366 /* %endif */
2367 /* %if-c++-only */
2368 /* %endif */
2369 {
2370     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2371 	if (new_buffer == NULL)
2372 		return;
2373 
2374 	yyensure_buffer_stack(yyscanner);
2375 
2376 	/* This block is copied from yy_switch_to_buffer. */
2377 	if ( YY_CURRENT_BUFFER )
2378 		{
2379 		/* Flush out information for old buffer. */
2380 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
2381 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2382 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2383 		}
2384 
2385 	/* Only push if top exists. Otherwise, replace top. */
2386 	if (YY_CURRENT_BUFFER)
2387 		yyg->yy_buffer_stack_top++;
2388 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2389 
2390 	/* copied from yy_switch_to_buffer. */
2391 	yy_load_buffer_state( yyscanner );
2392 	yyg->yy_did_buffer_switch_on_eof = 1;
2393 }
2394 /* %endif */
2395 
2396 /* %if-c-or-c++ */
2397 /** Removes and deletes the top of the stack, if present.
2398  *  The next element becomes the new top.
2399  *  @param yyscanner The scanner object.
2400  */
2401 /* %if-c-only */
yypop_buffer_state(yyscan_t yyscanner)2402 void yypop_buffer_state (yyscan_t yyscanner)
2403 /* %endif */
2404 /* %if-c++-only */
2405 /* %endif */
2406 {
2407     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2408 	if (!YY_CURRENT_BUFFER)
2409 		return;
2410 
2411 	yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2412 	YY_CURRENT_BUFFER_LVALUE = NULL;
2413 	if (yyg->yy_buffer_stack_top > 0)
2414 		--yyg->yy_buffer_stack_top;
2415 
2416 	if (YY_CURRENT_BUFFER) {
2417 		yy_load_buffer_state( yyscanner );
2418 		yyg->yy_did_buffer_switch_on_eof = 1;
2419 	}
2420 }
2421 /* %endif */
2422 
2423 /* %if-c-or-c++ */
2424 /* Allocates the stack if it does not exist.
2425  *  Guarantees space for at least one push.
2426  */
2427 /* %if-c-only */
yyensure_buffer_stack(yyscan_t yyscanner)2428 static void yyensure_buffer_stack (yyscan_t yyscanner)
2429 /* %endif */
2430 /* %if-c++-only */
2431 /* %endif */
2432 {
2433 	yy_size_t num_to_alloc;
2434     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2435 
2436 	if (!yyg->yy_buffer_stack) {
2437 
2438 		/* First allocation is just for 2 elements, since we don't know if this
2439 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2440 		 * immediate realloc on the next call.
2441          */
2442       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2443 		yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2444 								(num_to_alloc * sizeof(struct yy_buffer_state*)
2445 								, yyscanner);
2446 		if ( ! yyg->yy_buffer_stack )
2447 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2448 
2449 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2450 
2451 		yyg->yy_buffer_stack_max = num_to_alloc;
2452 		yyg->yy_buffer_stack_top = 0;
2453 		return;
2454 	}
2455 
2456 	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2457 
2458 		/* Increase the buffer to prepare for a possible push. */
2459 		yy_size_t grow_size = 8 /* arbitrary grow size */;
2460 
2461 		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2462 		yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2463 								(yyg->yy_buffer_stack,
2464 								num_to_alloc * sizeof(struct yy_buffer_state*)
2465 								, yyscanner);
2466 		if ( ! yyg->yy_buffer_stack )
2467 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2468 
2469 		/* zero only the new slots.*/
2470 		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2471 		yyg->yy_buffer_stack_max = num_to_alloc;
2472 	}
2473 }
2474 /* %endif */
2475 
2476 /* %if-c-only */
2477 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2478  * @param base the character buffer
2479  * @param size the size in bytes of the character buffer
2480  * @param yyscanner The scanner object.
2481  * @return the newly allocated buffer state object.
2482  */
yy_scan_buffer(char * base,yy_size_t size,yyscan_t yyscanner)2483 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
2484 {
2485 	YY_BUFFER_STATE b;
2486 
2487 	if ( size < 2 ||
2488 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
2489 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
2490 		/* They forgot to leave room for the EOB's. */
2491 		return NULL;
2492 
2493 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2494 	if ( ! b )
2495 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2496 
2497 	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
2498 	b->yy_buf_pos = b->yy_ch_buf = base;
2499 	b->yy_is_our_buffer = 0;
2500 	b->yy_input_file = NULL;
2501 	b->yy_n_chars = b->yy_buf_size;
2502 	b->yy_is_interactive = 0;
2503 	b->yy_at_bol = 1;
2504 	b->yy_fill_buffer = 0;
2505 	b->yy_buffer_status = YY_BUFFER_NEW;
2506 
2507 	yy_switch_to_buffer( b , yyscanner );
2508 
2509 	return b;
2510 }
2511 /* %endif */
2512 
2513 /* %if-c-only */
2514 /** Setup the input buffer state to scan a string. The next call to yylex() will
2515  * scan from a @e copy of @a str.
2516  * @param yystr a NUL-terminated string to scan
2517  * @param yyscanner The scanner object.
2518  * @return the newly allocated buffer state object.
2519  * @note If you want to scan bytes that may contain NUL values, then use
2520  *       yy_scan_bytes() instead.
2521  */
yy_scan_string(const char * yystr,yyscan_t yyscanner)2522 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
2523 {
2524 
2525 	return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
2526 }
2527 /* %endif */
2528 
2529 /* %if-c-only */
2530 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2531  * scan from a @e copy of @a bytes.
2532  * @param yybytes the byte buffer to scan
2533  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2534  * @param yyscanner The scanner object.
2535  * @return the newly allocated buffer state object.
2536  */
yy_scan_bytes(const char * yybytes,int _yybytes_len,yyscan_t yyscanner)2537 YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
2538 {
2539 	YY_BUFFER_STATE b;
2540 	char *buf;
2541 	yy_size_t n;
2542 	int i;
2543 
2544 	/* Get memory for full buffer, including space for trailing EOB's. */
2545 	n = (yy_size_t) (_yybytes_len + 2);
2546 	buf = (char *) yyalloc( n , yyscanner );
2547 	if ( ! buf )
2548 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2549 
2550 	for ( i = 0; i < _yybytes_len; ++i )
2551 		buf[i] = yybytes[i];
2552 
2553 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2554 
2555 	b = yy_scan_buffer( buf, n , yyscanner);
2556 	if ( ! b )
2557 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2558 
2559 	/* It's okay to grow etc. this buffer, and we should throw it
2560 	 * away when we're done.
2561 	 */
2562 	b->yy_is_our_buffer = 1;
2563 
2564 	return b;
2565 }
2566 /* %endif */
2567 
2568 #ifndef YY_EXIT_FAILURE
2569 #define YY_EXIT_FAILURE 2
2570 #endif
2571 
2572 /* %if-c-only */
yy_fatal_error(const char * msg,yyscan_t yyscanner)2573 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2574 {
2575 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2576 	(void)yyg;
2577 	fprintf( stderr, "%s\n", msg );
2578 	exit( YY_EXIT_FAILURE );
2579 }
2580 /* %endif */
2581 /* %if-c++-only */
2582 /* %endif */
2583 
2584 /* Redefine yyless() so it works in section 3 code. */
2585 
2586 #undef yyless
2587 #define yyless(n) \
2588 	do \
2589 		{ \
2590 		/* Undo effects of setting up yytext. */ \
2591         int yyless_macro_arg = (n); \
2592         YY_LESS_LINENO(yyless_macro_arg);\
2593 		yytext[yyleng] = yyg->yy_hold_char; \
2594 		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2595 		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2596 		*yyg->yy_c_buf_p = '\0'; \
2597 		yyleng = yyless_macro_arg; \
2598 		} \
2599 	while ( 0 )
2600 
2601 /* Accessor  methods (get/set functions) to struct members. */
2602 
2603 /* %if-c-only */
2604 /* %if-reentrant */
2605 
2606 /** Get the user-defined data for this scanner.
2607  * @param yyscanner The scanner object.
2608  */
yyget_extra(yyscan_t yyscanner)2609 YY_EXTRA_TYPE yyget_extra  (yyscan_t yyscanner)
2610 {
2611     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2612     return yyextra;
2613 }
2614 
2615 /* %endif */
2616 
2617 /** Get the current line number.
2618  * @param yyscanner The scanner object.
2619  */
yyget_lineno(yyscan_t yyscanner)2620 int yyget_lineno  (yyscan_t yyscanner)
2621 {
2622     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2623 
2624         if (! YY_CURRENT_BUFFER)
2625             return 0;
2626 
2627     return yylineno;
2628 }
2629 
2630 /** Get the current column number.
2631  * @param yyscanner The scanner object.
2632  */
yyget_column(yyscan_t yyscanner)2633 int yyget_column  (yyscan_t yyscanner)
2634 {
2635     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2636 
2637         if (! YY_CURRENT_BUFFER)
2638             return 0;
2639 
2640     return yycolumn;
2641 }
2642 
2643 /** Get the input stream.
2644  * @param yyscanner The scanner object.
2645  */
yyget_in(yyscan_t yyscanner)2646 FILE *yyget_in  (yyscan_t yyscanner)
2647 {
2648     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2649     return yyin;
2650 }
2651 
2652 /** Get the output stream.
2653  * @param yyscanner The scanner object.
2654  */
yyget_out(yyscan_t yyscanner)2655 FILE *yyget_out  (yyscan_t yyscanner)
2656 {
2657     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2658     return yyout;
2659 }
2660 
2661 /** Get the length of the current token.
2662  * @param yyscanner The scanner object.
2663  */
yyget_leng(yyscan_t yyscanner)2664 int yyget_leng  (yyscan_t yyscanner)
2665 {
2666     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2667     return yyleng;
2668 }
2669 
2670 /** Get the current token.
2671  * @param yyscanner The scanner object.
2672  */
2673 
yyget_text(yyscan_t yyscanner)2674 char *yyget_text  (yyscan_t yyscanner)
2675 {
2676     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2677     return yytext;
2678 }
2679 
2680 /* %if-reentrant */
2681 
2682 /** Set the user-defined data. This data is never touched by the scanner.
2683  * @param user_defined The data to be associated with this scanner.
2684  * @param yyscanner The scanner object.
2685  */
yyset_extra(YY_EXTRA_TYPE user_defined,yyscan_t yyscanner)2686 void yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
2687 {
2688     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2689     yyextra = user_defined ;
2690 }
2691 
2692 /* %endif */
2693 
2694 /** Set the current line number.
2695  * @param _line_number line number
2696  * @param yyscanner The scanner object.
2697  */
yyset_lineno(int _line_number,yyscan_t yyscanner)2698 void yyset_lineno (int  _line_number , yyscan_t yyscanner)
2699 {
2700     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2701 
2702         /* lineno is only valid if an input buffer exists. */
2703         if (! YY_CURRENT_BUFFER )
2704            YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2705 
2706     yylineno = _line_number;
2707 }
2708 
2709 /** Set the current column.
2710  * @param _column_no column number
2711  * @param yyscanner The scanner object.
2712  */
yyset_column(int _column_no,yyscan_t yyscanner)2713 void yyset_column (int  _column_no , yyscan_t yyscanner)
2714 {
2715     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2716 
2717         /* column is only valid if an input buffer exists. */
2718         if (! YY_CURRENT_BUFFER )
2719            YY_FATAL_ERROR( "yyset_column called with no buffer" );
2720 
2721     yycolumn = _column_no;
2722 }
2723 
2724 /** Set the input stream. This does not discard the current
2725  * input buffer.
2726  * @param _in_str A readable stream.
2727  * @param yyscanner The scanner object.
2728  * @see yy_switch_to_buffer
2729  */
yyset_in(FILE * _in_str,yyscan_t yyscanner)2730 void yyset_in (FILE *  _in_str , yyscan_t yyscanner)
2731 {
2732     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2733     yyin = _in_str ;
2734 }
2735 
yyset_out(FILE * _out_str,yyscan_t yyscanner)2736 void yyset_out (FILE *  _out_str , yyscan_t yyscanner)
2737 {
2738     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2739     yyout = _out_str ;
2740 }
2741 
yyget_debug(yyscan_t yyscanner)2742 int yyget_debug  (yyscan_t yyscanner)
2743 {
2744     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2745     return yy_flex_debug;
2746 }
2747 
yyset_debug(int _bdebug,yyscan_t yyscanner)2748 void yyset_debug (int  _bdebug , yyscan_t yyscanner)
2749 {
2750     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2751     yy_flex_debug = _bdebug ;
2752 }
2753 
2754 /* %endif */
2755 
2756 /* %if-reentrant */
2757 /* Accessor methods for yylval and yylloc */
2758 
2759 /* %if-bison-bridge */
2760 
yyget_lval(yyscan_t yyscanner)2761 YYSTYPE * yyget_lval  (yyscan_t yyscanner)
2762 {
2763     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2764     return yylval;
2765 }
2766 
yyset_lval(YYSTYPE * yylval_param,yyscan_t yyscanner)2767 void yyset_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
2768 {
2769     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2770     yylval = yylval_param;
2771 }
2772 
yyget_lloc(yyscan_t yyscanner)2773 YYLTYPE *yyget_lloc  (yyscan_t yyscanner)
2774 {
2775     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2776     return yylloc;
2777 }
2778 
yyset_lloc(YYLTYPE * yylloc_param,yyscan_t yyscanner)2779 void yyset_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
2780 {
2781     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2782     yylloc = yylloc_param;
2783 }
2784 
2785 /* %endif */
2786 
2787 /* User-visible API */
2788 
2789 /* yylex_init is special because it creates the scanner itself, so it is
2790  * the ONLY reentrant function that doesn't take the scanner as the last argument.
2791  * That's why we explicitly handle the declaration, instead of using our macros.
2792  */
yylex_init(yyscan_t * ptr_yy_globals)2793 int yylex_init(yyscan_t* ptr_yy_globals)
2794 {
2795     if (ptr_yy_globals == NULL){
2796         errno = EINVAL;
2797         return 1;
2798     }
2799 
2800     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2801 
2802     if (*ptr_yy_globals == NULL){
2803         errno = ENOMEM;
2804         return 1;
2805     }
2806 
2807     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2808     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2809 
2810     return yy_init_globals ( *ptr_yy_globals );
2811 }
2812 
2813 /* yylex_init_extra has the same functionality as yylex_init, but follows the
2814  * convention of taking the scanner as the last argument. Note however, that
2815  * this is a *pointer* to a scanner, as it will be allocated by this call (and
2816  * is the reason, too, why this function also must handle its own declaration).
2817  * The user defined value in the first argument will be available to yyalloc in
2818  * the yyextra field.
2819  */
yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t * ptr_yy_globals)2820 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2821 {
2822     struct yyguts_t dummy_yyguts;
2823 
2824     yyset_extra (yy_user_defined, &dummy_yyguts);
2825 
2826     if (ptr_yy_globals == NULL){
2827         errno = EINVAL;
2828         return 1;
2829     }
2830 
2831     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2832 
2833     if (*ptr_yy_globals == NULL){
2834         errno = ENOMEM;
2835         return 1;
2836     }
2837 
2838     /* By setting to 0xAA, we expose bugs in
2839     yy_init_globals. Leave at 0x00 for releases. */
2840     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2841 
2842     yyset_extra (yy_user_defined, *ptr_yy_globals);
2843 
2844     return yy_init_globals ( *ptr_yy_globals );
2845 }
2846 
2847 /* %endif if-c-only */
2848 
2849 /* %if-c-only */
yy_init_globals(yyscan_t yyscanner)2850 static int yy_init_globals (yyscan_t yyscanner)
2851 {
2852     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2853     /* Initialization is the same as for the non-reentrant scanner.
2854      * This function is called from yylex_destroy(), so don't allocate here.
2855      */
2856 
2857     yyg->yy_buffer_stack = NULL;
2858     yyg->yy_buffer_stack_top = 0;
2859     yyg->yy_buffer_stack_max = 0;
2860     yyg->yy_c_buf_p = NULL;
2861     yyg->yy_init = 0;
2862     yyg->yy_start = 0;
2863 
2864     yyg->yy_start_stack_ptr = 0;
2865     yyg->yy_start_stack_depth = 0;
2866     yyg->yy_start_stack =  NULL;
2867 
2868 /* Defined in main.c */
2869 #ifdef YY_STDINIT
2870     yyin = stdin;
2871     yyout = stdout;
2872 #else
2873     yyin = NULL;
2874     yyout = NULL;
2875 #endif
2876 
2877     /* For future reference: Set errno on error, since we are called by
2878      * yylex_init()
2879      */
2880     return 0;
2881 }
2882 /* %endif */
2883 
2884 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
2885 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(yyscan_t yyscanner)2886 int yylex_destroy  (yyscan_t yyscanner)
2887 {
2888     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2889 
2890     /* Pop the buffer stack, destroying each element. */
2891 	while(YY_CURRENT_BUFFER){
2892 		yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2893 		YY_CURRENT_BUFFER_LVALUE = NULL;
2894 		yypop_buffer_state(yyscanner);
2895 	}
2896 
2897 	/* Destroy the stack itself. */
2898 	yyfree(yyg->yy_buffer_stack , yyscanner);
2899 	yyg->yy_buffer_stack = NULL;
2900 
2901     /* Destroy the start condition stack. */
2902         yyfree( yyg->yy_start_stack , yyscanner );
2903         yyg->yy_start_stack = NULL;
2904 
2905     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2906      * yylex() is called, initialization will occur. */
2907     yy_init_globals( yyscanner);
2908 
2909 /* %if-reentrant */
2910     /* Destroy the main struct (reentrant only). */
2911     yyfree ( yyscanner , yyscanner );
2912     yyscanner = NULL;
2913 /* %endif */
2914     return 0;
2915 }
2916 /* %endif */
2917 
2918 /*
2919  * Internal utility routines.
2920  */
2921 
2922 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n,yyscan_t yyscanner)2923 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2924 {
2925 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2926 	(void)yyg;
2927 
2928 	int i;
2929 	for ( i = 0; i < n; ++i )
2930 		s1[i] = s2[i];
2931 }
2932 #endif
2933 
2934 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s,yyscan_t yyscanner)2935 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2936 {
2937 	int n;
2938 	for ( n = 0; s[n]; ++n )
2939 		;
2940 
2941 	return n;
2942 }
2943 #endif
2944 
yyalloc(yy_size_t size,yyscan_t yyscanner)2945 void *yyalloc (yy_size_t  size , yyscan_t yyscanner)
2946 {
2947 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2948 	(void)yyg;
2949 	return malloc(size);
2950 }
2951 
yyrealloc(void * ptr,yy_size_t size,yyscan_t yyscanner)2952 void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
2953 {
2954 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2955 	(void)yyg;
2956 
2957 	/* The cast to (char *) in the following accommodates both
2958 	 * implementations that use char* generic pointers, and those
2959 	 * that use void* generic pointers.  It works with the latter
2960 	 * because both ANSI C and C++ allow castless assignment from
2961 	 * any pointer type to void*, and deal with argument conversions
2962 	 * as though doing an assignment.
2963 	 */
2964 	return realloc(ptr, size);
2965 }
2966 
yyfree(void * ptr,yyscan_t yyscanner)2967 void yyfree (void * ptr , yyscan_t yyscanner)
2968 {
2969 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2970 	(void)yyg;
2971 	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
2972 }
2973 
2974 /* %if-tables-serialization definitions */
2975 /* %define-yytables   The name for this specific scanner's tables. */
2976 #define YYTABLES_NAME "yytables"
2977 /* %endif */
2978 
2979 /* %ok-for-header */
2980 
2981 #line 153 "mk-scanner.l"
2982 
2983 
2984 /* Private functions
2985  *---------------------------------------------------------------------------*/
2986 
2987 static gint
mkp_scanner_parse_end(MkpScanner * scanner)2988 mkp_scanner_parse_end (MkpScanner *scanner)
2989 {
2990     yypop_buffer_state(scanner->scanner);
2991     scanner->stream = anjuta_token_stream_pop (scanner->stream);
2992 
2993     if (scanner->stream == NULL)
2994     {
2995         yyterminate();
2996     }
2997     else
2998     {
2999         return 1;
3000     }
3001 }
3002 
3003 /* Parser functions
3004  *---------------------------------------------------------------------------*/
3005 
3006 void
mkp_yyerror(YYLTYPE * loc,MkpScanner * scanner,char const * s)3007 mkp_yyerror (YYLTYPE *loc, MkpScanner *scanner, char const *s)
3008 {
3009     AnjutaTokenFileLocation location;
3010 
3011     //g_message ("error at %d  error at * %d string \"%s\"", anjuta_token_get_type((AnjutaToken *)loc), anjuta_token_get_type(*loc), anjuta_token_get_string ((AnjutaToken *loc));
3012     if (mkp_project_get_token_location (scanner->project, &location, *loc))
3013     {
3014         g_message ("%s:%d.%d %s\n", location.filename, location.line, location.column, s);
3015         g_free (location.filename);
3016     }
3017     else
3018     {
3019         g_message ("%s \n", s);
3020     }
3021 }
3022 
3023 void
mkp_scanner_update_variable(MkpScanner * scanner,AnjutaToken * variable)3024 mkp_scanner_update_variable (MkpScanner *scanner, AnjutaToken *variable)
3025 {
3026     mkp_project_update_variable (scanner->project, variable);
3027 }
3028 
3029 void
mkp_scanner_add_rule(MkpScanner * scanner,AnjutaToken * rule)3030 mkp_scanner_add_rule (MkpScanner *scanner, AnjutaToken *rule)
3031 {
3032     mkp_project_add_rule (scanner->project, rule);
3033 }
3034 
3035 void
mkp_scanner_parse_variable(MkpScanner * scanner,AnjutaToken * variable)3036 mkp_scanner_parse_variable (MkpScanner *scanner, AnjutaToken *variable)
3037 {
3038     AnjutaToken *group;
3039     AnjutaToken *content;
3040 
3041     anjuta_token_set_type (variable, ANJUTA_TOKEN_VARIABLE);
3042     content = anjuta_token_new_static (ANJUTA_TOKEN_CONTENT, NULL);
3043     anjuta_token_stream_append_token (scanner->stream, content);
3044 
3045     group = mkp_project_get_variable_token (scanner->project, variable);
3046     //fprintf(stdout, "get variable %s is %p\n", anjuta_token_evaluate (variable), group);
3047     if (group != NULL)
3048     {
3049         //AnjutaToken *token;
3050 
3051         //anjuta_token_dump (group);
3052         //token = anjuta_token_group_into_token (group);
3053         //anjuta_token_set_type (token, ANJUTA_TOKEN_CONTENT);
3054         //anjuta_token_dump (token);
3055         //fprintf (stdout,"variable %s\n", anjuta_token_get_string (variable));
3056         //anjuta_token_dump (group);
3057         mkp_scanner_parse_token (scanner, group, NULL);
3058         //anjuta_token_free (token);
3059     }
3060 }
3061 
3062 /* Public functions
3063  *---------------------------------------------------------------------------*/
3064 
3065 AnjutaToken *
mkp_scanner_parse_token(MkpScanner * scanner,AnjutaToken * token,GError ** error)3066 mkp_scanner_parse_token (MkpScanner *scanner, AnjutaToken *token, GError **error)
3067 {
3068     AnjutaToken *first;
3069     AnjutaTokenStream *stream;
3070 
3071     stream = anjuta_token_stream_push (scanner->stream, NULL, token, NULL);
3072     first = anjuta_token_stream_get_root (stream);
3073 
3074     if (scanner->stream != NULL)
3075     {
3076         /* Parse an included file or a expanded variable */
3077 
3078         scanner->stream = stream;
3079         yypush_buffer_state(yy_create_buffer(NULL, YY_BUF_SIZE, scanner->scanner), scanner->scanner);
3080     }
3081     else
3082     {
3083         mkp_yypstate *ps;
3084         gint status;
3085 
3086         scanner->stream = stream;
3087         ps = mkp_yypstate_new ();
3088         do
3089         {
3090 	        YYSTYPE yylval_param;
3091     	    YYLTYPE yylloc_param;
3092             gint yychar = mkp_mk_yylex (&yylval_param, &yylloc_param, scanner->scanner);
3093 
3094             yylloc_param = yylval_param;
3095             status = mkp_yypush_parse (ps, yychar, &yylval_param, &yylloc_param, scanner);
3096         } while (status == YYPUSH_MORE);
3097         mkp_yypstate_delete (ps);
3098     }
3099 
3100     return first;
3101 }
3102 
3103 /* Constructor & Destructor
3104  *---------------------------------------------------------------------------*/
3105 
3106 MkpScanner *
mkp_scanner_new(MkpProject * project)3107 mkp_scanner_new (MkpProject *project)
3108 {
3109 	MkpScanner *scanner;
3110 
3111 	scanner = g_new0 (MkpScanner, 1);
3112 
3113     yylex_init(&scanner->scanner);
3114     yyset_extra (scanner, scanner->scanner);
3115 
3116     scanner->project = project;
3117 
3118 	return scanner;
3119 };
3120 
3121 void
mkp_scanner_free(MkpScanner * scanner)3122 mkp_scanner_free (MkpScanner *scanner)
3123 {
3124 	g_return_if_fail (scanner != NULL);
3125 
3126     yylex_destroy(scanner->scanner);
3127 
3128 	g_free (scanner);
3129 }
3130 
3131