1 
2 #line 3 "lex.yy.c"
3 
4 #define  YY_INT_ALIGNED short int
5 
6 /* A lexical scanner generated by flex */
7 
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 6
11 #define YY_FLEX_SUBMINOR_VERSION 4
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15 
16 /* First, we deal with  platform-specific or compiler-specific issues. */
17 
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
23 
24 /* end standard C headers. */
25 
26 /* flex integer type definitions */
27 
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30 
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32 
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34 
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36  * if you want the limit (max/min) macros for int types.
37  */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41 
42 #include <inttypes.h>
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56 
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN               (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN              (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN              (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX               (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX              (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX              (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX              (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX             (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX             (4294967295U)
84 #endif
85 
86 #ifndef SIZE_MAX
87 #define SIZE_MAX               (~(size_t)0)
88 #endif
89 
90 #endif /* ! C99 */
91 
92 #endif /* ! FLEXINT_H */
93 
94 /* begin standard C++ headers. */
95 
96 /* TODO: this is always defined, so inline it */
97 #define yyconst const
98 
99 #if defined(__GNUC__) && __GNUC__ >= 3
100 #define yynoreturn __attribute__((__noreturn__))
101 #else
102 #define yynoreturn
103 #endif
104 
105 /* Returned upon end-of-file. */
106 #define YY_NULL 0
107 
108 /* Promotes a possibly negative, possibly signed char to an
109  *   integer in range [0..255] for use as an array index.
110  */
111 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
112 
113 /* Enter a start condition.  This macro really ought to take a parameter,
114  * but we do it the disgusting crufty way forced on us by the ()-less
115  * definition of BEGIN.
116  */
117 #define BEGIN (yy_start) = 1 + 2 *
118 /* Translate the current start state into a value that can be later handed
119  * to BEGIN to return to the state.  The YYSTATE alias is for lex
120  * compatibility.
121  */
122 #define YY_START (((yy_start) - 1) / 2)
123 #define YYSTATE YY_START
124 /* Action number for EOF rule of a given start state. */
125 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
126 /* Special action meaning "start processing a new file". */
127 #define YY_NEW_FILE yyrestart( yyin  )
128 #define YY_END_OF_BUFFER_CHAR 0
129 
130 /* Size of default input buffer. */
131 #ifndef YY_BUF_SIZE
132 #ifdef __ia64__
133 /* On IA-64, the buffer size is 16k, not 8k.
134  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
135  * Ditto for the __ia64__ case accordingly.
136  */
137 #define YY_BUF_SIZE 32768
138 #else
139 #define YY_BUF_SIZE 16384
140 #endif /* __ia64__ */
141 #endif
142 
143 /* The state buf must be large enough to hold one state per character in the main buffer.
144  */
145 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
146 
147 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
148 #define YY_TYPEDEF_YY_BUFFER_STATE
149 typedef struct yy_buffer_state *YY_BUFFER_STATE;
150 #endif
151 
152 #ifndef YY_TYPEDEF_YY_SIZE_T
153 #define YY_TYPEDEF_YY_SIZE_T
154 typedef size_t yy_size_t;
155 #endif
156 
157 extern int yyleng;
158 
159 extern FILE *yyin, *yyout;
160 
161 #define EOB_ACT_CONTINUE_SCAN 0
162 #define EOB_ACT_END_OF_FILE 1
163 #define EOB_ACT_LAST_MATCH 2
164 
165     #define YY_LESS_LINENO(n)
166     #define YY_LINENO_REWIND_TO(ptr)
167 
168 /* Return all but the first "n" matched characters back to the input stream. */
169 #define yyless(n) \
170 	do \
171 		{ \
172 		/* Undo effects of setting up yytext. */ \
173         int yyless_macro_arg = (n); \
174         YY_LESS_LINENO(yyless_macro_arg);\
175 		*yy_cp = (yy_hold_char); \
176 		YY_RESTORE_YY_MORE_OFFSET \
177 		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
178 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
179 		} \
180 	while ( 0 )
181 #define unput(c) yyunput( c, (yytext_ptr)  )
182 
183 #ifndef YY_STRUCT_YY_BUFFER_STATE
184 #define YY_STRUCT_YY_BUFFER_STATE
185 struct yy_buffer_state
186 	{
187 	FILE *yy_input_file;
188 
189 	char *yy_ch_buf;		/* input buffer */
190 	char *yy_buf_pos;		/* current position in input buffer */
191 
192 	/* Size of input buffer in bytes, not including room for EOB
193 	 * characters.
194 	 */
195 	int yy_buf_size;
196 
197 	/* Number of characters read into yy_ch_buf, not including EOB
198 	 * characters.
199 	 */
200 	int yy_n_chars;
201 
202 	/* Whether we "own" the buffer - i.e., we know we created it,
203 	 * and can realloc() it to grow it, and should free() it to
204 	 * delete it.
205 	 */
206 	int yy_is_our_buffer;
207 
208 	/* Whether this is an "interactive" input source; if so, and
209 	 * if we're using stdio for input, then we want to use getc()
210 	 * instead of fread(), to make sure we stop fetching input after
211 	 * each newline.
212 	 */
213 	int yy_is_interactive;
214 
215 	/* Whether we're considered to be at the beginning of a line.
216 	 * If so, '^' rules will be active on the next match, otherwise
217 	 * not.
218 	 */
219 	int yy_at_bol;
220 
221     int yy_bs_lineno; /**< The line count. */
222     int yy_bs_column; /**< The column count. */
223 
224 	/* Whether to try to fill the input buffer when we reach the
225 	 * end of it.
226 	 */
227 	int yy_fill_buffer;
228 
229 	int yy_buffer_status;
230 
231 #define YY_BUFFER_NEW 0
232 #define YY_BUFFER_NORMAL 1
233 	/* When an EOF's been seen but there's still some text to process
234 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
235 	 * shouldn't try reading from the input source any more.  We might
236 	 * still have a bunch of tokens to match, though, because of
237 	 * possible backing-up.
238 	 *
239 	 * When we actually see the EOF, we change the status to "new"
240 	 * (via yyrestart()), so that the user can continue scanning by
241 	 * just pointing yyin at a new input file.
242 	 */
243 #define YY_BUFFER_EOF_PENDING 2
244 
245 	};
246 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
247 
248 /* Stack of input buffers. */
249 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
250 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
251 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
252 
253 /* We provide macros for accessing buffer states in case in the
254  * future we want to put the buffer states in a more general
255  * "scanner state".
256  *
257  * Returns the top of the stack, or NULL.
258  */
259 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
260                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
261                           : NULL)
262 /* Same as previous macro, but useful when we know that the buffer stack is not
263  * NULL or when we need an lvalue. For internal use only.
264  */
265 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
266 
267 /* yy_hold_char holds the character lost when yytext is formed. */
268 static char yy_hold_char;
269 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
270 int yyleng;
271 
272 /* Points to current character in buffer. */
273 static char *yy_c_buf_p = NULL;
274 static int yy_init = 0;		/* whether we need to initialize */
275 static int yy_start = 0;	/* start state number */
276 
277 /* Flag which is used to allow yywrap()'s to do buffer switches
278  * instead of setting up a fresh yyin.  A bit of a hack ...
279  */
280 static int yy_did_buffer_switch_on_eof;
281 
282 void yyrestart ( FILE *input_file  );
283 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
284 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
285 void yy_delete_buffer ( YY_BUFFER_STATE b  );
286 void yy_flush_buffer ( YY_BUFFER_STATE b  );
287 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
288 void yypop_buffer_state ( void );
289 
290 static void yyensure_buffer_stack ( void );
291 static void yy_load_buffer_state ( void );
292 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
293 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
294 
295 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
296 YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
297 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
298 
299 void *yyalloc ( yy_size_t  );
300 void *yyrealloc ( void *, yy_size_t  );
301 void yyfree ( void *  );
302 
303 #define yy_new_buffer yy_create_buffer
304 #define yy_set_interactive(is_interactive) \
305 	{ \
306 	if ( ! YY_CURRENT_BUFFER ){ \
307         yyensure_buffer_stack (); \
308 		YY_CURRENT_BUFFER_LVALUE =    \
309             yy_create_buffer( yyin, YY_BUF_SIZE ); \
310 	} \
311 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
312 	}
313 #define yy_set_bol(at_bol) \
314 	{ \
315 	if ( ! YY_CURRENT_BUFFER ){\
316         yyensure_buffer_stack (); \
317 		YY_CURRENT_BUFFER_LVALUE =    \
318             yy_create_buffer( yyin, YY_BUF_SIZE ); \
319 	} \
320 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
321 	}
322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
323 
324 /* Begin user sect3 */
325 
326 #define yywrap() (/*CONSTCOND*/1)
327 #define YY_SKIP_YYWRAP
328 typedef flex_uint8_t YY_CHAR;
329 
330 FILE *yyin = NULL, *yyout = NULL;
331 
332 typedef int yy_state_type;
333 
334 extern int yylineno;
335 int yylineno = 1;
336 
337 extern char *yytext;
338 #ifdef yytext_ptr
339 #undef yytext_ptr
340 #endif
341 #define yytext_ptr yytext
342 
343 static yy_state_type yy_get_previous_state ( void );
344 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
345 static int yy_get_next_buffer ( void );
346 static void yynoreturn yy_fatal_error ( const char* msg  );
347 
348 /* Done after the current pattern has been matched and before the
349  * corresponding action - sets up yytext.
350  */
351 #define YY_DO_BEFORE_ACTION \
352 	(yytext_ptr) = yy_bp; \
353 	yyleng = (int) (yy_cp - yy_bp); \
354 	(yy_hold_char) = *yy_cp; \
355 	*yy_cp = '\0'; \
356 	(yy_c_buf_p) = yy_cp;
357 #define YY_NUM_RULES 68
358 #define YY_END_OF_BUFFER 69
359 /* This struct is not used in this scanner,
360    but its presence is necessary. */
361 struct yy_trans_info
362 	{
363 	flex_int32_t yy_verify;
364 	flex_int32_t yy_nxt;
365 	};
366 static const flex_int16_t yy_accept[385] =
367     {   0,
368         0,    0,   60,   60,    0,    0,    0,    0,    0,    0,
369         0,    0,    0,    0,   69,   67,   65,   66,   66,   39,
370        67,   39,   39,   35,   36,   39,   39,   39,   39,   37,
371        39,   39,   36,   39,   38,   38,   38,   38,   38,   38,
372        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
373        38,   39,   38,   39,   60,   61,   60,   62,   68,   68,
374        45,   45,   68,    1,   68,   53,   68,   68,   68,   57,
375        65,   66,   66,   39,    0,   48,   48,   46,    0,   49,
376        49,    0,    0,    0,    0,   37,   37,   59,    0,   37,
377        38,   38,   39,   39,   38,   38,    3,   38,   38,   38,
378 
379        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
380        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
381        38,   38,   38,   60,   61,   60,   61,   62,   63,   62,
382        62,   64,    0,   45,   45,    0,    0,    0,   45,    0,
383         0,    0,   52,   53,    0,    0,   56,    0,   57,   48,
384         0,   48,   47,    0,    0,   50,   50,    0,    0,    0,
385        40,   40,    0,    0,   58,   58,    0,   37,   38,   38,
386        38,   38,   38,   38,    8,   38,   38,   38,   38,   38,
387        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
388        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
389 
390        63,    0,    0,    0,    0,   42,   42,    0,    0,    0,
391        56,    0,   50,    0,   41,   41,   40,   37,   58,   38,
392        38,   31,   38,   38,   38,   38,   38,   38,   38,   38,
393        38,   26,   38,   38,   28,   38,   38,   38,   38,   38,
394        38,   38,   25,   38,   38,   38,   38,   38,   27,   38,
395        43,   43,    0,   42,    0,    0,   55,   55,   55,    0,
396        41,   38,   38,   38,   38,   38,   38,   38,   24,   38,
397        38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
398        38,   38,   22,   32,   19,   21,   38,   43,    0,    0,
399         0,   38,   38,   38,    6,   38,   38,   23,   38,   38,
400 
401        38,   38,   38,   30,   13,   38,   38,   38,   38,   38,
402        38,   38,   38,    0,    0,    0,   38,   38,    5,   38,
403        38,   10,   38,   38,   29,   38,   38,   38,   38,   38,
404        38,   16,   18,    0,    0,    0,    2,   38,   38,   38,
405        38,   38,   38,   38,   38,   17,   15,   38,    0,    0,
406         0,    4,   38,   38,   38,   38,    9,   38,   38,   33,
407         0,   44,   44,    0,    0,   51,    7,   34,   11,   12,
408        14,   38,   44,    0,   54,   38,    0,   43,   43,    0,
409        20,   43,    0,    0
410     } ;
411 
412 static const YY_CHAR yy_ec[256] =
413     {   0,
414         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
415         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
416         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
417         1,    5,    6,    7,    1,    1,    8,    9,    1,   10,
418        11,   12,   13,   14,   15,   16,   17,   18,   18,   18,
419        18,   18,   18,   18,   18,   18,   18,   19,    1,   20,
420        21,   22,   23,    1,   24,   25,   26,   27,   28,   29,
421        30,   31,   32,   33,   34,   35,   36,   37,   38,   39,
422        34,   40,   41,   42,   43,   44,   45,   46,   47,   48,
423        49,   50,   51,   52,   53,    1,   34,   34,   54,   55,
424 
425        56,   57,   34,   34,   58,   34,   34,   59,   34,   60,
426        61,   34,   34,   34,   62,   34,   63,   34,   34,   34,
427        34,   64,   65,   66,   67,   68,    1,    1,    1,    1,
428         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
429         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
430         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
431         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
432         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
433         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
434         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
435 
436         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
437         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
438         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
439         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
440         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
441         1,    1,    1,    1,    1
442     } ;
443 
444 static const YY_CHAR yy_meta[69] =
445     {   0,
446         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
447         1,    3,    1,    1,    1,    4,    1,    5,    1,    1,
448         1,    1,    1,    5,    5,    5,    5,    5,    5,    5,
449         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
450         5,    5,    5,    5,    5,    5,    5,    5,    1,    1,
451         1,    1,    6,    5,    5,    5,    5,    5,    5,    5,
452         5,    5,    5,    5,    1,    1,    1,    1
453     } ;
454 
455 static const flex_int16_t yy_base[409] =
456     {   0,
457         0,    0,   66,   68,   71,   79,    0,    0,   82,   83,
458       702,  701,   85,   88,  708,  711,   94,  711,  704,  685,
459        97,  102,   93,  711,  684,   90,   94,  686,   96,  102,
460       711,   73,  682,  100,   94,    0,  664,  673,   87,  668,
461       659,   89,  655,   99,  669,  653,  103,  100,  111,  655,
462       663,  672,  634,  108,  141,  711,  145,  151,  148,  167,
463       711,  158,  173,  711,  684,    0,  711,  632,  157,    0,
464       180,  711,  686,  711,  183,  711,  185,  711,  191,  711,
465       685,  175,  627,  197,  668,  187,  178,  711,  204,  193,
466         0,  119,  664,  663,    0,  642,    0,  174,  188,  655,
467 
468       639,  643,  641,  184,  650,  641,  649,  634,  628,  631,
469       632,  636,  642,  183,  627,  624,  625,  642,  630,  640,
470       639,  634,  597,  219,  711,  225,  711,  233,  711,  235,
471       250,  711,  252,  711,  255,  261,  268,  271,  711,  274,
472       281,  653,  711,    0,  599,  235,  711,  241,    0,  711,
473       287,  289,  711,  294,  277,  711,  284,  604,  296,  300,
474       711,  303,  295,  308,  711,  311,  639,  638,  617,  615,
475       606,  617,  619,  622,    0,  621,  624,  604,  604,  603,
476       604,  604,  610,  613,  598,  600,  614,  613,  592,  611,
477       596,  609,  604,  589,  590,  597,  586,  585,  538,  513,
478 
479       711,  313,  315,  322,  338,  711,  328,  344,  509,  317,
480       550,  338,  711,  481,  711,  346,  711,  472,  711,  454,
481       450,    0,  463,  449,  448,  447,  448,  443,  449,  440,
482       455,    0,  437,  442,    0,  433,  439,  434,  441,  430,
483       427,  428,    0,  437,  440,  425,  438,  437,    0,  403,
484       711,  352,  354,  711,  360,  403,  711,  711,  454,  397,
485       711,  416,  421,  417,  165,  429,  428,  419,    0,  429,
486       409,  409,  411,  420,  406,  419,  414,  407,  412,  419,
487       414,  404,    0,    0,    0,    0,  383,  711,  362,  376,
488       383,  395,  408,  407,    0,  391,  403,    0,  377,  386,
489 
490       383,  384,  373,    0,    0,  364,  362,  358,  353,  370,
491       362,  353,    0,  368,  324,  319,  339,  324,    0,  327,
492       316,    0,  319,  307,    0,  303,  294,  296,  268,  267,
493       233,    0,    0,  370,  210,  375,    0,  219,  208,  218,
494       184,  193,  179,  184,  178,    0,    0,  184,  378,  382,
495       383,    0,  167,  144,  152,  123,    0,  118,  125,    0,
496       388,  711,  390,  396,  400,  711,    0,    0,    0,    0,
497         0,  102,  711,  406,  711,   40,  412,  711,  414,  424,
498         0,  711,  426,  711,  491,  497,  503,  509,  515,  521,
499       527,  530,  531,  537,  543,  549,  555,  561,  567,  573,
500 
501       579,  585,  591,  597,  603,  609,  615,  621
502     } ;
503 
504 static const flex_int16_t yy_def[409] =
505     {   0,
506       384,    1,  385,  385,  386,  386,  387,  387,  388,  388,
507       389,  389,  390,  390,  384,  384,  384,  384,  384,  384,
508       391,  384,  384,  384,  384,  384,  384,  384,  384,  392,
509       384,  384,  384,  384,  393,  393,  393,  393,  393,  393,
510       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
511       393,  384,  393,  384,  394,  384,  394,  395,  396,  396,
512       384,  396,  396,  384,  397,  398,  384,  384,  399,  400,
513       384,  384,  384,  384,  391,  384,  391,  384,  401,  384,
514       384,  402,  384,  403,  384,  384,  384,  384,  404,  392,
515       393,  393,  384,  384,  393,  393,  393,  393,  393,  393,
516 
517       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
518       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
519       393,  393,  393,  394,  384,  394,  384,  395,  384,  395,
520       395,  384,  396,  384,  396,  396,  396,  396,  384,  396,
521       405,  397,  384,  398,  384,  399,  384,  406,  400,  384,
522       401,  401,  384,  401,  402,  384,  402,  384,  403,  403,
523       384,  403,  384,  404,  384,  404,  384,  393,  393,  393,
524       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
525       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
526       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
527 
528       384,  405,  396,  405,  405,  384,  405,  405,  384,  399,
529       384,  406,  384,  384,  384,  403,  384,  384,  384,  393,
530       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
531       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
532       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
533       384,  405,  396,  384,  405,  384,  384,  384,  384,  384,
534       384,  393,  393,  393,  393,  393,  393,  393,  393,  393,
535       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
536       393,  393,  393,  393,  393,  393,  393,  384,  396,  384,
537       384,  393,  393,  393,  393,  393,  393,  393,  393,  393,
538 
539       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
540       393,  393,  393,  396,  384,  384,  393,  393,  393,  393,
541       393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
542       393,  393,  393,  396,  384,  384,  393,  393,  393,  393,
543       393,  393,  393,  393,  393,  393,  393,  393,  407,  384,
544       384,  393,  393,  393,  393,  393,  393,  393,  393,  393,
545       407,  384,  407,  407,  384,  384,  393,  393,  393,  393,
546       393,  393,  384,  408,  384,  393,  408,  384,  408,  408,
547       393,  384,  408,    0,  384,  384,  384,  384,  384,  384,
548       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
549 
550       384,  384,  384,  384,  384,  384,  384,  384
551     } ;
552 
553 static const flex_int16_t yy_nxt[780] =
554     {   0,
555        16,   17,   18,   19,   17,   20,   21,   22,   23,   24,
556        24,   25,   26,   24,   27,   28,   29,   30,   31,   32,
557        33,   34,   31,   35,   36,   37,   38,   39,   40,   41,
558        36,   42,   43,   36,   36,   44,   45,   46,   47,   48,
559        49,   50,   36,   36,   51,   36,   36,   36,   24,   16,
560        24,   52,   16,   36,   36,   36,   36,   36,   36,   36,
561        36,   53,   36,   36,   24,   54,   24,   31,   56,   57,
562        56,   57,   60,   61,   62,   60,  381,   58,   63,   58,
563        60,   61,   62,   60,   66,   66,   63,   70,   66,   66,
564        70,   70,   93,   74,   70,   71,   72,   73,   71,   76,
565 
566        77,   74,   74,   78,   80,   81,   82,   88,   74,   85,
567        74,   86,   89,   74,   74,   74,   74,   85,   96,   90,
568        74,   94,   74,  100,  107,  104,  111,  114,   74,   92,
569       105,  167,  101,  167,  116,   97,  168,  115,  117,  376,
570       112,  118,  113,  125,  126,  108,   79,  127,  126,  119,
571       134,  135,  120,  129,  130,  136,  372,   92,  371,   83,
572       139,  135,  131,  147,  370,  136,   84,  132,  137,  134,
573       135,  137,  148,   74,  138,  134,  135,  156,  157,  369,
574       136,   71,   72,   73,   71,   76,   77,  150,   77,   78,
575       368,   78,  295,   76,  152,   87,  296,  153,  160,  161,
576 
577       162,  160,   85,  367,   86,  163,  165,  166,   85,  170,
578        90,  360,  171,  172,  163,  179,  173,  190,  191,  359,
579        92,  125,  126,  358,  180,  357,  174,  127,  126,  356,
580       140,  355,   79,  163,   79,  129,  130,  201,  130,  141,
581       154,  147,  163,  354,  384,  353,  384,  211,   92,  384,
582       148,  384,  129,  130,  134,  135,  212,  139,  135,  136,
583       352,  131,  136,  134,  135,  350,  132,  348,  136,  137,
584       134,  135,  137,  134,  135,  138,  134,  135,  136,  156,
585       157,  136,  205,  206,  207,  205,  213,  157,  208,   76,
586       152,  150,  152,  153,  347,  153,   76,  152,  215,  216,
587 
588       153,  160,  161,  162,  160,  217,  216,  167,  346,  167,
589       165,  166,  218,  219,  166,  251,  252,  134,  135,  345,
590       208,  344,  136,  257,  251,  252,  343,  202,  140,  208,
591       254,  252,  148,  203,  342,  208,  154,  141,  154,  205,
592       206,  207,  205,  154,  259,  208,  251,  252,  261,  216,
593       341,  208,  340,  212,  288,  252,  134,  135,  339,  208,
594       338,  136,  251,  252,  134,  135,  337,  208,  253,  136,
595       134,  135,  134,  135,  336,  136,  351,  136,  335,  351,
596       362,  363,  333,  365,  351,  364,  365,  351,  332,  366,
597       362,  363,  373,  363,  331,  364,  330,  364,  362,  363,
598 
599       329,  365,  328,  364,  365,  327,  375,  326,  378,  379,
600       255,  325,  289,  380,  378,  379,  382,  379,  324,  380,
601       323,  380,  334,  322,  314,  349,  378,  379,  378,  379,
602       321,  380,  320,  380,  319,  318,  317,  316,  315,  313,
603       312,  311,  310,  309,  308,  307,  306,  305,  304,  303,
604       302,  301,  300,  299,  298,  297,  294,  293,  292,  291,
605       258,  290,  374,  287,  286,  285,  284,  283,  282,  281,
606       280,  279,  278,  277,  276,  275,  274,  273,  272,  271,
607       270,  269,  268,  267,  266,  265,  264,  263,  262,  218,
608       383,   55,   55,   55,   55,   55,   55,   59,   59,   59,
609 
610        59,   59,   59,   64,   64,   64,   64,   64,   64,   65,
611        65,   65,   65,   65,   65,   67,   67,   67,   67,   67,
612        67,   69,   69,   69,   69,   69,   69,   75,   75,   75,
613        75,   75,   75,   91,   91,   95,   95,  124,  124,  260,
614       124,  124,  124,  128,  128,  128,  128,  128,  128,  133,
615       133,  133,  133,  133,  133,  142,  258,  142,  142,  142,
616       142,  144,  256,  144,  144,  144,  144,  146,  250,  146,
617       146,  146,  146,  149,  249,  149,  149,  149,  149,  151,
618       151,  151,  151,  151,  151,  155,  155,  155,  155,  155,
619       155,  159,  159,  159,  159,  159,  159,  164,  164,  164,
620 
621       164,  164,  164,  204,  204,  204,  204,  204,  204,  210,
622       248,  210,  210,  210,  210,  361,  361,  361,  361,  361,
623       361,  377,  377,  377,  377,  377,  377,  247,  246,  245,
624       244,  243,  242,  241,  240,  239,  238,  237,  236,  235,
625       234,  233,  232,  231,  230,  229,  228,  227,  226,  225,
626       224,  223,  222,  221,  220,  168,  218,  214,  209,  143,
627       200,  199,  198,  197,  196,  195,  194,  193,  192,  189,
628       188,  187,  186,  185,  184,  183,  182,  181,  178,  177,
629       176,  175,  169,   74,   74,   87,  158,   80,   72,  145,
630       143,  123,   74,  122,  121,  110,  109,  106,  103,  102,
631 
632        99,   98,   74,   87,   74,   74,   72,  384,   68,   68,
633        15,  384,  384,  384,  384,  384,  384,  384,  384,  384,
634       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
635       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
636       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
637       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
638       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
639       384,  384,  384,  384,  384,  384,  384,  384,  384
640     } ;
641 
642 static const flex_int16_t yy_chk[780] =
643     {   0,
644         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
645         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
646         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
647         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
648         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
649         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
650         1,    1,    1,    1,    1,    1,    1,    1,    3,    3,
651         4,    4,    5,    5,    5,    5,  376,    3,    5,    4,
652         6,    6,    6,    6,    9,   10,    6,   13,    9,   10,
653        14,   13,   32,   32,   14,   17,   17,   17,   17,   21,
654 
655        21,   23,   26,   21,   22,   22,   22,   29,   27,   27,
656        26,   27,   29,   23,   27,   27,   29,   30,   35,   30,
657        34,   34,   22,   39,   44,   42,   47,   48,   54,   30,
658        42,   92,   39,   92,   49,   35,   92,   48,   49,  372,
659        47,   49,   47,   55,   55,   44,   21,   57,   57,   49,
660        59,   59,   49,   58,   58,   59,  359,   30,  358,   22,
661        62,   62,   58,   69,  356,   62,   22,   58,   60,   60,
662        60,   60,   69,   54,   60,   63,   63,   82,   82,  355,
663        63,   71,   71,   71,   71,   75,   75,   77,   77,   75,
664       354,   77,  265,   79,   79,   87,  265,   79,   84,   84,
665 
666        84,   84,   86,  353,   86,   87,   89,   89,   90,   98,
667        90,  348,   98,   99,   86,  104,   99,  114,  114,  345,
668        90,  124,  124,  344,  104,  343,   99,  126,  126,  342,
669        63,  341,   75,   87,   77,  128,  128,  130,  130,   63,
670        79,  146,   86,  340,  128,  339,  130,  148,   90,  128,
671       146,  130,  131,  131,  133,  133,  148,  135,  135,  133,
672       338,  131,  135,  136,  136,  335,  131,  331,  136,  137,
673       137,  137,  137,  138,  138,  137,  140,  140,  138,  155,
674       155,  140,  141,  141,  141,  141,  157,  157,  141,  151,
675       151,  152,  152,  151,  330,  152,  154,  154,  159,  159,
676 
677       154,  160,  160,  160,  160,  162,  162,  163,  329,  163,
678       164,  164,  163,  166,  166,  202,  202,  203,  203,  328,
679       202,  327,  203,  210,  204,  204,  326,  136,  138,  204,
680       207,  207,  210,  140,  324,  207,  151,  138,  152,  205,
681       205,  205,  205,  154,  212,  205,  208,  208,  216,  216,
682       323,  208,  321,  212,  252,  252,  253,  253,  320,  252,
683       318,  253,  255,  255,  289,  289,  317,  255,  203,  289,
684       314,  314,  334,  334,  316,  314,  336,  334,  315,  336,
685       349,  349,  312,  350,  351,  349,  350,  351,  311,  351,
686       361,  361,  363,  363,  310,  361,  309,  363,  364,  364,
687 
688       308,  365,  307,  364,  365,  306,  365,  303,  374,  374,
689       208,  302,  253,  374,  377,  377,  379,  379,  301,  377,
690       300,  379,  314,  299,  289,  334,  380,  380,  383,  383,
691       297,  380,  296,  383,  294,  293,  292,  291,  290,  287,
692       282,  281,  280,  279,  278,  277,  276,  275,  274,  273,
693       272,  271,  270,  268,  267,  266,  264,  263,  262,  260,
694       259,  256,  364,  250,  248,  247,  246,  245,  244,  242,
695       241,  240,  239,  238,  237,  236,  234,  233,  231,  230,
696       229,  228,  227,  226,  225,  224,  223,  221,  220,  218,
697       380,  385,  385,  385,  385,  385,  385,  386,  386,  386,
698 
699       386,  386,  386,  387,  387,  387,  387,  387,  387,  388,
700       388,  388,  388,  388,  388,  389,  389,  389,  389,  389,
701       389,  390,  390,  390,  390,  390,  390,  391,  391,  391,
702       391,  391,  391,  392,  392,  393,  393,  394,  394,  214,
703       394,  394,  394,  395,  395,  395,  395,  395,  395,  396,
704       396,  396,  396,  396,  396,  397,  211,  397,  397,  397,
705       397,  398,  209,  398,  398,  398,  398,  399,  200,  399,
706       399,  399,  399,  400,  199,  400,  400,  400,  400,  401,
707       401,  401,  401,  401,  401,  402,  402,  402,  402,  402,
708       402,  403,  403,  403,  403,  403,  403,  404,  404,  404,
709 
710       404,  404,  404,  405,  405,  405,  405,  405,  405,  406,
711       198,  406,  406,  406,  406,  407,  407,  407,  407,  407,
712       407,  408,  408,  408,  408,  408,  408,  197,  196,  195,
713       194,  193,  192,  191,  190,  189,  188,  187,  186,  185,
714       184,  183,  182,  181,  180,  179,  178,  177,  176,  174,
715       173,  172,  171,  170,  169,  168,  167,  158,  145,  142,
716       123,  122,  121,  120,  119,  118,  117,  116,  115,  113,
717       112,  111,  110,  109,  108,  107,  106,  105,  103,  102,
718       101,  100,   96,   94,   93,   85,   83,   81,   73,   68,
719        65,   53,   52,   51,   50,   46,   45,   43,   41,   40,
720 
721        38,   37,   33,   28,   25,   20,   19,   15,   12,   11,
722       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
723       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
724       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
725       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
726       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
727       384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
728       384,  384,  384,  384,  384,  384,  384,  384,  384
729     } ;
730 
731 static yy_state_type yy_last_accepting_state;
732 static char *yy_last_accepting_cpos;
733 
734 extern int yy_flex_debug;
735 int yy_flex_debug = 0;
736 
737 /* The intent behind this definition is that it'll catch
738  * any uses of REJECT which flex missed.
739  */
740 #define REJECT reject_used_but_not_detected
741 #define yymore() yymore_used_but_not_detected
742 #define YY_MORE_ADJ 0
743 #define YY_RESTORE_YY_MORE_OFFSET
744 char *yytext;
745 #line 1 "instrument.l"
746 /* In Emacs, please make this -*-c-*- mode. Thanks. */
747 /*******************************************************************************
748 *
749 * McStas, neutron ray-tracing package
750 *         Copyright (C) 1997-2007, All rights reserved
751 *         Risoe National Laboratory, Roskilde, Denmark
752 *         Institut Laue Langevin, Grenoble, France
753 *
754 * Kernel: instrument.l
755 *
756 * %Identification
757 * Written by: K.N.
758 * Date: Jul  1, 1997
759 * Origin: Risoe
760 * Release: McStas 1.6
761 * Version: $Revision$
762 *
763 * Flex scanner for instrument definition files.
764 *
765 *******************************************************************************/
766 /* Definition section. */
767 /* Do not use the `yywrap feature' - only scan a single file (see Flex manual). */
768 #line 31 "instrument.l"
769 #include <string.h>
770 #include <math.h>
771 #include <stdio.h>
772 
773 #include "mccode.h"
774 #include "instrument.tab.h"
775 
776 /* Fix things for bison option %pure_parser. */
777 #define YY_DECL int yylex(YYSTYPE *yylvalp)
778 #define yylval (*yylvalp)
779 
780 
781 /* Structure to hold the state of a file being parsed. */
782 struct file_state
783   {
784     YY_BUFFER_STATE buffer;
785     char *filename;
786     char *switch_line;
787     int line;
788     int oldstate;   /* Saved lexer start condition. */
789     int visible_eof;    /* If true, tell parser about end-of-file. */
790   };
791 
792 #define MAX_INCLUDE 256
793 static struct file_state file_stack[MAX_INCLUDE + 1];
794 static int file_stack_ptr = 0;
795 static char *switch_line = NULL;
796 
797 static void push_include(char *name);
798 
799 #line 800 "lex.yy.c"
800 /* Lexer states. */
801 /* The state ccomment is used for scanning c-style comments. The state ccode
802    is used when scanning embedded C code blocks. */
803 
804 /* The state initial_token is only used to output an initial token to
805    discriminate between parsing general instrument definitions and autoloaded
806    component definitions. */
807 
808 /* Get file name in %include. */
809 
810 /* Get full %include line within C code blocks. */
811 
812 /* Get file name in %include within C code blocks. */
813 
814 /* Abbreviations. */
815 #line 816 "lex.yy.c"
816 
817 #define INITIAL 0
818 #define ccomment 1
819 #define ccode 2
820 #define initial_token 3
821 #define inclname 4
822 #define cfullincl 5
823 #define cinclname 6
824 
825 #ifndef YY_NO_UNISTD_H
826 /* Special case for "unistd.h", since it is non-ANSI. We include it way
827  * down here because we want the user's section 1 to have been scanned first.
828  * The user has a chance to override it with an option.
829  */
830 #include <unistd.h>
831 #endif
832 
833 #ifndef YY_EXTRA_TYPE
834 #define YY_EXTRA_TYPE void *
835 #endif
836 
837 static int yy_init_globals ( void );
838 
839 /* Accessor methods to globals.
840    These are made visible to non-reentrant scanners for convenience. */
841 
842 int yylex_destroy ( void );
843 
844 int yyget_debug ( void );
845 
846 void yyset_debug ( int debug_flag  );
847 
848 YY_EXTRA_TYPE yyget_extra ( void );
849 
850 void yyset_extra ( YY_EXTRA_TYPE user_defined  );
851 
852 FILE *yyget_in ( void );
853 
854 void yyset_in  ( FILE * _in_str  );
855 
856 FILE *yyget_out ( void );
857 
858 void yyset_out  ( FILE * _out_str  );
859 
860 			int yyget_leng ( void );
861 
862 char *yyget_text ( void );
863 
864 int yyget_lineno ( void );
865 
866 void yyset_lineno ( int _line_number  );
867 
868 /* Macros after this point can all be overridden by user definitions in
869  * section 1.
870  */
871 
872 #ifndef YY_SKIP_YYWRAP
873 #ifdef __cplusplus
874 extern "C" int yywrap ( void );
875 #else
876 extern int yywrap ( void );
877 #endif
878 #endif
879 
880 #ifndef YY_NO_UNPUT
881 
882     static void yyunput ( int c, char *buf_ptr  );
883 
884 #endif
885 
886 #ifndef yytext_ptr
887 static void yy_flex_strncpy ( char *, const char *, int );
888 #endif
889 
890 #ifdef YY_NEED_STRLEN
891 static int yy_flex_strlen ( const char * );
892 #endif
893 
894 #ifndef YY_NO_INPUT
895 #ifdef __cplusplus
896 static int yyinput ( void );
897 #else
898 static int input ( void );
899 #endif
900 
901 #endif
902 
903 /* Amount of stuff to slurp up with each read. */
904 #ifndef YY_READ_BUF_SIZE
905 #ifdef __ia64__
906 /* On IA-64, the buffer size is 16k, not 8k */
907 #define YY_READ_BUF_SIZE 16384
908 #else
909 #define YY_READ_BUF_SIZE 8192
910 #endif /* __ia64__ */
911 #endif
912 
913 /* Copy whatever the last rule matched to the standard output. */
914 #ifndef ECHO
915 /* This used to be an fputs(), but since the string might contain NUL's,
916  * we now use fwrite().
917  */
918 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
919 #endif
920 
921 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
922  * is returned in "result".
923  */
924 #ifndef YY_INPUT
925 #define YY_INPUT(buf,result,max_size) \
926 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
927 		{ \
928 		int c = '*'; \
929 		int n; \
930 		for ( n = 0; n < max_size && \
931 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
932 			buf[n] = (char) c; \
933 		if ( c == '\n' ) \
934 			buf[n++] = (char) c; \
935 		if ( c == EOF && ferror( yyin ) ) \
936 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
937 		result = n; \
938 		} \
939 	else \
940 		{ \
941 		errno=0; \
942 		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
943 			{ \
944 			if( errno != EINTR) \
945 				{ \
946 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
947 				break; \
948 				} \
949 			errno=0; \
950 			clearerr(yyin); \
951 			} \
952 		}\
953 \
954 
955 #endif
956 
957 /* No semi-colon after return; correct usage is to write "yyterminate();" -
958  * we don't want an extra ';' after the "return" because that will cause
959  * some compilers to complain about unreachable statements.
960  */
961 #ifndef yyterminate
962 #define yyterminate() return YY_NULL
963 #endif
964 
965 /* Number of entries by which start-condition stack grows. */
966 #ifndef YY_START_STACK_INCR
967 #define YY_START_STACK_INCR 25
968 #endif
969 
970 /* Report a fatal error. */
971 #ifndef YY_FATAL_ERROR
972 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
973 #endif
974 
975 /* end tables serialization structures and prototypes */
976 
977 /* Default declaration of generated scanner - a define so the user can
978  * easily add parameters.
979  */
980 #ifndef YY_DECL
981 #define YY_DECL_IS_OURS 1
982 
983 extern int yylex (void);
984 
985 #define YY_DECL int yylex (void)
986 #endif /* !YY_DECL */
987 
988 /* Code executed at the beginning of each rule, after yytext and yyleng
989  * have been set up.
990  */
991 #ifndef YY_USER_ACTION
992 #define YY_USER_ACTION
993 #endif
994 
995 /* Code executed at the end of each rule. */
996 #ifndef YY_BREAK
997 #define YY_BREAK /*LINTED*/break;
998 #endif
999 
1000 #define YY_RULE_SETUP \
1001 	YY_USER_ACTION
1002 
1003 /** The main scanner function which does all the work.
1004  */
1005 YY_DECL
1006 {
1007 	yy_state_type yy_current_state;
1008 	char *yy_cp, *yy_bp;
1009 	int yy_act;
1010 
1011 	if ( !(yy_init) )
1012 		{
1013 		(yy_init) = 1;
1014 
1015 #ifdef YY_USER_INIT
1016 		YY_USER_INIT;
1017 #endif
1018 
1019 		if ( ! (yy_start) )
1020 			(yy_start) = 1;	/* first start state */
1021 
1022 		if ( ! yyin )
1023 			yyin = stdin;
1024 
1025 		if ( ! yyout )
1026 			yyout = stdout;
1027 
1028 		if ( ! YY_CURRENT_BUFFER ) {
1029 			yyensure_buffer_stack ();
1030 			YY_CURRENT_BUFFER_LVALUE =
1031 				yy_create_buffer( yyin, YY_BUF_SIZE );
1032 		}
1033 
1034 		yy_load_buffer_state(  );
1035 		}
1036 
1037 	{
1038 #line 96 "instrument.l"
1039 
1040 
1041 #line 99 "instrument.l"
1042  /* Initially, output a single token to the parser to tell it whether to parse
1043     general instrument definitions or autoloaded component definitions. */
1044 #line 1045 "lex.yy.c"
1045 
1046 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
1047 		{
1048 		yy_cp = (yy_c_buf_p);
1049 
1050 		/* Support of yytext. */
1051 		*yy_cp = (yy_hold_char);
1052 
1053 		/* yy_bp points to the position in yy_ch_buf of the start of
1054 		 * the current run.
1055 		 */
1056 		yy_bp = yy_cp;
1057 
1058 		yy_current_state = (yy_start);
1059 yy_match:
1060 		do
1061 			{
1062 			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1063 			if ( yy_accept[yy_current_state] )
1064 				{
1065 				(yy_last_accepting_state) = yy_current_state;
1066 				(yy_last_accepting_cpos) = yy_cp;
1067 				}
1068 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1069 				{
1070 				yy_current_state = (int) yy_def[yy_current_state];
1071 				if ( yy_current_state >= 385 )
1072 					yy_c = yy_meta[yy_c];
1073 				}
1074 			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1075 			++yy_cp;
1076 			}
1077 		while ( yy_base[yy_current_state] != 711 );
1078 
1079 yy_find_action:
1080 		yy_act = yy_accept[yy_current_state];
1081 		if ( yy_act == 0 )
1082 			{ /* have to back up */
1083 			yy_cp = (yy_last_accepting_cpos);
1084 			yy_current_state = (yy_last_accepting_state);
1085 			yy_act = yy_accept[yy_current_state];
1086 			}
1087 
1088 		YY_DO_BEFORE_ACTION;
1089 
1090 do_action:	/* This label is used only to access EOF actions. */
1091 
1092 		switch ( yy_act )
1093 	{ /* beginning of action switch */
1094 			case 0: /* must back up */
1095 			/* undo the effects of YY_DO_BEFORE_ACTION */
1096 			*yy_cp = (yy_hold_char);
1097 			yy_cp = (yy_last_accepting_cpos);
1098 			yy_current_state = (yy_last_accepting_state);
1099 			goto yy_find_action;
1100 
1101 case 1:
1102 /* rule 1 can match eol */
1103 #line 102 "instrument.l"
1104 YY_RULE_SETUP
1105 case YY_STATE_EOF(initial_token):
1106 #line 102 "instrument.l"
1107 {
1108       yyless(0);
1109       BEGIN(INITIAL);
1110       return parse_restricted ? TOK_RESTRICTED : TOK_GENERAL;
1111     }
1112 	YY_BREAK
1113 case 2:
1114 YY_RULE_SETUP
1115 #line 108 "instrument.l"
1116 return TOK_ABSOLUTE;
1117 	YY_BREAK
1118 case 3:
1119 YY_RULE_SETUP
1120 #line 109 "instrument.l"
1121 return TOK_AT;
1122 	YY_BREAK
1123 case 4:
1124 YY_RULE_SETUP
1125 #line 110 "instrument.l"
1126 return TOK_COMPONENT;
1127 	YY_BREAK
1128 case 5:
1129 YY_RULE_SETUP
1130 #line 111 "instrument.l"
1131 return TOK_DECLARE;
1132 	YY_BREAK
1133 case 6:
1134 YY_RULE_SETUP
1135 #line 112 "instrument.l"
1136 return TOK_DEFINE;
1137 	YY_BREAK
1138 case 7:
1139 YY_RULE_SETUP
1140 #line 113 "instrument.l"
1141 return TOK_DEFINITION;
1142 	YY_BREAK
1143 case 8:
1144 YY_RULE_SETUP
1145 #line 114 "instrument.l"
1146 return TOK_END;
1147 	YY_BREAK
1148 case 9:
1149 YY_RULE_SETUP
1150 #line 115 "instrument.l"
1151 return TOK_MCDISPLAY;
1152 	YY_BREAK
1153 case 10:
1154 YY_RULE_SETUP
1155 #line 116 "instrument.l"
1156 return TOK_FINALLY;
1157 	YY_BREAK
1158 case 11:
1159 YY_RULE_SETUP
1160 #line 117 "instrument.l"
1161 return TOK_INITIALIZE;
1162 	YY_BREAK
1163 case 12:
1164 YY_RULE_SETUP
1165 #line 118 "instrument.l"
1166 return TOK_INSTRUMENT;
1167 	YY_BREAK
1168 case 13:
1169 YY_RULE_SETUP
1170 #line 119 "instrument.l"
1171 return TOK_OUTPUT;
1172 	YY_BREAK
1173 case 14:
1174 YY_RULE_SETUP
1175 #line 120 "instrument.l"
1176 return TOK_PARAMETERS;
1177 	YY_BREAK
1178 case 15:
1179 YY_RULE_SETUP
1180 #line 121 "instrument.l"
1181 return TOK_RELATIVE;
1182 	YY_BREAK
1183 case 16:
1184 YY_RULE_SETUP
1185 #line 122 "instrument.l"
1186 return TOK_ROTATED;
1187 	YY_BREAK
1188 case 17:
1189 YY_RULE_SETUP
1190 #line 123 "instrument.l"
1191 return TOK_PREVIOUS;
1192 	YY_BREAK
1193 case 18:
1194 YY_RULE_SETUP
1195 #line 124 "instrument.l"
1196 return TOK_SETTING;
1197 	YY_BREAK
1198 case 19:
1199 YY_RULE_SETUP
1200 #line 125 "instrument.l"
1201 return TOK_STATE;
1202 	YY_BREAK
1203 case 20:
1204 YY_RULE_SETUP
1205 #line 126 "instrument.l"
1206 return TOK_POL;
1207 	YY_BREAK
1208 case 21:
1209 YY_RULE_SETUP
1210 #line 127 "instrument.l"
1211 return TOK_TRACE;
1212 	YY_BREAK
1213 case 22:
1214 YY_RULE_SETUP
1215 #line 128 "instrument.l"
1216 return TOK_SHARE;
1217 	YY_BREAK
1218 case 23:
1219 YY_RULE_SETUP
1220 #line 129 "instrument.l"
1221 return TOK_EXTEND;
1222 	YY_BREAK
1223 case 24:
1224 YY_RULE_SETUP
1225 #line 130 "instrument.l"
1226 return TOK_GROUP;
1227 	YY_BREAK
1228 case 25:
1229 YY_RULE_SETUP
1230 #line 131 "instrument.l"
1231 return TOK_SAVE;
1232 	YY_BREAK
1233 case 26:
1234 YY_RULE_SETUP
1235 #line 132 "instrument.l"
1236 return TOK_JUMP;
1237 	YY_BREAK
1238 case 27:
1239 YY_RULE_SETUP
1240 #line 133 "instrument.l"
1241 return TOK_WHEN;
1242 	YY_BREAK
1243 case 28:
1244 YY_RULE_SETUP
1245 #line 134 "instrument.l"
1246 return TOK_NEXT;
1247 	YY_BREAK
1248 case 29:
1249 YY_RULE_SETUP
1250 #line 135 "instrument.l"
1251 return TOK_ITERATE;
1252 	YY_BREAK
1253 case 30:
1254 YY_RULE_SETUP
1255 #line 136 "instrument.l"
1256 return TOK_MYSELF;
1257 	YY_BREAK
1258 case 31:
1259 YY_RULE_SETUP
1260 #line 137 "instrument.l"
1261 return TOK_COPY;
1262 	YY_BREAK
1263 case 32:
1264 YY_RULE_SETUP
1265 #line 138 "instrument.l"
1266 return TOK_SPLIT;
1267 	YY_BREAK
1268 case 33:
1269 YY_RULE_SETUP
1270 #line 139 "instrument.l"
1271 return TOK_REMOVABLE;
1272 	YY_BREAK
1273 case 34:
1274 YY_RULE_SETUP
1275 #line 140 "instrument.l"
1276 return TOK_DEPENDENCY;
1277 	YY_BREAK
1278 case 35:
1279 YY_RULE_SETUP
1280 #line 142 "instrument.l"
1281 return yytext[0]; /* Punctuation. */
1282 	YY_BREAK
1283 case 36:
1284 YY_RULE_SETUP
1285 #line 143 "instrument.l"
1286 return yytext[0]; /* Operator. */
1287 	YY_BREAK
1288 case 37:
1289 YY_RULE_SETUP
1290 #line 145 "instrument.l"
1291 yylval.number = str_dup(yytext); return TOK_NUMBER;
1292 	YY_BREAK
1293 /* Note: Since ID overlaps with NUMBER (eg. "2E3"), ID must come
1294     after NUMBER */
1295 case 38:
1296 YY_RULE_SETUP
1297 #line 148 "instrument.l"
1298 yylval.string = str_dup(yytext); return TOK_ID;
1299 	YY_BREAK
1300 /* Scanning all other C tokens used in expressions for component
1301  * actual parameters.
1302  * IMPORTANT!: Whenever a token is removed from here to make an independent
1303  * separate token, the new token must be added to the parser rules for
1304  * genatexp/topatexp.
1305  */
1306 case 39:
1307 YY_RULE_SETUP
1308 #line 156 "instrument.l"
1309 {
1310       yylval.string = str_dup(yytext);
1311       return TOK_CTOK;
1312 \
1313     }
1314 	YY_BREAK
1315 /* Scanning embedded C code. */
1316 case 40:
1317 /* rule 40 can match eol */
1318 YY_RULE_SETUP
1319 #line 164 "instrument.l"
1320 {
1321       yylval.linenum = instr_current_line;
1322       instr_current_line++;
1323       BEGIN(ccode);
1324       return TOK_CODE_START;
1325     }
1326 	YY_BREAK
1327 case 41:
1328 /* rule 41 can match eol */
1329 YY_RULE_SETUP
1330 #line 170 "instrument.l"
1331 {
1332       instr_current_line++;
1333       print_error("%%{ token not on a line by itself "
1334                   "on line %d of file '%s': %s.\n",
1335               instr_current_line, instr_current_filename, yytext);
1336       return TOK_INVALID;
1337     }
1338 	YY_BREAK
1339 
1340 /* normal %} symbol to end C code block */
1341 case 42:
1342 /* rule 42 can match eol */
1343 YY_RULE_SETUP
1344 #line 180 "instrument.l"
1345 instr_current_line++; BEGIN(INITIAL); return TOK_CODE_END;
1346 	YY_BREAK
1347 /* %} symbol surrounded by some unrelevant stuff */
1348 case 43:
1349 /* rule 43 can match eol */
1350 YY_RULE_SETUP
1351 #line 182 "instrument.l"
1352 {
1353         instr_current_line++;
1354         print_warn(NULL, "%%} terminator not on a line by itself "
1355                     "on line %d of file '%s': %s.\n",
1356               instr_current_line, instr_current_filename, yytext);
1357       }
1358 	YY_BREAK
1359 /* %include full line -> jump to cfullincl state */
1360 case 44:
1361 /* rule 44 can match eol */
1362 YY_RULE_SETUP
1363 #line 189 "instrument.l"
1364 {
1365       yyless(0);  /* re-use the current line, but within cfullincl state */
1366       BEGIN(cfullincl);
1367       }
1368 	YY_BREAK
1369 /* full line as C code */
1370 case 45:
1371 /* rule 45 can match eol */
1372 YY_RULE_SETUP
1373 #line 194 "instrument.l"
1374 {
1375         instr_current_line++;
1376         yylval.string = str_dup(yytext);
1377         return TOK_CODE_LINE;
1378       }
1379 	YY_BREAK
1380 /* end ccode */
1381 /* Quoted strings. Simple version: no escape sequences. */
1382 case 46:
1383 YY_RULE_SETUP
1384 #line 202 "instrument.l"
1385 {
1386         yylval.string =
1387           str_dup_n(&yytext[1], strlen(yytext) - 2);
1388         return TOK_STRING;
1389       }
1390 	YY_BREAK
1391 /* Quoted strings with escape sequence (e.g Win32 path): preserve all chars */
1392 case 47:
1393 YY_RULE_SETUP
1394 #line 208 "instrument.l"
1395 {
1396         yylval.string = str_dup_n(&yytext[1], strlen(yytext) - 2);
1397         return TOK_STRING;
1398       }
1399 	YY_BREAK
1400 case 48:
1401 /* rule 48 can match eol */
1402 YY_RULE_SETUP
1403 #line 212 "instrument.l"
1404 {
1405         print_error("Error: Unterminated string "
1406                     "on line %d of file '%s': %s.\n",
1407               instr_current_line, instr_current_filename, yytext);
1408       }
1409 	YY_BREAK
1410 /* %-style comments - ignore everything to end of line. */
1411 case 49:
1412 /* rule 49 can match eol */
1413 YY_RULE_SETUP
1414 #line 219 "instrument.l"
1415 instr_current_line++; /* Ignore comment. */
1416 	YY_BREAK
1417 case 50:
1418 /* rule 50 can match eol */
1419 YY_RULE_SETUP
1420 #line 220 "instrument.l"
1421 instr_current_line++; /* Ignore comment. */
1422 	YY_BREAK
1423 /* Include files for McStas comp/instr (INITIAL state). */
1424 /* then next token is the file name */
1425 case 51:
1426 YY_RULE_SETUP
1427 #line 224 "instrument.l"
1428 BEGIN(inclname);
1429 	YY_BREAK
1430 
1431 /* name ends with a quote char -> include as INITIAL state */
1432 case 52:
1433 YY_RULE_SETUP
1434 #line 227 "instrument.l"
1435 {
1436         yytext[yyleng - 1] = '\0';
1437         BEGIN(INITIAL);
1438         if (verbose) fprintf(stderr, "Embedding %s\n", yytext);
1439         push_include(yytext);
1440       }
1441 	YY_BREAK
1442 /* name contains char, including quote and \n -> not valid */
1443 case 53:
1444 /* rule 53 can match eol */
1445 YY_RULE_SETUP
1446 #line 234 "instrument.l"
1447 {
1448         print_error("Error in %%include statement "
1449                     "on line %d of file '%s': %s.\n",
1450               instr_current_line, instr_current_filename, yytext);
1451         BEGIN(INITIAL);
1452       }
1453 	YY_BREAK
1454 /* end inclname */
1455 /* Include files within C code blocks (ccode state)*/
1456 /* next token is full line, regenerated by yyless(0) */
1457 case 54:
1458 YY_RULE_SETUP
1459 #line 243 "instrument.l"
1460 BEGIN(cinclname);
1461 	YY_BREAK
1462 
1463 /* name ends with a quote char, with extension -> include as ccode state */
1464 case 55:
1465 YY_RULE_SETUP
1466 #line 246 "instrument.l"
1467 {
1468         yytext[yyleng - 1] = '\0';
1469         BEGIN(ccode);
1470         if (verbose) fprintf(stderr, "Embedding file      %s\n", yytext);
1471         push_include(yytext);
1472       }
1473 	YY_BREAK
1474 /* name ends with a quote char, but no ext -> include as ccode state
1475    * this occurs when importing a library .h/.c The .c is only included
1476    * when instr->runtime option is true
1477    */
1478 case 56:
1479 YY_RULE_SETUP
1480 #line 256 "instrument.l"
1481 {
1482         char *tmp0, *tmp1;
1483         yytext[yyleng - 1] = '\0';
1484         tmp0 = str_dup(yytext);
1485         if (!symtab_lookup(lib_instances, tmp0))
1486         {
1487           tmp1 = str_cat(tmp0, ".h", NULL);
1488           if (instrument_definition->include_runtime)
1489           {
1490             switch_line = str_cat(tmp0, ".c", NULL);
1491           }
1492           else
1493             fprintf(stderr,"Dependency: %s.o\n", tmp0);
1494 
1495           BEGIN(ccode);
1496           if (verbose) fprintf(stderr, "Embedding library   %s\n", tmp1);
1497 
1498           push_include(tmp1);
1499           symtab_add(lib_instances, tmp0, NULL);
1500           str_free(tmp1);
1501         }
1502         else
1503         {
1504           BEGIN(ccode);
1505           instr_current_line++;  /* library was previously embedded */
1506         }
1507         str_free(tmp0);
1508       }
1509 	YY_BREAK
1510 /* name contains char, including quote and \n -> not valid */
1511 case 57:
1512 /* rule 57 can match eol */
1513 YY_RULE_SETUP
1514 #line 285 "instrument.l"
1515 {
1516         print_error("Error in %%include statement "
1517                     "on line %d of file '%s': %s.\n",
1518               instr_current_line, instr_current_filename, yytext);
1519         BEGIN(ccode);
1520       }
1521 	YY_BREAK
1522 /* end  cinclname */
1523 /* C++ "//"-style comments - ignore everything to end of line. */
1524 case 58:
1525 /* rule 58 can match eol */
1526 YY_RULE_SETUP
1527 #line 294 "instrument.l"
1528 instr_current_line++; /* Ignore comment. */
1529 	YY_BREAK
1530 /* C-style comments. */
1531 case 59:
1532 YY_RULE_SETUP
1533 #line 297 "instrument.l"
1534 BEGIN(ccomment);
1535 	YY_BREAK
1536 
1537 case 60:
1538 YY_RULE_SETUP
1539 #line 299 "instrument.l"
1540 /* Ignore comment. */
1541 	YY_BREAK
1542 case 61:
1543 /* rule 61 can match eol */
1544 YY_RULE_SETUP
1545 #line 300 "instrument.l"
1546 instr_current_line++; /* Ignore comment. */
1547 	YY_BREAK
1548 case 62:
1549 YY_RULE_SETUP
1550 #line 301 "instrument.l"
1551 /* Ignore comment. */
1552 	YY_BREAK
1553 case 63:
1554 /* rule 63 can match eol */
1555 YY_RULE_SETUP
1556 #line 302 "instrument.l"
1557 instr_current_line++; /* Ignore comment. */
1558 	YY_BREAK
1559 case 64:
1560 YY_RULE_SETUP
1561 #line 303 "instrument.l"
1562 BEGIN(INITIAL); /* End of comment. */
1563 	YY_BREAK
1564 
1565 case 65:
1566 YY_RULE_SETUP
1567 #line 306 "instrument.l"
1568 /* Ignore whitespace. */
1569 	YY_BREAK
1570 case 66:
1571 /* rule 66 can match eol */
1572 YY_RULE_SETUP
1573 #line 307 "instrument.l"
1574 instr_current_line++; /* Ignore whitespace. */
1575 	YY_BREAK
1576 case YY_STATE_EOF(INITIAL):
1577 case YY_STATE_EOF(ccode):
1578 #line 309 "instrument.l"
1579 {
1580       if(file_stack_ptr <= 0)
1581       {
1582         /* EOF on main instrument file. */
1583         yyterminate();
1584       }
1585       else
1586       {
1587         --file_stack_ptr;
1588         yy_delete_buffer(YY_CURRENT_BUFFER);
1589         yy_switch_to_buffer(file_stack[file_stack_ptr].buffer);
1590         instr_current_filename = file_stack[file_stack_ptr].filename;
1591         instr_current_line = file_stack[file_stack_ptr].line;
1592         switch_line        = file_stack[file_stack_ptr].switch_line;
1593         if (switch_line)
1594         {
1595           char *tmp0;
1596           tmp0 = str_dup(switch_line);
1597           str_free(switch_line);
1598           switch_line = NULL;
1599           BEGIN(ccode);
1600           if (verbose) fprintf(stderr, "Embedding library   %s\n", tmp0);
1601           push_include(tmp0);
1602           str_free(tmp0);
1603         }
1604         else
1605         {
1606           BEGIN(file_stack[file_stack_ptr].oldstate);
1607           if(file_stack[file_stack_ptr].visible_eof)
1608             yyterminate();
1609         }
1610 
1611       }
1612     }
1613 	YY_BREAK
1614 case 67:
1615 YY_RULE_SETUP
1616 #line 344 "instrument.l"
1617 {
1618       print_error("Invalid character `%s' "
1619                   "on line %d of file '%s'.\n",
1620             yytext, instr_current_line, instr_current_filename);
1621       return TOK_INVALID;
1622     }
1623 	YY_BREAK
1624 case 68:
1625 YY_RULE_SETUP
1626 #line 353 "instrument.l"
1627 ECHO;
1628 	YY_BREAK
1629 #line 1630 "lex.yy.c"
1630 case YY_STATE_EOF(ccomment):
1631 case YY_STATE_EOF(inclname):
1632 case YY_STATE_EOF(cfullincl):
1633 case YY_STATE_EOF(cinclname):
1634 	yyterminate();
1635 
1636 	case YY_END_OF_BUFFER:
1637 		{
1638 		/* Amount of text matched not including the EOB char. */
1639 		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1640 
1641 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1642 		*yy_cp = (yy_hold_char);
1643 		YY_RESTORE_YY_MORE_OFFSET
1644 
1645 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1646 			{
1647 			/* We're scanning a new file or input source.  It's
1648 			 * possible that this happened because the user
1649 			 * just pointed yyin at a new source and called
1650 			 * yylex().  If so, then we have to assure
1651 			 * consistency between YY_CURRENT_BUFFER and our
1652 			 * globals.  Here is the right place to do so, because
1653 			 * this is the first action (other than possibly a
1654 			 * back-up) that will match for the new input source.
1655 			 */
1656 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1657 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1658 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1659 			}
1660 
1661 		/* Note that here we test for yy_c_buf_p "<=" to the position
1662 		 * of the first EOB in the buffer, since yy_c_buf_p will
1663 		 * already have been incremented past the NUL character
1664 		 * (since all states make transitions on EOB to the
1665 		 * end-of-buffer state).  Contrast this with the test
1666 		 * in input().
1667 		 */
1668 		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1669 			{ /* This was really a NUL. */
1670 			yy_state_type yy_next_state;
1671 
1672 			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1673 
1674 			yy_current_state = yy_get_previous_state(  );
1675 
1676 			/* Okay, we're now positioned to make the NUL
1677 			 * transition.  We couldn't have
1678 			 * yy_get_previous_state() go ahead and do it
1679 			 * for us because it doesn't know how to deal
1680 			 * with the possibility of jamming (and we don't
1681 			 * want to build jamming into it because then it
1682 			 * will run more slowly).
1683 			 */
1684 
1685 			yy_next_state = yy_try_NUL_trans( yy_current_state );
1686 
1687 			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1688 
1689 			if ( yy_next_state )
1690 				{
1691 				/* Consume the NUL. */
1692 				yy_cp = ++(yy_c_buf_p);
1693 				yy_current_state = yy_next_state;
1694 				goto yy_match;
1695 				}
1696 
1697 			else
1698 				{
1699 				yy_cp = (yy_c_buf_p);
1700 				goto yy_find_action;
1701 				}
1702 			}
1703 
1704 		else switch ( yy_get_next_buffer(  ) )
1705 			{
1706 			case EOB_ACT_END_OF_FILE:
1707 				{
1708 				(yy_did_buffer_switch_on_eof) = 0;
1709 
1710 				if ( yywrap(  ) )
1711 					{
1712 					/* Note: because we've taken care in
1713 					 * yy_get_next_buffer() to have set up
1714 					 * yytext, we can now set up
1715 					 * yy_c_buf_p so that if some total
1716 					 * hoser (like flex itself) wants to
1717 					 * call the scanner after we return the
1718 					 * YY_NULL, it'll still work - another
1719 					 * YY_NULL will get returned.
1720 					 */
1721 					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1722 
1723 					yy_act = YY_STATE_EOF(YY_START);
1724 					goto do_action;
1725 					}
1726 
1727 				else
1728 					{
1729 					if ( ! (yy_did_buffer_switch_on_eof) )
1730 						YY_NEW_FILE;
1731 					}
1732 				break;
1733 				}
1734 
1735 			case EOB_ACT_CONTINUE_SCAN:
1736 				(yy_c_buf_p) =
1737 					(yytext_ptr) + yy_amount_of_matched_text;
1738 
1739 				yy_current_state = yy_get_previous_state(  );
1740 
1741 				yy_cp = (yy_c_buf_p);
1742 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1743 				goto yy_match;
1744 
1745 			case EOB_ACT_LAST_MATCH:
1746 				(yy_c_buf_p) =
1747 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1748 
1749 				yy_current_state = yy_get_previous_state(  );
1750 
1751 				yy_cp = (yy_c_buf_p);
1752 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1753 				goto yy_find_action;
1754 			}
1755 		break;
1756 		}
1757 
1758 	default:
1759 		YY_FATAL_ERROR(
1760 			"fatal flex scanner internal error--no action found" );
1761 	} /* end of action switch */
1762 		} /* end of scanning one token */
1763 	} /* end of user's declarations */
1764 } /* end of yylex */
1765 
1766 /* yy_get_next_buffer - try to read in a new buffer
1767  *
1768  * Returns a code representing an action:
1769  *	EOB_ACT_LAST_MATCH -
1770  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1771  *	EOB_ACT_END_OF_FILE - end of file
1772  */
yy_get_next_buffer(void)1773 static int yy_get_next_buffer (void)
1774 {
1775     	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1776 	char *source = (yytext_ptr);
1777 	int number_to_move, i;
1778 	int ret_val;
1779 
1780 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1781 		YY_FATAL_ERROR(
1782 		"fatal flex scanner internal error--end of buffer missed" );
1783 
1784 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1785 		{ /* Don't try to fill the buffer, so this is an EOF. */
1786 		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1787 			{
1788 			/* We matched a single character, the EOB, so
1789 			 * treat this as a final EOF.
1790 			 */
1791 			return EOB_ACT_END_OF_FILE;
1792 			}
1793 
1794 		else
1795 			{
1796 			/* We matched some text prior to the EOB, first
1797 			 * process it.
1798 			 */
1799 			return EOB_ACT_LAST_MATCH;
1800 			}
1801 		}
1802 
1803 	/* Try to read more data. */
1804 
1805 	/* First move last chars to start of buffer. */
1806 	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1807 
1808 	for ( i = 0; i < number_to_move; ++i )
1809 		*(dest++) = *(source++);
1810 
1811 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1812 		/* don't do the read, it's not guaranteed to return an EOF,
1813 		 * just force an EOF
1814 		 */
1815 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1816 
1817 	else
1818 		{
1819 			int num_to_read =
1820 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1821 
1822 		while ( num_to_read <= 0 )
1823 			{ /* Not enough room in the buffer - grow it. */
1824 
1825 			/* just a shorter name for the current buffer */
1826 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1827 
1828 			int yy_c_buf_p_offset =
1829 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1830 
1831 			if ( b->yy_is_our_buffer )
1832 				{
1833 				int new_size = b->yy_buf_size * 2;
1834 
1835 				if ( new_size <= 0 )
1836 					b->yy_buf_size += b->yy_buf_size / 8;
1837 				else
1838 					b->yy_buf_size *= 2;
1839 
1840 				b->yy_ch_buf = (char *)
1841 					/* Include room in for 2 EOB chars. */
1842 					yyrealloc( (void *) b->yy_ch_buf,
1843 							 (yy_size_t) (b->yy_buf_size + 2)  );
1844 				}
1845 			else
1846 				/* Can't grow it, we don't own it. */
1847 				b->yy_ch_buf = NULL;
1848 
1849 			if ( ! b->yy_ch_buf )
1850 				YY_FATAL_ERROR(
1851 				"fatal error - scanner input buffer overflow" );
1852 
1853 			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1854 
1855 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1856 						number_to_move - 1;
1857 
1858 			}
1859 
1860 		if ( num_to_read > YY_READ_BUF_SIZE )
1861 			num_to_read = YY_READ_BUF_SIZE;
1862 
1863 		/* Read in more data. */
1864 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1865 			(yy_n_chars), num_to_read );
1866 
1867 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1868 		}
1869 
1870 	if ( (yy_n_chars) == 0 )
1871 		{
1872 		if ( number_to_move == YY_MORE_ADJ )
1873 			{
1874 			ret_val = EOB_ACT_END_OF_FILE;
1875 			yyrestart( yyin  );
1876 			}
1877 
1878 		else
1879 			{
1880 			ret_val = EOB_ACT_LAST_MATCH;
1881 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1882 				YY_BUFFER_EOF_PENDING;
1883 			}
1884 		}
1885 
1886 	else
1887 		ret_val = EOB_ACT_CONTINUE_SCAN;
1888 
1889 	if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1890 		/* Extend the array by 50%, plus the number we really need. */
1891 		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1892 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1893 			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
1894 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1895 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1896 		/* "- 2" to take care of EOB's */
1897 		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1898 	}
1899 
1900 	(yy_n_chars) += number_to_move;
1901 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1902 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1903 
1904 	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1905 
1906 	return ret_val;
1907 }
1908 
1909 /* yy_get_previous_state - get the state just before the EOB char was reached */
1910 
yy_get_previous_state(void)1911     static yy_state_type yy_get_previous_state (void)
1912 {
1913 	yy_state_type yy_current_state;
1914 	char *yy_cp;
1915 
1916 	yy_current_state = (yy_start);
1917 
1918 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1919 		{
1920 		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1921 		if ( yy_accept[yy_current_state] )
1922 			{
1923 			(yy_last_accepting_state) = yy_current_state;
1924 			(yy_last_accepting_cpos) = yy_cp;
1925 			}
1926 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1927 			{
1928 			yy_current_state = (int) yy_def[yy_current_state];
1929 			if ( yy_current_state >= 385 )
1930 				yy_c = yy_meta[yy_c];
1931 			}
1932 		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1933 		}
1934 
1935 	return yy_current_state;
1936 }
1937 
1938 /* yy_try_NUL_trans - try to make a transition on the NUL character
1939  *
1940  * synopsis
1941  *	next_state = yy_try_NUL_trans( current_state );
1942  */
yy_try_NUL_trans(yy_state_type yy_current_state)1943     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1944 {
1945 	int yy_is_jam;
1946     	char *yy_cp = (yy_c_buf_p);
1947 
1948 	YY_CHAR yy_c = 1;
1949 	if ( yy_accept[yy_current_state] )
1950 		{
1951 		(yy_last_accepting_state) = yy_current_state;
1952 		(yy_last_accepting_cpos) = yy_cp;
1953 		}
1954 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1955 		{
1956 		yy_current_state = (int) yy_def[yy_current_state];
1957 		if ( yy_current_state >= 385 )
1958 			yy_c = yy_meta[yy_c];
1959 		}
1960 	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1961 	yy_is_jam = (yy_current_state == 384);
1962 
1963 		return yy_is_jam ? 0 : yy_current_state;
1964 }
1965 
1966 #ifndef YY_NO_UNPUT
1967 
yyunput(int c,char * yy_bp)1968     static void yyunput (int c, char * yy_bp )
1969 {
1970 	char *yy_cp;
1971 
1972     yy_cp = (yy_c_buf_p);
1973 
1974 	/* undo effects of setting up yytext */
1975 	*yy_cp = (yy_hold_char);
1976 
1977 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1978 		{ /* need to shift things up to make room */
1979 		/* +2 for EOB chars. */
1980 		int number_to_move = (yy_n_chars) + 2;
1981 		char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1982 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1983 		char *source =
1984 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1985 
1986 		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1987 			*--dest = *--source;
1988 
1989 		yy_cp += (int) (dest - source);
1990 		yy_bp += (int) (dest - source);
1991 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1992 			(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1993 
1994 		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1995 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
1996 		}
1997 
1998 	*--yy_cp = (char) c;
1999 
2000 	(yytext_ptr) = yy_bp;
2001 	(yy_hold_char) = *yy_cp;
2002 	(yy_c_buf_p) = yy_cp;
2003 }
2004 
2005 #endif
2006 
2007 #ifndef YY_NO_INPUT
2008 #ifdef __cplusplus
yyinput(void)2009     static int yyinput (void)
2010 #else
2011     static int input  (void)
2012 #endif
2013 
2014 {
2015 	int c;
2016 
2017 	*(yy_c_buf_p) = (yy_hold_char);
2018 
2019 	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2020 		{
2021 		/* yy_c_buf_p now points to the character we want to return.
2022 		 * If this occurs *before* the EOB characters, then it's a
2023 		 * valid NUL; if not, then we've hit the end of the buffer.
2024 		 */
2025 		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2026 			/* This was really a NUL. */
2027 			*(yy_c_buf_p) = '\0';
2028 
2029 		else
2030 			{ /* need more input */
2031 			int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2032 			++(yy_c_buf_p);
2033 
2034 			switch ( yy_get_next_buffer(  ) )
2035 				{
2036 				case EOB_ACT_LAST_MATCH:
2037 					/* This happens because yy_g_n_b()
2038 					 * sees that we've accumulated a
2039 					 * token and flags that we need to
2040 					 * try matching the token before
2041 					 * proceeding.  But for input(),
2042 					 * there's no matching to consider.
2043 					 * So convert the EOB_ACT_LAST_MATCH
2044 					 * to EOB_ACT_END_OF_FILE.
2045 					 */
2046 
2047 					/* Reset buffer status. */
2048 					yyrestart( yyin );
2049 
2050 					/*FALLTHROUGH*/
2051 
2052 				case EOB_ACT_END_OF_FILE:
2053 					{
2054 					if ( yywrap(  ) )
2055 						return 0;
2056 
2057 					if ( ! (yy_did_buffer_switch_on_eof) )
2058 						YY_NEW_FILE;
2059 #ifdef __cplusplus
2060 					return yyinput();
2061 #else
2062 					return input();
2063 #endif
2064 					}
2065 
2066 				case EOB_ACT_CONTINUE_SCAN:
2067 					(yy_c_buf_p) = (yytext_ptr) + offset;
2068 					break;
2069 				}
2070 			}
2071 		}
2072 
2073 	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
2074 	*(yy_c_buf_p) = '\0';	/* preserve yytext */
2075 	(yy_hold_char) = *++(yy_c_buf_p);
2076 
2077 	return c;
2078 }
2079 #endif	/* ifndef YY_NO_INPUT */
2080 
2081 /** Immediately switch to a different input stream.
2082  * @param input_file A readable stream.
2083  *
2084  * @note This function does not reset the start condition to @c INITIAL .
2085  */
yyrestart(FILE * input_file)2086     void yyrestart  (FILE * input_file )
2087 {
2088 
2089 	if ( ! YY_CURRENT_BUFFER ){
2090         yyensure_buffer_stack ();
2091 		YY_CURRENT_BUFFER_LVALUE =
2092             yy_create_buffer( yyin, YY_BUF_SIZE );
2093 	}
2094 
2095 	yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2096 	yy_load_buffer_state(  );
2097 }
2098 
2099 /** Switch to a different input buffer.
2100  * @param new_buffer The new input buffer.
2101  *
2102  */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)2103     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2104 {
2105 
2106 	/* TODO. We should be able to replace this entire function body
2107 	 * with
2108 	 *		yypop_buffer_state();
2109 	 *		yypush_buffer_state(new_buffer);
2110      */
2111 	yyensure_buffer_stack ();
2112 	if ( YY_CURRENT_BUFFER == new_buffer )
2113 		return;
2114 
2115 	if ( YY_CURRENT_BUFFER )
2116 		{
2117 		/* Flush out information for old buffer. */
2118 		*(yy_c_buf_p) = (yy_hold_char);
2119 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2120 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2121 		}
2122 
2123 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2124 	yy_load_buffer_state(  );
2125 
2126 	/* We don't actually know whether we did this switch during
2127 	 * EOF (yywrap()) processing, but the only time this flag
2128 	 * is looked at is after yywrap() is called, so it's safe
2129 	 * to go ahead and always set it.
2130 	 */
2131 	(yy_did_buffer_switch_on_eof) = 1;
2132 }
2133 
yy_load_buffer_state(void)2134 static void yy_load_buffer_state  (void)
2135 {
2136     	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2137 	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2138 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2139 	(yy_hold_char) = *(yy_c_buf_p);
2140 }
2141 
2142 /** Allocate and initialize an input buffer state.
2143  * @param file A readable stream.
2144  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2145  *
2146  * @return the allocated buffer state.
2147  */
yy_create_buffer(FILE * file,int size)2148     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
2149 {
2150 	YY_BUFFER_STATE b;
2151 
2152 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
2153 	if ( ! b )
2154 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2155 
2156 	b->yy_buf_size = size;
2157 
2158 	/* yy_ch_buf has to be 2 characters longer than the size given because
2159 	 * we need to put in 2 end-of-buffer characters.
2160 	 */
2161 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
2162 	if ( ! b->yy_ch_buf )
2163 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2164 
2165 	b->yy_is_our_buffer = 1;
2166 
2167 	yy_init_buffer( b, file );
2168 
2169 	return b;
2170 }
2171 
2172 /** Destroy the buffer.
2173  * @param b a buffer created with yy_create_buffer()
2174  *
2175  */
yy_delete_buffer(YY_BUFFER_STATE b)2176     void yy_delete_buffer (YY_BUFFER_STATE  b )
2177 {
2178 
2179 	if ( ! b )
2180 		return;
2181 
2182 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2183 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2184 
2185 	if ( b->yy_is_our_buffer )
2186 		yyfree( (void *) b->yy_ch_buf  );
2187 
2188 	yyfree( (void *) b  );
2189 }
2190 
2191 /* Initializes or reinitializes a buffer.
2192  * This function is sometimes called more than once on the same buffer,
2193  * such as during a yyrestart() or at EOF.
2194  */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)2195     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
2196 
2197 {
2198 	int oerrno = errno;
2199 
2200 	yy_flush_buffer( b );
2201 
2202 	b->yy_input_file = file;
2203 	b->yy_fill_buffer = 1;
2204 
2205     /* If b is the current buffer, then yy_init_buffer was _probably_
2206      * called from yyrestart() or through yy_get_next_buffer.
2207      * In that case, we don't want to reset the lineno or column.
2208      */
2209     if (b != YY_CURRENT_BUFFER){
2210         b->yy_bs_lineno = 1;
2211         b->yy_bs_column = 0;
2212     }
2213 
2214         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2215 
2216 	errno = oerrno;
2217 }
2218 
2219 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2220  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2221  *
2222  */
yy_flush_buffer(YY_BUFFER_STATE b)2223     void yy_flush_buffer (YY_BUFFER_STATE  b )
2224 {
2225     	if ( ! b )
2226 		return;
2227 
2228 	b->yy_n_chars = 0;
2229 
2230 	/* We always need two end-of-buffer characters.  The first causes
2231 	 * a transition to the end-of-buffer state.  The second causes
2232 	 * a jam in that state.
2233 	 */
2234 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2235 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2236 
2237 	b->yy_buf_pos = &b->yy_ch_buf[0];
2238 
2239 	b->yy_at_bol = 1;
2240 	b->yy_buffer_status = YY_BUFFER_NEW;
2241 
2242 	if ( b == YY_CURRENT_BUFFER )
2243 		yy_load_buffer_state(  );
2244 }
2245 
2246 /** Pushes the new state onto the stack. The new state becomes
2247  *  the current state. This function will allocate the stack
2248  *  if necessary.
2249  *  @param new_buffer The new state.
2250  *
2251  */
yypush_buffer_state(YY_BUFFER_STATE new_buffer)2252 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2253 {
2254     	if (new_buffer == NULL)
2255 		return;
2256 
2257 	yyensure_buffer_stack();
2258 
2259 	/* This block is copied from yy_switch_to_buffer. */
2260 	if ( YY_CURRENT_BUFFER )
2261 		{
2262 		/* Flush out information for old buffer. */
2263 		*(yy_c_buf_p) = (yy_hold_char);
2264 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2265 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2266 		}
2267 
2268 	/* Only push if top exists. Otherwise, replace top. */
2269 	if (YY_CURRENT_BUFFER)
2270 		(yy_buffer_stack_top)++;
2271 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
2272 
2273 	/* copied from yy_switch_to_buffer. */
2274 	yy_load_buffer_state(  );
2275 	(yy_did_buffer_switch_on_eof) = 1;
2276 }
2277 
2278 /** Removes and deletes the top of the stack, if present.
2279  *  The next element becomes the new top.
2280  *
2281  */
yypop_buffer_state(void)2282 void yypop_buffer_state (void)
2283 {
2284     	if (!YY_CURRENT_BUFFER)
2285 		return;
2286 
2287 	yy_delete_buffer(YY_CURRENT_BUFFER );
2288 	YY_CURRENT_BUFFER_LVALUE = NULL;
2289 	if ((yy_buffer_stack_top) > 0)
2290 		--(yy_buffer_stack_top);
2291 
2292 	if (YY_CURRENT_BUFFER) {
2293 		yy_load_buffer_state(  );
2294 		(yy_did_buffer_switch_on_eof) = 1;
2295 	}
2296 }
2297 
2298 /* Allocates the stack if it does not exist.
2299  *  Guarantees space for at least one push.
2300  */
yyensure_buffer_stack(void)2301 static void yyensure_buffer_stack (void)
2302 {
2303 	yy_size_t num_to_alloc;
2304 
2305 	if (!(yy_buffer_stack)) {
2306 
2307 		/* First allocation is just for 2 elements, since we don't know if this
2308 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2309 		 * immediate realloc on the next call.
2310          */
2311       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2312 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2313 								(num_to_alloc * sizeof(struct yy_buffer_state*)
2314 								);
2315 		if ( ! (yy_buffer_stack) )
2316 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2317 
2318 		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2319 
2320 		(yy_buffer_stack_max) = num_to_alloc;
2321 		(yy_buffer_stack_top) = 0;
2322 		return;
2323 	}
2324 
2325 	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2326 
2327 		/* Increase the buffer to prepare for a possible push. */
2328 		yy_size_t grow_size = 8 /* arbitrary grow size */;
2329 
2330 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
2331 		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2332 								((yy_buffer_stack),
2333 								num_to_alloc * sizeof(struct yy_buffer_state*)
2334 								);
2335 		if ( ! (yy_buffer_stack) )
2336 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2337 
2338 		/* zero only the new slots.*/
2339 		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2340 		(yy_buffer_stack_max) = num_to_alloc;
2341 	}
2342 }
2343 
2344 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2345  * @param base the character buffer
2346  * @param size the size in bytes of the character buffer
2347  *
2348  * @return the newly allocated buffer state object.
2349  */
yy_scan_buffer(char * base,yy_size_t size)2350 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
2351 {
2352 	YY_BUFFER_STATE b;
2353 
2354 	if ( size < 2 ||
2355 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
2356 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
2357 		/* They forgot to leave room for the EOB's. */
2358 		return NULL;
2359 
2360 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
2361 	if ( ! b )
2362 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2363 
2364 	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
2365 	b->yy_buf_pos = b->yy_ch_buf = base;
2366 	b->yy_is_our_buffer = 0;
2367 	b->yy_input_file = NULL;
2368 	b->yy_n_chars = b->yy_buf_size;
2369 	b->yy_is_interactive = 0;
2370 	b->yy_at_bol = 1;
2371 	b->yy_fill_buffer = 0;
2372 	b->yy_buffer_status = YY_BUFFER_NEW;
2373 
2374 	yy_switch_to_buffer( b  );
2375 
2376 	return b;
2377 }
2378 
2379 /** Setup the input buffer state to scan a string. The next call to yylex() will
2380  * scan from a @e copy of @a str.
2381  * @param yystr a NUL-terminated string to scan
2382  *
2383  * @return the newly allocated buffer state object.
2384  * @note If you want to scan bytes that may contain NUL values, then use
2385  *       yy_scan_bytes() instead.
2386  */
yy_scan_string(const char * yystr)2387 YY_BUFFER_STATE yy_scan_string (const char * yystr )
2388 {
2389 
2390 	return yy_scan_bytes( yystr, (int) strlen(yystr) );
2391 }
2392 
2393 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2394  * scan from a @e copy of @a bytes.
2395  * @param yybytes the byte buffer to scan
2396  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2397  *
2398  * @return the newly allocated buffer state object.
2399  */
yy_scan_bytes(const char * yybytes,int _yybytes_len)2400 YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
2401 {
2402 	YY_BUFFER_STATE b;
2403 	char *buf;
2404 	yy_size_t n;
2405 	int i;
2406 
2407 	/* Get memory for full buffer, including space for trailing EOB's. */
2408 	n = (yy_size_t) (_yybytes_len + 2);
2409 	buf = (char *) yyalloc( n  );
2410 	if ( ! buf )
2411 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2412 
2413 	for ( i = 0; i < _yybytes_len; ++i )
2414 		buf[i] = yybytes[i];
2415 
2416 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2417 
2418 	b = yy_scan_buffer( buf, n );
2419 	if ( ! b )
2420 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2421 
2422 	/* It's okay to grow etc. this buffer, and we should throw it
2423 	 * away when we're done.
2424 	 */
2425 	b->yy_is_our_buffer = 1;
2426 
2427 	return b;
2428 }
2429 
2430 #ifndef YY_EXIT_FAILURE
2431 #define YY_EXIT_FAILURE 2
2432 #endif
2433 
yy_fatal_error(const char * msg)2434 static void yynoreturn yy_fatal_error (const char* msg )
2435 {
2436 			fprintf( stderr, "%s\n", msg );
2437 	exit( YY_EXIT_FAILURE );
2438 }
2439 
2440 /* Redefine yyless() so it works in section 3 code. */
2441 
2442 #undef yyless
2443 #define yyless(n) \
2444 	do \
2445 		{ \
2446 		/* Undo effects of setting up yytext. */ \
2447         int yyless_macro_arg = (n); \
2448         YY_LESS_LINENO(yyless_macro_arg);\
2449 		yytext[yyleng] = (yy_hold_char); \
2450 		(yy_c_buf_p) = yytext + yyless_macro_arg; \
2451 		(yy_hold_char) = *(yy_c_buf_p); \
2452 		*(yy_c_buf_p) = '\0'; \
2453 		yyleng = yyless_macro_arg; \
2454 		} \
2455 	while ( 0 )
2456 
2457 /* Accessor  methods (get/set functions) to struct members. */
2458 
2459 /** Get the current line number.
2460  *
2461  */
yyget_lineno(void)2462 int yyget_lineno  (void)
2463 {
2464 
2465     return yylineno;
2466 }
2467 
2468 /** Get the input stream.
2469  *
2470  */
yyget_in(void)2471 FILE *yyget_in  (void)
2472 {
2473         return yyin;
2474 }
2475 
2476 /** Get the output stream.
2477  *
2478  */
yyget_out(void)2479 FILE *yyget_out  (void)
2480 {
2481         return yyout;
2482 }
2483 
2484 /** Get the length of the current token.
2485  *
2486  */
yyget_leng(void)2487 int yyget_leng  (void)
2488 {
2489         return yyleng;
2490 }
2491 
2492 /** Get the current token.
2493  *
2494  */
2495 
yyget_text(void)2496 char *yyget_text  (void)
2497 {
2498         return yytext;
2499 }
2500 
2501 /** Set the current line number.
2502  * @param _line_number line number
2503  *
2504  */
yyset_lineno(int _line_number)2505 void yyset_lineno (int  _line_number )
2506 {
2507 
2508     yylineno = _line_number;
2509 }
2510 
2511 /** Set the input stream. This does not discard the current
2512  * input buffer.
2513  * @param _in_str A readable stream.
2514  *
2515  * @see yy_switch_to_buffer
2516  */
yyset_in(FILE * _in_str)2517 void yyset_in (FILE *  _in_str )
2518 {
2519         yyin = _in_str ;
2520 }
2521 
yyset_out(FILE * _out_str)2522 void yyset_out (FILE *  _out_str )
2523 {
2524         yyout = _out_str ;
2525 }
2526 
yyget_debug(void)2527 int yyget_debug  (void)
2528 {
2529         return yy_flex_debug;
2530 }
2531 
yyset_debug(int _bdebug)2532 void yyset_debug (int  _bdebug )
2533 {
2534         yy_flex_debug = _bdebug ;
2535 }
2536 
yy_init_globals(void)2537 static int yy_init_globals (void)
2538 {
2539         /* Initialization is the same as for the non-reentrant scanner.
2540      * This function is called from yylex_destroy(), so don't allocate here.
2541      */
2542 
2543     (yy_buffer_stack) = NULL;
2544     (yy_buffer_stack_top) = 0;
2545     (yy_buffer_stack_max) = 0;
2546     (yy_c_buf_p) = NULL;
2547     (yy_init) = 0;
2548     (yy_start) = 0;
2549 
2550 /* Defined in main.c */
2551 #ifdef YY_STDINIT
2552     yyin = stdin;
2553     yyout = stdout;
2554 #else
2555     yyin = NULL;
2556     yyout = NULL;
2557 #endif
2558 
2559     /* For future reference: Set errno on error, since we are called by
2560      * yylex_init()
2561      */
2562     return 0;
2563 }
2564 
2565 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(void)2566 int yylex_destroy  (void)
2567 {
2568 
2569     /* Pop the buffer stack, destroying each element. */
2570 	while(YY_CURRENT_BUFFER){
2571 		yy_delete_buffer( YY_CURRENT_BUFFER  );
2572 		YY_CURRENT_BUFFER_LVALUE = NULL;
2573 		yypop_buffer_state();
2574 	}
2575 
2576 	/* Destroy the stack itself. */
2577 	yyfree((yy_buffer_stack) );
2578 	(yy_buffer_stack) = NULL;
2579 
2580     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2581      * yylex() is called, initialization will occur. */
2582     yy_init_globals( );
2583 
2584     return 0;
2585 }
2586 
2587 /*
2588  * Internal utility routines.
2589  */
2590 
2591 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n)2592 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2593 {
2594 
2595 	int i;
2596 	for ( i = 0; i < n; ++i )
2597 		s1[i] = s2[i];
2598 }
2599 #endif
2600 
2601 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s)2602 static int yy_flex_strlen (const char * s )
2603 {
2604 	int n;
2605 	for ( n = 0; s[n]; ++n )
2606 		;
2607 
2608 	return n;
2609 }
2610 #endif
2611 
yyalloc(yy_size_t size)2612 void *yyalloc (yy_size_t  size )
2613 {
2614 			return malloc(size);
2615 }
2616 
yyrealloc(void * ptr,yy_size_t size)2617 void *yyrealloc  (void * ptr, yy_size_t  size )
2618 {
2619 
2620 	/* The cast to (char *) in the following accommodates both
2621 	 * implementations that use char* generic pointers, and those
2622 	 * that use void* generic pointers.  It works with the latter
2623 	 * because both ANSI C and C++ allow castless assignment from
2624 	 * any pointer type to void*, and deal with argument conversions
2625 	 * as though doing an assignment.
2626 	 */
2627 	return realloc(ptr, size);
2628 }
2629 
yyfree(void * ptr)2630 void yyfree (void * ptr )
2631 {
2632 			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
2633 }
2634 
2635 #define YYTABLES_NAME "yytables"
2636 
2637 #line 353 "instrument.l"
2638 
2639 
2640 /* User code section. */
2641 
2642 /* This flag is set when autoloading component definitions to make the lexer
2643    output the special initial token to switch the parser to restricted
2644    mode. */
2645 int parse_restricted = FALSE;
2646 
2647 /* Prepare to run lexical analysis on new file. */
2648 void
lex_new_file(FILE * file)2649 lex_new_file(FILE *file)
2650 {
2651   parse_restricted = FALSE;
2652   BEGIN(initial_token);
2653   yyrestart(file);
2654 }
2655 
2656 
2657 /* This handles the details of switching the lexer to a new file. */
2658 static void
push_file(FILE * file,int restricted,int visible_eof)2659 push_file(FILE *file, int restricted, int visible_eof)
2660 {
2661   if(file_stack_ptr >= MAX_INCLUDE)
2662     fatal_error("Too deeply nested includes "
2663                 "on line %d of file '%s'.\n",
2664               instr_current_line, instr_current_filename);
2665   file_stack[file_stack_ptr].buffer = YY_CURRENT_BUFFER;
2666   file_stack[file_stack_ptr].filename = instr_current_filename;
2667   file_stack[file_stack_ptr].line = instr_current_line;
2668   file_stack[file_stack_ptr].oldstate = YY_START;
2669   file_stack[file_stack_ptr].visible_eof = visible_eof;
2670   file_stack[file_stack_ptr].switch_line = switch_line;
2671   file_stack_ptr++;
2672 
2673   instr_current_line = 1;
2674 
2675   yy_switch_to_buffer(yy_create_buffer(file, YY_BUF_SIZE));
2676   parse_restricted = restricted;
2677 }
2678 
2679 /* Handle a new %include file. */
2680 void
push_include(char * name)2681 push_include(char *name)
2682 {
2683   FILE *file;
2684 
2685   file = open_file_search(name);
2686   if(file == NULL)
2687     fatal_error("Cannot open include file '%s' "
2688                 "on line %d of file '%s'.\n",
2689               name, instr_current_line, instr_current_filename);
2690   push_file(file, FALSE, FALSE);
2691   instr_current_filename = name;
2692   instr_current_line = 1;
2693 }
2694 
2695 /* Handle a new autoincluded file (uses recursive parser call). */
2696 void
push_autoload(FILE * file)2697 push_autoload(FILE *file)
2698 {
2699   push_file(file, TRUE, TRUE);
2700   BEGIN(initial_token);
2701 }
2702 
2703