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