1 /* A lexical scanner generated by flex */
2 
3 
4 #define FLEX_SCANNER
5 
6 #ifdef _WIN32
7 #include <io.h>
8 #else
9 #include <unistd.h>
10 #endif
11 #include <stdlib.h>
12 #include <stdio.h>
13 
14 
15 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
16 #ifdef c_plusplus
17 #ifndef __cplusplus
18 #define __cplusplus
19 #endif
20 #endif
21 
22 
23 #ifdef __cplusplus
24 
25 #include <stdlib.h>
26 
27 /* Use prototypes in function declarations. */
28 #define YY_USE_PROTOS
29 
30 /* The "const" storage-class-modifier is valid. */
31 #define YY_USE_CONST
32 
33 #else	/* ! __cplusplus */
34 
35 #ifdef __STDC__
36 
37 #define YY_USE_PROTOS
38 #define YY_USE_CONST
39 
40 #endif	/* __STDC__ */
41 #endif	/* ! __cplusplus */
42 
43 
44 #ifdef __TURBOC__
45 #define YY_USE_CONST
46 #endif
47 
48 
49 #ifndef YY_USE_CONST
50 #ifndef const
51 #define const
52 #endif
53 #endif
54 
55 
56 #ifdef YY_USE_PROTOS
57 #define YY_PROTO(proto) proto
58 #else
59 #define YY_PROTO(proto) ()
60 #endif
61 
62 /* Returned upon end-of-file. */
63 #define YY_NULL 0
64 
65 /* Promotes a possibly negative, possibly signed char to an unsigned
66  * integer for use as an array index.  If the signed char is negative,
67  * we want to instead treat it as an 8-bit unsigned char, hence the
68  * double cast.
69  */
70 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
71 
72 /* Enter a start condition.  This macro really ought to take a parameter,
73  * but we do it the disgusting crufty way forced on us by the ()-less
74  * definition of BEGIN.
75  */
76 #define BEGIN yy_start = 1 + 2 *
77 
78 /* Translate the current start state into a value that can be later handed
79  * to BEGIN to return to the state.
80  */
81 #define YY_START ((yy_start - 1) / 2)
82 
83 /* Action number for EOF rule of a given start state. */
84 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
85 
86 /* Special action meaning "start processing a new file".  Now included
87  * only for backward compatibility with previous versions of flex.
88  */
89 #define YY_NEW_FILE yyrestart( yyin )
90 
91 #define YY_END_OF_BUFFER_CHAR 0
92 
93 /* Size of default input buffer. */
94 #define YY_BUF_SIZE 16384
95 
96 typedef struct yy_buffer_state *YY_BUFFER_STATE;
97 
98 extern int yyleng;
99 extern FILE *yyin, *yyout;
100 
101 #ifdef __cplusplus
102 extern "C" {
103 #endif
104 	extern int yywrap YY_PROTO(( void ));
105 #ifdef __cplusplus
106 	}
107 #endif
108 
109 #define EOB_ACT_CONTINUE_SCAN 0
110 #define EOB_ACT_END_OF_FILE 1
111 #define EOB_ACT_LAST_MATCH 2
112 
113 /* The funky do-while in the following #define is used to turn the definition
114  * int a single C statement (which needs a semi-colon terminator).  This
115  * avoids problems with code like:
116  *
117  * 	if ( condition_holds )
118  *		yyless( 5 );
119  *	else
120  *		do_something_else();
121  *
122  * Prior to using the do-while the compiler would get upset at the
123  * "else" because it interpreted the "if" statement as being all
124  * done when it reached the ';' after the yyless() call.
125  */
126 
127 /* Return all but the first 'n' matched characters back to the input stream. */
128 
129 #define yyless(n) \
130 	do \
131 		{ \
132 		/* Undo effects of setting up yytext. */ \
133 		*yy_cp = yy_hold_char; \
134 		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
135 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
136 		} \
137 	while ( 0 )
138 
139 #define unput(c) yyunput( c, yytext_ptr )
140 
141 
142 struct yy_buffer_state
143 	{
144 	FILE *yy_input_file;
145 
146 	char *yy_ch_buf;		/* input buffer */
147 	char *yy_buf_pos;		/* current position in input buffer */
148 
149 	/* Size of input buffer in bytes, not including room for EOB
150 	 * characters.
151 	 */
152 	int yy_buf_size;
153 
154 	/* Number of characters read into yy_ch_buf, not including EOB
155 	 * characters.
156 	 */
157 	int yy_n_chars;
158 
159 	/* Whether this is an "interactive" input source; if so, and
160 	 * if we're using stdio for input, then we want to use getc()
161 	 * instead of fread(), to make sure we stop fetching input after
162 	 * each newline.
163 	 */
164 	int yy_is_interactive;
165 
166 	/* Whether to try to fill the input buffer when we reach the
167 	 * end of it.
168 	 */
169 	int yy_fill_buffer;
170 
171 	int yy_buffer_status;
172 #define YY_BUFFER_NEW 0
173 #define YY_BUFFER_NORMAL 1
174 	/* When an EOF's been seen but there's still some text to process
175 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
176 	 * shouldn't try reading from the input source any more.  We might
177 	 * still have a bunch of tokens to match, though, because of
178 	 * possible backing-up.
179 	 *
180 	 * When we actually see the EOF, we change the status to "new"
181 	 * (via yyrestart()), so that the user can continue scanning by
182 	 * just pointing yyin at a new input file.
183 	 */
184 #define YY_BUFFER_EOF_PENDING 2
185 	};
186 
187 static YY_BUFFER_STATE yy_current_buffer = 0;
188 
189 /* We provide macros for accessing buffer states in case in the
190  * future we want to put the buffer states in a more general
191  * "scanner state".
192  */
193 #define YY_CURRENT_BUFFER yy_current_buffer
194 
195 
196 /* yy_hold_char holds the character lost when yytext is formed. */
197 static char yy_hold_char;
198 
199 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
200 
201 
202 int yyleng;
203 
204 /* Points to current character in buffer. */
205 static char *yy_c_buf_p = (char *) 0;
206 static int yy_init = 1;		/* whether we need to initialize */
207 static int yy_start = 0;	/* start state number */
208 
209 /* Flag which is used to allow yywrap()'s to do buffer switches
210  * instead of setting up a fresh yyin.  A bit of a hack ...
211  */
212 static int yy_did_buffer_switch_on_eof;
213 
214 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
215 void yyrestart YY_PROTO(( FILE *input_file ));
216 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
217 void yy_load_buffer_state YY_PROTO(( void ));
218 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
219 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
220 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
221 
222 static int yy_start_stack_ptr = 0;
223 static int yy_start_stack_depth = 0;
224 static int *yy_start_stack = 0;
225 static void yy_push_state YY_PROTO(( int new_state ));
226 static void yy_pop_state YY_PROTO(( void ));
227 static int yy_top_state YY_PROTO(( void ));
228 
229 static void *yy_flex_alloc YY_PROTO(( unsigned int ));
230 static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
231 static void yy_flex_free YY_PROTO(( void * ));
232 
233 #define yy_new_buffer yy_create_buffer
234 
235 #define INITIAL 0
236 typedef unsigned char YY_CHAR;
237 typedef int yy_state_type;
238 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
239 extern char *yytext;
240 #define yytext_ptr yytext
241 
242 #ifndef yytext_ptr
243 static void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));
244 #endif
245 
246 #ifdef __cplusplus
247 static int yyinput YY_PROTO(( void ));
248 #else
249 static int input YY_PROTO(( void ));
250 #endif
251 
252 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
253 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
254 static int yy_get_next_buffer YY_PROTO(( void ));
255 static void yy_fatal_error YY_PROTO(( const char msg[] ));
256 
257 /* Done after the current pattern has been matched and before the
258  * corresponding action - sets up yytext.
259  */
260 #define YY_DO_BEFORE_ACTION \
261 	yytext_ptr = yy_bp; \
262 	yyleng = yy_cp - yy_bp; \
263 	yy_hold_char = *yy_cp; \
264 	*yy_cp = '\0'; \
265 	yy_c_buf_p = yy_cp;
266 
267 #define YY_END_OF_BUFFER 36
268 static const short int yy_accept[95] =
269     {   0,
270         0,    0,   36,   34,    1,   33,   33,    2,   10,    5,
271         6,    7,   34,    4,    8,   12,    9,   32,   32,   32,
272        32,   32,   32,   32,   32,   32,   32,   32,   32,   11,
273         1,    2,    4,    0,   14,   13,   15,   32,   32,   32,
274        32,   32,   32,   32,   32,   32,   32,   32,   32,   28,
275        32,   32,   32,    3,   27,   32,   32,   32,   32,   32,
276        32,   32,   32,   32,   29,   32,   32,   32,   32,   32,
277        32,   32,   32,   19,   24,   26,   25,   32,   17,   31,
278        32,   32,   18,   32,   23,   32,   32,   32,   30,   16,
279        21,   20,   22,    0
280 
281     } ;
282 
283 static const int yy_ec[256] =
284     {   0,
285         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
286         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
287         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
288         1,    2,    1,    1,    5,    1,    1,    6,    1,    7,
289         8,    1,    1,    9,   10,   11,    1,   12,   12,   12,
290        12,   12,   12,   12,   12,   12,   12,    1,    1,   13,
291        14,   15,    1,    1,   16,   16,   16,   16,   16,   16,
292        16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
293        16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
294         1,    1,    1,    1,    1,    1,   17,   18,   19,   20,
295 
296        21,   22,   23,   24,   25,   16,   16,   26,   27,   28,
297        29,   30,   31,   32,   33,   34,   35,   16,   36,   16,
298        16,   16,    1,    1,    1,   37,    1,    1,    1,    1,
299         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
300         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
301         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
302         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
303         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
304         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
305         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
306 
307         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
308         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
309         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
310         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
311         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
312         1,    1,    1,    1,    1
313     } ;
314 
315 static const int yy_meta[38] =
316     {   0,
317         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
318         1,    3,    1,    1,    1,    3,    3,    3,    3,    3,
319         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
320         3,    3,    3,    3,    3,    3,    1
321     } ;
322 
323 static const short int yy_base[97] =
324     {   0,
325         0,    0,  107,  108,  104,  108,  108,    0,  108,  108,
326       108,  108,   93,   27,   26,  108,   90,    0,   75,   16,
327        22,   70,   80,   72,   70,   14,   63,   76,   72,  108,
328        93,    0,   38,   82,  108,  108,  108,    0,   73,   63,
329        70,   27,   61,   62,   59,   61,   53,   51,   63,    0,
330        58,   56,   60,   68,    0,   46,   61,   42,   55,   45,
331        44,   46,   42,   50,    0,   42,   35,   47,   35,   45,
332        31,   41,   29,    0,    0,    0,    0,   30,    0,    0,
333        42,   38,    0,   35,    0,   34,   18,   17,    0,    0,
334         0,    0,    0,  108,   57,   44
335 
336     } ;
337 
338 static const short int yy_def[97] =
339     {   0,
340        94,    1,   94,   94,   94,   94,   94,   95,   94,   94,
341        94,   94,   94,   94,   94,   94,   94,   96,   96,   96,
342        96,   96,   96,   96,   96,   96,   96,   96,   96,   94,
343        94,   95,   94,   94,   94,   94,   94,   96,   96,   96,
344        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
345        96,   96,   96,   94,   96,   96,   96,   96,   96,   96,
346        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
347        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
348        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
349        96,   96,   96,    0,   94,   94
350 
351     } ;
352 
353 static const short int yy_nxt[146] =
354     {   0,
355         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
356         4,   14,   15,   16,   17,   18,   19,   18,   20,   21,
357        18,   22,   18,   23,   24,   18,   18,   25,   26,   18,
358        27,   18,   28,   18,   18,   29,   30,   34,   33,   35,
359        36,   40,   42,   49,   58,   50,   38,   41,   34,   33,
360        93,   92,   59,   43,   91,   90,   44,   32,   89,   32,
361        88,   87,   86,   85,   84,   83,   82,   81,   80,   79,
362        78,   77,   76,   75,   74,   73,   72,   71,   70,   54,
363        69,   68,   67,   66,   65,   64,   63,   62,   61,   60,
364        57,   56,   55,   54,   31,   53,   52,   51,   48,   47,
365 
366        46,   45,   39,   37,   33,   31,   94,    3,   94,   94,
367        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
368        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
369        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
370        94,   94,   94,   94,   94
371     } ;
372 
373 static const short int yy_chk[146] =
374     {   0,
375         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
376         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
377         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
378         1,    1,    1,    1,    1,    1,    1,   14,   14,   15,
379        15,   20,   21,   26,   42,   26,   96,   20,   33,   33,
380        88,   87,   42,   21,   86,   84,   21,   95,   82,   95,
381        81,   78,   73,   72,   71,   70,   69,   68,   67,   66,
382        64,   63,   62,   61,   60,   59,   58,   57,   56,   54,
383        53,   52,   51,   49,   48,   47,   46,   45,   44,   43,
384        41,   40,   39,   34,   31,   29,   28,   27,   25,   24,
385 
386        23,   22,   19,   17,   13,    5,    3,   94,   94,   94,
387        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
388        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
389        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
390        94,   94,   94,   94,   94
391     } ;
392 
393 static yy_state_type yy_last_accepting_state;
394 static char *yy_last_accepting_cpos;
395 
396 /* The intent behind this definition is that it'll catch
397  * any uses of REJECT which flex missed.
398  */
399 #define REJECT reject_used_but_not_detected
400 #define yymore() yymore_used_but_not_detected
401 #define YY_MORE_ADJ 0
402 char *yytext;
403 # line 1 "scan.l"
404 # line 2 "scan.l"
405 #include <iostream.h>
406 #include "RT.h"
407 #include "gram.tab.h"
408 
409 /* Macros after this point can all be overridden by user definitions in
410  * section 1.
411  */
412 
413 #ifdef YY_MALLOC_DECL
414 YY_MALLOC_DECL
415 #else
416 #if __STDC__
417 #ifndef __cplusplus
418 #include <stdlib.h>
419 #endif
420 #else
421 /* Just try to get by without declaring the routines.  This will fail
422  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
423  * or sizeof(void*) != sizeof(int).
424  */
425 #endif
426 #endif
427 
428 /* Amount of stuff to slurp up with each read. */
429 #ifndef YY_READ_BUF_SIZE
430 #define YY_READ_BUF_SIZE 8192
431 #endif
432 
433 /* Copy whatever the last rule matched to the standard output. */
434 
435 #ifndef ECHO
436 /* This used to be an fputs(), but since the string might contain NUL's,
437  * we now use fwrite().
438  */
439 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
440 #endif
441 
442 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
443  * is returned in "result".
444  */
445 #ifndef YY_INPUT
446 #define YY_INPUT(buf,result,max_size) \
447 	if ( yy_current_buffer->yy_is_interactive ) \
448 		{ \
449 		int c = getc( yyin ); \
450 		result = c == EOF ? 0 : 1; \
451 		buf[0] = (char) c; \
452 		} \
453 	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
454 		  && ferror( yyin ) ) \
455 		YY_FATAL_ERROR( "input in flex scanner failed" );
456 #endif
457 
458 /* No semi-colon after return; correct usage is to write "yyterminate();" -
459  * we don't want an extra ';' after the "return" because that will cause
460  * some compilers to complain about unreachable statements.
461  */
462 #ifndef yyterminate
463 #define yyterminate() return YY_NULL
464 #endif
465 
466 /* Number of entries by which start-condition stack grows. */
467 #ifndef YY_START_STACK_INCR
468 #define YY_START_STACK_INCR 25
469 #endif
470 
471 /* Report a fatal error. */
472 #ifndef YY_FATAL_ERROR
473 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
474 #endif
475 
476 /* Default declaration of generated scanner - a define so the user can
477  * easily add parameters.
478  */
479 #ifndef YY_DECL
480 #define YY_DECL int yylex YY_PROTO(( void ))
481 #endif
482 
483 /* Code executed at the beginning of each rule, after yytext and yyleng
484  * have been set up.
485  */
486 #ifndef YY_USER_ACTION
487 #define YY_USER_ACTION
488 #endif
489 
490 /* Code executed at the end of each rule. */
491 #ifndef YY_BREAK
492 #define YY_BREAK break;
493 #endif
494 
495 YY_DECL
496 	{
497 	register yy_state_type yy_current_state;
498 	register char *yy_cp, *yy_bp;
499 	register int yy_act;
500 
501 # line 14 "scan.l"
502 
503 
504 
505 	if ( yy_init )
506 		{
507 #ifdef YY_USER_INIT
508 		YY_USER_INIT;
509 #endif
510 
511 		if ( ! yy_start )
512 			yy_start = 1;	/* first start state */
513 
514 		if ( ! yyin )
515 			yyin = stdin;
516 
517 		if ( ! yyout )
518 			yyout = stdout;
519 
520 		if ( yy_current_buffer )
521 			yy_init_buffer( yy_current_buffer, yyin );
522 		else
523 			yy_current_buffer =
524 				yy_create_buffer( yyin, YY_BUF_SIZE );
525 
526 		yy_load_buffer_state();
527 
528 		yy_init = 0;
529 		}
530 
531 	while ( 1 )		/* loops until end-of-file is reached */
532 		{
533 		yy_cp = yy_c_buf_p;
534 
535 		/* Support of yytext. */
536 		*yy_cp = yy_hold_char;
537 
538 		/* yy_bp points to the position in yy_ch_buf of the start of
539 		 * the current run.
540 		 */
541 		yy_bp = yy_cp;
542 
543 		yy_current_state = yy_start;
544 yy_match:
545 		do
546 			{
547 			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
548 			if ( yy_accept[yy_current_state] )
549 				{
550 				yy_last_accepting_state = yy_current_state;
551 				yy_last_accepting_cpos = yy_cp;
552 				}
553 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
554 				{
555 				yy_current_state = (int) yy_def[yy_current_state];
556 				if ( yy_current_state >= 95 )
557 					yy_c = yy_meta[(unsigned int) yy_c];
558 				}
559 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
560 			++yy_cp;
561 			}
562 		while ( yy_base[yy_current_state] != 108 );
563 
564 yy_find_action:
565 		yy_act = yy_accept[yy_current_state];
566 
567 		YY_DO_BEFORE_ACTION;
568 
569 
570 do_action:	/* This label is used only to access EOF actions. */
571 
572 
573 		switch ( yy_act )
574 	{ /* beginning of action switch */
575 			case 0: /* must back up */
576 			/* undo the effects of YY_DO_BEFORE_ACTION */
577 			*yy_cp = yy_hold_char;
578 			yy_cp = yy_last_accepting_cpos;
579 			yy_current_state = yy_last_accepting_state;
580 			goto yy_find_action;
581 
582 case 1:
583 YY_USER_ACTION
584 # line 16 "scan.l"
585 ;
586 	YY_BREAK
587 case 2:
588 YY_USER_ACTION
589 # line 17 "scan.l"
590 ;
591 	YY_BREAK
592 case 3:
593 YY_USER_ACTION
594 # line 18 "scan.l"
595 { yylval.dbl = strtod((const char *)yytext, NULL);
596             return DBLCONST;
597           }
598 	YY_BREAK
599 case 4:
600 YY_USER_ACTION
601 # line 22 "scan.l"
602 { yylval.number = atoi((const char *)yytext);
603 	    return INTCONST;
604 	  }
605 	YY_BREAK
606 case 5:
607 # line 26 "scan.l"
608 case 6:
609 # line 27 "scan.l"
610 case 7:
611 # line 28 "scan.l"
612 case 8:
613 # line 29 "scan.l"
614 case 9:
615 # line 30 "scan.l"
616 case 10:
617 # line 31 "scan.l"
618 case 11:
619 # line 32 "scan.l"
620 case 12:
621 YY_USER_ACTION
622 # line 32 "scan.l"
623 { return yytext[0]; }
624 	YY_BREAK
625 case 13:
626 YY_USER_ACTION
627 # line 33 "scan.l"
628 { return opNE; }
629 	YY_BREAK
630 case 14:
631 YY_USER_ACTION
632 # line 34 "scan.l"
633 { return opLE; }
634 	YY_BREAK
635 case 15:
636 YY_USER_ACTION
637 # line 35 "scan.l"
638 { return opGE; }
639 	YY_BREAK
640 case 16:
641 YY_USER_ACTION
642 # line 37 "scan.l"
643 { return CREATE; }
644 	YY_BREAK
645 case 17:
646 YY_USER_ACTION
647 # line 38 "scan.l"
648 { return OPEN; }
649 	YY_BREAK
650 case 18:
651 YY_USER_ACTION
652 # line 39 "scan.l"
653 { return CLOSE; }
654 	YY_BREAK
655 case 19:
656 YY_USER_ACTION
657 # line 40 "scan.l"
658 { return DROP; }
659 	YY_BREAK
660 case 20:
661 YY_USER_ACTION
662 # line 41 "scan.l"
663 { return INSERT; }
664 	YY_BREAK
665 case 21:
666 YY_USER_ACTION
667 # line 42 "scan.l"
668 { return DELETE; }
669 	YY_BREAK
670 case 22:
671 YY_USER_ACTION
672 # line 43 "scan.l"
673 { return SELECT; }
674 	YY_BREAK
675 case 23:
676 YY_USER_ACTION
677 # line 44 "scan.l"
678 { return DEBUG; }
679 	YY_BREAK
680 case 24:
681 YY_USER_ACTION
682 # line 45 "scan.l"
683 { return DUMP; }
684 	YY_BREAK
685 case 25:
686 YY_USER_ACTION
687 # line 46 "scan.l"
688 { return HELP; }
689 	YY_BREAK
690 case 26:
691 YY_USER_ACTION
692 # line 47 "scan.l"
693 { return FROM; }
694 	YY_BREAK
695 case 27:
696 YY_USER_ACTION
697 # line 48 "scan.l"
698 { return AND; }
699 	YY_BREAK
700 case 28:
701 YY_USER_ACTION
702 # line 49 "scan.l"
703 { return OR; }
704 	YY_BREAK
705 case 29:
706 YY_USER_ACTION
707 # line 50 "scan.l"
708 { return NOT; }
709 	YY_BREAK
710 case 30:
711 YY_USER_ACTION
712 # line 51 "scan.l"
713 { return WHERE; }
714 	YY_BREAK
715 case 31:
716 YY_USER_ACTION
717 # line 52 "scan.l"
718 { return QUIT; }
719 	YY_BREAK
720 case 32:
721 YY_USER_ACTION
722 # line 53 "scan.l"
723 { yylval.string = strdup((const char *)yytext); return ID; }
724 	YY_BREAK
725 case 33:
726 YY_USER_ACTION
727 # line 54 "scan.l"
728 { return NL; }
729 	YY_BREAK
730 case YY_STATE_EOF(INITIAL):
731 # line 55 "scan.l"
732 { yyterminate(); }
733 	YY_BREAK
734 case 34:
735 YY_USER_ACTION
736 # line 56 "scan.l"
737 { cerr << "Lexical error in input string: invalid character\n";
738 		  return ERROR; }
739 	YY_BREAK
740 case 35:
741 YY_USER_ACTION
742 # line 59 "scan.l"
743 ECHO;
744 	YY_BREAK
745 
746 	case YY_END_OF_BUFFER:
747 		{
748 		/* Amount of text matched not including the EOB char. */
749 		int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;
750 
751 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
752 		*yy_cp = yy_hold_char;
753 
754 		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
755 			{
756 			/* We're scanning a new file or input source.  It's
757 			 * possible that this happened because the user
758 			 * just pointed yyin at a new source and called
759 			 * yylex().  If so, then we have to assure
760 			 * consistency between yy_current_buffer and our
761 			 * globals.  Here is the right place to do so, because
762 			 * this is the first action (other than possibly a
763 			 * back-up) that will match for the new input source.
764 			 */
765 			yy_n_chars = yy_current_buffer->yy_n_chars;
766 			yy_current_buffer->yy_input_file = yyin;
767 			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
768 			}
769 
770 		/* Note that here we test for yy_c_buf_p "<=" to the position
771 		 * of the first EOB in the buffer, since yy_c_buf_p will
772 		 * already have been incremented past the NUL character
773 		 * (since all states make transitions on EOB to the
774 		 * end-of-buffer state).  Contrast this with the test
775 		 * in input().
776 		 */
777 		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
778 			{ /* This was really a NUL. */
779 			yy_state_type yy_next_state;
780 
781 			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
782 
783 			yy_current_state = yy_get_previous_state();
784 
785 			/* Okay, we're now positioned to make the NUL
786 			 * transition.  We couldn't have
787 			 * yy_get_previous_state() go ahead and do it
788 			 * for us because it doesn't know how to deal
789 			 * with the possibility of jamming (and we don't
790 			 * want to build jamming into it because then it
791 			 * will run more slowly).
792 			 */
793 
794 			yy_next_state = yy_try_NUL_trans( yy_current_state );
795 
796 			yy_bp = yytext_ptr + YY_MORE_ADJ;
797 
798 			if ( yy_next_state )
799 				{
800 				/* Consume the NUL. */
801 				yy_cp = ++yy_c_buf_p;
802 				yy_current_state = yy_next_state;
803 				goto yy_match;
804 				}
805 
806 			else
807 				{
808 							yy_cp = yy_c_buf_p;
809 				goto yy_find_action;
810 				}
811 			}
812 
813 		else switch ( yy_get_next_buffer() )
814 			{
815 			case EOB_ACT_END_OF_FILE:
816 				{
817 				yy_did_buffer_switch_on_eof = 0;
818 
819 				if ( yywrap() )
820 					{
821 					/* Note: because we've taken care in
822 					 * yy_get_next_buffer() to have set up
823 					 * yytext, we can now set up
824 					 * yy_c_buf_p so that if some total
825 					 * hoser (like flex itself) wants to
826 					 * call the scanner after we return the
827 					 * YY_NULL, it'll still work - another
828 					 * YY_NULL will get returned.
829 					 */
830 					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
831 
832 					yy_act = YY_STATE_EOF(YY_START);
833 					goto do_action;
834 					}
835 
836 				else
837 					{
838 					if ( ! yy_did_buffer_switch_on_eof )
839 						YY_NEW_FILE;
840 					}
841 				break;
842 				}
843 
844 			case EOB_ACT_CONTINUE_SCAN:
845 				yy_c_buf_p =
846 					yytext_ptr + yy_amount_of_matched_text;
847 
848 				yy_current_state = yy_get_previous_state();
849 
850 				yy_cp = yy_c_buf_p;
851 				yy_bp = yytext_ptr + YY_MORE_ADJ;
852 				goto yy_match;
853 
854 			case EOB_ACT_LAST_MATCH:
855 				yy_c_buf_p =
856 				&yy_current_buffer->yy_ch_buf[yy_n_chars];
857 
858 				yy_current_state = yy_get_previous_state();
859 
860 				yy_cp = yy_c_buf_p;
861 				yy_bp = yytext_ptr + YY_MORE_ADJ;
862 				goto yy_find_action;
863 			}
864 		break;
865 		}
866 
867 	default:
868 		YY_FATAL_ERROR(
869 			"fatal flex scanner internal error--no action found" );
870 	} /* end of action switch */
871 		} /* end of scanning one token */
872 	} /* end of yylex */
873 
874 
875 /* yy_get_next_buffer - try to read in a new buffer
876  *
877  * Returns a code representing an action:
878  *	EOB_ACT_LAST_MATCH -
879  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
880  *	EOB_ACT_END_OF_FILE - end of file
881  */
882 
883 static int yy_get_next_buffer()
884 	{
885 	register char *dest = yy_current_buffer->yy_ch_buf;
886 	register char *source = yytext_ptr - 1; /* copy prev. char, too */
887 	register int number_to_move, i;
888 	int ret_val;
889 
890 	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
891 		YY_FATAL_ERROR(
892 		"fatal flex scanner internal error--end of buffer missed" );
893 
894 	if ( yy_current_buffer->yy_fill_buffer == 0 )
895 		{ /* Don't try to fill the buffer, so this is an EOF. */
896 		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
897 			{
898 			/* We matched a singled characater, the EOB, so
899 			 * treat this as a final EOF.
900 			 */
901 			return EOB_ACT_END_OF_FILE;
902 			}
903 
904 		else
905 			{
906 			/* We matched some text prior to the EOB, first
907 			 * process it.
908 			 */
909 			return EOB_ACT_LAST_MATCH;
910 			}
911 		}
912 
913 	/* Try to read more data. */
914 
915 	/* First move last chars to start of buffer. */
916 	number_to_move = yy_c_buf_p - yytext_ptr;
917 
918 	for ( i = 0; i < number_to_move; ++i )
919 		*(dest++) = *(source++);
920 
921 	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
922 		/* don't do the read, it's not guaranteed to return an EOF,
923 		 * just force an EOF
924 		 */
925 		yy_n_chars = 0;
926 
927 	else
928 		{
929 		int num_to_read =
930 			yy_current_buffer->yy_buf_size - number_to_move - 1;
931 
932 		while ( num_to_read <= 0 )
933 			{ /* Not enough room in the buffer - grow it. */
934 #ifdef YY_USES_REJECT
935 			YY_FATAL_ERROR(
936 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
937 #else
938 
939 			/* just a shorter name for the current buffer */
940 			YY_BUFFER_STATE b = yy_current_buffer;
941 
942 			int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
943 
944 			b->yy_buf_size *= 2;
945 			b->yy_ch_buf = (char *)
946 				yy_flex_realloc( (void *) b->yy_ch_buf,
947 						 b->yy_buf_size );
948 
949 			if ( ! b->yy_ch_buf )
950 				YY_FATAL_ERROR(
951 				"fatal error - scanner input buffer overflow" );
952 
953 			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
954 
955 			num_to_read = yy_current_buffer->yy_buf_size -
956 						number_to_move - 1;
957 #endif
958 			}
959 
960 		if ( num_to_read > YY_READ_BUF_SIZE )
961 			num_to_read = YY_READ_BUF_SIZE;
962 
963 		/* Read in more data. */
964 		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
965 			yy_n_chars, num_to_read );
966 		}
967 
968 	if ( yy_n_chars == 0 )
969 		{
970 		if ( number_to_move - YY_MORE_ADJ == 1 )
971 			{
972 			ret_val = EOB_ACT_END_OF_FILE;
973 			yyrestart( yyin );
974 			}
975 
976 		else
977 			{
978 			ret_val = EOB_ACT_LAST_MATCH;
979 			yy_current_buffer->yy_buffer_status =
980 				YY_BUFFER_EOF_PENDING;
981 			}
982 		}
983 
984 	else
985 		ret_val = EOB_ACT_CONTINUE_SCAN;
986 
987 	yy_n_chars += number_to_move;
988 	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
989 	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
990 
991 	/* yytext begins at the second character in yy_ch_buf; the first
992 	 * character is the one which preceded it before reading in the latest
993 	 * buffer; it needs to be kept around in case it's a newline, so
994 	 * yy_get_previous_state() will have with '^' rules active.
995 	 */
996 
997 	yytext_ptr = &yy_current_buffer->yy_ch_buf[1];
998 
999 	return ret_val;
1000 	}
1001 
1002 
1003 /* yy_get_previous_state - get the state just before the EOB char was reached */
1004 
yy_get_previous_state()1005 static yy_state_type yy_get_previous_state()
1006 	{
1007 	register yy_state_type yy_current_state;
1008 	register char *yy_cp;
1009 
1010 	yy_current_state = yy_start;
1011 
1012 	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1013 		{
1014 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1015 		if ( yy_accept[yy_current_state] )
1016 			{
1017 			yy_last_accepting_state = yy_current_state;
1018 			yy_last_accepting_cpos = yy_cp;
1019 			}
1020 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1021 			{
1022 			yy_current_state = (int) yy_def[yy_current_state];
1023 			if ( yy_current_state >= 95 )
1024 				yy_c = yy_meta[(unsigned int) yy_c];
1025 			}
1026 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1027 		}
1028 
1029 	return yy_current_state;
1030 	}
1031 
1032 
1033 /* yy_try_NUL_trans - try to make a transition on the NUL character
1034  *
1035  * synopsis
1036  *	next_state = yy_try_NUL_trans( current_state );
1037  */
1038 
1039 #ifdef YY_USE_PROTOS
yy_try_NUL_trans(yy_state_type yy_current_state)1040 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1041 #else
1042 static yy_state_type yy_try_NUL_trans( yy_current_state )
1043 yy_state_type yy_current_state;
1044 #endif
1045 	{
1046 	register int yy_is_jam;
1047 	register char *yy_cp = yy_c_buf_p;
1048 
1049 	register YY_CHAR yy_c = 1;
1050 	if ( yy_accept[yy_current_state] )
1051 		{
1052 		yy_last_accepting_state = yy_current_state;
1053 		yy_last_accepting_cpos = yy_cp;
1054 		}
1055 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1056 		{
1057 		yy_current_state = (int) yy_def[yy_current_state];
1058 		if ( yy_current_state >= 95 )
1059 			yy_c = yy_meta[(unsigned int) yy_c];
1060 		}
1061 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1062 	yy_is_jam = (yy_current_state == 94);
1063 
1064 	return yy_is_jam ? 0 : yy_current_state;
1065 	}
1066 
1067 
1068 #ifdef YY_USE_PROTOS
yyunput(int c,register char * yy_bp)1069 static void yyunput( int c, register char *yy_bp )
1070 #else
1071 static void yyunput( c, yy_bp )
1072 int c;
1073 register char *yy_bp;
1074 #endif
1075 	{
1076 	register char *yy_cp = yy_c_buf_p;
1077 
1078 	/* undo effects of setting up yytext */
1079 	*yy_cp = yy_hold_char;
1080 
1081 	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1082 		{ /* need to shift things up to make room */
1083 		/* +2 for EOB chars. */
1084 		register int number_to_move = yy_n_chars + 2;
1085 		register char *dest = &yy_current_buffer->yy_ch_buf[
1086 					yy_current_buffer->yy_buf_size + 2];
1087 		register char *source =
1088 				&yy_current_buffer->yy_ch_buf[number_to_move];
1089 
1090 		while ( source > yy_current_buffer->yy_ch_buf )
1091 			*--dest = *--source;
1092 
1093 		yy_cp += dest - source;
1094 		yy_bp += dest - source;
1095 		yy_n_chars = yy_current_buffer->yy_buf_size;
1096 
1097 		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1098 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1099 		}
1100 
1101 	if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
1102 		yy_cp[-2] = '\n';
1103 
1104 	*--yy_cp = (char) c;
1105 
1106 
1107 	/* Note: the formal parameter *must* be called "yy_bp" for this
1108 	 * macro to now work correctly.
1109 	 */
1110 	YY_DO_BEFORE_ACTION; /* set up yytext again */
1111 	}
1112 
1113 
1114 #ifdef __cplusplus
yyinput()1115 static int yyinput()
1116 #else
1117 static int input()
1118 #endif
1119 	{
1120 	int c;
1121 
1122 	*yy_c_buf_p = yy_hold_char;
1123 
1124 	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1125 		{
1126 		/* yy_c_buf_p now points to the character we want to return.
1127 		 * If this occurs *before* the EOB characters, then it's a
1128 		 * valid NUL; if not, then we've hit the end of the buffer.
1129 		 */
1130 		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1131 			/* This was really a NUL. */
1132 			*yy_c_buf_p = '\0';
1133 
1134 		else
1135 			{ /* need more input */
1136 			yytext_ptr = yy_c_buf_p;
1137 			++yy_c_buf_p;
1138 
1139 			switch ( yy_get_next_buffer() )
1140 				{
1141 				case EOB_ACT_END_OF_FILE:
1142 					{
1143 					if ( yywrap() )
1144 						{
1145 						yy_c_buf_p =
1146 						yytext_ptr + YY_MORE_ADJ;
1147 						return EOF;
1148 						}
1149 
1150 					YY_NEW_FILE;
1151 #ifdef __cplusplus
1152 					return yyinput();
1153 #else
1154 					return input();
1155 #endif
1156 					}
1157 
1158 				case EOB_ACT_CONTINUE_SCAN:
1159 					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1160 					break;
1161 
1162 				case EOB_ACT_LAST_MATCH:
1163 #ifdef __cplusplus
1164 					YY_FATAL_ERROR(
1165 					"unexpected last match in yyinput()" );
1166 #else
1167 					YY_FATAL_ERROR(
1168 					"unexpected last match in input()" );
1169 #endif
1170 				}
1171 			}
1172 		}
1173 
1174 	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
1175 	*yy_c_buf_p = '\0';	/* preserve yytext */
1176 	yy_hold_char = *++yy_c_buf_p;
1177 
1178 	return c;
1179 	}
1180 
1181 
1182 #ifdef YY_USE_PROTOS
yyrestart(FILE * input_file)1183 void yyrestart( FILE *input_file )
1184 #else
1185 void yyrestart( input_file )
1186 FILE *input_file;
1187 #endif
1188 	{
1189 	if ( ! yy_current_buffer )
1190 		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1191 
1192 	yy_init_buffer( yy_current_buffer, input_file );
1193 	yy_load_buffer_state();
1194 	}
1195 
1196 
1197 #ifdef YY_USE_PROTOS
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1198 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1199 #else
1200 void yy_switch_to_buffer( new_buffer )
1201 YY_BUFFER_STATE new_buffer;
1202 #endif
1203 	{
1204 	if ( yy_current_buffer == new_buffer )
1205 		return;
1206 
1207 	if ( yy_current_buffer )
1208 		{
1209 		/* Flush out information for old buffer. */
1210 		*yy_c_buf_p = yy_hold_char;
1211 		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1212 		yy_current_buffer->yy_n_chars = yy_n_chars;
1213 		}
1214 
1215 	yy_current_buffer = new_buffer;
1216 	yy_load_buffer_state();
1217 
1218 	/* We don't actually know whether we did this switch during
1219 	 * EOF (yywrap()) processing, but the only time this flag
1220 	 * is looked at is after yywrap() is called, so it's safe
1221 	 * to go ahead and always set it.
1222 	 */
1223 	yy_did_buffer_switch_on_eof = 1;
1224 	}
1225 
1226 
1227 #ifdef YY_USE_PROTOS
yy_load_buffer_state(void)1228 void yy_load_buffer_state( void )
1229 #else
1230 void yy_load_buffer_state()
1231 #endif
1232 	{
1233 	yy_n_chars = yy_current_buffer->yy_n_chars;
1234 	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1235 	yyin = yy_current_buffer->yy_input_file;
1236 	yy_hold_char = *yy_c_buf_p;
1237 	}
1238 
1239 
1240 #ifdef YY_USE_PROTOS
yy_create_buffer(FILE * file,int size)1241 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1242 #else
1243 YY_BUFFER_STATE yy_create_buffer( file, size )
1244 FILE *file;
1245 int size;
1246 #endif
1247 	{
1248 	YY_BUFFER_STATE b;
1249 
1250 	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1251 
1252 	if ( ! b )
1253 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1254 
1255 	b->yy_buf_size = size;
1256 
1257 	/* yy_ch_buf has to be 2 characters longer than the size given because
1258 	 * we need to put in 2 end-of-buffer characters.
1259 	 */
1260 	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1261 
1262 	if ( ! b->yy_ch_buf )
1263 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1264 
1265 	yy_init_buffer( b, file );
1266 
1267 	return b;
1268 	}
1269 
1270 
1271 #ifdef YY_USE_PROTOS
yy_delete_buffer(YY_BUFFER_STATE b)1272 void yy_delete_buffer( YY_BUFFER_STATE b )
1273 #else
1274 void yy_delete_buffer( b )
1275 YY_BUFFER_STATE b;
1276 #endif
1277 	{
1278 	if ( b == yy_current_buffer )
1279 		yy_current_buffer = (YY_BUFFER_STATE) 0;
1280 
1281 	yy_flex_free( (void *) b->yy_ch_buf );
1282 	yy_flex_free( (void *) b );
1283 	}
1284 
1285 
1286 #ifdef YY_USE_PROTOS
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1287 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1288 #else
1289 void yy_init_buffer( b, file )
1290 YY_BUFFER_STATE b;
1291 FILE *file;
1292 #endif
1293 	{
1294 	b->yy_input_file = file;
1295 
1296 	/* We put in the '\n' and start reading from [1] so that an
1297 	 * initial match-at-newline will be true.
1298 	 */
1299 
1300 	b->yy_ch_buf[0] = '\n';
1301 	b->yy_n_chars = 1;
1302 
1303 	/* We always need two end-of-buffer characters.  The first causes
1304 	 * a transition to the end-of-buffer state.  The second causes
1305 	 * a jam in that state.
1306 	 */
1307 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1308 	b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
1309 
1310 	b->yy_buf_pos = &b->yy_ch_buf[1];
1311 
1312 	b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
1313 
1314 	b->yy_fill_buffer = 1;
1315 
1316 	b->yy_buffer_status = YY_BUFFER_NEW;
1317 	}
1318 
1319 
1320 #ifdef YY_USE_PROTOS
yy_push_state(int new_state)1321 static void yy_push_state( int new_state )
1322 #else
1323 static void yy_push_state( new_state )
1324 int new_state;
1325 #endif
1326 	{
1327 	if ( yy_start_stack_ptr >= yy_start_stack_depth )
1328 		{
1329 		int new_size;
1330 
1331 		yy_start_stack_depth += YY_START_STACK_INCR;
1332 		new_size = yy_start_stack_depth * sizeof( int );
1333 
1334 		if ( ! yy_start_stack )
1335 			yy_start_stack = (int *) yy_flex_alloc( new_size );
1336 
1337 		else
1338 			yy_start_stack = (int *) yy_flex_realloc(
1339 					(void *) yy_start_stack, new_size );
1340 
1341 		if ( ! yy_start_stack )
1342 			YY_FATAL_ERROR(
1343 			"out of memory expanding start-condition stack" );
1344 		}
1345 
1346 	yy_start_stack[yy_start_stack_ptr++] = YY_START;
1347 
1348 	BEGIN(new_state);
1349 	}
1350 
1351 
yy_pop_state()1352 static void yy_pop_state()
1353 	{
1354 	if ( --yy_start_stack_ptr < 0 )
1355 		YY_FATAL_ERROR( "start-condition stack underflow" );
1356 
1357 	BEGIN(yy_start_stack[yy_start_stack_ptr]);
1358 	}
1359 
1360 
yy_top_state()1361 static int yy_top_state()
1362 	{
1363 	return yy_start_stack[yy_start_stack_ptr - 1];
1364 	}
1365 
1366 
1367 #ifdef YY_USE_PROTOS
yy_fatal_error(const char msg[])1368 static void yy_fatal_error( const char msg[] )
1369 #else
1370 static void yy_fatal_error( msg )
1371 char msg[];
1372 #endif
1373 	{
1374 	(void) fprintf( stderr, "%s\n", msg );
1375 	exit( 1 );
1376 	}
1377 
1378 
1379 
1380 /* Redefine yyless() so it works in section 3 code. */
1381 
1382 #undef yyless
1383 #define yyless(n) \
1384 	do \
1385 		{ \
1386 		/* Undo effects of setting up yytext. */ \
1387 		yytext[yyleng] = yy_hold_char; \
1388 		yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
1389 		yy_hold_char = *yy_c_buf_p; \
1390 		*yy_c_buf_p = '\0'; \
1391 		yyleng = n; \
1392 		} \
1393 	while ( 0 )
1394 
1395 
1396 /* Internal utility routines. */
1397 
1398 #ifndef yytext_ptr
1399 #ifdef YY_USE_PROTOS
yy_flex_strncpy(char * s1,const char * s2,int n)1400 static void yy_flex_strncpy( char *s1, const char *s2, int n )
1401 #else
1402 static void yy_flex_strncpy( s1, s2, n )
1403 char *s1;
1404 const char *s2;
1405 int n;
1406 #endif
1407 	{
1408 	register int i;
1409 	for ( i = 0; i < n; ++i )
1410 		s1[i] = s2[i];
1411 	}
1412 #endif
1413 
1414 
1415 #ifdef YY_USE_PROTOS
yy_flex_alloc(unsigned int size)1416 static void *yy_flex_alloc( unsigned int size )
1417 #else
1418 static void *yy_flex_alloc( size )
1419 unsigned int size;
1420 #endif
1421 	{
1422 	return (void *) malloc( size );
1423 	}
1424 
1425 #ifdef YY_USE_PROTOS
yy_flex_realloc(void * ptr,unsigned int size)1426 static void *yy_flex_realloc( void *ptr, unsigned int size )
1427 #else
1428 static void *yy_flex_realloc( ptr, size )
1429 void *ptr;
1430 unsigned int size;
1431 #endif
1432 	{
1433 	return (void *) realloc( ptr, size );
1434 	}
1435 
1436 #ifdef YY_USE_PROTOS
yy_flex_free(void * ptr)1437 static void yy_flex_free( void *ptr )
1438 #else
1439 static void yy_flex_free( ptr )
1440 void *ptr;
1441 #endif
1442 	{
1443 	free( ptr );
1444 	}
1445 # line 59 "scan.l"
1446 
1447