source: heimdal/trunk/lib/asn1/lex.c@ 5

Last change on this file since 5 was 1, checked in by Paul Smedley, 10 years ago

Initial commit of Heimdal 1.5.3

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