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