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