1 #line 1 "ac-scanner.c"
2 
3 #line 3 "ac-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 amp_ac_yy_create_buffer_ALREADY_DEFINED
30 #else
31 #define yy_create_buffer amp_ac_yy_create_buffer
32 #endif
33 
34 #ifdef yy_delete_buffer
35 #define amp_ac_yy_delete_buffer_ALREADY_DEFINED
36 #else
37 #define yy_delete_buffer amp_ac_yy_delete_buffer
38 #endif
39 
40 #ifdef yy_scan_buffer
41 #define amp_ac_yy_scan_buffer_ALREADY_DEFINED
42 #else
43 #define yy_scan_buffer amp_ac_yy_scan_buffer
44 #endif
45 
46 #ifdef yy_scan_string
47 #define amp_ac_yy_scan_string_ALREADY_DEFINED
48 #else
49 #define yy_scan_string amp_ac_yy_scan_string
50 #endif
51 
52 #ifdef yy_scan_bytes
53 #define amp_ac_yy_scan_bytes_ALREADY_DEFINED
54 #else
55 #define yy_scan_bytes amp_ac_yy_scan_bytes
56 #endif
57 
58 #ifdef yy_init_buffer
59 #define amp_ac_yy_init_buffer_ALREADY_DEFINED
60 #else
61 #define yy_init_buffer amp_ac_yy_init_buffer
62 #endif
63 
64 #ifdef yy_flush_buffer
65 #define amp_ac_yy_flush_buffer_ALREADY_DEFINED
66 #else
67 #define yy_flush_buffer amp_ac_yy_flush_buffer
68 #endif
69 
70 #ifdef yy_load_buffer_state
71 #define amp_ac_yy_load_buffer_state_ALREADY_DEFINED
72 #else
73 #define yy_load_buffer_state amp_ac_yy_load_buffer_state
74 #endif
75 
76 #ifdef yy_switch_to_buffer
77 #define amp_ac_yy_switch_to_buffer_ALREADY_DEFINED
78 #else
79 #define yy_switch_to_buffer amp_ac_yy_switch_to_buffer
80 #endif
81 
82 #ifdef yypush_buffer_state
83 #define amp_ac_yypush_buffer_state_ALREADY_DEFINED
84 #else
85 #define yypush_buffer_state amp_ac_yypush_buffer_state
86 #endif
87 
88 #ifdef yypop_buffer_state
89 #define amp_ac_yypop_buffer_state_ALREADY_DEFINED
90 #else
91 #define yypop_buffer_state amp_ac_yypop_buffer_state
92 #endif
93 
94 #ifdef yyensure_buffer_stack
95 #define amp_ac_yyensure_buffer_stack_ALREADY_DEFINED
96 #else
97 #define yyensure_buffer_stack amp_ac_yyensure_buffer_stack
98 #endif
99 
100 #ifdef yylex
101 #define amp_ac_yylex_ALREADY_DEFINED
102 #else
103 #define yylex amp_ac_yylex
104 #endif
105 
106 #ifdef yyrestart
107 #define amp_ac_yyrestart_ALREADY_DEFINED
108 #else
109 #define yyrestart amp_ac_yyrestart
110 #endif
111 
112 #ifdef yylex_init
113 #define amp_ac_yylex_init_ALREADY_DEFINED
114 #else
115 #define yylex_init amp_ac_yylex_init
116 #endif
117 
118 #ifdef yylex_init_extra
119 #define amp_ac_yylex_init_extra_ALREADY_DEFINED
120 #else
121 #define yylex_init_extra amp_ac_yylex_init_extra
122 #endif
123 
124 #ifdef yylex_destroy
125 #define amp_ac_yylex_destroy_ALREADY_DEFINED
126 #else
127 #define yylex_destroy amp_ac_yylex_destroy
128 #endif
129 
130 #ifdef yyget_debug
131 #define amp_ac_yyget_debug_ALREADY_DEFINED
132 #else
133 #define yyget_debug amp_ac_yyget_debug
134 #endif
135 
136 #ifdef yyset_debug
137 #define amp_ac_yyset_debug_ALREADY_DEFINED
138 #else
139 #define yyset_debug amp_ac_yyset_debug
140 #endif
141 
142 #ifdef yyget_extra
143 #define amp_ac_yyget_extra_ALREADY_DEFINED
144 #else
145 #define yyget_extra amp_ac_yyget_extra
146 #endif
147 
148 #ifdef yyset_extra
149 #define amp_ac_yyset_extra_ALREADY_DEFINED
150 #else
151 #define yyset_extra amp_ac_yyset_extra
152 #endif
153 
154 #ifdef yyget_in
155 #define amp_ac_yyget_in_ALREADY_DEFINED
156 #else
157 #define yyget_in amp_ac_yyget_in
158 #endif
159 
160 #ifdef yyset_in
161 #define amp_ac_yyset_in_ALREADY_DEFINED
162 #else
163 #define yyset_in amp_ac_yyset_in
164 #endif
165 
166 #ifdef yyget_out
167 #define amp_ac_yyget_out_ALREADY_DEFINED
168 #else
169 #define yyget_out amp_ac_yyget_out
170 #endif
171 
172 #ifdef yyset_out
173 #define amp_ac_yyset_out_ALREADY_DEFINED
174 #else
175 #define yyset_out amp_ac_yyset_out
176 #endif
177 
178 #ifdef yyget_leng
179 #define amp_ac_yyget_leng_ALREADY_DEFINED
180 #else
181 #define yyget_leng amp_ac_yyget_leng
182 #endif
183 
184 #ifdef yyget_text
185 #define amp_ac_yyget_text_ALREADY_DEFINED
186 #else
187 #define yyget_text amp_ac_yyget_text
188 #endif
189 
190 #ifdef yyget_lineno
191 #define amp_ac_yyget_lineno_ALREADY_DEFINED
192 #else
193 #define yyget_lineno amp_ac_yyget_lineno
194 #endif
195 
196 #ifdef yyset_lineno
197 #define amp_ac_yyset_lineno_ALREADY_DEFINED
198 #else
199 #define yyset_lineno amp_ac_yyset_lineno
200 #endif
201 
202 #ifdef yyget_column
203 #define amp_ac_yyget_column_ALREADY_DEFINED
204 #else
205 #define yyget_column amp_ac_yyget_column
206 #endif
207 
208 #ifdef yyset_column
209 #define amp_ac_yyset_column_ALREADY_DEFINED
210 #else
211 #define yyset_column amp_ac_yyset_column
212 #endif
213 
214 #ifdef yywrap
215 #define amp_ac_yywrap_ALREADY_DEFINED
216 #else
217 #define yywrap amp_ac_yywrap
218 #endif
219 
220 /* %endif */
221 
222 #ifdef yyget_lval
223 #define amp_ac_yyget_lval_ALREADY_DEFINED
224 #else
225 #define yyget_lval amp_ac_yyget_lval
226 #endif
227 
228 #ifdef yyset_lval
229 #define amp_ac_yyset_lval_ALREADY_DEFINED
230 #else
231 #define yyset_lval amp_ac_yyset_lval
232 #endif
233 
234 #ifdef yyget_lloc
235 #define amp_ac_yyget_lloc_ALREADY_DEFINED
236 #else
237 #define yyget_lloc amp_ac_yyget_lloc
238 #endif
239 
240 #ifdef yyset_lloc
241 #define amp_ac_yyset_lloc_ALREADY_DEFINED
242 #else
243 #define yyset_lloc amp_ac_yyset_lloc
244 #endif
245 
246 #ifdef yyalloc
247 #define amp_ac_yyalloc_ALREADY_DEFINED
248 #else
249 #define yyalloc amp_ac_yyalloc
250 #endif
251 
252 #ifdef yyrealloc
253 #define amp_ac_yyrealloc_ALREADY_DEFINED
254 #else
255 #define yyrealloc amp_ac_yyrealloc
256 #endif
257 
258 #ifdef yyfree
259 #define amp_ac_yyfree_ALREADY_DEFINED
260 #else
261 #define yyfree amp_ac_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 amp_ac_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 63
676 #define YY_END_OF_BUFFER 64
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[370] =
685     {   0,
686         0,    0,    0,    0,   64,   57,    1,    3,   10,    4,
687        57,    9,    7,    8,   11,   13,   12,   14,   55,   55,
688        55,   55,   55,    5,   57,    6,   55,   55,   62,   58,
689        58,   60,   60,   60,   61,   62,   57,    1,   56,   55,
690        55,   55,   55,   55,   55,    2,   55,   55,   58,   60,
691        61,   59,   55,   55,   55,   55,   55,   15,   55,   55,
692        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
693        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
694        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
695        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
696 
697        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
698        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
699        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
700        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
701        55,   55,   55,   51,   55,   55,   55,   55,   55,   55,
702        55,   55,   55,   55,   55,   30,   55,   55,   55,   55,
703        55,   55,   55,   55,   55,   55,   55,   50,   55,   55,
704        55,   55,   55,   55,   55,   55,   55,   28,   55,   31,
705        33,   55,   55,   55,   55,   55,   43,   55,   55,   55,
706        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
707 
708        55,   55,   55,   55,   18,   55,   55,   32,   34,   35,
709        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
710        55,   55,   55,   52,   55,   55,   55,   55,   55,   55,
711        55,   55,   55,   55,   55,   55,   55,   55,   36,   37,
712        39,   55,   55,   55,   55,   55,   55,   55,   55,   55,
713        55,   55,   55,   16,   55,   55,   55,   55,   55,   55,
714        55,   55,   55,   55,   55,   55,   55,   42,   55,   55,
715        55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
716        21,   55,   55,   55,   55,   55,   55,   55,   55,   55,
717        45,   55,   55,   55,   55,   55,   55,   55,   55,   17,
718 
719        55,   55,   22,   55,   55,   55,   55,   55,   29,   55,
720        41,   44,   55,   55,   55,   55,   55,   55,   55,   19,
721        55,   55,   55,   55,   55,   55,   40,   55,   55,   55,
722        49,   55,   55,   55,   55,   23,   55,   55,   55,   27,
723        55,   55,   55,   55,   55,   55,   20,   55,   55,   26,
724        55,   46,   55,   38,   55,   55,   24,   55,   55,   48,
725        53,   55,   55,   55,   55,   25,   47,   54,    0
726     } ;
727 
728 static const YY_CHAR yy_ec[256] =
729     {   0,
730         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
731         2,    1,    2,    1,    1,    1,    1,    1,    1,    1,
732         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
733         1,    2,    1,    4,    5,    6,    1,    1,    7,    8,
734         9,    1,    1,   10,    1,    1,    1,   11,   11,   11,
735        11,   12,   11,   11,   11,   11,   11,    1,    1,   13,
736        14,   15,    1,    1,   16,   17,   18,   19,   20,   21,
737        22,   23,   24,   25,   26,   27,   28,   29,   30,   31,
738        32,   33,   34,   35,   36,   37,   37,   38,   39,   40,
739        41,   42,   43,    1,   44,    1,   37,   37,   45,   46,
740 
741        47,   37,   37,   37,   48,   37,   37,   49,   50,   51,
742        37,   37,   37,   37,   37,   37,   52,   37,   37,   37,
743        37,   37,    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         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
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 
752         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
753         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
754         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
755         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
756         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
757         1,    1,    1,    1,    1
758     } ;
759 
760 static const YY_CHAR yy_meta[53] =
761     {   0,
762         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
763         2,    2,    1,    1,    1,    2,    2,    2,    2,    2,
764         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
765         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
766         1,    1,    1,    2,    2,    2,    2,    2,    2,    2,
767         2,    2
768     } ;
769 
770 static const flex_int16_t yy_base[374] =
771     {   0,
772         0,    0,   52,   95,  435,   67,  432,  436,  436,  436,
773         0,  436,  436,  436,  436,  436,  436,  436,   52,    0,
774       398,  397,  405,  436,  427,  436,  378,  416,  436,   69,
775        71,  413,  436,  412,    0,  422,   74,  422,    0,    0,
776       379,  378,  377,  376,  397,  436,  369,  373,   74,  436,
777         0,  436,  123,   59,  385,   58,  371,    0,  366,  380,
778        88,   90,  392,  382,   52,  377,  373,  369,  380,  377,
779       389,  371,  370,  373,  368,   95,  349,  377,  378,  368,
780       378,  362,  374,  377,  368,  366,  355,   94,  372,  357,
781       363,  362,  361,  354,  353,  358,  361,  357,  346,  333,
782 
783       333,  358,  354,  344,  353,  352,  352,  335,  349,  337,
784       334,  344,  331,  344,  346,  327,  332,  338,  337,  323,
785       324,  336,  325,  305,  333,  326,  327,  321,  318,  310,
786       327,  338,  307,  308,  323,  298,  306,  296,  295,  294,
787       302,  292,  291,  326,  313,  314,  309,  278,  300,  284,
788       305,  292,  281,  289,  290,  436,  287,  286,  288,  117,
789       311,   85,  296,  301,  300,  288,  290,  436,  281,  286,
790       267,  264,  293,  100,  264,  272,  283,    0,  261,    0,
791       296,  295,  102,  105,  286,  285,  436,  279,  275,  269,
792       261,  272,  271,  265,  285,  248,  260,  243,  272,  252,
793 
794       267,  262,  252,  138,    0,  264,  249,  436,  436,    0,
795       251,  243,  242,  262,  249,  259,  255,  235,  238,  238,
796       243,  254,  235,  436,  241,  242,  259,  239,  236,  248,
797       246,  232,  237,  240,  243,  225,  241,  221,    0,    0,
798         0,  220,  227,  235,  208,  231,  206,  219,  228,  212,
799       219,  215,  222,  436,  223,  224,  222,  232,  217,  211,
800       221,  218,  217,  215,  214,  202,  207,    0,  195,  185,
801       206,  199,  193,  195,  189,  204,  178,  213,  186,  199,
802       436,  210,  197,  197,  182,  195,  193,  194,  181,  193,
803         0,  174,  188,  191,  162,  175,  174,  167,  184,  436,
804 
805       193,  167,  436,  165,  178,  167,  172,  162,    0,  167,
806         0,    0,  158,  166,  163,  163,  159,  161,  157,  436,
807       152,  177,  151,  139,  149,  173,    0,  145,  159,  148,
808         0,  150,  156,  146,  163,  436,  136,  150,  160,  436,
809       147,  157,  145,  155,  128,  139,  436,  147,  128,  436,
810       113,  436,  129,  436,  140,  121,  436,  109,   99,    0,
811       436,  108,  114,  109,  108,  436,  436,  436,  436,  172,
812        90,   89,   82
813     } ;
814 
815 static const flex_int16_t yy_def[374] =
816     {   0,
817       369,    1,  370,  370,  369,  369,  369,  369,  369,  369,
818       371,  369,  369,  369,  369,  369,  369,  369,  372,  372,
819       372,  372,  372,  369,  369,  369,  372,  372,  369,  369,
820       369,  369,  369,  369,  373,  369,  369,  369,  371,  372,
821       372,  372,  372,  372,  372,  369,  372,  372,  369,  369,
822       373,  369,  372,  372,  372,  372,  372,  372,  372,  372,
823       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
824       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
825       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
826       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
827 
828       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
829       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
830       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
831       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
832       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
833       372,  372,  372,  372,  372,  369,  372,  372,  372,  372,
834       372,  372,  372,  372,  372,  372,  372,  369,  372,  372,
835       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
836       372,  372,  372,  372,  372,  372,  369,  372,  372,  372,
837       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
838 
839       372,  372,  372,  372,  372,  372,  372,  369,  369,  372,
840       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
841       372,  372,  372,  369,  372,  372,  372,  372,  372,  372,
842       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
843       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
844       372,  372,  372,  369,  372,  372,  372,  372,  372,  372,
845       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
846       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
847       369,  372,  372,  372,  372,  372,  372,  372,  372,  372,
848       372,  372,  372,  372,  372,  372,  372,  372,  372,  369,
849 
850       372,  372,  369,  372,  372,  372,  372,  372,  372,  372,
851       372,  372,  372,  372,  372,  372,  372,  372,  372,  369,
852       372,  372,  372,  372,  372,  372,  372,  372,  372,  372,
853       372,  372,  372,  372,  372,  369,  372,  372,  372,  369,
854       372,  372,  372,  372,  372,  372,  369,  372,  372,  369,
855       372,  369,  372,  369,  372,  372,  369,  372,  372,  372,
856       369,  372,  372,  372,  372,  369,  369,  369,    0,  369,
857       369,  369,  369
858     } ;
859 
860 static const flex_int16_t yy_nxt[489] =
861     {   0,
862         6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
863         6,    6,   16,   17,   18,   19,   20,   20,   20,   20,
864        20,   20,   20,   21,   20,   20,   22,   20,   20,   20,
865        23,   20,   20,   20,   20,   20,   20,   20,   20,   20,
866        24,   25,   26,   20,   20,   27,   20,   20,   20,   28,
867        20,   20,   29,   30,   31,   29,   29,   29,   29,   29,
868        29,   29,   29,   29,   32,   33,   34,   37,   86,   41,
869        49,   49,   49,   49,   37,   49,   49,   37,   37,   42,
870        69,   74,   70,   51,   37,   37,   71,   87,   75,   72,
871        40,   39,   29,   36,   29,   29,   30,   31,   29,   29,
872 
873        29,   29,   29,   29,   29,   29,   29,   32,   33,   34,
874        79,   82,   98,  111,  188,  368,  367,   80,  189,  210,
875       200,  366,  201,  112,  213,   99,  202,   83,  214,  365,
876       203,   81,  211,  364,  183,   29,   36,   29,   60,  212,
877        61,  363,   62,  184,  362,   63,   64,  361,  360,  185,
878       359,  358,   65,   66,  357,  186,   67,   68,  233,  356,
879       234,  355,  354,  353,  352,  235,  351,  350,  349,  348,
880       347,  236,   35,   35,  346,  345,  344,  343,  342,  341,
881       340,  339,  338,  337,  336,  335,  334,  333,  332,  331,
882       330,  329,  328,  327,  326,  325,  324,  323,  322,  321,
883 
884       320,  319,  318,  317,  316,  315,  314,  313,  312,  311,
885       310,  309,  308,  307,  306,  305,  304,  303,  302,  301,
886       300,  299,  298,  297,  296,  295,  294,  293,  292,  291,
887       290,  289,  288,  287,  286,  285,  284,  283,  282,  281,
888       280,  279,  278,  277,  276,  275,  274,  273,  272,  271,
889       270,  269,  268,  267,  266,  265,  264,  263,  262,  261,
890       260,  259,  258,  257,  256,  255,  254,  253,  252,  251,
891       250,  249,  248,  247,  246,  245,  244,  243,  242,  241,
892       240,  239,  238,  237,  232,  231,  230,  229,  228,  227,
893       226,  225,  224,  223,  222,  221,  220,  219,  218,  217,
894 
895       216,  215,  209,  208,  207,  206,  205,  204,  199,  198,
896       197,  196,  195,  194,  193,  192,  191,  190,  187,  182,
897       181,  180,  179,  178,  177,  176,  175,  174,  173,  172,
898       171,  170,  169,  168,  167,  166,  165,  164,  163,  162,
899       161,  160,  159,  158,  157,  156,  155,  154,  153,  152,
900       151,  150,  149,  148,  147,  146,  145,  144,  143,  142,
901       141,  140,  139,  138,  137,  136,  135,  134,  133,  132,
902       131,  130,  129,  128,  127,  126,  125,  124,  123,  122,
903       121,  120,  119,  118,  117,  116,  115,  114,  113,  110,
904       109,  108,  107,  106,  105,  104,  103,  102,  101,  100,
905 
906        97,   96,   95,   94,   93,   92,   91,   90,   89,   88,
907        85,   84,   78,   77,   76,   73,   59,   58,   57,   56,
908        55,   54,   53,   38,   52,   50,   50,   48,   47,   46,
909        45,   44,   43,   38,  369,    5,  369,  369,  369,  369,
910       369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
911       369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
912       369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
913       369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
914       369,  369,  369,  369,  369,  369,  369,  369
915     } ;
916 
917 static const flex_int16_t yy_chk[489] =
918     {   0,
919         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
920         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
921         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
922         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
923         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
924         1,    1,    3,    3,    3,    3,    3,    3,    3,    3,
925         3,    3,    3,    3,    3,    3,    3,    6,   65,   19,
926        30,   30,   31,   31,   37,   49,   49,    6,    6,   19,
927        54,   56,   54,  373,   37,   37,   54,   65,   56,   54,
928       372,  371,    3,    3,    3,    4,    4,    4,    4,    4,
929 
930         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
931        61,   62,   76,   88,  162,  365,  364,   61,  162,  183,
932       174,  363,  174,   88,  184,   76,  174,   62,  184,  362,
933       174,   61,  183,  359,  160,    4,    4,    4,   53,  183,
934        53,  358,   53,  160,  356,   53,   53,  355,  353,  160,
935       351,  349,   53,   53,  348,  160,   53,   53,  204,  346,
936       204,  345,  344,  343,  342,  204,  341,  339,  338,  337,
937       335,  204,  370,  370,  334,  333,  332,  330,  329,  328,
938       326,  325,  324,  323,  322,  321,  319,  318,  317,  316,
939       315,  314,  313,  310,  308,  307,  306,  305,  304,  302,
940 
941       301,  299,  298,  297,  296,  295,  294,  293,  292,  290,
942       289,  288,  287,  286,  285,  284,  283,  282,  280,  279,
943       278,  277,  276,  275,  274,  273,  272,  271,  270,  269,
944       267,  266,  265,  264,  263,  262,  261,  260,  259,  258,
945       257,  256,  255,  253,  252,  251,  250,  249,  248,  247,
946       246,  245,  244,  243,  242,  238,  237,  236,  235,  234,
947       233,  232,  231,  230,  229,  228,  227,  226,  225,  223,
948       222,  221,  220,  219,  218,  217,  216,  215,  214,  213,
949       212,  211,  207,  206,  203,  202,  201,  200,  199,  198,
950       197,  196,  195,  194,  193,  192,  191,  190,  189,  188,
951 
952       186,  185,  182,  181,  179,  177,  176,  175,  173,  172,
953       171,  170,  169,  167,  166,  165,  164,  163,  161,  159,
954       158,  157,  155,  154,  153,  152,  151,  150,  149,  148,
955       147,  146,  145,  144,  143,  142,  141,  140,  139,  138,
956       137,  136,  135,  134,  133,  132,  131,  130,  129,  128,
957       127,  126,  125,  124,  123,  122,  121,  120,  119,  118,
958       117,  116,  115,  114,  113,  112,  111,  110,  109,  108,
959       107,  106,  105,  104,  103,  102,  101,  100,   99,   98,
960        97,   96,   95,   94,   93,   92,   91,   90,   89,   87,
961        86,   85,   84,   83,   82,   81,   80,   79,   78,   77,
962 
963        75,   74,   73,   72,   71,   70,   69,   68,   67,   66,
964        64,   63,   60,   59,   57,   55,   48,   47,   45,   44,
965        43,   42,   41,   38,   36,   34,   32,   28,   27,   25,
966        23,   22,   21,    7,    5,  369,  369,  369,  369,  369,
967       369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
968       369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
969       369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
970       369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
971       369,  369,  369,  369,  369,  369,  369,  369
972     } ;
973 
974 /* Table of booleans, true if rule could match eol. */
975 static const flex_int32_t yy_rule_can_match_eol[64] =
976     {   0,
977 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
978     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
979     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
980     0, 0, 0, 0,     };
981 
982 static const flex_int16_t yy_rule_linenum[63] =
983     {   0,
984       104,  106,  108,  110,  112,  114,  116,  118,  120,  122,
985       124,  126,  128,  130,  132,  134,  136,  138,  140,  142,
986       144,  146,  148,  150,  152,  154,  156,  158,  160,  162,
987       164,  166,  168,  170,  172,  174,  176,  178,  180,  182,
988       184,  186,  188,  190,  192,  194,  196,  198,  200,  202,
989       204,  206,  208,  210,  212,  214,  216,  222,  224,  226,
990       228,  230
991     } ;
992 
993 /* The intent behind this definition is that it'll catch
994  * any uses of REJECT which flex missed.
995  */
996 #define REJECT reject_used_but_not_detected
997 #define yymore() yymore_used_but_not_detected
998 #define YY_MORE_ADJ 0
999 #define YY_RESTORE_YY_MORE_OFFSET
1000 #line 1 "ac-scanner.l"
1001 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
1002 /*
1003  * ac-scanner.l
1004  * Copyright (C) Sébastien Granjoux 2009 <seb.sfo@free.fr>
1005  *
1006  * main.c is free software: you can redistribute it and/or modify it
1007  * under the terms of the GNU General Public License as published by the
1008  * Free Software Foundation, either version 3 of the License, or
1009  * (at your option) any later version.
1010  *
1011  * main.c is distributed in the hope that it will be useful, but
1012  * WITHOUT ANY WARRANTY; without even the implied warranty of
1013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1014  * See the GNU General Public License for more details.
1015  *
1016  * You should have received a copy of the GNU General Public License along
1017  * with this program.  If not, see <http://www.gnu.org/licenses/>.
1018  */
1019 #line 21 "ac-scanner.l"
1020 
1021 #include "ac-scanner.h"
1022 #include "ac-parser.h"
1023 #include "amp-source.h"
1024 
1025 #include "libanjuta/anjuta-debug.h"
1026 #include "libanjuta/anjuta-token-stream.h"
1027 
1028 #include <stdlib.h>
1029 #include <string.h>
1030 
1031 #define YY_INPUT(buffer, result, max_size) result = anjuta_token_stream_read (yyextra->stream, buffer, max_size)
1032 
1033 #define YY_EXTRA_TYPE  AmpAcScanner*
1034 
1035 #define YY_DECL static int ac_yylex (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner)
1036 
1037 //#define YY_USER_INIT {yy_flex_debug = 1;}
1038 
1039 static gint amp_ac_scanner_parse_end (AmpAcScanner *scanner);
1040 
1041 #define RETURN(tok) *yylval = anjuta_token_stream_tokenize (yyextra->stream, tok, yyleng); \
1042                     return tok
1043 
1044 struct _AmpAcScanner
1045 {
1046     yyscan_t scanner;
1047 
1048     AnjutaTokenStream *stream;
1049 
1050     AmpProject *project;
1051 
1052     AnjutaToken *parsed;
1053 
1054 	gboolean eof;		/* TRUE to emit EOF at the end */
1055 
1056 	GHashTable *variables;
1057 };
1058 
1059 
1060 #line 1060 "ac-scanner.c"
1061 /* Remove some warnings */
1062 #define YY_NO_INPUT 1
1063 /* Necessary because autotools wrapper always looks for a file named "lex.yy.c",
1064  * not "lex.amp_ac_yy.c"
1065 %option outfile="lex.yy.c"*/
1066 
1067 #line 1067 "ac-scanner.c"
1068 
1069 #define INITIAL 0
1070 #define SPACE_LIST 1
1071 
1072 #ifndef YY_NO_UNISTD_H
1073 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1074  * down here because we want the user's section 1 to have been scanned first.
1075  * The user has a chance to override it with an option.
1076  */
1077 /* %if-c-only */
1078 #include <unistd.h>
1079 /* %endif */
1080 /* %if-c++-only */
1081 /* %endif */
1082 #endif
1083 
1084 #ifndef YY_EXTRA_TYPE
1085 #define YY_EXTRA_TYPE void *
1086 #endif
1087 
1088 /* %if-c-only Reentrant structure and macros (non-C++). */
1089 /* %if-reentrant */
1090 
1091 /* Holds the entire state of the reentrant scanner. */
1092 struct yyguts_t
1093     {
1094 
1095     /* User-defined. Not touched by flex. */
1096     YY_EXTRA_TYPE yyextra_r;
1097 
1098     /* The rest are the same as the globals declared in the non-reentrant scanner. */
1099     FILE *yyin_r, *yyout_r;
1100     size_t yy_buffer_stack_top; /**< index of top of stack. */
1101     size_t yy_buffer_stack_max; /**< capacity of stack. */
1102     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1103     char yy_hold_char;
1104     int yy_n_chars;
1105     int yyleng_r;
1106     char *yy_c_buf_p;
1107     int yy_init;
1108     int yy_start;
1109     int yy_did_buffer_switch_on_eof;
1110     int yy_start_stack_ptr;
1111     int yy_start_stack_depth;
1112     int *yy_start_stack;
1113     yy_state_type yy_last_accepting_state;
1114     char* yy_last_accepting_cpos;
1115 
1116     int yylineno_r;
1117     int yy_flex_debug_r;
1118 
1119     char *yytext_r;
1120     int yy_more_flag;
1121     int yy_more_len;
1122 
1123     YYSTYPE * yylval_r;
1124 
1125     YYLTYPE * yylloc_r;
1126 
1127     }; /* end struct yyguts_t */
1128 
1129 /* %if-c-only */
1130 
1131 static int yy_init_globals ( yyscan_t yyscanner );
1132 
1133 /* %endif */
1134 
1135 /* %if-reentrant */
1136 
1137     /* This must go here because YYSTYPE and YYLTYPE are included
1138      * from bison output in section 1.*/
1139     #    define yylval yyg->yylval_r
1140 
1141     #    define yylloc yyg->yylloc_r
1142 
1143 int yylex_init (yyscan_t* scanner);
1144 
1145 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1146 
1147 /* %endif */
1148 
1149 /* %endif End reentrant structures and macros. */
1150 
1151 /* Accessor methods to globals.
1152    These are made visible to non-reentrant scanners for convenience. */
1153 
1154 int yylex_destroy ( yyscan_t yyscanner );
1155 
1156 int yyget_debug ( yyscan_t yyscanner );
1157 
1158 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1159 
1160 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1161 
1162 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1163 
1164 FILE *yyget_in ( yyscan_t yyscanner );
1165 
1166 void yyset_in  ( FILE * _in_str , yyscan_t yyscanner );
1167 
1168 FILE *yyget_out ( yyscan_t yyscanner );
1169 
1170 void yyset_out  ( FILE * _out_str , yyscan_t yyscanner );
1171 
1172 			int yyget_leng ( yyscan_t yyscanner );
1173 
1174 char *yyget_text ( yyscan_t yyscanner );
1175 
1176 int yyget_lineno ( yyscan_t yyscanner );
1177 
1178 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1179 
1180 int yyget_column  ( yyscan_t yyscanner );
1181 
1182 void yyset_column ( int _column_no , yyscan_t yyscanner );
1183 
1184 /* %if-bison-bridge */
1185 
1186 YYSTYPE * yyget_lval ( yyscan_t yyscanner );
1187 
1188 void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1189 
1190        YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
1191 
1192         void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
1193 
1194 /* %endif */
1195 
1196 /* Macros after this point can all be overridden by user definitions in
1197  * section 1.
1198  */
1199 
1200 #ifndef YY_SKIP_YYWRAP
1201 #ifdef __cplusplus
1202 extern "C" int yywrap ( yyscan_t yyscanner );
1203 #else
1204 extern int yywrap ( yyscan_t yyscanner );
1205 #endif
1206 #endif
1207 
1208 /* %not-for-header */
1209 #ifndef YY_NO_UNPUT
1210 
1211 #endif
1212 /* %ok-for-header */
1213 
1214 /* %endif */
1215 
1216 #ifndef yytext_ptr
1217 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1218 #endif
1219 
1220 #ifdef YY_NEED_STRLEN
1221 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1222 #endif
1223 
1224 #ifndef YY_NO_INPUT
1225 /* %if-c-only Standard (non-C++) definition */
1226 /* %not-for-header */
1227 #ifdef __cplusplus
1228 static int yyinput ( yyscan_t yyscanner );
1229 #else
1230 static int input ( yyscan_t yyscanner );
1231 #endif
1232 /* %ok-for-header */
1233 
1234 /* %endif */
1235 #endif
1236 
1237 /* %if-c-only */
1238 
1239     static void yy_push_state ( int _new_state , yyscan_t yyscanner);
1240 
1241 /* %endif */
1242 
1243 /* Amount of stuff to slurp up with each read. */
1244 #ifndef YY_READ_BUF_SIZE
1245 #ifdef __ia64__
1246 /* On IA-64, the buffer size is 16k, not 8k */
1247 #define YY_READ_BUF_SIZE 16384
1248 #else
1249 #define YY_READ_BUF_SIZE 8192
1250 #endif /* __ia64__ */
1251 #endif
1252 
1253 /* Copy whatever the last rule matched to the standard output. */
1254 #ifndef ECHO
1255 /* %if-c-only Standard (non-C++) definition */
1256 /* This used to be an fputs(), but since the string might contain NUL's,
1257  * we now use fwrite().
1258  */
1259 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1260 /* %endif */
1261 /* %if-c++-only C++ definition */
1262 /* %endif */
1263 #endif
1264 
1265 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1266  * is returned in "result".
1267  */
1268 #ifndef YY_INPUT
1269 #define YY_INPUT(buf,result,max_size) \
1270 /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
1271 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1272 		{ \
1273 		int c = '*'; \
1274 		int n; \
1275 		for ( n = 0; n < max_size && \
1276 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1277 			buf[n] = (char) c; \
1278 		if ( c == '\n' ) \
1279 			buf[n++] = (char) c; \
1280 		if ( c == EOF && ferror( yyin ) ) \
1281 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
1282 		result = n; \
1283 		} \
1284 	else \
1285 		{ \
1286 		errno=0; \
1287 		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1288 			{ \
1289 			if( errno != EINTR) \
1290 				{ \
1291 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
1292 				break; \
1293 				} \
1294 			errno=0; \
1295 			clearerr(yyin); \
1296 			} \
1297 		}\
1298 \
1299 /* %if-c++-only C++ definition \ */\
1300 /* %endif */
1301 
1302 #endif
1303 
1304 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1305  * we don't want an extra ';' after the "return" because that will cause
1306  * some compilers to complain about unreachable statements.
1307  */
1308 #ifndef yyterminate
1309 #define yyterminate() return YY_NULL
1310 #endif
1311 
1312 /* Number of entries by which start-condition stack grows. */
1313 #ifndef YY_START_STACK_INCR
1314 #define YY_START_STACK_INCR 25
1315 #endif
1316 
1317 /* Report a fatal error. */
1318 #ifndef YY_FATAL_ERROR
1319 /* %if-c-only */
1320 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1321 /* %endif */
1322 /* %if-c++-only */
1323 /* %endif */
1324 #endif
1325 
1326 /* %if-tables-serialization structures and prototypes */
1327 /* %not-for-header */
1328 /* %ok-for-header */
1329 
1330 /* %not-for-header */
1331 /* %tables-yydmap generated elements */
1332 /* %endif */
1333 /* end tables serialization structures and prototypes */
1334 
1335 /* %ok-for-header */
1336 
1337 /* Default declaration of generated scanner - a define so the user can
1338  * easily add parameters.
1339  */
1340 #ifndef YY_DECL
1341 #define YY_DECL_IS_OURS 1
1342 /* %if-c-only Standard (non-C++) definition */
1343 
1344 extern int yylex \
1345                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
1346 
1347 #define YY_DECL int yylex \
1348                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1349 /* %endif */
1350 /* %if-c++-only C++ definition */
1351 /* %endif */
1352 #endif /* !YY_DECL */
1353 
1354 /* Code executed at the beginning of each rule, after yytext and yyleng
1355  * have been set up.
1356  */
1357 #ifndef YY_USER_ACTION
1358 #define YY_USER_ACTION
1359 #endif
1360 
1361 /* Code executed at the end of each rule. */
1362 #ifndef YY_BREAK
1363 #define YY_BREAK /*LINTED*/break;
1364 #endif
1365 
1366 /* %% [6.0] YY_RULE_SETUP definition goes here */
1367 #define YY_RULE_SETUP \
1368 	YY_USER_ACTION
1369 
1370 /* %not-for-header */
1371 /** The main scanner function which does all the work.
1372  */
1373 YY_DECL
1374 {
1375 	yy_state_type yy_current_state;
1376 	char *yy_cp, *yy_bp;
1377 	int yy_act;
1378     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1379 
1380     yylval = yylval_param;
1381 
1382     yylloc = yylloc_param;
1383 
1384 	if ( !yyg->yy_init )
1385 		{
1386 		yyg->yy_init = 1;
1387 
1388 #ifdef YY_USER_INIT
1389 		YY_USER_INIT;
1390 #endif
1391 
1392 		if ( ! yyg->yy_start )
1393 			yyg->yy_start = 1;	/* first start state */
1394 
1395 		if ( ! yyin )
1396 /* %if-c-only */
1397 			yyin = stdin;
1398 /* %endif */
1399 /* %if-c++-only */
1400 /* %endif */
1401 
1402 		if ( ! yyout )
1403 /* %if-c-only */
1404 			yyout = stdout;
1405 /* %endif */
1406 /* %if-c++-only */
1407 /* %endif */
1408 
1409 		if ( ! YY_CURRENT_BUFFER ) {
1410 			yyensure_buffer_stack (yyscanner);
1411 			YY_CURRENT_BUFFER_LVALUE =
1412 				yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1413 		}
1414 
1415 		yy_load_buffer_state( yyscanner );
1416 		}
1417 
1418 	{
1419 /* %% [7.0] user's declarations go here */
1420 #line 102 "ac-scanner.l"
1421 
1422 
1423 #line 1423 "ac-scanner.c"
1424 
1425 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
1426 		{
1427 /* %% [8.0] yymore()-related code goes here */
1428 		yy_cp = yyg->yy_c_buf_p;
1429 
1430 		/* Support of yytext. */
1431 		*yy_cp = yyg->yy_hold_char;
1432 
1433 		/* yy_bp points to the position in yy_ch_buf of the start of
1434 		 * the current run.
1435 		 */
1436 		yy_bp = yy_cp;
1437 
1438 /* %% [9.0] code to set up and find next match goes here */
1439 		yy_current_state = yyg->yy_start;
1440 yy_match:
1441 		do
1442 			{
1443 			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1444 			if ( yy_accept[yy_current_state] )
1445 				{
1446 				yyg->yy_last_accepting_state = yy_current_state;
1447 				yyg->yy_last_accepting_cpos = yy_cp;
1448 				}
1449 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1450 				{
1451 				yy_current_state = (int) yy_def[yy_current_state];
1452 				if ( yy_current_state >= 370 )
1453 					yy_c = yy_meta[yy_c];
1454 				}
1455 			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1456 			++yy_cp;
1457 			}
1458 		while ( yy_current_state != 369 );
1459 		yy_cp = yyg->yy_last_accepting_cpos;
1460 		yy_current_state = yyg->yy_last_accepting_state;
1461 
1462 yy_find_action:
1463 /* %% [10.0] code to find the action number goes here */
1464 		yy_act = yy_accept[yy_current_state];
1465 
1466 		YY_DO_BEFORE_ACTION;
1467 
1468 /* %% [11.0] code for yylineno update goes here */
1469 
1470 		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1471 			{
1472 			int yyl;
1473 			for ( yyl = 0; yyl < yyleng; ++yyl )
1474 				if ( yytext[yyl] == '\n' )
1475 
1476     do{ yylineno++;
1477         yycolumn=0;
1478     }while(0)
1479 ;
1480 			}
1481 
1482 do_action:	/* This label is used only to access EOF actions. */
1483 
1484 /* %% [12.0] debug code goes here */
1485 		if ( yy_flex_debug )
1486 			{
1487 			if ( yy_act == 0 )
1488 				fprintf( stderr, "--scanner backing up\n" );
1489 			else if ( yy_act < 63 )
1490 				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
1491 				         (long)yy_rule_linenum[yy_act], yytext );
1492 			else if ( yy_act == 63 )
1493 				fprintf( stderr, "--accepting default rule (\"%s\")\n",
1494 				         yytext );
1495 			else if ( yy_act == 64 )
1496 				fprintf( stderr, "--(end of buffer or a NUL)\n" );
1497 			else
1498 				fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
1499 			}
1500 
1501 		switch ( yy_act )
1502 	{ /* beginning of action switch */
1503 /* %% [13.0] actions go here */
1504 			case 0: /* must back up */
1505 			/* undo the effects of YY_DO_BEFORE_ACTION */
1506 			*yy_cp = yyg->yy_hold_char;
1507 			yy_cp = yyg->yy_last_accepting_cpos;
1508 			yy_current_state = yyg->yy_last_accepting_state;
1509 			goto yy_find_action;
1510 
1511 case 1:
1512 YY_RULE_SETUP
1513 #line 104 "ac-scanner.l"
1514 { RETURN (SPACE); }
1515 	YY_BREAK
1516 case 2:
1517 /* rule 2 can match eol */
1518 YY_RULE_SETUP
1519 #line 106 "ac-scanner.l"
1520 { RETURN (SPACE); }
1521 	YY_BREAK
1522 case 3:
1523 /* rule 3 can match eol */
1524 YY_RULE_SETUP
1525 #line 108 "ac-scanner.l"
1526 { RETURN (END_OF_LINE); }
1527 	YY_BREAK
1528 case 4:
1529 YY_RULE_SETUP
1530 #line 110 "ac-scanner.l"
1531 { RETURN (HASH); }
1532 	YY_BREAK
1533 case 5:
1534 YY_RULE_SETUP
1535 #line 112 "ac-scanner.l"
1536 { RETURN (LEFT_BRACE); }
1537 	YY_BREAK
1538 case 6:
1539 YY_RULE_SETUP
1540 #line 114 "ac-scanner.l"
1541 { RETURN (RIGHT_BRACE); }
1542 	YY_BREAK
1543 case 7:
1544 YY_RULE_SETUP
1545 #line 116 "ac-scanner.l"
1546 { RETURN (LEFT_PAREN); }
1547 	YY_BREAK
1548 case 8:
1549 YY_RULE_SETUP
1550 #line 118 "ac-scanner.l"
1551 { RETURN (RIGHT_PAREN); }
1552 	YY_BREAK
1553 case 9:
1554 YY_RULE_SETUP
1555 #line 120 "ac-scanner.l"
1556 { RETURN (SINGLE_QUOTE); }
1557 	YY_BREAK
1558 case 10:
1559 YY_RULE_SETUP
1560 #line 122 "ac-scanner.l"
1561 { RETURN (DOUBLE_QUOTE); }
1562 	YY_BREAK
1563 case 11:
1564 YY_RULE_SETUP
1565 #line 124 "ac-scanner.l"
1566 { RETURN (COMMA); }
1567 	YY_BREAK
1568 case 12:
1569 YY_RULE_SETUP
1570 #line 126 "ac-scanner.l"
1571 { RETURN (EQUAL); }
1572 	YY_BREAK
1573 case 13:
1574 YY_RULE_SETUP
1575 #line 128 "ac-scanner.l"
1576 { RETURN (LOWER); }
1577 	YY_BREAK
1578 case 14:
1579 YY_RULE_SETUP
1580 #line 130 "ac-scanner.l"
1581 { RETURN (GREATER); }
1582 	YY_BREAK
1583 case 15:
1584 YY_RULE_SETUP
1585 #line 132 "ac-scanner.l"
1586 { RETURN (DNL); }
1587 	YY_BREAK
1588 case 16:
1589 YY_RULE_SETUP
1590 #line 134 "ac-scanner.l"
1591 { RETURN (M4_INCLUDE); }
1592 	YY_BREAK
1593 case 17:
1594 YY_RULE_SETUP
1595 #line 136 "ac-scanner.l"
1596 { RETURN (AC_ARG_ENABLE);}
1597 	YY_BREAK
1598 case 18:
1599 YY_RULE_SETUP
1600 #line 138 "ac-scanner.l"
1601 { RETURN (AC_C_CONST);}
1602 	YY_BREAK
1603 case 19:
1604 YY_RULE_SETUP
1605 #line 140 "ac-scanner.l"
1606 { RETURN (AC_CHECK_FUNCS);}
1607 	YY_BREAK
1608 case 20:
1609 YY_RULE_SETUP
1610 #line 142 "ac-scanner.l"
1611 { RETURN (AC_CHECK_HEADERS);}
1612 	YY_BREAK
1613 case 21:
1614 YY_RULE_SETUP
1615 #line 144 "ac-scanner.l"
1616 { RETURN (AC_CHECK_LIB);}
1617 	YY_BREAK
1618 case 22:
1619 YY_RULE_SETUP
1620 #line 146 "ac-scanner.l"
1621 { RETURN (AC_CHECK_PROG);}
1622 	YY_BREAK
1623 case 23:
1624 YY_RULE_SETUP
1625 #line 148 "ac-scanner.l"
1626 { RETURN (AC_CONFIG_FILES); }
1627 	YY_BREAK
1628 case 24:
1629 YY_RULE_SETUP
1630 #line 150 "ac-scanner.l"
1631 { RETURN (AC_CONFIG_HEADERS); }
1632 	YY_BREAK
1633 case 25:
1634 YY_RULE_SETUP
1635 #line 152 "ac-scanner.l"
1636 { RETURN (AC_CONFIG_MACRO_DIR); }
1637 	YY_BREAK
1638 case 26:
1639 YY_RULE_SETUP
1640 #line 154 "ac-scanner.l"
1641 { RETURN (AC_CONFIG_SRCDIR); }
1642 	YY_BREAK
1643 case 27:
1644 YY_RULE_SETUP
1645 #line 156 "ac-scanner.l"
1646 { RETURN (AC_EGREP_HEADER); }
1647 	YY_BREAK
1648 case 28:
1649 YY_RULE_SETUP
1650 #line 158 "ac-scanner.l"
1651 { RETURN (AC_EXEEXT); }
1652 	YY_BREAK
1653 case 29:
1654 YY_RULE_SETUP
1655 #line 160 "ac-scanner.l"
1656 { RETURN (AC_HEADER_STDC); }
1657 	YY_BREAK
1658 case 30:
1659 YY_RULE_SETUP
1660 #line 162 "ac-scanner.l"
1661 { RETURN (AC_INIT); }
1662 	YY_BREAK
1663 case 31:
1664 YY_RULE_SETUP
1665 #line 164 "ac-scanner.l"
1666 { RETURN (AC_OBJEXT); }
1667 	YY_BREAK
1668 case 32:
1669 YY_RULE_SETUP
1670 #line 166 "ac-scanner.l"
1671 { RETURN (OBSOLETE_AC_OUTPUT); }
1672 	YY_BREAK
1673 case 33:
1674 YY_RULE_SETUP
1675 #line 168 "ac-scanner.l"
1676 { RETURN (AC_OUTPUT); }
1677 	YY_BREAK
1678 case 34:
1679 YY_RULE_SETUP
1680 #line 170 "ac-scanner.l"
1681 { RETURN (AC_PREREQ); }
1682 	YY_BREAK
1683 case 35:
1684 YY_RULE_SETUP
1685 #line 172 "ac-scanner.l"
1686 { RETURN (AC_PROG_CC);}
1687 	YY_BREAK
1688 case 36:
1689 YY_RULE_SETUP
1690 #line 174 "ac-scanner.l"
1691 { RETURN (AC_PROG_CPP);}
1692 	YY_BREAK
1693 case 37:
1694 YY_RULE_SETUP
1695 #line 176 "ac-scanner.l"
1696 { RETURN (AC_PROG_CXX);}
1697 	YY_BREAK
1698 case 38:
1699 YY_RULE_SETUP
1700 #line 178 "ac-scanner.l"
1701 { RETURN (IT_PROG_INTLTOOL);}
1702 	YY_BREAK
1703 case 39:
1704 YY_RULE_SETUP
1705 #line 180 "ac-scanner.l"
1706 { RETURN (AC_PROG_LEX);}
1707 	YY_BREAK
1708 case 40:
1709 YY_RULE_SETUP
1710 #line 182 "ac-scanner.l"
1711 { RETURN (AC_PROG_LIBTOOL);}
1712 	YY_BREAK
1713 case 41:
1714 YY_RULE_SETUP
1715 #line 184 "ac-scanner.l"
1716 { RETURN (AC_PROG_RANLIB);}
1717 	YY_BREAK
1718 case 42:
1719 YY_RULE_SETUP
1720 #line 186 "ac-scanner.l"
1721 { RETURN (AC_PROG_YACC);}
1722 	YY_BREAK
1723 case 43:
1724 YY_RULE_SETUP
1725 #line 188 "ac-scanner.l"
1726 { RETURN (AC_SUBST);}
1727 	YY_BREAK
1728 case 44:
1729 YY_RULE_SETUP
1730 #line 190 "ac-scanner.l"
1731 { RETURN (AC_TYPE_SIZE_T);}
1732 	YY_BREAK
1733 case 45:
1734 YY_RULE_SETUP
1735 #line 192 "ac-scanner.l"
1736 { RETURN (AC_TYPE_OFF_T);}
1737 	YY_BREAK
1738 case 46:
1739 YY_RULE_SETUP
1740 #line 194 "ac-scanner.l"
1741 { RETURN (AM_INIT_AUTOMAKE);}
1742 	YY_BREAK
1743 case 47:
1744 YY_RULE_SETUP
1745 #line 196 "ac-scanner.l"
1746 { RETURN (AM_GLIB_GNU_GETTEXT);}
1747 	YY_BREAK
1748 case 48:
1749 YY_RULE_SETUP
1750 #line 198 "ac-scanner.l"
1751 { RETURN (AM_MAINTAINER_MODE);}
1752 	YY_BREAK
1753 case 49:
1754 YY_RULE_SETUP
1755 #line 200 "ac-scanner.l"
1756 { RETURN (AM_PROG_LIBTOOL);}
1757 	YY_BREAK
1758 case 50:
1759 YY_RULE_SETUP
1760 #line 202 "ac-scanner.l"
1761 { RETURN (LT_INIT);}
1762 	YY_BREAK
1763 case 51:
1764 YY_RULE_SETUP
1765 #line 204 "ac-scanner.l"
1766 { RETURN (DEFAULT_LT_INIT);}
1767 	YY_BREAK
1768 case 52:
1769 YY_RULE_SETUP
1770 #line 206 "ac-scanner.l"
1771 { RETURN (LT_PREREQ);}
1772 	YY_BREAK
1773 case 53:
1774 YY_RULE_SETUP
1775 #line 208 "ac-scanner.l"
1776 { RETURN (PKG_CHECK_MODULES); }
1777 	YY_BREAK
1778 case 54:
1779 YY_RULE_SETUP
1780 #line 210 "ac-scanner.l"
1781 { RETURN (PKG_PROG_PKG_CONFIG);}
1782 	YY_BREAK
1783 case 55:
1784 YY_RULE_SETUP
1785 #line 212 "ac-scanner.l"
1786 { RETURN (NAME); }
1787 	YY_BREAK
1788 case 56:
1789 YY_RULE_SETUP
1790 #line 214 "ac-scanner.l"
1791 { RETURN (VARIABLE); }
1792 	YY_BREAK
1793 case 57:
1794 YY_RULE_SETUP
1795 #line 216 "ac-scanner.l"
1796 { RETURN (WORD); }
1797 	YY_BREAK
1798 case YY_STATE_EOF(INITIAL):
1799 case YY_STATE_EOF(SPACE_LIST):
1800 #line 218 "ac-scanner.l"
1801 { if (amp_ac_scanner_parse_end (yyextra) == YY_NULL) return YY_NULL; }
1802 	YY_BREAK
1803 
1804 case 58:
1805 /* rule 58 can match eol */
1806 YY_RULE_SETUP
1807 #line 222 "ac-scanner.l"
1808 { RETURN (SPACE); }
1809 	YY_BREAK
1810 case 59:
1811 /* rule 59 can match eol */
1812 YY_RULE_SETUP
1813 #line 224 "ac-scanner.l"
1814 { RETURN (SPACE); }
1815 	YY_BREAK
1816 case 60:
1817 YY_RULE_SETUP
1818 #line 226 "ac-scanner.l"
1819 { RETURN (OPERATOR); }
1820 	YY_BREAK
1821 case 61:
1822 YY_RULE_SETUP
1823 #line 228 "ac-scanner.l"
1824 { RETURN (WORD); }
1825 	YY_BREAK
1826 case 62:
1827 YY_RULE_SETUP
1828 #line 230 "ac-scanner.l"
1829 {RETURN (WORD);}
1830 	YY_BREAK
1831 
1832 case 63:
1833 YY_RULE_SETUP
1834 #line 233 "ac-scanner.l"
1835 ECHO;
1836 	YY_BREAK
1837 #line 1837 "ac-scanner.c"
1838 
1839 	case YY_END_OF_BUFFER:
1840 		{
1841 		/* Amount of text matched not including the EOB char. */
1842 		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1843 
1844 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1845 		*yy_cp = yyg->yy_hold_char;
1846 		YY_RESTORE_YY_MORE_OFFSET
1847 
1848 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1849 			{
1850 			/* We're scanning a new file or input source.  It's
1851 			 * possible that this happened because the user
1852 			 * just pointed yyin at a new source and called
1853 			 * yylex().  If so, then we have to assure
1854 			 * consistency between YY_CURRENT_BUFFER and our
1855 			 * globals.  Here is the right place to do so, because
1856 			 * this is the first action (other than possibly a
1857 			 * back-up) that will match for the new input source.
1858 			 */
1859 			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1860 /* %if-c-only */
1861 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1862 /* %endif */
1863 /* %if-c++-only */
1864 /* %endif */
1865 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1866 			}
1867 
1868 		/* Note that here we test for yy_c_buf_p "<=" to the position
1869 		 * of the first EOB in the buffer, since yy_c_buf_p will
1870 		 * already have been incremented past the NUL character
1871 		 * (since all states make transitions on EOB to the
1872 		 * end-of-buffer state).  Contrast this with the test
1873 		 * in input().
1874 		 */
1875 		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1876 			{ /* This was really a NUL. */
1877 			yy_state_type yy_next_state;
1878 
1879 			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1880 
1881 			yy_current_state = yy_get_previous_state( yyscanner );
1882 
1883 			/* Okay, we're now positioned to make the NUL
1884 			 * transition.  We couldn't have
1885 			 * yy_get_previous_state() go ahead and do it
1886 			 * for us because it doesn't know how to deal
1887 			 * with the possibility of jamming (and we don't
1888 			 * want to build jamming into it because then it
1889 			 * will run more slowly).
1890 			 */
1891 
1892 			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1893 
1894 			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1895 
1896 			if ( yy_next_state )
1897 				{
1898 				/* Consume the NUL. */
1899 				yy_cp = ++yyg->yy_c_buf_p;
1900 				yy_current_state = yy_next_state;
1901 				goto yy_match;
1902 				}
1903 
1904 			else
1905 				{
1906 /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
1907 				yy_cp = yyg->yy_last_accepting_cpos;
1908 				yy_current_state = yyg->yy_last_accepting_state;
1909 				goto yy_find_action;
1910 				}
1911 			}
1912 
1913 		else switch ( yy_get_next_buffer( yyscanner ) )
1914 			{
1915 			case EOB_ACT_END_OF_FILE:
1916 				{
1917 				yyg->yy_did_buffer_switch_on_eof = 0;
1918 
1919 				if ( yywrap( yyscanner ) )
1920 					{
1921 					/* Note: because we've taken care in
1922 					 * yy_get_next_buffer() to have set up
1923 					 * yytext, we can now set up
1924 					 * yy_c_buf_p so that if some total
1925 					 * hoser (like flex itself) wants to
1926 					 * call the scanner after we return the
1927 					 * YY_NULL, it'll still work - another
1928 					 * YY_NULL will get returned.
1929 					 */
1930 					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1931 
1932 					yy_act = YY_STATE_EOF(YY_START);
1933 					goto do_action;
1934 					}
1935 
1936 				else
1937 					{
1938 					if ( ! yyg->yy_did_buffer_switch_on_eof )
1939 						YY_NEW_FILE;
1940 					}
1941 				break;
1942 				}
1943 
1944 			case EOB_ACT_CONTINUE_SCAN:
1945 				yyg->yy_c_buf_p =
1946 					yyg->yytext_ptr + yy_amount_of_matched_text;
1947 
1948 				yy_current_state = yy_get_previous_state( yyscanner );
1949 
1950 				yy_cp = yyg->yy_c_buf_p;
1951 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1952 				goto yy_match;
1953 
1954 			case EOB_ACT_LAST_MATCH:
1955 				yyg->yy_c_buf_p =
1956 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1957 
1958 				yy_current_state = yy_get_previous_state( yyscanner );
1959 
1960 				yy_cp = yyg->yy_c_buf_p;
1961 				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1962 				goto yy_find_action;
1963 			}
1964 		break;
1965 		}
1966 
1967 	default:
1968 		YY_FATAL_ERROR(
1969 			"fatal flex scanner internal error--no action found" );
1970 	} /* end of action switch */
1971 		} /* end of scanning one token */
1972 	} /* end of user's declarations */
1973 } /* end of yylex */
1974 /* %ok-for-header */
1975 
1976 /* %if-c++-only */
1977 /* %not-for-header */
1978 /* %ok-for-header */
1979 
1980 /* %endif */
1981 
1982 /* yy_get_next_buffer - try to read in a new buffer
1983  *
1984  * Returns a code representing an action:
1985  *	EOB_ACT_LAST_MATCH -
1986  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1987  *	EOB_ACT_END_OF_FILE - end of file
1988  */
1989 /* %if-c-only */
yy_get_next_buffer(yyscan_t yyscanner)1990 static int yy_get_next_buffer (yyscan_t yyscanner)
1991 /* %endif */
1992 /* %if-c++-only */
1993 /* %endif */
1994 {
1995     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1996 	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1997 	char *source = yyg->yytext_ptr;
1998 	int number_to_move, i;
1999 	int ret_val;
2000 
2001 	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2002 		YY_FATAL_ERROR(
2003 		"fatal flex scanner internal error--end of buffer missed" );
2004 
2005 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2006 		{ /* Don't try to fill the buffer, so this is an EOF. */
2007 		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2008 			{
2009 			/* We matched a single character, the EOB, so
2010 			 * treat this as a final EOF.
2011 			 */
2012 			return EOB_ACT_END_OF_FILE;
2013 			}
2014 
2015 		else
2016 			{
2017 			/* We matched some text prior to the EOB, first
2018 			 * process it.
2019 			 */
2020 			return EOB_ACT_LAST_MATCH;
2021 			}
2022 		}
2023 
2024 	/* Try to read more data. */
2025 
2026 	/* First move last chars to start of buffer. */
2027 	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
2028 
2029 	for ( i = 0; i < number_to_move; ++i )
2030 		*(dest++) = *(source++);
2031 
2032 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2033 		/* don't do the read, it's not guaranteed to return an EOF,
2034 		 * just force an EOF
2035 		 */
2036 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2037 
2038 	else
2039 		{
2040 			int num_to_read =
2041 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2042 
2043 		while ( num_to_read <= 0 )
2044 			{ /* Not enough room in the buffer - grow it. */
2045 
2046 			/* just a shorter name for the current buffer */
2047 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2048 
2049 			int yy_c_buf_p_offset =
2050 				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2051 
2052 			if ( b->yy_is_our_buffer )
2053 				{
2054 				int new_size = b->yy_buf_size * 2;
2055 
2056 				if ( new_size <= 0 )
2057 					b->yy_buf_size += b->yy_buf_size / 8;
2058 				else
2059 					b->yy_buf_size *= 2;
2060 
2061 				b->yy_ch_buf = (char *)
2062 					/* Include room in for 2 EOB chars. */
2063 					yyrealloc( (void *) b->yy_ch_buf,
2064 							 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2065 				}
2066 			else
2067 				/* Can't grow it, we don't own it. */
2068 				b->yy_ch_buf = NULL;
2069 
2070 			if ( ! b->yy_ch_buf )
2071 				YY_FATAL_ERROR(
2072 				"fatal error - scanner input buffer overflow" );
2073 
2074 			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2075 
2076 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2077 						number_to_move - 1;
2078 
2079 			}
2080 
2081 		if ( num_to_read > YY_READ_BUF_SIZE )
2082 			num_to_read = YY_READ_BUF_SIZE;
2083 
2084 		/* Read in more data. */
2085 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2086 			yyg->yy_n_chars, num_to_read );
2087 
2088 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2089 		}
2090 
2091 	if ( yyg->yy_n_chars == 0 )
2092 		{
2093 		if ( number_to_move == YY_MORE_ADJ )
2094 			{
2095 			ret_val = EOB_ACT_END_OF_FILE;
2096 			yyrestart( yyin  , yyscanner);
2097 			}
2098 
2099 		else
2100 			{
2101 			ret_val = EOB_ACT_LAST_MATCH;
2102 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2103 				YY_BUFFER_EOF_PENDING;
2104 			}
2105 		}
2106 
2107 	else
2108 		ret_val = EOB_ACT_CONTINUE_SCAN;
2109 
2110 	if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2111 		/* Extend the array by 50%, plus the number we really need. */
2112 		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2113 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2114 			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
2115 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2116 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2117 		/* "- 2" to take care of EOB's */
2118 		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2119 	}
2120 
2121 	yyg->yy_n_chars += number_to_move;
2122 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2123 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2124 
2125 	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2126 
2127 	return ret_val;
2128 }
2129 
2130 /* yy_get_previous_state - get the state just before the EOB char was reached */
2131 
2132 /* %if-c-only */
2133 /* %not-for-header */
yy_get_previous_state(yyscan_t yyscanner)2134     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2135 /* %endif */
2136 /* %if-c++-only */
2137 /* %endif */
2138 {
2139 	yy_state_type yy_current_state;
2140 	char *yy_cp;
2141     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2142 
2143 /* %% [15.0] code to get the start state into yy_current_state goes here */
2144 	yy_current_state = yyg->yy_start;
2145 
2146 	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2147 		{
2148 /* %% [16.0] code to find the next state goes here */
2149 		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2150 		if ( yy_accept[yy_current_state] )
2151 			{
2152 			yyg->yy_last_accepting_state = yy_current_state;
2153 			yyg->yy_last_accepting_cpos = yy_cp;
2154 			}
2155 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2156 			{
2157 			yy_current_state = (int) yy_def[yy_current_state];
2158 			if ( yy_current_state >= 370 )
2159 				yy_c = yy_meta[yy_c];
2160 			}
2161 		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2162 		}
2163 
2164 	return yy_current_state;
2165 }
2166 
2167 /* yy_try_NUL_trans - try to make a transition on the NUL character
2168  *
2169  * synopsis
2170  *	next_state = yy_try_NUL_trans( current_state );
2171  */
2172 /* %if-c-only */
yy_try_NUL_trans(yy_state_type yy_current_state,yyscan_t yyscanner)2173     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
2174 /* %endif */
2175 /* %if-c++-only */
2176 /* %endif */
2177 {
2178 	int yy_is_jam;
2179     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2180 /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
2181 	char *yy_cp = yyg->yy_c_buf_p;
2182 
2183 	YY_CHAR yy_c = 1;
2184 	if ( yy_accept[yy_current_state] )
2185 		{
2186 		yyg->yy_last_accepting_state = yy_current_state;
2187 		yyg->yy_last_accepting_cpos = yy_cp;
2188 		}
2189 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2190 		{
2191 		yy_current_state = (int) yy_def[yy_current_state];
2192 		if ( yy_current_state >= 370 )
2193 			yy_c = yy_meta[yy_c];
2194 		}
2195 	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2196 	yy_is_jam = (yy_current_state == 369);
2197 
2198 	(void)yyg;
2199 	return yy_is_jam ? 0 : yy_current_state;
2200 }
2201 
2202 #ifndef YY_NO_UNPUT
2203 /* %if-c-only */
2204 
2205 /* %endif */
2206 #endif
2207 
2208 /* %if-c-only */
2209 #ifndef YY_NO_INPUT
2210 #ifdef __cplusplus
yyinput(yyscan_t yyscanner)2211     static int yyinput (yyscan_t yyscanner)
2212 #else
2213     static int input  (yyscan_t yyscanner)
2214 #endif
2215 
2216 /* %endif */
2217 /* %if-c++-only */
2218 /* %endif */
2219 {
2220 	int c;
2221     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2222 
2223 	*yyg->yy_c_buf_p = yyg->yy_hold_char;
2224 
2225 	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2226 		{
2227 		/* yy_c_buf_p now points to the character we want to return.
2228 		 * If this occurs *before* the EOB characters, then it's a
2229 		 * valid NUL; if not, then we've hit the end of the buffer.
2230 		 */
2231 		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2232 			/* This was really a NUL. */
2233 			*yyg->yy_c_buf_p = '\0';
2234 
2235 		else
2236 			{ /* need more input */
2237 			int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
2238 			++yyg->yy_c_buf_p;
2239 
2240 			switch ( yy_get_next_buffer( yyscanner ) )
2241 				{
2242 				case EOB_ACT_LAST_MATCH:
2243 					/* This happens because yy_g_n_b()
2244 					 * sees that we've accumulated a
2245 					 * token and flags that we need to
2246 					 * try matching the token before
2247 					 * proceeding.  But for input(),
2248 					 * there's no matching to consider.
2249 					 * So convert the EOB_ACT_LAST_MATCH
2250 					 * to EOB_ACT_END_OF_FILE.
2251 					 */
2252 
2253 					/* Reset buffer status. */
2254 					yyrestart( yyin , yyscanner);
2255 
2256 					/*FALLTHROUGH*/
2257 
2258 				case EOB_ACT_END_OF_FILE:
2259 					{
2260 					if ( yywrap( yyscanner ) )
2261 						return 0;
2262 
2263 					if ( ! yyg->yy_did_buffer_switch_on_eof )
2264 						YY_NEW_FILE;
2265 #ifdef __cplusplus
2266 					return yyinput(yyscanner);
2267 #else
2268 					return input(yyscanner);
2269 #endif
2270 					}
2271 
2272 				case EOB_ACT_CONTINUE_SCAN:
2273 					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2274 					break;
2275 				}
2276 			}
2277 		}
2278 
2279 	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
2280 	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
2281 	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2282 
2283 /* %% [19.0] update BOL and yylineno */
2284 	if ( c == '\n' )
2285 
2286     do{ yylineno++;
2287         yycolumn=0;
2288     }while(0)
2289 ;
2290 
2291 	return c;
2292 }
2293 /* %if-c-only */
2294 #endif	/* ifndef YY_NO_INPUT */
2295 /* %endif */
2296 
2297 /** Immediately switch to a different input stream.
2298  * @param input_file A readable stream.
2299  * @param yyscanner The scanner object.
2300  * @note This function does not reset the start condition to @c INITIAL .
2301  */
2302 /* %if-c-only */
yyrestart(FILE * input_file,yyscan_t yyscanner)2303     void yyrestart  (FILE * input_file , yyscan_t yyscanner)
2304 /* %endif */
2305 /* %if-c++-only */
2306 /* %endif */
2307 {
2308     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2309 
2310 	if ( ! YY_CURRENT_BUFFER ){
2311         yyensure_buffer_stack (yyscanner);
2312 		YY_CURRENT_BUFFER_LVALUE =
2313             yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2314 	}
2315 
2316 	yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2317 	yy_load_buffer_state( yyscanner );
2318 }
2319 
2320 /* %if-c++-only */
2321 /* %endif */
2322 
2323 /** Switch to a different input buffer.
2324  * @param new_buffer The new input buffer.
2325  * @param yyscanner The scanner object.
2326  */
2327 /* %if-c-only */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2328     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
2329 /* %endif */
2330 /* %if-c++-only */
2331 /* %endif */
2332 {
2333     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2334 
2335 	/* TODO. We should be able to replace this entire function body
2336 	 * with
2337 	 *		yypop_buffer_state();
2338 	 *		yypush_buffer_state(new_buffer);
2339      */
2340 	yyensure_buffer_stack (yyscanner);
2341 	if ( YY_CURRENT_BUFFER == new_buffer )
2342 		return;
2343 
2344 	if ( YY_CURRENT_BUFFER )
2345 		{
2346 		/* Flush out information for old buffer. */
2347 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
2348 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2349 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2350 		}
2351 
2352 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2353 	yy_load_buffer_state( yyscanner );
2354 
2355 	/* We don't actually know whether we did this switch during
2356 	 * EOF (yywrap()) processing, but the only time this flag
2357 	 * is looked at is after yywrap() is called, so it's safe
2358 	 * to go ahead and always set it.
2359 	 */
2360 	yyg->yy_did_buffer_switch_on_eof = 1;
2361 }
2362 
2363 /* %if-c-only */
yy_load_buffer_state(yyscan_t yyscanner)2364 static void yy_load_buffer_state  (yyscan_t yyscanner)
2365 /* %endif */
2366 /* %if-c++-only */
2367 /* %endif */
2368 {
2369     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2370 	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2371 	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2372 /* %if-c-only */
2373 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2374 /* %endif */
2375 /* %if-c++-only */
2376 /* %endif */
2377 	yyg->yy_hold_char = *yyg->yy_c_buf_p;
2378 }
2379 
2380 /** Allocate and initialize an input buffer state.
2381  * @param file A readable stream.
2382  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2383  * @param yyscanner The scanner object.
2384  * @return the allocated buffer state.
2385  */
2386 /* %if-c-only */
yy_create_buffer(FILE * file,int size,yyscan_t yyscanner)2387     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
2388 /* %endif */
2389 /* %if-c++-only */
2390 /* %endif */
2391 {
2392 	YY_BUFFER_STATE b;
2393 
2394 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2395 	if ( ! b )
2396 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2397 
2398 	b->yy_buf_size = size;
2399 
2400 	/* yy_ch_buf has to be 2 characters longer than the size given because
2401 	 * we need to put in 2 end-of-buffer characters.
2402 	 */
2403 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2404 	if ( ! b->yy_ch_buf )
2405 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2406 
2407 	b->yy_is_our_buffer = 1;
2408 
2409 	yy_init_buffer( b, file , yyscanner);
2410 
2411 	return b;
2412 }
2413 
2414 /* %if-c++-only */
2415 /* %endif */
2416 
2417 /** Destroy the buffer.
2418  * @param b a buffer created with yy_create_buffer()
2419  * @param yyscanner The scanner object.
2420  */
2421 /* %if-c-only */
yy_delete_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2422     void yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
2423 /* %endif */
2424 /* %if-c++-only */
2425 /* %endif */
2426 {
2427     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2428 
2429 	if ( ! b )
2430 		return;
2431 
2432 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2433 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2434 
2435 	if ( b->yy_is_our_buffer )
2436 		yyfree( (void *) b->yy_ch_buf , yyscanner );
2437 
2438 	yyfree( (void *) b , yyscanner );
2439 }
2440 
2441 /* Initializes or reinitializes a buffer.
2442  * This function is sometimes called more than once on the same buffer,
2443  * such as during a yyrestart() or at EOF.
2444  */
2445 /* %if-c-only */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file,yyscan_t yyscanner)2446     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
2447 /* %endif */
2448 /* %if-c++-only */
2449 /* %endif */
2450 
2451 {
2452 	int oerrno = errno;
2453     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2454 
2455 	yy_flush_buffer( b , yyscanner);
2456 
2457 /* %if-c-only */
2458 	b->yy_input_file = file;
2459 /* %endif */
2460 /* %if-c++-only */
2461 /* %endif */
2462 	b->yy_fill_buffer = 1;
2463 
2464     /* If b is the current buffer, then yy_init_buffer was _probably_
2465      * called from yyrestart() or through yy_get_next_buffer.
2466      * In that case, we don't want to reset the lineno or column.
2467      */
2468     if (b != YY_CURRENT_BUFFER){
2469         b->yy_bs_lineno = 1;
2470         b->yy_bs_column = 0;
2471     }
2472 
2473 /* %if-c-only */
2474 
2475         b->yy_is_interactive = 0;
2476 
2477 /* %endif */
2478 /* %if-c++-only */
2479 /* %endif */
2480 	errno = oerrno;
2481 }
2482 
2483 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2484  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2485  * @param yyscanner The scanner object.
2486  */
2487 /* %if-c-only */
yy_flush_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2488     void yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
2489 /* %endif */
2490 /* %if-c++-only */
2491 /* %endif */
2492 {
2493     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2494 	if ( ! b )
2495 		return;
2496 
2497 	b->yy_n_chars = 0;
2498 
2499 	/* We always need two end-of-buffer characters.  The first causes
2500 	 * a transition to the end-of-buffer state.  The second causes
2501 	 * a jam in that state.
2502 	 */
2503 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2504 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2505 
2506 	b->yy_buf_pos = &b->yy_ch_buf[0];
2507 
2508 	b->yy_at_bol = 1;
2509 	b->yy_buffer_status = YY_BUFFER_NEW;
2510 
2511 	if ( b == YY_CURRENT_BUFFER )
2512 		yy_load_buffer_state( yyscanner );
2513 }
2514 
2515 /* %if-c-or-c++ */
2516 /** Pushes the new state onto the stack. The new state becomes
2517  *  the current state. This function will allocate the stack
2518  *  if necessary.
2519  *  @param new_buffer The new state.
2520  *  @param yyscanner The scanner object.
2521  */
2522 /* %if-c-only */
yypush_buffer_state(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2523 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2524 /* %endif */
2525 /* %if-c++-only */
2526 /* %endif */
2527 {
2528     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2529 	if (new_buffer == NULL)
2530 		return;
2531 
2532 	yyensure_buffer_stack(yyscanner);
2533 
2534 	/* This block is copied from yy_switch_to_buffer. */
2535 	if ( YY_CURRENT_BUFFER )
2536 		{
2537 		/* Flush out information for old buffer. */
2538 		*yyg->yy_c_buf_p = yyg->yy_hold_char;
2539 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2540 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2541 		}
2542 
2543 	/* Only push if top exists. Otherwise, replace top. */
2544 	if (YY_CURRENT_BUFFER)
2545 		yyg->yy_buffer_stack_top++;
2546 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2547 
2548 	/* copied from yy_switch_to_buffer. */
2549 	yy_load_buffer_state( yyscanner );
2550 	yyg->yy_did_buffer_switch_on_eof = 1;
2551 }
2552 /* %endif */
2553 
2554 /* %if-c-or-c++ */
2555 /** Removes and deletes the top of the stack, if present.
2556  *  The next element becomes the new top.
2557  *  @param yyscanner The scanner object.
2558  */
2559 /* %if-c-only */
yypop_buffer_state(yyscan_t yyscanner)2560 void yypop_buffer_state (yyscan_t yyscanner)
2561 /* %endif */
2562 /* %if-c++-only */
2563 /* %endif */
2564 {
2565     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2566 	if (!YY_CURRENT_BUFFER)
2567 		return;
2568 
2569 	yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2570 	YY_CURRENT_BUFFER_LVALUE = NULL;
2571 	if (yyg->yy_buffer_stack_top > 0)
2572 		--yyg->yy_buffer_stack_top;
2573 
2574 	if (YY_CURRENT_BUFFER) {
2575 		yy_load_buffer_state( yyscanner );
2576 		yyg->yy_did_buffer_switch_on_eof = 1;
2577 	}
2578 }
2579 /* %endif */
2580 
2581 /* %if-c-or-c++ */
2582 /* Allocates the stack if it does not exist.
2583  *  Guarantees space for at least one push.
2584  */
2585 /* %if-c-only */
yyensure_buffer_stack(yyscan_t yyscanner)2586 static void yyensure_buffer_stack (yyscan_t yyscanner)
2587 /* %endif */
2588 /* %if-c++-only */
2589 /* %endif */
2590 {
2591 	yy_size_t num_to_alloc;
2592     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2593 
2594 	if (!yyg->yy_buffer_stack) {
2595 
2596 		/* First allocation is just for 2 elements, since we don't know if this
2597 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2598 		 * immediate realloc on the next call.
2599          */
2600       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2601 		yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2602 								(num_to_alloc * sizeof(struct yy_buffer_state*)
2603 								, yyscanner);
2604 		if ( ! yyg->yy_buffer_stack )
2605 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2606 
2607 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2608 
2609 		yyg->yy_buffer_stack_max = num_to_alloc;
2610 		yyg->yy_buffer_stack_top = 0;
2611 		return;
2612 	}
2613 
2614 	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2615 
2616 		/* Increase the buffer to prepare for a possible push. */
2617 		yy_size_t grow_size = 8 /* arbitrary grow size */;
2618 
2619 		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2620 		yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2621 								(yyg->yy_buffer_stack,
2622 								num_to_alloc * sizeof(struct yy_buffer_state*)
2623 								, yyscanner);
2624 		if ( ! yyg->yy_buffer_stack )
2625 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2626 
2627 		/* zero only the new slots.*/
2628 		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2629 		yyg->yy_buffer_stack_max = num_to_alloc;
2630 	}
2631 }
2632 /* %endif */
2633 
2634 /* %if-c-only */
2635 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2636  * @param base the character buffer
2637  * @param size the size in bytes of the character buffer
2638  * @param yyscanner The scanner object.
2639  * @return the newly allocated buffer state object.
2640  */
yy_scan_buffer(char * base,yy_size_t size,yyscan_t yyscanner)2641 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
2642 {
2643 	YY_BUFFER_STATE b;
2644 
2645 	if ( size < 2 ||
2646 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
2647 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
2648 		/* They forgot to leave room for the EOB's. */
2649 		return NULL;
2650 
2651 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2652 	if ( ! b )
2653 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2654 
2655 	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
2656 	b->yy_buf_pos = b->yy_ch_buf = base;
2657 	b->yy_is_our_buffer = 0;
2658 	b->yy_input_file = NULL;
2659 	b->yy_n_chars = b->yy_buf_size;
2660 	b->yy_is_interactive = 0;
2661 	b->yy_at_bol = 1;
2662 	b->yy_fill_buffer = 0;
2663 	b->yy_buffer_status = YY_BUFFER_NEW;
2664 
2665 	yy_switch_to_buffer( b , yyscanner );
2666 
2667 	return b;
2668 }
2669 /* %endif */
2670 
2671 /* %if-c-only */
2672 /** Setup the input buffer state to scan a string. The next call to yylex() will
2673  * scan from a @e copy of @a str.
2674  * @param yystr a NUL-terminated string to scan
2675  * @param yyscanner The scanner object.
2676  * @return the newly allocated buffer state object.
2677  * @note If you want to scan bytes that may contain NUL values, then use
2678  *       yy_scan_bytes() instead.
2679  */
yy_scan_string(const char * yystr,yyscan_t yyscanner)2680 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
2681 {
2682 
2683 	return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
2684 }
2685 /* %endif */
2686 
2687 /* %if-c-only */
2688 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2689  * scan from a @e copy of @a bytes.
2690  * @param yybytes the byte buffer to scan
2691  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2692  * @param yyscanner The scanner object.
2693  * @return the newly allocated buffer state object.
2694  */
yy_scan_bytes(const char * yybytes,int _yybytes_len,yyscan_t yyscanner)2695 YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
2696 {
2697 	YY_BUFFER_STATE b;
2698 	char *buf;
2699 	yy_size_t n;
2700 	int i;
2701 
2702 	/* Get memory for full buffer, including space for trailing EOB's. */
2703 	n = (yy_size_t) (_yybytes_len + 2);
2704 	buf = (char *) yyalloc( n , yyscanner );
2705 	if ( ! buf )
2706 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2707 
2708 	for ( i = 0; i < _yybytes_len; ++i )
2709 		buf[i] = yybytes[i];
2710 
2711 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2712 
2713 	b = yy_scan_buffer( buf, n , yyscanner);
2714 	if ( ! b )
2715 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2716 
2717 	/* It's okay to grow etc. this buffer, and we should throw it
2718 	 * away when we're done.
2719 	 */
2720 	b->yy_is_our_buffer = 1;
2721 
2722 	return b;
2723 }
2724 /* %endif */
2725 
2726 /* %if-c-only */
yy_push_state(int _new_state,yyscan_t yyscanner)2727     static void yy_push_state (int  _new_state , yyscan_t yyscanner)
2728 /* %endif */
2729 /* %if-c++-only */
2730 /* %endif */
2731 {
2732     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2733 	if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
2734 		{
2735 		yy_size_t new_size;
2736 
2737 		yyg->yy_start_stack_depth += YY_START_STACK_INCR;
2738 		new_size = (yy_size_t) yyg->yy_start_stack_depth * sizeof( int );
2739 
2740 		if ( ! yyg->yy_start_stack )
2741 			yyg->yy_start_stack = (int *) yyalloc( new_size , yyscanner );
2742 
2743 		else
2744 			yyg->yy_start_stack = (int *) yyrealloc(
2745 					(void *) yyg->yy_start_stack, new_size , yyscanner );
2746 
2747 		if ( ! yyg->yy_start_stack )
2748 			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2749 		}
2750 
2751 	yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
2752 
2753 	BEGIN(_new_state);
2754 }
2755 
2756 #ifndef YY_EXIT_FAILURE
2757 #define YY_EXIT_FAILURE 2
2758 #endif
2759 
2760 /* %if-c-only */
yy_fatal_error(const char * msg,yyscan_t yyscanner)2761 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2762 {
2763 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2764 	(void)yyg;
2765 	fprintf( stderr, "%s\n", msg );
2766 	exit( YY_EXIT_FAILURE );
2767 }
2768 /* %endif */
2769 /* %if-c++-only */
2770 /* %endif */
2771 
2772 /* Redefine yyless() so it works in section 3 code. */
2773 
2774 #undef yyless
2775 #define yyless(n) \
2776 	do \
2777 		{ \
2778 		/* Undo effects of setting up yytext. */ \
2779         int yyless_macro_arg = (n); \
2780         YY_LESS_LINENO(yyless_macro_arg);\
2781 		yytext[yyleng] = yyg->yy_hold_char; \
2782 		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2783 		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2784 		*yyg->yy_c_buf_p = '\0'; \
2785 		yyleng = yyless_macro_arg; \
2786 		} \
2787 	while ( 0 )
2788 
2789 /* Accessor  methods (get/set functions) to struct members. */
2790 
2791 /* %if-c-only */
2792 /* %if-reentrant */
2793 
2794 /** Get the user-defined data for this scanner.
2795  * @param yyscanner The scanner object.
2796  */
yyget_extra(yyscan_t yyscanner)2797 YY_EXTRA_TYPE yyget_extra  (yyscan_t yyscanner)
2798 {
2799     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2800     return yyextra;
2801 }
2802 
2803 /* %endif */
2804 
2805 /** Get the current line number.
2806  * @param yyscanner The scanner object.
2807  */
yyget_lineno(yyscan_t yyscanner)2808 int yyget_lineno  (yyscan_t yyscanner)
2809 {
2810     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2811 
2812         if (! YY_CURRENT_BUFFER)
2813             return 0;
2814 
2815     return yylineno;
2816 }
2817 
2818 /** Get the current column number.
2819  * @param yyscanner The scanner object.
2820  */
yyget_column(yyscan_t yyscanner)2821 int yyget_column  (yyscan_t yyscanner)
2822 {
2823     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2824 
2825         if (! YY_CURRENT_BUFFER)
2826             return 0;
2827 
2828     return yycolumn;
2829 }
2830 
2831 /** Get the input stream.
2832  * @param yyscanner The scanner object.
2833  */
yyget_in(yyscan_t yyscanner)2834 FILE *yyget_in  (yyscan_t yyscanner)
2835 {
2836     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2837     return yyin;
2838 }
2839 
2840 /** Get the output stream.
2841  * @param yyscanner The scanner object.
2842  */
yyget_out(yyscan_t yyscanner)2843 FILE *yyget_out  (yyscan_t yyscanner)
2844 {
2845     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2846     return yyout;
2847 }
2848 
2849 /** Get the length of the current token.
2850  * @param yyscanner The scanner object.
2851  */
yyget_leng(yyscan_t yyscanner)2852 int yyget_leng  (yyscan_t yyscanner)
2853 {
2854     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2855     return yyleng;
2856 }
2857 
2858 /** Get the current token.
2859  * @param yyscanner The scanner object.
2860  */
2861 
yyget_text(yyscan_t yyscanner)2862 char *yyget_text  (yyscan_t yyscanner)
2863 {
2864     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2865     return yytext;
2866 }
2867 
2868 /* %if-reentrant */
2869 
2870 /** Set the user-defined data. This data is never touched by the scanner.
2871  * @param user_defined The data to be associated with this scanner.
2872  * @param yyscanner The scanner object.
2873  */
yyset_extra(YY_EXTRA_TYPE user_defined,yyscan_t yyscanner)2874 void yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
2875 {
2876     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2877     yyextra = user_defined ;
2878 }
2879 
2880 /* %endif */
2881 
2882 /** Set the current line number.
2883  * @param _line_number line number
2884  * @param yyscanner The scanner object.
2885  */
yyset_lineno(int _line_number,yyscan_t yyscanner)2886 void yyset_lineno (int  _line_number , yyscan_t yyscanner)
2887 {
2888     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2889 
2890         /* lineno is only valid if an input buffer exists. */
2891         if (! YY_CURRENT_BUFFER )
2892            YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2893 
2894     yylineno = _line_number;
2895 }
2896 
2897 /** Set the current column.
2898  * @param _column_no column number
2899  * @param yyscanner The scanner object.
2900  */
yyset_column(int _column_no,yyscan_t yyscanner)2901 void yyset_column (int  _column_no , yyscan_t yyscanner)
2902 {
2903     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2904 
2905         /* column is only valid if an input buffer exists. */
2906         if (! YY_CURRENT_BUFFER )
2907            YY_FATAL_ERROR( "yyset_column called with no buffer" );
2908 
2909     yycolumn = _column_no;
2910 }
2911 
2912 /** Set the input stream. This does not discard the current
2913  * input buffer.
2914  * @param _in_str A readable stream.
2915  * @param yyscanner The scanner object.
2916  * @see yy_switch_to_buffer
2917  */
yyset_in(FILE * _in_str,yyscan_t yyscanner)2918 void yyset_in (FILE *  _in_str , yyscan_t yyscanner)
2919 {
2920     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2921     yyin = _in_str ;
2922 }
2923 
yyset_out(FILE * _out_str,yyscan_t yyscanner)2924 void yyset_out (FILE *  _out_str , yyscan_t yyscanner)
2925 {
2926     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2927     yyout = _out_str ;
2928 }
2929 
yyget_debug(yyscan_t yyscanner)2930 int yyget_debug  (yyscan_t yyscanner)
2931 {
2932     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2933     return yy_flex_debug;
2934 }
2935 
yyset_debug(int _bdebug,yyscan_t yyscanner)2936 void yyset_debug (int  _bdebug , yyscan_t yyscanner)
2937 {
2938     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2939     yy_flex_debug = _bdebug ;
2940 }
2941 
2942 /* %endif */
2943 
2944 /* %if-reentrant */
2945 /* Accessor methods for yylval and yylloc */
2946 
2947 /* %if-bison-bridge */
2948 
yyget_lval(yyscan_t yyscanner)2949 YYSTYPE * yyget_lval  (yyscan_t yyscanner)
2950 {
2951     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2952     return yylval;
2953 }
2954 
yyset_lval(YYSTYPE * yylval_param,yyscan_t yyscanner)2955 void yyset_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
2956 {
2957     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2958     yylval = yylval_param;
2959 }
2960 
yyget_lloc(yyscan_t yyscanner)2961 YYLTYPE *yyget_lloc  (yyscan_t yyscanner)
2962 {
2963     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2964     return yylloc;
2965 }
2966 
yyset_lloc(YYLTYPE * yylloc_param,yyscan_t yyscanner)2967 void yyset_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
2968 {
2969     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2970     yylloc = yylloc_param;
2971 }
2972 
2973 /* %endif */
2974 
2975 /* User-visible API */
2976 
2977 /* yylex_init is special because it creates the scanner itself, so it is
2978  * the ONLY reentrant function that doesn't take the scanner as the last argument.
2979  * That's why we explicitly handle the declaration, instead of using our macros.
2980  */
yylex_init(yyscan_t * ptr_yy_globals)2981 int yylex_init(yyscan_t* ptr_yy_globals)
2982 {
2983     if (ptr_yy_globals == NULL){
2984         errno = EINVAL;
2985         return 1;
2986     }
2987 
2988     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2989 
2990     if (*ptr_yy_globals == NULL){
2991         errno = ENOMEM;
2992         return 1;
2993     }
2994 
2995     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2996     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2997 
2998     return yy_init_globals ( *ptr_yy_globals );
2999 }
3000 
3001 /* yylex_init_extra has the same functionality as yylex_init, but follows the
3002  * convention of taking the scanner as the last argument. Note however, that
3003  * this is a *pointer* to a scanner, as it will be allocated by this call (and
3004  * is the reason, too, why this function also must handle its own declaration).
3005  * The user defined value in the first argument will be available to yyalloc in
3006  * the yyextra field.
3007  */
yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t * ptr_yy_globals)3008 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
3009 {
3010     struct yyguts_t dummy_yyguts;
3011 
3012     yyset_extra (yy_user_defined, &dummy_yyguts);
3013 
3014     if (ptr_yy_globals == NULL){
3015         errno = EINVAL;
3016         return 1;
3017     }
3018 
3019     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3020 
3021     if (*ptr_yy_globals == NULL){
3022         errno = ENOMEM;
3023         return 1;
3024     }
3025 
3026     /* By setting to 0xAA, we expose bugs in
3027     yy_init_globals. Leave at 0x00 for releases. */
3028     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3029 
3030     yyset_extra (yy_user_defined, *ptr_yy_globals);
3031 
3032     return yy_init_globals ( *ptr_yy_globals );
3033 }
3034 
3035 /* %endif if-c-only */
3036 
3037 /* %if-c-only */
yy_init_globals(yyscan_t yyscanner)3038 static int yy_init_globals (yyscan_t yyscanner)
3039 {
3040     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3041     /* Initialization is the same as for the non-reentrant scanner.
3042      * This function is called from yylex_destroy(), so don't allocate here.
3043      */
3044 
3045     yyg->yy_buffer_stack = NULL;
3046     yyg->yy_buffer_stack_top = 0;
3047     yyg->yy_buffer_stack_max = 0;
3048     yyg->yy_c_buf_p = NULL;
3049     yyg->yy_init = 0;
3050     yyg->yy_start = 0;
3051 
3052     yyg->yy_start_stack_ptr = 0;
3053     yyg->yy_start_stack_depth = 0;
3054     yyg->yy_start_stack =  NULL;
3055 
3056 /* Defined in main.c */
3057 #ifdef YY_STDINIT
3058     yyin = stdin;
3059     yyout = stdout;
3060 #else
3061     yyin = NULL;
3062     yyout = NULL;
3063 #endif
3064 
3065     /* For future reference: Set errno on error, since we are called by
3066      * yylex_init()
3067      */
3068     return 0;
3069 }
3070 /* %endif */
3071 
3072 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
3073 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(yyscan_t yyscanner)3074 int yylex_destroy  (yyscan_t yyscanner)
3075 {
3076     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3077 
3078     /* Pop the buffer stack, destroying each element. */
3079 	while(YY_CURRENT_BUFFER){
3080 		yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
3081 		YY_CURRENT_BUFFER_LVALUE = NULL;
3082 		yypop_buffer_state(yyscanner);
3083 	}
3084 
3085 	/* Destroy the stack itself. */
3086 	yyfree(yyg->yy_buffer_stack , yyscanner);
3087 	yyg->yy_buffer_stack = NULL;
3088 
3089     /* Destroy the start condition stack. */
3090         yyfree( yyg->yy_start_stack , yyscanner );
3091         yyg->yy_start_stack = NULL;
3092 
3093     /* Reset the globals. This is important in a non-reentrant scanner so the next time
3094      * yylex() is called, initialization will occur. */
3095     yy_init_globals( yyscanner);
3096 
3097 /* %if-reentrant */
3098     /* Destroy the main struct (reentrant only). */
3099     yyfree ( yyscanner , yyscanner );
3100     yyscanner = NULL;
3101 /* %endif */
3102     return 0;
3103 }
3104 /* %endif */
3105 
3106 /*
3107  * Internal utility routines.
3108  */
3109 
3110 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n,yyscan_t yyscanner)3111 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
3112 {
3113 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3114 	(void)yyg;
3115 
3116 	int i;
3117 	for ( i = 0; i < n; ++i )
3118 		s1[i] = s2[i];
3119 }
3120 #endif
3121 
3122 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s,yyscan_t yyscanner)3123 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
3124 {
3125 	int n;
3126 	for ( n = 0; s[n]; ++n )
3127 		;
3128 
3129 	return n;
3130 }
3131 #endif
3132 
yyalloc(yy_size_t size,yyscan_t yyscanner)3133 void *yyalloc (yy_size_t  size , yyscan_t yyscanner)
3134 {
3135 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3136 	(void)yyg;
3137 	return malloc(size);
3138 }
3139 
yyrealloc(void * ptr,yy_size_t size,yyscan_t yyscanner)3140 void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
3141 {
3142 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3143 	(void)yyg;
3144 
3145 	/* The cast to (char *) in the following accommodates both
3146 	 * implementations that use char* generic pointers, and those
3147 	 * that use void* generic pointers.  It works with the latter
3148 	 * because both ANSI C and C++ allow castless assignment from
3149 	 * any pointer type to void*, and deal with argument conversions
3150 	 * as though doing an assignment.
3151 	 */
3152 	return realloc(ptr, size);
3153 }
3154 
yyfree(void * ptr,yyscan_t yyscanner)3155 void yyfree (void * ptr , yyscan_t yyscanner)
3156 {
3157 	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3158 	(void)yyg;
3159 	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
3160 }
3161 
3162 /* %if-tables-serialization definitions */
3163 /* %define-yytables   The name for this specific scanner's tables. */
3164 #define YYTABLES_NAME "yytables"
3165 /* %endif */
3166 
3167 /* %ok-for-header */
3168 
3169 #line 233 "ac-scanner.l"
3170 
3171 
3172 /* Private functions
3173  *---------------------------------------------------------------------------*/
3174 
3175 
3176 static gint
amp_ac_scanner_parse_end(AmpAcScanner * scanner)3177 amp_ac_scanner_parse_end (AmpAcScanner *scanner)
3178 {
3179 
3180    	if (scanner->stream == NULL)
3181    	{
3182 		yyterminate();
3183 	}
3184    	else
3185    	{
3186 		if (scanner->eof)
3187 		{
3188 			scanner->eof = FALSE;
3189 			return END_OF_FILE;
3190 		}
3191 
3192 		yypop_buffer_state(scanner->scanner);
3193     	scanner->stream = anjuta_token_stream_pop (scanner->stream);
3194 
3195 		if (scanner->stream == NULL)
3196 		{
3197 			yyterminate();
3198 		}
3199 		else
3200 		{
3201 			scanner->eof = anjuta_token_stream_get_current_file (scanner->stream) != NULL;
3202 
3203 			/* Continue parsing the parent file */
3204 			return 1;
3205 		}
3206 	}
3207 }
3208 
3209 /* Parser functions
3210  *---------------------------------------------------------------------------*/
3211 
3212 void
amp_ac_yyerror(YYLTYPE * loc,AmpAcScanner * scanner,char const * s)3213 amp_ac_yyerror (YYLTYPE *loc, AmpAcScanner *scanner, char const *s)
3214 {
3215     AnjutaTokenFileLocation location;
3216 
3217     if (amp_project_get_token_location (scanner->project, &location, *loc))
3218     {
3219         g_message ("%s:%d.%d %s\n", location.filename, location.line, location.column, s);
3220         g_free (location.filename);
3221     }
3222     else
3223     {
3224         g_message ("%s \n", s);
3225     }
3226 }
3227 
3228 void
amp_ac_scanner_load_module(AmpAcScanner * scanner,AnjutaToken * module)3229 amp_ac_scanner_load_module (AmpAcScanner *scanner, AnjutaToken *module)
3230 {
3231     amp_project_load_module (scanner->project, module);
3232 }
3233 
3234 void
amp_ac_scanner_load_config(AmpAcScanner * scanner,AnjutaToken * list)3235 amp_ac_scanner_load_config (AmpAcScanner *scanner, AnjutaToken *list)
3236 {
3237     amp_project_load_config (scanner->project, list);
3238 }
3239 
3240 void
amp_ac_scanner_load_properties(AmpAcScanner * scanner,AnjutaToken * macro,AnjutaToken * list)3241 amp_ac_scanner_load_properties (AmpAcScanner *scanner, AnjutaToken *macro, AnjutaToken *list)
3242 {
3243     amp_project_load_properties (scanner->project, macro, list);
3244 }
3245 
3246 void
amp_ac_scanner_include(AmpAcScanner * scanner,AnjutaToken * list)3247 amp_ac_scanner_include (AmpAcScanner *scanner, AnjutaToken *list)
3248 {
3249 	GFile *file;
3250 	AnjutaTokenFile *include;
3251 	AnjutaToken *token;
3252 	AnjutaToken *name;
3253 	gchar *filename;
3254 	AnjutaProjectNode *source;
3255 
3256 	name = anjuta_token_first_item (list);  	/* m4_include macro */
3257 	name = anjuta_token_next_item (name);		/* arguments list */
3258 	name = anjuta_token_first_item (name);		/* filename */
3259 	filename = g_strstrip (anjuta_token_evaluate (name));
3260 	//g_message ("read include =%s=", filename);
3261 	file = g_file_resolve_relative_path (anjuta_token_stream_get_current_directory (scanner->stream), filename);
3262 	g_free (filename);
3263 	source = amp_source_node_new (file, ANJUTA_PROJECT_PROJECT | ANJUTA_PROJECT_FRAME | ANJUTA_PROJECT_READ_ONLY);
3264 	anjuta_project_node_append (ANJUTA_PROJECT_NODE (scanner->project), source);
3265 	include = anjuta_token_file_new (file);
3266 	token = anjuta_token_file_load (include, NULL);
3267 	amp_ac_scanner_parse_token (scanner, list, token, 0, file, NULL);
3268 	g_object_unref (file);
3269 }
3270 
3271 void
amp_ac_scanner_update_variable(AmpAcScanner * scanner,AnjutaToken * variable)3272 amp_ac_scanner_update_variable (AmpAcScanner *scanner, AnjutaToken *variable)
3273 {
3274 	AnjutaToken *arg;
3275 	char *name = NULL;
3276 	AnjutaToken *value = NULL;
3277 
3278 	arg = anjuta_token_first_word (variable);
3279 	name = g_strstrip (anjuta_token_evaluate (arg));
3280 	value = anjuta_token_nth_word (variable, 2);
3281 
3282 	g_hash_table_insert (scanner->variables, name, value);
3283 }
3284 
3285 void
amp_ac_scanner_subst_variable(AmpAcScanner * scanner,AnjutaToken * list)3286 amp_ac_scanner_subst_variable (AmpAcScanner *scanner, AnjutaToken *list)
3287 {
3288 	AnjutaToken *arg;
3289 	char *name = NULL;
3290 	AnjutaToken *value = NULL;
3291 
3292 	arg = anjuta_token_first_word (list);
3293 	name = g_strstrip (anjuta_token_evaluate (arg));
3294 	value = anjuta_token_nth_word (list, 2);
3295 	if (value == NULL)
3296 	{
3297 		value = g_hash_table_lookup (scanner->variables, name);
3298 	}
3299 
3300 	amp_project_add_subst_variable (scanner->project, name, value);
3301 }
3302 
3303 
3304 /* Public functions
3305  *---------------------------------------------------------------------------*/
3306 
3307 AnjutaToken *
amp_ac_scanner_parse_token(AmpAcScanner * scanner,AnjutaToken * root,AnjutaToken * content,gint start,GFile * filename,GError ** error)3308 amp_ac_scanner_parse_token (AmpAcScanner *scanner, AnjutaToken *root, AnjutaToken *content, gint start, GFile *filename, GError **error)
3309 {
3310     AnjutaToken *first;
3311     AnjutaTokenStream *stream;
3312 
3313     stream = anjuta_token_stream_push (scanner->stream, root, content, filename);
3314     first = anjuta_token_stream_get_root (stream);
3315 
3316 	scanner->eof = filename != NULL;
3317 
3318     if (scanner->stream != NULL)
3319     {
3320         /* Parse an included file or a expanded variable */
3321 
3322         scanner->stream = stream;
3323         yypush_buffer_state(yy_create_buffer(NULL, YY_BUF_SIZE, scanner->scanner), scanner->scanner);
3324     }
3325     else
3326     {
3327         amp_ac_yypstate *ps;
3328         gint status;
3329         YYSTYPE yylval_param;
3330         YYLTYPE yylloc_param;
3331 
3332         scanner->stream = stream;
3333         ps = amp_ac_yypstate_new ();
3334 
3335         yylval_param = NULL;
3336         yylloc_param = NULL;
3337         switch (start)
3338         {
3339         case AC_SPACE_LIST_STATE:
3340             amp_ac_yypush_parse (ps, START_SPACE_LIST, &yylval_param, &yylloc_param, scanner);
3341             yy_push_state (SPACE_LIST, scanner->scanner);
3342             break;
3343         default:
3344             break;
3345         }
3346 
3347         do
3348         {
3349             gint yychar = ac_yylex (&yylval_param, &yylloc_param, scanner->scanner);
3350 
3351             yylloc_param = yylval_param;
3352             status = amp_ac_yypush_parse (ps, yychar, &yylval_param, &yylloc_param, scanner);
3353 
3354         } while (status == YYPUSH_MORE);
3355         amp_ac_yypstate_delete (ps);
3356     }
3357 
3358     return first;
3359 }
3360 
3361 /* Constructor & Destructor
3362  *---------------------------------------------------------------------------*/
3363 
3364 AmpAcScanner *
amp_ac_scanner_new(AmpProject * project)3365 amp_ac_scanner_new (AmpProject *project)
3366 {
3367 	AmpAcScanner *scanner;
3368 
3369 	scanner = g_new0 (AmpAcScanner, 1);
3370 
3371     yylex_init(&scanner->scanner);
3372     yyset_extra (scanner, scanner->scanner);
3373 
3374     scanner->project = project;
3375 
3376 	scanner->variables = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, NULL);
3377 
3378 	return scanner;
3379 };
3380 
3381 void
amp_ac_scanner_free(AmpAcScanner * scanner)3382 amp_ac_scanner_free (AmpAcScanner *scanner)
3383 {
3384 	g_return_if_fail (scanner != NULL);
3385 
3386 	g_hash_table_remove_all (scanner->variables);
3387     yylex_destroy(scanner->scanner);
3388 
3389 	g_free (scanner);
3390 }
3391 
3392