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