source: trunk/server/source4/heimdal/lib/asn1/lex.c

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

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