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