1 #define yy_create_buffer _mdir__create_buffer
2 #define yy_delete_buffer _mdir__delete_buffer
3 #define yy_scan_buffer _mdir__scan_buffer
4 #define yy_scan_string _mdir__scan_string
5 #define yy_scan_bytes _mdir__scan_bytes
6 #define yy_flex_debug _mdir__flex_debug
7 #define yy_init_buffer _mdir__init_buffer
8 #define yy_flush_buffer _mdir__flush_buffer
9 #define yy_load_buffer_state _mdir__load_buffer_state
10 #define yy_switch_to_buffer _mdir__switch_to_buffer
11 #define yyin _mdir_in
12 #define yyleng _mdir_leng
13 #define yylex _mdir_lex
14 #define yyout _mdir_out
15 #define yyrestart _mdir_restart
16 #define yytext _mdir_text
17 
18 #line 19 "dirlex.c"
19 /* A lexical scanner generated by flex */
20 
21 /* Scanner skeleton version:
22  * $Header: /cvsroot/libmimedir/libmimedir/dirlex.c,v 1.10 2005/03/03 20:48:51 vlm Exp $
23  */
24 
25 #define FLEX_SCANNER
26 #define YY_FLEX_MAJOR_VERSION 2
27 #define YY_FLEX_MINOR_VERSION 5
28 
29 #include <stdio.h>
30 
31 
32 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
33 #ifdef c_plusplus
34 #ifndef __cplusplus
35 #define __cplusplus
36 #endif
37 #endif
38 
39 
40 #ifdef __cplusplus
41 
42 #include <stdlib.h>
43 #include <unistd.h>
44 
45 /* Use prototypes in function declarations. */
46 #define YY_USE_PROTOS
47 
48 /* The "const" storage-class-modifier is valid. */
49 #define YY_USE_CONST
50 
51 #else	/* ! __cplusplus */
52 
53 #if __STDC__
54 
55 #define YY_USE_PROTOS
56 #define YY_USE_CONST
57 
58 #endif	/* __STDC__ */
59 #endif	/* ! __cplusplus */
60 
61 #ifdef __TURBOC__
62  #pragma warn -rch
63  #pragma warn -use
64 #include <io.h>
65 #include <stdlib.h>
66 #define YY_USE_CONST
67 #define YY_USE_PROTOS
68 #endif
69 
70 #ifdef YY_USE_CONST
71 #define yyconst const
72 #else
73 #define yyconst
74 #endif
75 
76 
77 #ifdef YY_USE_PROTOS
78 #define YY_PROTO(proto) proto
79 #else
80 #define YY_PROTO(proto) ()
81 #endif
82 
83 /* Returned upon end-of-file. */
84 #define YY_NULL 0
85 
86 /* Promotes a possibly negative, possibly signed char to an unsigned
87  * integer for use as an array index.  If the signed char is negative,
88  * we want to instead treat it as an 8-bit unsigned char, hence the
89  * double cast.
90  */
91 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
92 
93 /* Enter a start condition.  This macro really ought to take a parameter,
94  * but we do it the disgusting crufty way forced on us by the ()-less
95  * definition of BEGIN.
96  */
97 #define BEGIN yy_start = 1 + 2 *
98 
99 /* Translate the current start state into a value that can be later handed
100  * to BEGIN to return to the state.  The YYSTATE alias is for lex
101  * compatibility.
102  */
103 #define YY_START ((yy_start - 1) / 2)
104 #define YYSTATE YY_START
105 
106 /* Action number for EOF rule of a given start state. */
107 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
108 
109 /* Special action meaning "start processing a new file". */
110 #define YY_NEW_FILE yyrestart( yyin )
111 
112 #define YY_END_OF_BUFFER_CHAR 0
113 
114 /* Size of default input buffer. */
115 #define YY_BUF_SIZE 16384
116 
117 typedef struct yy_buffer_state *YY_BUFFER_STATE;
118 
119 extern int yyleng;
120 extern FILE *yyin, *yyout;
121 
122 #define EOB_ACT_CONTINUE_SCAN 0
123 #define EOB_ACT_END_OF_FILE 1
124 #define EOB_ACT_LAST_MATCH 2
125 
126 /* The funky do-while in the following #define is used to turn the definition
127  * int a single C statement (which needs a semi-colon terminator).  This
128  * avoids problems with code like:
129  *
130  * 	if ( condition_holds )
131  *		yyless( 5 );
132  *	else
133  *		do_something_else();
134  *
135  * Prior to using the do-while the compiler would get upset at the
136  * "else" because it interpreted the "if" statement as being all
137  * done when it reached the ';' after the yyless() call.
138  */
139 
140 /* Return all but the first 'n' matched characters back to the input stream. */
141 
142 #define yyless(n) \
143 	do \
144 		{ \
145 		/* Undo effects of setting up yytext. */ \
146 		*yy_cp = yy_hold_char; \
147 		YY_RESTORE_YY_MORE_OFFSET \
148 		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
149 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
150 		} \
151 	while ( 0 )
152 
153 #define unput(c) yyunput( c, yytext_ptr )
154 
155 /* The following is because we cannot portably get our hands on size_t
156  * (without autoconf's help, which isn't available because we want
157  * flex-generated scanners to compile on their own).
158  */
159 typedef unsigned int yy_size_t;
160 
161 
162 struct yy_buffer_state
163 	{
164 	FILE *yy_input_file;
165 
166 	char *yy_ch_buf;		/* input buffer */
167 	char *yy_buf_pos;		/* current position in input buffer */
168 
169 	/* Size of input buffer in bytes, not including room for EOB
170 	 * characters.
171 	 */
172 	yy_size_t yy_buf_size;
173 
174 	/* Number of characters read into yy_ch_buf, not including EOB
175 	 * characters.
176 	 */
177 	int yy_n_chars;
178 
179 	/* Whether we "own" the buffer - i.e., we know we created it,
180 	 * and can realloc() it to grow it, and should free() it to
181 	 * delete it.
182 	 */
183 	int yy_is_our_buffer;
184 
185 	/* Whether this is an "interactive" input source; if so, and
186 	 * if we're using stdio for input, then we want to use getc()
187 	 * instead of fread(), to make sure we stop fetching input after
188 	 * each newline.
189 	 */
190 	int yy_is_interactive;
191 
192 	/* Whether we're considered to be at the beginning of a line.
193 	 * If so, '^' rules will be active on the next match, otherwise
194 	 * not.
195 	 */
196 	int yy_at_bol;
197 
198 	/* Whether to try to fill the input buffer when we reach the
199 	 * end of it.
200 	 */
201 	int yy_fill_buffer;
202 
203 	int yy_buffer_status;
204 #define YY_BUFFER_NEW 0
205 #define YY_BUFFER_NORMAL 1
206 	/* When an EOF's been seen but there's still some text to process
207 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
208 	 * shouldn't try reading from the input source any more.  We might
209 	 * still have a bunch of tokens to match, though, because of
210 	 * possible backing-up.
211 	 *
212 	 * When we actually see the EOF, we change the status to "new"
213 	 * (via yyrestart()), so that the user can continue scanning by
214 	 * just pointing yyin at a new input file.
215 	 */
216 #define YY_BUFFER_EOF_PENDING 2
217 	};
218 
219 static YY_BUFFER_STATE yy_current_buffer = 0;
220 
221 /* We provide macros for accessing buffer states in case in the
222  * future we want to put the buffer states in a more general
223  * "scanner state".
224  */
225 #define YY_CURRENT_BUFFER yy_current_buffer
226 
227 
228 /* yy_hold_char holds the character lost when yytext is formed. */
229 static char yy_hold_char;
230 
231 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
232 
233 
234 int yyleng;
235 
236 /* Points to current character in buffer. */
237 static char *yy_c_buf_p = (char *) 0;
238 static int yy_init = 1;		/* whether we need to initialize */
239 static int yy_start = 0;	/* start state number */
240 
241 /* Flag which is used to allow yywrap()'s to do buffer switches
242  * instead of setting up a fresh yyin.  A bit of a hack ...
243  */
244 static int yy_did_buffer_switch_on_eof;
245 
246 void yyrestart YY_PROTO(( FILE *input_file ));
247 
248 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
249 void yy_load_buffer_state YY_PROTO(( void ));
250 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
251 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
252 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
253 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
254 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
255 
256 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
257 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
258 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
259 
260 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
261 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
262 static void yy_flex_free YY_PROTO(( void * ));
263 
264 #define yy_new_buffer yy_create_buffer
265 
266 #define yy_set_interactive(is_interactive) \
267 	{ \
268 	if ( ! yy_current_buffer ) \
269 		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
270 	yy_current_buffer->yy_is_interactive = is_interactive; \
271 	}
272 
273 #define yy_set_bol(at_bol) \
274 	{ \
275 	if ( ! yy_current_buffer ) \
276 		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
277 	yy_current_buffer->yy_at_bol = at_bol; \
278 	}
279 
280 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
281 
282 
283 #define yywrap() 1
284 #define YY_SKIP_YYWRAP
285 typedef unsigned char YY_CHAR;
286 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
287 typedef int yy_state_type;
288 extern char *yytext;
289 #define yytext_ptr yytext
290 
291 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
292 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
293 static int yy_get_next_buffer YY_PROTO(( void ));
294 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
295 
296 /* Done after the current pattern has been matched and before the
297  * corresponding action - sets up yytext.
298  */
299 #define YY_DO_BEFORE_ACTION \
300 	yytext_ptr = yy_bp; \
301 	yyleng = (int) (yy_cp - yy_bp); \
302 	yy_hold_char = *yy_cp; \
303 	*yy_cp = '\0'; \
304 	yy_c_buf_p = yy_cp;
305 
306 #define YY_NUM_RULES 23
307 #define YY_END_OF_BUFFER 24
308 static yyconst short int yy_accept[64] =
309     {   0,
310         0,    0,    0,    0,   13,   13,   18,   18,    0,    0,
311         7,    7,   12,   12,   24,   22,   21,   22,    1,    3,
312         2,   13,   15,   22,   18,   20,   22,   22,   22,   22,
313         5,    6,    7,    8,    7,    9,   12,   22,   22,   11,
314        21,    1,    0,   13,   14,   15,   18,   19,   20,   17,
315        16,    4,    0,    5,    7,    7,    0,    7,   12,   10,
316         0,    1,    0
317     } ;
318 
319 static yyconst int yy_ec[256] =
320     {   0,
321         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
322         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
323         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
324         1,    2,    5,    6,    5,    5,    5,    5,    5,    5,
325         5,    5,    5,    7,    8,    9,    5,    8,    8,    8,
326         8,    8,    8,    8,    8,    8,    8,   10,   11,    5,
327        12,    5,    5,    5,    8,    8,    8,    8,    8,    8,
328         8,    8,    8,    8,    8,    8,    8,   13,    8,    8,
329         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
330         5,   14,    5,    5,    5,    5,    8,    8,    8,    8,
331 
332         8,    8,    8,    8,    8,    8,    8,    8,    8,   13,
333         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
334         8,    8,    5,    5,    5,    5,    1,    5,    5,    5,
335         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
336         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
337         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
338         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
339         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
340         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
341         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
342 
343         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
344         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
345         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
346         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
347         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
348         5,    5,    5,    5,    5
349     } ;
350 
351 static yyconst int yy_meta[15] =
352     {   0,
353         1,    2,    3,    1,    2,    4,    2,    5,    5,    6,
354         6,    2,    5,    7
355     } ;
356 
357 static yyconst short int yy_base[75] =
358     {   0,
359         0,   11,    0,    6,   24,   28,   32,   46,   58,    0,
360        71,    0,   85,   91,   58,  162,  162,   54,   47,  162,
361       162,    0,   53,   51,    0,   51,   49,   38,   46,   42,
362        10,  162,   37,   37,  162,  162,    0,   39,   37,  162,
363       162,   29,   13,    0,  162,   28,    0,  162,   20,  162,
364       162,  162,   18,   26,    5,  162,    3,    0,    0,  162,
365         4,   29,  162,   97,  104,  111,  118,    0,  124,  130,
366       136,  142,  148,  154
367     } ;
368 
369 static yyconst short int yy_def[75] =
370     {   0,
371        64,   64,   64,   64,   65,   65,   66,   66,   64,    9,
372        63,   11,   67,   67,   63,   63,   63,   63,   68,   63,
373        63,   69,   63,   63,   70,   63,   63,   71,   63,   63,
374        63,   63,   72,   73,   63,   63,   74,   63,   63,   63,
375        63,   68,   63,   69,   63,   63,   70,   63,   63,   63,
376        63,   63,   63,   63,   72,   63,   73,   63,   74,   63,
377        63,   63,    0,   63,   63,   63,   63,   63,   63,   63,
378        63,   63,   63,   63
379     } ;
380 
381 static yyconst short int yy_nxt[177] =
382     {   0,
383        63,   63,   17,   18,   42,   60,   56,   19,   58,   20,
384        21,   56,   19,   17,   18,   20,   21,   54,   19,   52,
385        62,   48,   54,   19,   16,   62,   23,   24,   16,   45,
386        23,   24,   16,   54,   26,   27,   62,   43,   54,   61,
387        60,   62,   58,   56,   53,   28,   16,   52,   26,   27,
388        51,   49,   48,   46,   45,   43,   41,   63,   63,   28,
389        29,   30,   63,   63,   63,   31,   63,   63,   63,   32,
390        31,   16,   33,   16,   16,   33,   34,   35,   33,   33,
391        36,   36,   33,   33,   33,   16,   63,   38,   39,   63,
392        40,   16,   63,   38,   39,   63,   40,   16,   16,   16,
393 
394        16,   16,   16,   16,   22,   22,   22,   22,   22,   22,
395        22,   25,   25,   25,   25,   25,   25,   25,   37,   37,
396        37,   37,   37,   37,   37,   44,   63,   44,   44,   44,
397        44,   47,   63,   47,   47,   47,   50,   50,   63,   50,
398        50,   50,   50,   55,   63,   63,   55,   63,   55,   57,
399        63,   57,   57,   57,   57,   59,   63,   63,   59,   59,
400        59,   15,   63,   63,   63,   63,   63,   63,   63,   63,
401        63,   63,   63,   63,   63,   63
402     } ;
403 
404 static yyconst short int yy_chk[177] =
405     {   0,
406         0,    0,    1,    1,   68,   61,   58,    1,   57,    3,
407         3,   55,    1,    2,    2,    4,    4,   31,    2,   53,
408        43,   49,   31,    2,    5,   43,    5,    5,    6,   46,
409         6,    6,    7,   54,    7,    7,   62,   42,   54,   39,
410        38,   62,   34,   33,   30,    7,    8,   29,    8,    8,
411        28,   27,   26,   24,   23,   19,   18,   15,    0,    8,
412         9,    9,    0,    0,    0,    9,    0,    0,    0,    9,
413         9,   11,   11,   11,   11,   11,   11,   11,   11,   11,
414        11,   11,   11,   11,   11,   13,    0,   13,   13,    0,
415        13,   14,    0,   14,   14,    0,   14,   64,   64,   64,
416 
417        64,   64,   64,   64,   65,   65,   65,   65,   65,   65,
418        65,   66,   66,   66,   66,   66,   66,   66,   67,   67,
419        67,   67,   67,   67,   67,   69,    0,   69,   69,   69,
420        69,   70,    0,   70,   70,   70,   71,   71,    0,   71,
421        71,   71,   71,   72,    0,    0,   72,    0,   72,   73,
422         0,   73,   73,   73,   73,   74,    0,    0,   74,   74,
423        74,   63,   63,   63,   63,   63,   63,   63,   63,   63,
424        63,   63,   63,   63,   63,   63
425     } ;
426 
427 static yy_state_type yy_last_accepting_state;
428 static char *yy_last_accepting_cpos;
429 
430 /* The intent behind this definition is that it'll catch
431  * any uses of REJECT which flex missed.
432  */
433 #define REJECT reject_used_but_not_detected
434 #define yymore() yymore_used_but_not_detected
435 #define YY_MORE_ADJ 0
436 #define YY_RESTORE_YY_MORE_OFFSET
437 char *yytext;
438 #line 1 "dirlex.l"
439 #define INITIAL 0
440 #line 2 "dirlex.l"
441 /*-
442  * Copyright (c) 2001, 2003, 2005 Lev Walkin <vlm@lionet.info>.
443  * All rights reserved.
444  *
445  * Redistribution and use in source and binary forms, with or without
446  * modification, are permitted provided that the following conditions
447  * are met:
448  * 1. Redistributions of source code must retain the above copyright
449  *    notice, this list of conditions and the following disclaimer.
450  * 2. Redistributions in binary form must reproduce the above copyright
451  *    notice, this list of conditions and the following disclaimer in the
452  *    documentation and/or other materials provided with the distribution.
453  *
454  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
455  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
456  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
457  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
458  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
459  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
460  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
461  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
462  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
463  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
464  * SUCH DAMAGE.
465  *
466  * $Id: dirlex.c,v 1.10 2005/03/03 20:48:51 vlm Exp $
467  */
468 
469 #include "intern.h"
470 #include "dirsynt.h"
471 
472 #define	YY_DECL	int yylex (YYSTYPE *_mdir_lval, void *arg)
473 
474 #define YY_NEVER_INTERACTIVE 1
475 #define YY_STACK_USED 1
476 #define YY_NO_INPUT 1
477 #define YY_NO_UNPUT 1
478 /* Basic character sets */
479 /* Any character except CTLs, DQUOTE */
480 /* Any character except CTLs, DQUOTE, ";", ":", "," */
481 /* WSP + visible (printing) characters + NON-ASCII */
482 /* WSP + visible (printing) characters + NON-ASCII without backslash */
483 /* Basic tokens */
484 #define optParam 1
485 
486 #define Value 2
487 
488 #define TextValue 3
489 
490 #define paramName 4
491 
492 #define paramValue 5
493 
494 #define paramQuotedValue 6
495 
496 #line 497 "dirlex.c"
497 
498 /* Macros after this point can all be overridden by user definitions in
499  * section 1.
500  */
501 
502 #ifndef YY_SKIP_YYWRAP
503 #ifdef __cplusplus
504 extern "C" int yywrap YY_PROTO(( void ));
505 #else
506 extern int yywrap YY_PROTO(( void ));
507 #endif
508 #endif
509 
510 #ifndef YY_NO_UNPUT
511 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
512 #endif
513 
514 #ifndef yytext_ptr
515 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
516 #endif
517 
518 #ifdef YY_NEED_STRLEN
519 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
520 #endif
521 
522 #ifndef YY_NO_INPUT
523 #ifdef __cplusplus
524 static int yyinput YY_PROTO(( void ));
525 #else
526 static int input YY_PROTO(( void ));
527 #endif
528 #endif
529 
530 #if YY_STACK_USED
531 static int yy_start_stack_ptr = 0;
532 static int yy_start_stack_depth = 0;
533 static int *yy_start_stack = 0;
534 #ifndef YY_NO_PUSH_STATE
535 static void yy_push_state YY_PROTO(( int new_state ));
536 #endif
537 #ifndef YY_NO_POP_STATE
538 static void yy_pop_state YY_PROTO(( void ));
539 #endif
540 #ifndef YY_NO_TOP_STATE
541 static int yy_top_state YY_PROTO(( void ));
542 #endif
543 
544 #else
545 #define YY_NO_PUSH_STATE 1
546 #define YY_NO_POP_STATE 1
547 #define YY_NO_TOP_STATE 1
548 #endif
549 
550 #ifdef YY_MALLOC_DECL
551 YY_MALLOC_DECL
552 #else
553 #if __STDC__
554 #ifndef __cplusplus
555 #include <stdlib.h>
556 #endif
557 #else
558 /* Just try to get by without declaring the routines.  This will fail
559  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
560  * or sizeof(void*) != sizeof(int).
561  */
562 #endif
563 #endif
564 
565 /* Amount of stuff to slurp up with each read. */
566 #ifndef YY_READ_BUF_SIZE
567 #define YY_READ_BUF_SIZE 8192
568 #endif
569 
570 /* Copy whatever the last rule matched to the standard output. */
571 
572 #ifndef ECHO
573 /* This used to be an fputs(), but since the string might contain NUL's,
574  * we now use fwrite().
575  */
576 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
577 #endif
578 
579 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
580  * is returned in "result".
581  */
582 #ifndef YY_INPUT
583 #define YY_INPUT(buf,result,max_size) \
584 	if ( yy_current_buffer->yy_is_interactive ) \
585 		{ \
586 		int c = '*', n; \
587 		for ( n = 0; n < max_size && \
588 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
589 			buf[n] = (char) c; \
590 		if ( c == '\n' ) \
591 			buf[n++] = (char) c; \
592 		if ( c == EOF && ferror( yyin ) ) \
593 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
594 		result = n; \
595 		} \
596 	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
597 		  && ferror( yyin ) ) \
598 		YY_FATAL_ERROR( "input in flex scanner failed" );
599 #endif
600 
601 /* No semi-colon after return; correct usage is to write "yyterminate();" -
602  * we don't want an extra ';' after the "return" because that will cause
603  * some compilers to complain about unreachable statements.
604  */
605 #ifndef yyterminate
606 #define yyterminate() return YY_NULL
607 #endif
608 
609 /* Number of entries by which start-condition stack grows. */
610 #ifndef YY_START_STACK_INCR
611 #define YY_START_STACK_INCR 25
612 #endif
613 
614 /* Report a fatal error. */
615 #ifndef YY_FATAL_ERROR
616 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
617 #endif
618 
619 /* Default declaration of generated scanner - a define so the user can
620  * easily add parameters.
621  */
622 #ifndef YY_DECL
623 #define YY_DECL int yylex YY_PROTO(( void ))
624 #endif
625 
626 /* Code executed at the beginning of each rule, after yytext and yyleng
627  * have been set up.
628  */
629 #ifndef YY_USER_ACTION
630 #define YY_USER_ACTION
631 #endif
632 
633 /* Code executed at the end of each rule. */
634 #ifndef YY_BREAK
635 #define YY_BREAK break;
636 #endif
637 
638 #define YY_RULE_SETUP \
639 	YY_USER_ACTION
640 
641 YY_DECL
642 	{
643 	register yy_state_type yy_current_state;
644 	register char *yy_cp, *yy_bp;
645 	register int yy_act;
646 
647 #line 82 "dirlex.l"
648 
649 
650 #line 651 "dirlex.c"
651 
652 	if ( yy_init )
653 		{
654 		yy_init = 0;
655 
656 #ifdef YY_USER_INIT
657 		YY_USER_INIT;
658 #endif
659 
660 		if ( ! yy_start )
661 			yy_start = 1;	/* first start state */
662 
663 		if ( ! yyin )
664 			yyin = stdin;
665 
666 		if ( ! yyout )
667 			yyout = stdout;
668 
669 		if ( ! yy_current_buffer )
670 			yy_current_buffer =
671 				yy_create_buffer( yyin, YY_BUF_SIZE );
672 
673 		yy_load_buffer_state();
674 		}
675 
676 	while ( 1 )		/* loops until end-of-file is reached */
677 		{
678 		yy_cp = yy_c_buf_p;
679 
680 		/* Support of yytext. */
681 		*yy_cp = yy_hold_char;
682 
683 		/* yy_bp points to the position in yy_ch_buf of the start of
684 		 * the current run.
685 		 */
686 		yy_bp = yy_cp;
687 
688 		yy_current_state = yy_start;
689 yy_match:
690 		do
691 			{
692 			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
693 			if ( yy_accept[yy_current_state] )
694 				{
695 				yy_last_accepting_state = yy_current_state;
696 				yy_last_accepting_cpos = yy_cp;
697 				}
698 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
699 				{
700 				yy_current_state = (int) yy_def[yy_current_state];
701 				if ( yy_current_state >= 64 )
702 					yy_c = yy_meta[(unsigned int) yy_c];
703 				}
704 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
705 			++yy_cp;
706 			}
707 		while ( yy_base[yy_current_state] != 162 );
708 
709 yy_find_action:
710 		yy_act = yy_accept[yy_current_state];
711 		if ( yy_act == 0 )
712 			{ /* have to back up */
713 			yy_cp = yy_last_accepting_cpos;
714 			yy_current_state = yy_last_accepting_state;
715 			yy_act = yy_accept[yy_current_state];
716 			}
717 
718 		YY_DO_BEFORE_ACTION;
719 
720 
721 do_action:	/* This label is used only to access EOF actions. */
722 
723 
724 		switch ( yy_act )
725 	{ /* beginning of action switch */
726 			case 0: /* must back up */
727 			/* undo the effects of YY_DO_BEFORE_ACTION */
728 			*yy_cp = yy_hold_char;
729 			yy_cp = yy_last_accepting_cpos;
730 			yy_current_state = yy_last_accepting_state;
731 			goto yy_find_action;
732 
733 case 1:
734 YY_RULE_SETUP
735 #line 84 "dirlex.l"
736 {
737 		yy_push_state(optParam);
738 		_mdir_lval->tv_char = _mdir_mem_strdup(arg, yytext);
739 		return C_NAME;
740 	};
741 	YY_BREAK
742 
743 case 2:
744 YY_RULE_SETUP
745 #line 91 "dirlex.l"
746 yy_push_state(paramName);
747 	YY_BREAK
748 case 3:
749 YY_RULE_SETUP
750 #line 92 "dirlex.l"
751 {
752 		yy_pop_state();
753 		yy_push_state(TextValue);
754 		// yy_push_state(Value);
755 	}
756 	YY_BREAK
757 
758 
759 case 4:
760 YY_RULE_SETUP
761 #line 100 "dirlex.l"
762 /* Just ignore it */
763 	YY_BREAK
764 case 5:
765 YY_RULE_SETUP
766 #line 101 "dirlex.l"
767 {
768 			_mdir_lval->tv_char = _mdir_mem_strdup(arg, yytext);
769 			return C_PARAM_NAME;
770 		}
771 	YY_BREAK
772 case 6:
773 YY_RULE_SETUP
774 #line 105 "dirlex.l"
775 {
776 			yy_pop_state();
777 			yy_push_state(paramValue);
778 			return C_EQ;
779 		}
780 	YY_BREAK
781 
782 
783 case 7:
784 YY_RULE_SETUP
785 #line 113 "dirlex.l"
786 {
787 			char *p = yytext;
788 			int plen = yyleng;
789 
790 			/* Crop the tailing comma */
791 			if(p[plen - 1] == ',')
792 				p[--plen] = 0;
793 			else {
794 				yy_pop_state();
795 			}
796 
797 			/* Crop the quotes */
798 			if(*p == '"') {
799 				p[--plen] = 0;	/* Crop quote */
800 				p += 1;	/* Skip quote */
801 			}
802 
803 			_mdir_lval->tv_char = _mdir_mem_strdup(arg, p);
804 			return C_PARAM_VALUE;
805 		}
806 	YY_BREAK
807 case 8:
808 YY_RULE_SETUP
809 #line 134 "dirlex.l"
810 yy_push_state(paramQuotedValue);
811 	YY_BREAK
812 case 9:
813 YY_RULE_SETUP
814 #line 136 "dirlex.l"
815 {
816 			yy_pop_state();
817 			yyless(0);
818 			_mdir_lval->tv_char = _mdir_mem_strdup(arg, "");
819 			return C_PARAM_VALUE;
820 	}
821 	YY_BREAK
822 
823 
824 case 10:
825 YY_RULE_SETUP
826 #line 145 "dirlex.l"
827 /* Just ignore it */
828 	YY_BREAK
829 case 11:
830 YY_RULE_SETUP
831 #line 147 "dirlex.l"
832 yy_pop_state();
833 	YY_BREAK
834 case 12:
835 YY_RULE_SETUP
836 #line 149 "dirlex.l"
837 {
838 		_mdir_lval->tv_char = yytext;
839 		return C_QUOTED_VALUE;
840 	}
841 	YY_BREAK
842 
843 
844 case 13:
845 YY_RULE_SETUP
846 #line 157 "dirlex.l"
847 {
848 		_mdir_lval->tv_char = yytext;
849 		return C_VALUE;
850 	}
851 	YY_BREAK
852 case 14:
853 YY_RULE_SETUP
854 #line 161 "dirlex.l"
855 /* Just ignore it */
856 	YY_BREAK
857 case 15:
858 YY_RULE_SETUP
859 #line 162 "dirlex.l"
860 {
861 			yy_pop_state();
862 			_mdir_lval->tv_char = yytext;
863 			return C_VALUE;
864 		}
865 	YY_BREAK
866 
867 
868 case 16:
869 YY_RULE_SETUP
870 #line 170 "dirlex.l"
871 {
872 		_mdir_lval->tv_char = "\n";
873 		return C_VALUE;
874 		}
875 	YY_BREAK
876 case 17:
877 YY_RULE_SETUP
878 #line 174 "dirlex.l"
879 {
880 		_mdir_lval->tv_char = yytext + 1;
881 		return C_VALUE;
882 	}
883 	YY_BREAK
884 case 18:
885 YY_RULE_SETUP
886 #line 179 "dirlex.l"
887 {
888 		_mdir_lval->tv_char = yytext;
889 		return C_VALUE;
890 	}
891 	YY_BREAK
892 case 19:
893 YY_RULE_SETUP
894 #line 184 "dirlex.l"
895 /* Just ignore it */
896 	YY_BREAK
897 case 20:
898 YY_RULE_SETUP
899 #line 185 "dirlex.l"
900 {
901 			yy_pop_state();
902 			_mdir_lval->tv_char = "";
903 			return C_VALUE;
904 		}
905 	YY_BREAK
906 
907 case 21:
908 YY_RULE_SETUP
909 #line 192 "dirlex.l"
910 { return 0; }	/* Finish */
911 	YY_BREAK
912 case 22:
913 YY_RULE_SETUP
914 #line 194 "dirlex.l"
915 {
916 		while(YY_START)
917 			yy_pop_state();
918 		yy_top_state();
919 		return ERROR;
920 	}
921 	YY_BREAK
922 case YY_STATE_EOF(INITIAL):
923 case YY_STATE_EOF(optParam):
924 case YY_STATE_EOF(Value):
925 case YY_STATE_EOF(TextValue):
926 case YY_STATE_EOF(paramName):
927 case YY_STATE_EOF(paramValue):
928 case YY_STATE_EOF(paramQuotedValue):
929 #line 201 "dirlex.l"
930 {
931 		while(YY_START)
932 			yy_pop_state();
933 		yyterminate();
934 	}
935 	YY_BREAK
936 case 23:
937 YY_RULE_SETUP
938 #line 207 "dirlex.l"
939 ECHO;
940 	YY_BREAK
941 #line 942 "dirlex.c"
942 
943 	case YY_END_OF_BUFFER:
944 		{
945 		/* Amount of text matched not including the EOB char. */
946 		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
947 
948 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
949 		*yy_cp = yy_hold_char;
950 		YY_RESTORE_YY_MORE_OFFSET
951 
952 		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
953 			{
954 			/* We're scanning a new file or input source.  It's
955 			 * possible that this happened because the user
956 			 * just pointed yyin at a new source and called
957 			 * yylex().  If so, then we have to assure
958 			 * consistency between yy_current_buffer and our
959 			 * globals.  Here is the right place to do so, because
960 			 * this is the first action (other than possibly a
961 			 * back-up) that will match for the new input source.
962 			 */
963 			yy_n_chars = yy_current_buffer->yy_n_chars;
964 			yy_current_buffer->yy_input_file = yyin;
965 			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
966 			}
967 
968 		/* Note that here we test for yy_c_buf_p "<=" to the position
969 		 * of the first EOB in the buffer, since yy_c_buf_p will
970 		 * already have been incremented past the NUL character
971 		 * (since all states make transitions on EOB to the
972 		 * end-of-buffer state).  Contrast this with the test
973 		 * in input().
974 		 */
975 		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
976 			{ /* This was really a NUL. */
977 			yy_state_type yy_next_state;
978 
979 			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
980 
981 			yy_current_state = yy_get_previous_state();
982 
983 			/* Okay, we're now positioned to make the NUL
984 			 * transition.  We couldn't have
985 			 * yy_get_previous_state() go ahead and do it
986 			 * for us because it doesn't know how to deal
987 			 * with the possibility of jamming (and we don't
988 			 * want to build jamming into it because then it
989 			 * will run more slowly).
990 			 */
991 
992 			yy_next_state = yy_try_NUL_trans( yy_current_state );
993 
994 			yy_bp = yytext_ptr + YY_MORE_ADJ;
995 
996 			if ( yy_next_state )
997 				{
998 				/* Consume the NUL. */
999 				yy_cp = ++yy_c_buf_p;
1000 				yy_current_state = yy_next_state;
1001 				goto yy_match;
1002 				}
1003 
1004 			else
1005 				{
1006 				yy_cp = yy_c_buf_p;
1007 				goto yy_find_action;
1008 				}
1009 			}
1010 
1011 		else switch ( yy_get_next_buffer() )
1012 			{
1013 			case EOB_ACT_END_OF_FILE:
1014 				{
1015 				yy_did_buffer_switch_on_eof = 0;
1016 
1017 				if ( yywrap() )
1018 					{
1019 					/* Note: because we've taken care in
1020 					 * yy_get_next_buffer() to have set up
1021 					 * yytext, we can now set up
1022 					 * yy_c_buf_p so that if some total
1023 					 * hoser (like flex itself) wants to
1024 					 * call the scanner after we return the
1025 					 * YY_NULL, it'll still work - another
1026 					 * YY_NULL will get returned.
1027 					 */
1028 					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1029 
1030 					yy_act = YY_STATE_EOF(YY_START);
1031 					goto do_action;
1032 					}
1033 
1034 				else
1035 					{
1036 					if ( ! yy_did_buffer_switch_on_eof )
1037 						YY_NEW_FILE;
1038 					}
1039 				break;
1040 				}
1041 
1042 			case EOB_ACT_CONTINUE_SCAN:
1043 				yy_c_buf_p =
1044 					yytext_ptr + yy_amount_of_matched_text;
1045 
1046 				yy_current_state = yy_get_previous_state();
1047 
1048 				yy_cp = yy_c_buf_p;
1049 				yy_bp = yytext_ptr + YY_MORE_ADJ;
1050 				goto yy_match;
1051 
1052 			case EOB_ACT_LAST_MATCH:
1053 				yy_c_buf_p =
1054 				&yy_current_buffer->yy_ch_buf[yy_n_chars];
1055 
1056 				yy_current_state = yy_get_previous_state();
1057 
1058 				yy_cp = yy_c_buf_p;
1059 				yy_bp = yytext_ptr + YY_MORE_ADJ;
1060 				goto yy_find_action;
1061 			}
1062 		break;
1063 		}
1064 
1065 	default:
1066 		YY_FATAL_ERROR(
1067 			"fatal flex scanner internal error--no action found" );
1068 	} /* end of action switch */
1069 		} /* end of scanning one token */
1070 	} /* end of yylex */
1071 
1072 
1073 /* yy_get_next_buffer - try to read in a new buffer
1074  *
1075  * Returns a code representing an action:
1076  *	EOB_ACT_LAST_MATCH -
1077  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1078  *	EOB_ACT_END_OF_FILE - end of file
1079  */
1080 
yy_get_next_buffer()1081 static int yy_get_next_buffer()
1082 	{
1083 	register char *dest = yy_current_buffer->yy_ch_buf;
1084 	register char *source = yytext_ptr;
1085 	register int number_to_move, i;
1086 	int ret_val;
1087 
1088 	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1089 		YY_FATAL_ERROR(
1090 		"fatal flex scanner internal error--end of buffer missed" );
1091 
1092 	if ( yy_current_buffer->yy_fill_buffer == 0 )
1093 		{ /* Don't try to fill the buffer, so this is an EOF. */
1094 		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1095 			{
1096 			/* We matched a single character, the EOB, so
1097 			 * treat this as a final EOF.
1098 			 */
1099 			return EOB_ACT_END_OF_FILE;
1100 			}
1101 
1102 		else
1103 			{
1104 			/* We matched some text prior to the EOB, first
1105 			 * process it.
1106 			 */
1107 			return EOB_ACT_LAST_MATCH;
1108 			}
1109 		}
1110 
1111 	/* Try to read more data. */
1112 
1113 	/* First move last chars to start of buffer. */
1114 	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1115 
1116 	for ( i = 0; i < number_to_move; ++i )
1117 		*(dest++) = *(source++);
1118 
1119 	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1120 		/* don't do the read, it's not guaranteed to return an EOF,
1121 		 * just force an EOF
1122 		 */
1123 		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1124 
1125 	else
1126 		{
1127 		int num_to_read =
1128 			yy_current_buffer->yy_buf_size - number_to_move - 1;
1129 
1130 		while ( num_to_read <= 0 )
1131 			{ /* Not enough room in the buffer - grow it. */
1132 #ifdef YY_USES_REJECT
1133 			YY_FATAL_ERROR(
1134 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1135 #else
1136 
1137 			/* just a shorter name for the current buffer */
1138 			YY_BUFFER_STATE b = yy_current_buffer;
1139 
1140 			int yy_c_buf_p_offset =
1141 				(int) (yy_c_buf_p - b->yy_ch_buf);
1142 
1143 			if ( b->yy_is_our_buffer )
1144 				{
1145 				int new_size = b->yy_buf_size * 2;
1146 
1147 				if ( new_size <= 0 )
1148 					b->yy_buf_size += b->yy_buf_size / 8;
1149 				else
1150 					b->yy_buf_size *= 2;
1151 
1152 				b->yy_ch_buf = (char *)
1153 					/* Include room in for 2 EOB chars. */
1154 					yy_flex_realloc( (void *) b->yy_ch_buf,
1155 							 b->yy_buf_size + 2 );
1156 				}
1157 			else
1158 				/* Can't grow it, we don't own it. */
1159 				b->yy_ch_buf = 0;
1160 
1161 			if ( ! b->yy_ch_buf )
1162 				YY_FATAL_ERROR(
1163 				"fatal error - scanner input buffer overflow" );
1164 
1165 			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1166 
1167 			num_to_read = yy_current_buffer->yy_buf_size -
1168 						number_to_move - 1;
1169 #endif
1170 			}
1171 
1172 		if ( num_to_read > YY_READ_BUF_SIZE )
1173 			num_to_read = YY_READ_BUF_SIZE;
1174 
1175 		/* Read in more data. */
1176 		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1177 			yy_n_chars, num_to_read );
1178 
1179 		yy_current_buffer->yy_n_chars = yy_n_chars;
1180 		}
1181 
1182 	if ( yy_n_chars == 0 )
1183 		{
1184 		if ( number_to_move == YY_MORE_ADJ )
1185 			{
1186 			ret_val = EOB_ACT_END_OF_FILE;
1187 			yyrestart( yyin );
1188 			}
1189 
1190 		else
1191 			{
1192 			ret_val = EOB_ACT_LAST_MATCH;
1193 			yy_current_buffer->yy_buffer_status =
1194 				YY_BUFFER_EOF_PENDING;
1195 			}
1196 		}
1197 
1198 	else
1199 		ret_val = EOB_ACT_CONTINUE_SCAN;
1200 
1201 	yy_n_chars += number_to_move;
1202 	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1203 	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1204 
1205 	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1206 
1207 	return ret_val;
1208 	}
1209 
1210 
1211 /* yy_get_previous_state - get the state just before the EOB char was reached */
1212 
yy_get_previous_state()1213 static yy_state_type yy_get_previous_state()
1214 	{
1215 	register yy_state_type yy_current_state;
1216 	register char *yy_cp;
1217 
1218 	yy_current_state = yy_start;
1219 
1220 	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1221 		{
1222 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1223 		if ( yy_accept[yy_current_state] )
1224 			{
1225 			yy_last_accepting_state = yy_current_state;
1226 			yy_last_accepting_cpos = yy_cp;
1227 			}
1228 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1229 			{
1230 			yy_current_state = (int) yy_def[yy_current_state];
1231 			if ( yy_current_state >= 64 )
1232 				yy_c = yy_meta[(unsigned int) yy_c];
1233 			}
1234 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1235 		}
1236 
1237 	return yy_current_state;
1238 	}
1239 
1240 
1241 /* yy_try_NUL_trans - try to make a transition on the NUL character
1242  *
1243  * synopsis
1244  *	next_state = yy_try_NUL_trans( current_state );
1245  */
1246 
1247 #ifdef YY_USE_PROTOS
yy_try_NUL_trans(yy_state_type yy_current_state)1248 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1249 #else
1250 static yy_state_type yy_try_NUL_trans( yy_current_state )
1251 yy_state_type yy_current_state;
1252 #endif
1253 	{
1254 	register int yy_is_jam;
1255 	register char *yy_cp = yy_c_buf_p;
1256 
1257 	register YY_CHAR yy_c = 1;
1258 	if ( yy_accept[yy_current_state] )
1259 		{
1260 		yy_last_accepting_state = yy_current_state;
1261 		yy_last_accepting_cpos = yy_cp;
1262 		}
1263 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1264 		{
1265 		yy_current_state = (int) yy_def[yy_current_state];
1266 		if ( yy_current_state >= 64 )
1267 			yy_c = yy_meta[(unsigned int) yy_c];
1268 		}
1269 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1270 	yy_is_jam = (yy_current_state == 63);
1271 
1272 	return yy_is_jam ? 0 : yy_current_state;
1273 	}
1274 
1275 
1276 #ifndef YY_NO_UNPUT
1277 #ifdef YY_USE_PROTOS
yyunput(int c,register char * yy_bp)1278 static void yyunput( int c, register char *yy_bp )
1279 #else
1280 static void yyunput( c, yy_bp )
1281 int c;
1282 register char *yy_bp;
1283 #endif
1284 	{
1285 	register char *yy_cp = yy_c_buf_p;
1286 
1287 	/* undo effects of setting up yytext */
1288 	*yy_cp = yy_hold_char;
1289 
1290 	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1291 		{ /* need to shift things up to make room */
1292 		/* +2 for EOB chars. */
1293 		register int number_to_move = yy_n_chars + 2;
1294 		register char *dest = &yy_current_buffer->yy_ch_buf[
1295 					yy_current_buffer->yy_buf_size + 2];
1296 		register char *source =
1297 				&yy_current_buffer->yy_ch_buf[number_to_move];
1298 
1299 		while ( source > yy_current_buffer->yy_ch_buf )
1300 			*--dest = *--source;
1301 
1302 		yy_cp += (int) (dest - source);
1303 		yy_bp += (int) (dest - source);
1304 		yy_current_buffer->yy_n_chars =
1305 			yy_n_chars = yy_current_buffer->yy_buf_size;
1306 
1307 		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1308 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1309 		}
1310 
1311 	*--yy_cp = (char) c;
1312 
1313 
1314 	yytext_ptr = yy_bp;
1315 	yy_hold_char = *yy_cp;
1316 	yy_c_buf_p = yy_cp;
1317 	}
1318 #endif	/* ifndef YY_NO_UNPUT */
1319 
1320 
1321 #ifdef __cplusplus
yyinput()1322 static int yyinput()
1323 #else
1324 static int input()
1325 #endif
1326 	{
1327 	int c;
1328 
1329 	*yy_c_buf_p = yy_hold_char;
1330 
1331 	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1332 		{
1333 		/* yy_c_buf_p now points to the character we want to return.
1334 		 * If this occurs *before* the EOB characters, then it's a
1335 		 * valid NUL; if not, then we've hit the end of the buffer.
1336 		 */
1337 		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1338 			/* This was really a NUL. */
1339 			*yy_c_buf_p = '\0';
1340 
1341 		else
1342 			{ /* need more input */
1343 			int offset = yy_c_buf_p - yytext_ptr;
1344 			++yy_c_buf_p;
1345 
1346 			switch ( yy_get_next_buffer() )
1347 				{
1348 				case EOB_ACT_LAST_MATCH:
1349 					/* This happens because yy_g_n_b()
1350 					 * sees that we've accumulated a
1351 					 * token and flags that we need to
1352 					 * try matching the token before
1353 					 * proceeding.  But for input(),
1354 					 * there's no matching to consider.
1355 					 * So convert the EOB_ACT_LAST_MATCH
1356 					 * to EOB_ACT_END_OF_FILE.
1357 					 */
1358 
1359 					/* Reset buffer status. */
1360 					yyrestart( yyin );
1361 
1362 					/* fall through */
1363 
1364 				case EOB_ACT_END_OF_FILE:
1365 					{
1366 					if ( yywrap() )
1367 						return EOF;
1368 
1369 					if ( ! yy_did_buffer_switch_on_eof )
1370 						YY_NEW_FILE;
1371 #ifdef __cplusplus
1372 					return yyinput();
1373 #else
1374 					return input();
1375 #endif
1376 					}
1377 
1378 				case EOB_ACT_CONTINUE_SCAN:
1379 					yy_c_buf_p = yytext_ptr + offset;
1380 					break;
1381 				}
1382 			}
1383 		}
1384 
1385 	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
1386 	*yy_c_buf_p = '\0';	/* preserve yytext */
1387 	yy_hold_char = *++yy_c_buf_p;
1388 
1389 
1390 	return c;
1391 	}
1392 
1393 
1394 #ifdef YY_USE_PROTOS
yyrestart(FILE * input_file)1395 void yyrestart( FILE *input_file )
1396 #else
1397 void yyrestart( input_file )
1398 FILE *input_file;
1399 #endif
1400 	{
1401 	if ( ! yy_current_buffer )
1402 		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1403 
1404 	yy_init_buffer( yy_current_buffer, input_file );
1405 	yy_load_buffer_state();
1406 	}
1407 
1408 
1409 #ifdef YY_USE_PROTOS
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1410 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1411 #else
1412 void yy_switch_to_buffer( new_buffer )
1413 YY_BUFFER_STATE new_buffer;
1414 #endif
1415 	{
1416 	if ( yy_current_buffer == new_buffer )
1417 		return;
1418 
1419 	if ( yy_current_buffer )
1420 		{
1421 		/* Flush out information for old buffer. */
1422 		*yy_c_buf_p = yy_hold_char;
1423 		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1424 		yy_current_buffer->yy_n_chars = yy_n_chars;
1425 		}
1426 
1427 	yy_current_buffer = new_buffer;
1428 	yy_load_buffer_state();
1429 
1430 	/* We don't actually know whether we did this switch during
1431 	 * EOF (yywrap()) processing, but the only time this flag
1432 	 * is looked at is after yywrap() is called, so it's safe
1433 	 * to go ahead and always set it.
1434 	 */
1435 	yy_did_buffer_switch_on_eof = 1;
1436 	}
1437 
1438 
1439 #ifdef YY_USE_PROTOS
yy_load_buffer_state(void)1440 void yy_load_buffer_state( void )
1441 #else
1442 void yy_load_buffer_state()
1443 #endif
1444 	{
1445 	yy_n_chars = yy_current_buffer->yy_n_chars;
1446 	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1447 	yyin = yy_current_buffer->yy_input_file;
1448 	yy_hold_char = *yy_c_buf_p;
1449 	}
1450 
1451 
1452 #ifdef YY_USE_PROTOS
yy_create_buffer(FILE * file,int size)1453 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1454 #else
1455 YY_BUFFER_STATE yy_create_buffer( file, size )
1456 FILE *file;
1457 int size;
1458 #endif
1459 	{
1460 	YY_BUFFER_STATE b;
1461 
1462 	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1463 	if ( ! b )
1464 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1465 
1466 	b->yy_buf_size = size;
1467 
1468 	/* yy_ch_buf has to be 2 characters longer than the size given because
1469 	 * we need to put in 2 end-of-buffer characters.
1470 	 */
1471 	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1472 	if ( ! b->yy_ch_buf )
1473 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1474 
1475 	b->yy_is_our_buffer = 1;
1476 
1477 	yy_init_buffer( b, file );
1478 
1479 	return b;
1480 	}
1481 
1482 
1483 #ifdef YY_USE_PROTOS
yy_delete_buffer(YY_BUFFER_STATE b)1484 void yy_delete_buffer( YY_BUFFER_STATE b )
1485 #else
1486 void yy_delete_buffer( b )
1487 YY_BUFFER_STATE b;
1488 #endif
1489 	{
1490 	if ( ! b )
1491 		return;
1492 
1493 	if ( b == yy_current_buffer )
1494 		yy_current_buffer = (YY_BUFFER_STATE) 0;
1495 
1496 	if ( b->yy_is_our_buffer )
1497 		yy_flex_free( (void *) b->yy_ch_buf );
1498 
1499 	yy_flex_free( (void *) b );
1500 	}
1501 
1502 
1503 #ifndef YY_ALWAYS_INTERACTIVE
1504 #ifndef YY_NEVER_INTERACTIVE
1505 extern int isatty YY_PROTO(( int ));
1506 #endif
1507 #endif
1508 
1509 #ifdef YY_USE_PROTOS
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1510 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1511 #else
1512 void yy_init_buffer( b, file )
1513 YY_BUFFER_STATE b;
1514 FILE *file;
1515 #endif
1516 
1517 
1518 	{
1519 	yy_flush_buffer( b );
1520 
1521 	b->yy_input_file = file;
1522 	b->yy_fill_buffer = 1;
1523 
1524 #if YY_ALWAYS_INTERACTIVE
1525 	b->yy_is_interactive = 1;
1526 #else
1527 #if YY_NEVER_INTERACTIVE
1528 	b->yy_is_interactive = 0;
1529 #else
1530 	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1531 #endif
1532 #endif
1533 	}
1534 
1535 
1536 #ifdef YY_USE_PROTOS
yy_flush_buffer(YY_BUFFER_STATE b)1537 void yy_flush_buffer( YY_BUFFER_STATE b )
1538 #else
1539 void yy_flush_buffer( b )
1540 YY_BUFFER_STATE b;
1541 #endif
1542 
1543 	{
1544 	if ( ! b )
1545 		return;
1546 
1547 	b->yy_n_chars = 0;
1548 
1549 	/* We always need two end-of-buffer characters.  The first causes
1550 	 * a transition to the end-of-buffer state.  The second causes
1551 	 * a jam in that state.
1552 	 */
1553 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1554 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1555 
1556 	b->yy_buf_pos = &b->yy_ch_buf[0];
1557 
1558 	b->yy_at_bol = 1;
1559 	b->yy_buffer_status = YY_BUFFER_NEW;
1560 
1561 	if ( b == yy_current_buffer )
1562 		yy_load_buffer_state();
1563 	}
1564 
1565 
1566 #ifndef YY_NO_SCAN_BUFFER
1567 #ifdef YY_USE_PROTOS
yy_scan_buffer(char * base,yy_size_t size)1568 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1569 #else
1570 YY_BUFFER_STATE yy_scan_buffer( base, size )
1571 char *base;
1572 yy_size_t size;
1573 #endif
1574 	{
1575 	YY_BUFFER_STATE b;
1576 
1577 	if ( size < 2 ||
1578 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
1579 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
1580 		/* They forgot to leave room for the EOB's. */
1581 		return 0;
1582 
1583 	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1584 	if ( ! b )
1585 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1586 
1587 	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
1588 	b->yy_buf_pos = b->yy_ch_buf = base;
1589 	b->yy_is_our_buffer = 0;
1590 	b->yy_input_file = 0;
1591 	b->yy_n_chars = b->yy_buf_size;
1592 	b->yy_is_interactive = 0;
1593 	b->yy_at_bol = 1;
1594 	b->yy_fill_buffer = 0;
1595 	b->yy_buffer_status = YY_BUFFER_NEW;
1596 
1597 	yy_switch_to_buffer( b );
1598 
1599 	return b;
1600 	}
1601 #endif
1602 
1603 
1604 #ifndef YY_NO_SCAN_STRING
1605 #ifdef YY_USE_PROTOS
yy_scan_string(yyconst char * yy_str)1606 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1607 #else
1608 YY_BUFFER_STATE yy_scan_string( yy_str )
1609 yyconst char *yy_str;
1610 #endif
1611 	{
1612 	int len;
1613 	for ( len = 0; yy_str[len]; ++len )
1614 		;
1615 
1616 	return yy_scan_bytes( yy_str, len );
1617 	}
1618 #endif
1619 
1620 
1621 #ifndef YY_NO_SCAN_BYTES
1622 #ifdef YY_USE_PROTOS
yy_scan_bytes(yyconst char * bytes,int len)1623 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1624 #else
1625 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1626 yyconst char *bytes;
1627 int len;
1628 #endif
1629 	{
1630 	YY_BUFFER_STATE b;
1631 	char *buf;
1632 	yy_size_t n;
1633 	int i;
1634 
1635 	/* Get memory for full buffer, including space for trailing EOB's. */
1636 	n = len + 2;
1637 	buf = (char *) yy_flex_alloc( n );
1638 	if ( ! buf )
1639 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1640 
1641 	for ( i = 0; i < len; ++i )
1642 		buf[i] = bytes[i];
1643 
1644 	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1645 
1646 	b = yy_scan_buffer( buf, n );
1647 	if ( ! b )
1648 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1649 
1650 	/* It's okay to grow etc. this buffer, and we should throw it
1651 	 * away when we're done.
1652 	 */
1653 	b->yy_is_our_buffer = 1;
1654 
1655 	return b;
1656 	}
1657 #endif
1658 
1659 
1660 #ifndef YY_NO_PUSH_STATE
1661 #ifdef YY_USE_PROTOS
yy_push_state(int new_state)1662 static void yy_push_state( int new_state )
1663 #else
1664 static void yy_push_state( new_state )
1665 int new_state;
1666 #endif
1667 	{
1668 	if ( yy_start_stack_ptr >= yy_start_stack_depth )
1669 		{
1670 		yy_size_t new_size;
1671 
1672 		yy_start_stack_depth += YY_START_STACK_INCR;
1673 		new_size = yy_start_stack_depth * sizeof( int );
1674 
1675 		if ( ! yy_start_stack )
1676 			yy_start_stack = (int *) yy_flex_alloc( new_size );
1677 
1678 		else
1679 			yy_start_stack = (int *) yy_flex_realloc(
1680 					(void *) yy_start_stack, new_size );
1681 
1682 		if ( ! yy_start_stack )
1683 			YY_FATAL_ERROR(
1684 			"out of memory expanding start-condition stack" );
1685 		}
1686 
1687 	yy_start_stack[yy_start_stack_ptr++] = YY_START;
1688 
1689 	BEGIN(new_state);
1690 	}
1691 #endif
1692 
1693 
1694 #ifndef YY_NO_POP_STATE
yy_pop_state()1695 static void yy_pop_state()
1696 	{
1697 	if ( --yy_start_stack_ptr < 0 )
1698 		YY_FATAL_ERROR( "start-condition stack underflow" );
1699 
1700 	BEGIN(yy_start_stack[yy_start_stack_ptr]);
1701 	}
1702 #endif
1703 
1704 
1705 #ifndef YY_NO_TOP_STATE
yy_top_state()1706 static int yy_top_state()
1707 	{
1708 	return yy_start_stack[yy_start_stack_ptr - 1];
1709 	}
1710 #endif
1711 
1712 #ifndef YY_EXIT_FAILURE
1713 #define YY_EXIT_FAILURE 2
1714 #endif
1715 
1716 #ifdef YY_USE_PROTOS
yy_fatal_error(yyconst char msg[])1717 static void yy_fatal_error( yyconst char msg[] )
1718 #else
1719 static void yy_fatal_error( msg )
1720 char msg[];
1721 #endif
1722 	{
1723 	(void) fprintf( stderr, "%s\n", msg );
1724 	exit( YY_EXIT_FAILURE );
1725 	}
1726 
1727 
1728 
1729 /* Redefine yyless() so it works in section 3 code. */
1730 
1731 #undef yyless
1732 #define yyless(n) \
1733 	do \
1734 		{ \
1735 		/* Undo effects of setting up yytext. */ \
1736 		yytext[yyleng] = yy_hold_char; \
1737 		yy_c_buf_p = yytext + n; \
1738 		yy_hold_char = *yy_c_buf_p; \
1739 		*yy_c_buf_p = '\0'; \
1740 		yyleng = n; \
1741 		} \
1742 	while ( 0 )
1743 
1744 
1745 /* Internal utility routines. */
1746 
1747 #ifndef yytext_ptr
1748 #ifdef YY_USE_PROTOS
yy_flex_strncpy(char * s1,yyconst char * s2,int n)1749 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1750 #else
1751 static void yy_flex_strncpy( s1, s2, n )
1752 char *s1;
1753 yyconst char *s2;
1754 int n;
1755 #endif
1756 	{
1757 	register int i;
1758 	for ( i = 0; i < n; ++i )
1759 		s1[i] = s2[i];
1760 	}
1761 #endif
1762 
1763 #ifdef YY_NEED_STRLEN
1764 #ifdef YY_USE_PROTOS
yy_flex_strlen(yyconst char * s)1765 static int yy_flex_strlen( yyconst char *s )
1766 #else
1767 static int yy_flex_strlen( s )
1768 yyconst char *s;
1769 #endif
1770 	{
1771 	register int n;
1772 	for ( n = 0; s[n]; ++n )
1773 		;
1774 
1775 	return n;
1776 	}
1777 #endif
1778 
1779 
1780 #ifdef YY_USE_PROTOS
yy_flex_alloc(yy_size_t size)1781 static void *yy_flex_alloc( yy_size_t size )
1782 #else
1783 static void *yy_flex_alloc( size )
1784 yy_size_t size;
1785 #endif
1786 	{
1787 	return (void *) malloc( size );
1788 	}
1789 
1790 #ifdef YY_USE_PROTOS
yy_flex_realloc(void * ptr,yy_size_t size)1791 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1792 #else
1793 static void *yy_flex_realloc( ptr, size )
1794 void *ptr;
1795 yy_size_t size;
1796 #endif
1797 	{
1798 	/* The cast to (char *) in the following accommodates both
1799 	 * implementations that use char* generic pointers, and those
1800 	 * that use void* generic pointers.  It works with the latter
1801 	 * because both ANSI C and C++ allow castless assignment from
1802 	 * any pointer type to void*, and deal with argument conversions
1803 	 * as though doing an assignment.
1804 	 */
1805 	return (void *) realloc( (char *) ptr, size );
1806 	}
1807 
1808 #ifdef YY_USE_PROTOS
yy_flex_free(void * ptr)1809 static void yy_flex_free( void *ptr )
1810 #else
1811 static void yy_flex_free( ptr )
1812 void *ptr;
1813 #endif
1814 	{
1815 	free( ptr );
1816 	}
1817 
1818 #if YY_MAIN
main()1819 int main()
1820 	{
1821 	yylex();
1822 	return 0;
1823 	}
1824 #endif
1825 #line 207 "dirlex.l"
1826 
1827