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