michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* A lexical scanner generated by flex */ michael@0: michael@0: #define FLEX_SCANNER michael@0: #define YY_FLEX_MAJOR_VERSION 2 michael@0: #define YY_FLEX_MINOR_VERSION 5 michael@0: michael@0: #include michael@0: #ifdef _WIN32 michael@0: #include michael@0: #else michael@0: #include michael@0: #endif michael@0: michael@0: /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ michael@0: #ifdef c_plusplus michael@0: #ifndef __cplusplus michael@0: #define __cplusplus michael@0: #endif michael@0: #endif michael@0: michael@0: #ifdef __cplusplus michael@0: michael@0: #include michael@0: michael@0: /* Use prototypes in function declarations. */ michael@0: #define YY_USE_PROTOS michael@0: michael@0: /* The "const" storage-class-modifier is valid. */ michael@0: #define YY_USE_CONST michael@0: michael@0: #else /* ! __cplusplus */ michael@0: michael@0: #if __STDC__ michael@0: michael@0: #define YY_USE_PROTOS michael@0: #define YY_USE_CONST michael@0: michael@0: #endif /* __STDC__ */ michael@0: #endif /* ! __cplusplus */ michael@0: michael@0: #ifdef __TURBOC__ michael@0: #pragma warn -rch michael@0: #pragma warn -use michael@0: #include michael@0: #include michael@0: #define YY_USE_CONST michael@0: #define YY_USE_PROTOS michael@0: #endif michael@0: michael@0: #ifdef YY_USE_CONST michael@0: #define yyconst const michael@0: #else michael@0: #define yyconst michael@0: #endif michael@0: michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: #define YY_PROTO(proto) proto michael@0: #else michael@0: #define YY_PROTO(proto) () michael@0: #endif michael@0: michael@0: /* Returned upon end-of-file. */ michael@0: #define YY_NULL 0 michael@0: michael@0: /* Promotes a possibly negative, possibly signed char to an unsigned michael@0: * integer for use as an array index. If the signed char is negative, michael@0: * we want to instead treat it as an 8-bit unsigned char, hence the michael@0: * double cast. michael@0: */ michael@0: #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) michael@0: michael@0: /* Enter a start condition. This macro really ought to take a parameter, michael@0: * but we do it the disgusting crufty way forced on us by the ()-less michael@0: * definition of BEGIN. michael@0: */ michael@0: #define BEGIN yy_start = 1 + 2 * michael@0: michael@0: /* Translate the current start state into a value that can be later handed michael@0: * to BEGIN to return to the state. The YYSTATE alias is for lex michael@0: * compatibility. michael@0: */ michael@0: #define YY_START ((yy_start - 1) / 2) michael@0: #define YYSTATE YY_START michael@0: michael@0: /* Action number for EOF rule of a given start state. */ michael@0: #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) michael@0: michael@0: /* Special action meaning "start processing a new file". */ michael@0: #define YY_NEW_FILE yyrestart( yyin ) michael@0: michael@0: #define YY_END_OF_BUFFER_CHAR 0 michael@0: michael@0: /* Size of default input buffer. */ michael@0: #define YY_BUF_SIZE 16384 michael@0: michael@0: typedef struct yy_buffer_state *YY_BUFFER_STATE; michael@0: michael@0: extern int yyleng; michael@0: extern FILE *yyin, *yyout; michael@0: michael@0: #define EOB_ACT_CONTINUE_SCAN 0 michael@0: #define EOB_ACT_END_OF_FILE 1 michael@0: #define EOB_ACT_LAST_MATCH 2 michael@0: michael@0: /* The funky do-while in the following #define is used to turn the definition michael@0: * int a single C statement (which needs a semi-colon terminator). This michael@0: * avoids problems with code like: michael@0: * michael@0: * if ( condition_holds ) michael@0: * yyless( 5 ); michael@0: * else michael@0: * do_something_else(); michael@0: * michael@0: * Prior to using the do-while the compiler would get upset at the michael@0: * "else" because it interpreted the "if" statement as being all michael@0: * done when it reached the ';' after the yyless() call. michael@0: */ michael@0: michael@0: /* Return all but the first 'n' matched characters back to the input stream. */ michael@0: michael@0: #define yyless(n) \ michael@0: do \ michael@0: { \ michael@0: /* Undo effects of setting up yytext. */ \ michael@0: *yy_cp = yy_hold_char; \ michael@0: YY_RESTORE_YY_MORE_OFFSET \ michael@0: yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ michael@0: YY_DO_BEFORE_ACTION; /* set up yytext again */ \ michael@0: } \ michael@0: while ( 0 ) michael@0: michael@0: #define unput(c) yyunput( c, yytext_ptr ) michael@0: michael@0: /* The following is because we cannot portably get our hands on size_t michael@0: * (without autoconf's help, which isn't available because we want michael@0: * flex-generated scanners to compile on their own). michael@0: */ michael@0: typedef unsigned int yy_size_t; michael@0: michael@0: michael@0: struct yy_buffer_state michael@0: { michael@0: FILE *yy_input_file; michael@0: michael@0: char *yy_ch_buf; /* input buffer */ michael@0: char *yy_buf_pos; /* current position in input buffer */ michael@0: michael@0: /* Size of input buffer in bytes, not including room for EOB michael@0: * characters. michael@0: */ michael@0: yy_size_t yy_buf_size; michael@0: michael@0: /* Number of characters read into yy_ch_buf, not including EOB michael@0: * characters. michael@0: */ michael@0: int yy_n_chars; michael@0: michael@0: /* Whether we "own" the buffer - i.e., we know we created it, michael@0: * and can realloc() it to grow it, and should free() it to michael@0: * delete it. michael@0: */ michael@0: int yy_is_our_buffer; michael@0: michael@0: /* Whether this is an "interactive" input source; if so, and michael@0: * if we're using stdio for input, then we want to use getc() michael@0: * instead of fread(), to make sure we stop fetching input after michael@0: * each newline. michael@0: */ michael@0: int yy_is_interactive; michael@0: michael@0: /* Whether we're considered to be at the beginning of a line. michael@0: * If so, '^' rules will be active on the next match, otherwise michael@0: * not. michael@0: */ michael@0: int yy_at_bol; michael@0: michael@0: /* Whether to try to fill the input buffer when we reach the michael@0: * end of it. michael@0: */ michael@0: int yy_fill_buffer; michael@0: michael@0: int yy_buffer_status; michael@0: #define YY_BUFFER_NEW 0 michael@0: #define YY_BUFFER_NORMAL 1 michael@0: /* When an EOF's been seen but there's still some text to process michael@0: * then we mark the buffer as YY_EOF_PENDING, to indicate that we michael@0: * shouldn't try reading from the input source any more. We might michael@0: * still have a bunch of tokens to match, though, because of michael@0: * possible backing-up. michael@0: * michael@0: * When we actually see the EOF, we change the status to "new" michael@0: * (via yyrestart()), so that the user can continue scanning by michael@0: * just pointing yyin at a new input file. michael@0: */ michael@0: #define YY_BUFFER_EOF_PENDING 2 michael@0: }; michael@0: michael@0: static YY_BUFFER_STATE yy_current_buffer = 0; michael@0: michael@0: /* We provide macros for accessing buffer states in case in the michael@0: * future we want to put the buffer states in a more general michael@0: * "scanner state". michael@0: */ michael@0: #define YY_CURRENT_BUFFER yy_current_buffer michael@0: michael@0: michael@0: /* yy_hold_char holds the character lost when yytext is formed. */ michael@0: static char yy_hold_char; michael@0: michael@0: static int yy_n_chars; /* number of characters read into yy_ch_buf */ michael@0: michael@0: michael@0: int yyleng; michael@0: michael@0: /* Points to current character in buffer. */ michael@0: static char *yy_c_buf_p = (char *) 0; michael@0: static int yy_init = 1; /* whether we need to initialize */ michael@0: static int yy_start = 0; /* start state number */ michael@0: michael@0: /* Flag which is used to allow yywrap()'s to do buffer switches michael@0: * instead of setting up a fresh yyin. A bit of a hack ... michael@0: */ michael@0: static int yy_did_buffer_switch_on_eof; michael@0: michael@0: void yyrestart YY_PROTO(( FILE *input_file )); michael@0: michael@0: void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); michael@0: void yy_load_buffer_state YY_PROTO(( void )); michael@0: YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); michael@0: void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); michael@0: void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); michael@0: void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); michael@0: #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) michael@0: michael@0: YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); michael@0: YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); michael@0: YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); michael@0: michael@0: static void *yy_flex_alloc YY_PROTO(( yy_size_t )); michael@0: static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); michael@0: static void yy_flex_free YY_PROTO(( void * )); michael@0: michael@0: #define yy_new_buffer yy_create_buffer michael@0: michael@0: #define yy_set_interactive(is_interactive) \ michael@0: { \ michael@0: if ( ! yy_current_buffer ) \ michael@0: yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ michael@0: yy_current_buffer->yy_is_interactive = is_interactive; \ michael@0: } michael@0: michael@0: #define yy_set_bol(at_bol) \ michael@0: { \ michael@0: if ( ! yy_current_buffer ) \ michael@0: yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ michael@0: yy_current_buffer->yy_at_bol = at_bol; \ michael@0: } michael@0: michael@0: #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) michael@0: michael@0: typedef unsigned char YY_CHAR; michael@0: FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; michael@0: typedef int yy_state_type; michael@0: extern char *yytext; michael@0: #define yytext_ptr yytext michael@0: michael@0: static yy_state_type yy_get_previous_state YY_PROTO(( void )); michael@0: static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); michael@0: static int yy_get_next_buffer YY_PROTO(( void )); michael@0: static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); michael@0: michael@0: /* Done after the current pattern has been matched and before the michael@0: * corresponding action - sets up yytext. michael@0: */ michael@0: #define YY_DO_BEFORE_ACTION \ michael@0: yytext_ptr = yy_bp; \ michael@0: yytext_ptr -= yy_more_len; \ michael@0: yyleng = (int) (yy_cp - yytext_ptr); \ michael@0: yy_hold_char = *yy_cp; \ michael@0: *yy_cp = '\0'; \ michael@0: yy_c_buf_p = yy_cp; michael@0: michael@0: #define YY_NUM_RULES 17 michael@0: #define YY_END_OF_BUFFER 18 michael@0: static yyconst short int yy_accept[67] = michael@0: { 0, michael@0: 0, 0, 18, 16, 14, 15, 16, 11, 12, 2, michael@0: 10, 9, 9, 9, 9, 9, 13, 14, 15, 11, michael@0: 12, 0, 12, 2, 9, 9, 9, 9, 9, 13, michael@0: 3, 4, 2, 9, 9, 9, 9, 2, 9, 9, michael@0: 9, 9, 2, 2, 9, 9, 8, 9, 2, 5, michael@0: 9, 6, 2, 9, 2, 9, 2, 9, 2, 7, michael@0: 2, 2, 2, 2, 1, 0 michael@0: } ; michael@0: michael@0: static yyconst int yy_ec[256] = michael@0: { 0, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, michael@0: 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 7, 8, 1, 9, 9, 10, michael@0: 11, 12, 12, 12, 13, 13, 13, 14, 1, 1, michael@0: 15, 1, 1, 1, 16, 16, 16, 16, 16, 16, michael@0: 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, michael@0: 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, michael@0: 1, 1, 1, 1, 1, 1, 18, 16, 16, 19, michael@0: michael@0: 20, 16, 21, 16, 22, 16, 16, 16, 16, 23, michael@0: 16, 24, 16, 25, 26, 27, 28, 16, 16, 29, michael@0: 16, 16, 1, 14, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1 michael@0: } ; michael@0: michael@0: static yyconst int yy_meta[30] = michael@0: { 0, michael@0: 1, 1, 2, 1, 3, 1, 1, 4, 5, 5, michael@0: 5, 5, 5, 4, 1, 4, 4, 4, 4, 4, michael@0: 4, 4, 4, 4, 4, 4, 4, 4, 4 michael@0: } ; michael@0: michael@0: static yyconst short int yy_base[72] = michael@0: { 0, michael@0: 0, 149, 154, 205, 138, 205, 103, 0, 0, 23, michael@0: 205, 29, 30, 31, 32, 33, 0, 99, 205, 0, michael@0: 0, 0, 50, 55, 34, 61, 41, 63, 64, 0, michael@0: 0, 0, 79, 65, 68, 86, 66, 99, 105, 88, michael@0: 106, 90, 118, 76, 107, 110, 89, 125, 43, 91, michael@0: 127, 128, 138, 144, 113, 129, 154, 160, 160, 130, michael@0: 172, 166, 177, 144, 0, 205, 190, 192, 194, 199, michael@0: 76 michael@0: } ; michael@0: michael@0: static yyconst short int yy_def[72] = michael@0: { 0, michael@0: 66, 1, 66, 66, 66, 66, 66, 67, 68, 68, michael@0: 66, 69, 69, 69, 69, 69, 70, 66, 66, 67, michael@0: 68, 71, 68, 10, 69, 69, 69, 69, 69, 70, michael@0: 71, 23, 10, 69, 69, 69, 69, 10, 69, 69, michael@0: 69, 69, 10, 38, 69, 69, 69, 69, 38, 69, michael@0: 69, 69, 38, 69, 38, 69, 38, 69, 38, 69, michael@0: 38, 38, 38, 38, 68, 0, 66, 66, 66, 66, michael@0: 66 michael@0: } ; michael@0: michael@0: static yyconst short int yy_nxt[235] = michael@0: { 0, michael@0: 4, 5, 6, 7, 8, 4, 4, 9, 10, 10, michael@0: 10, 10, 10, 9, 11, 12, 12, 12, 12, 12, michael@0: 12, 13, 14, 12, 15, 12, 12, 16, 12, 22, michael@0: 23, 24, 24, 24, 24, 24, 21, 21, 21, 21, michael@0: 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, michael@0: 27, 53, 53, 53, 21, 26, 29, 32, 32, 32, michael@0: 32, 32, 32, 33, 33, 33, 33, 33, 21, 35, michael@0: 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, michael@0: 31, 21, 37, 42, 44, 36, 34, 38, 38, 38, michael@0: 38, 38, 39, 21, 40, 21, 21, 21, 21, 21, michael@0: michael@0: 18, 21, 21, 21, 21, 19, 41, 43, 44, 44, michael@0: 44, 44, 21, 21, 21, 46, 48, 21, 21, 21, michael@0: 21, 57, 57, 21, 45, 47, 49, 49, 49, 49, michael@0: 49, 50, 21, 51, 21, 21, 21, 21, 21, 18, michael@0: 21, 21, 21, 21, 52, 54, 55, 55, 55, 55, michael@0: 55, 21, 44, 66, 17, 58, 66, 21, 66, 66, michael@0: 65, 56, 59, 59, 59, 59, 59, 21, 61, 61, michael@0: 61, 61, 66, 21, 63, 63, 63, 63, 66, 60, michael@0: 62, 62, 62, 62, 62, 64, 64, 64, 64, 64, michael@0: 20, 20, 66, 20, 20, 21, 21, 25, 25, 30, michael@0: michael@0: 66, 30, 30, 30, 3, 66, 66, 66, 66, 66, michael@0: 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, michael@0: 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, michael@0: 66, 66, 66, 66 michael@0: } ; michael@0: michael@0: static yyconst short int yy_chk[235] = michael@0: { 0, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, michael@0: 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, michael@0: 10, 10, 10, 10, 10, 10, 12, 13, 14, 15, michael@0: 16, 25, 12, 13, 14, 15, 16, 25, 27, 15, michael@0: 14, 49, 49, 49, 27, 13, 16, 23, 23, 23, michael@0: 23, 23, 23, 24, 24, 24, 24, 24, 26, 27, michael@0: 28, 29, 34, 37, 26, 35, 28, 29, 34, 37, michael@0: 71, 35, 29, 37, 44, 28, 26, 33, 33, 33, michael@0: 33, 33, 34, 36, 35, 40, 47, 42, 50, 36, michael@0: michael@0: 18, 40, 47, 42, 50, 7, 36, 38, 38, 38, michael@0: 38, 38, 39, 41, 45, 40, 42, 46, 39, 41, michael@0: 45, 55, 55, 46, 39, 41, 43, 43, 43, 43, michael@0: 43, 45, 48, 46, 51, 52, 56, 60, 48, 5, michael@0: 51, 52, 56, 60, 48, 51, 53, 53, 53, 53, michael@0: 53, 54, 64, 3, 2, 56, 0, 54, 0, 0, michael@0: 64, 54, 57, 57, 57, 57, 57, 58, 59, 59, michael@0: 59, 59, 0, 58, 62, 62, 62, 62, 0, 58, michael@0: 61, 61, 61, 61, 61, 63, 63, 63, 63, 63, michael@0: 67, 67, 0, 67, 67, 68, 68, 69, 69, 70, michael@0: michael@0: 0, 70, 70, 70, 66, 66, 66, 66, 66, 66, michael@0: 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, michael@0: 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, michael@0: 66, 66, 66, 66 michael@0: } ; michael@0: michael@0: static yy_state_type yy_last_accepting_state; michael@0: static char *yy_last_accepting_cpos; michael@0: michael@0: /* The intent behind this definition is that it'll catch michael@0: * any uses of REJECT which flex missed. michael@0: */ michael@0: #define REJECT reject_used_but_not_detected michael@0: static int yy_more_flag = 0; michael@0: static int yy_more_len = 0; michael@0: #define yymore() (yy_more_flag = 1) michael@0: #define YY_MORE_ADJ yy_more_len michael@0: #define YY_RESTORE_YY_MORE_OFFSET michael@0: char *yytext; michael@0: #line 1 "crlgen_lex_orig.l" michael@0: #define INITIAL 0 michael@0: #line 2 "crlgen_lex_orig.l" michael@0: michael@0: #include "crlgen.h" michael@0: michael@0: static SECStatus parserStatus = SECSuccess; michael@0: static CRLGENGeneratorData *parserData; michael@0: static PRFileDesc *src; michael@0: michael@0: #define YY_INPUT(buf,result,max_size) \ michael@0: if ( parserStatus != SECFailure) { \ michael@0: if (((result = PR_Read(src, buf, max_size)) == 0) && \ michael@0: ferror( yyin )) \ michael@0: return SECFailure; \ michael@0: } else { return SECFailure; } michael@0: michael@0: michael@0: michael@0: /* Macros after this point can all be overridden by user definitions in michael@0: * section 1. michael@0: */ michael@0: michael@0: #ifndef YY_SKIP_YYWRAP michael@0: #ifdef __cplusplus michael@0: extern "C" int yywrap YY_PROTO(( void )); michael@0: #else michael@0: extern int yywrap YY_PROTO(( void )); michael@0: #endif michael@0: #endif michael@0: michael@0: #ifndef YY_NO_UNPUT michael@0: static void yyunput YY_PROTO(( int c, char *buf_ptr )); michael@0: #endif michael@0: michael@0: #ifndef yytext_ptr michael@0: static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); michael@0: #endif michael@0: michael@0: #ifdef YY_NEED_STRLEN michael@0: static int yy_flex_strlen YY_PROTO(( yyconst char * )); michael@0: #endif michael@0: michael@0: #ifndef YY_NO_INPUT michael@0: #ifdef __cplusplus michael@0: static int yyinput YY_PROTO(( void )); michael@0: #else michael@0: static int input YY_PROTO(( void )); michael@0: #endif michael@0: #endif michael@0: michael@0: #if YY_STACK_USED michael@0: static int yy_start_stack_ptr = 0; michael@0: static int yy_start_stack_depth = 0; michael@0: static int *yy_start_stack = 0; michael@0: #ifndef YY_NO_PUSH_STATE michael@0: static void yy_push_state YY_PROTO(( int new_state )); michael@0: #endif michael@0: #ifndef YY_NO_POP_STATE michael@0: static void yy_pop_state YY_PROTO(( void )); michael@0: #endif michael@0: #ifndef YY_NO_TOP_STATE michael@0: static int yy_top_state YY_PROTO(( void )); michael@0: #endif michael@0: michael@0: #else michael@0: #define YY_NO_PUSH_STATE 1 michael@0: #define YY_NO_POP_STATE 1 michael@0: #define YY_NO_TOP_STATE 1 michael@0: #endif michael@0: michael@0: #ifdef YY_MALLOC_DECL michael@0: YY_MALLOC_DECL michael@0: #else michael@0: #if __STDC__ michael@0: #ifndef __cplusplus michael@0: #include michael@0: #endif michael@0: #else michael@0: /* Just try to get by without declaring the routines. This will fail michael@0: * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) michael@0: * or sizeof(void*) != sizeof(int). michael@0: */ michael@0: #endif michael@0: #endif michael@0: michael@0: /* Amount of stuff to slurp up with each read. */ michael@0: #ifndef YY_READ_BUF_SIZE michael@0: #define YY_READ_BUF_SIZE 8192 michael@0: #endif michael@0: michael@0: /* Copy whatever the last rule matched to the standard output. */ michael@0: michael@0: #ifndef ECHO michael@0: /* This used to be an fputs(), but since the string might contain NUL's, michael@0: * we now use fwrite(). michael@0: */ michael@0: #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) michael@0: #endif michael@0: michael@0: /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, michael@0: * is returned in "result". michael@0: */ michael@0: #ifndef YY_INPUT michael@0: #define YY_INPUT(buf,result,max_size) \ michael@0: if ( yy_current_buffer->yy_is_interactive ) \ michael@0: { \ michael@0: int c = '*', n; \ michael@0: for ( n = 0; n < max_size && \ michael@0: (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ michael@0: buf[n] = (char) c; \ michael@0: if ( c == '\n' ) \ michael@0: buf[n++] = (char) c; \ michael@0: if ( c == EOF && ferror( yyin ) ) \ michael@0: YY_FATAL_ERROR( "input in flex scanner failed" ); \ michael@0: result = n; \ michael@0: } \ michael@0: else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ michael@0: && ferror( yyin ) ) \ michael@0: YY_FATAL_ERROR( "input in flex scanner failed" ); michael@0: #endif michael@0: michael@0: /* No semi-colon after return; correct usage is to write "yyterminate();" - michael@0: * we don't want an extra ';' after the "return" because that will cause michael@0: * some compilers to complain about unreachable statements. michael@0: */ michael@0: #ifndef yyterminate michael@0: #define yyterminate() return YY_NULL michael@0: #endif michael@0: michael@0: /* Number of entries by which start-condition stack grows. */ michael@0: #ifndef YY_START_STACK_INCR michael@0: #define YY_START_STACK_INCR 25 michael@0: #endif michael@0: michael@0: /* Report a fatal error. */ michael@0: #ifndef YY_FATAL_ERROR michael@0: #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) michael@0: #endif michael@0: michael@0: /* Default declaration of generated scanner - a define so the user can michael@0: * easily add parameters. michael@0: */ michael@0: #ifndef YY_DECL michael@0: #define YY_DECL int yylex YY_PROTO(( void )) michael@0: #endif michael@0: michael@0: /* Code executed at the beginning of each rule, after yytext and yyleng michael@0: * have been set up. michael@0: */ michael@0: #ifndef YY_USER_ACTION michael@0: #define YY_USER_ACTION michael@0: #endif michael@0: michael@0: /* Code executed at the end of each rule. */ michael@0: #ifndef YY_BREAK michael@0: #define YY_BREAK break; michael@0: #endif michael@0: michael@0: #define YY_RULE_SETUP \ michael@0: if ( yyleng > 0 ) \ michael@0: yy_current_buffer->yy_at_bol = \ michael@0: (yytext[yyleng - 1] == '\n'); \ michael@0: YY_USER_ACTION michael@0: michael@0: YY_DECL michael@0: { michael@0: register yy_state_type yy_current_state; michael@0: register char *yy_cp = NULL, *yy_bp = NULL; michael@0: register int yy_act; michael@0: michael@0: #line 28 "crlgen_lex_orig.l" michael@0: michael@0: michael@0: michael@0: if ( yy_init ) michael@0: { michael@0: yy_init = 0; michael@0: michael@0: #ifdef YY_USER_INIT michael@0: YY_USER_INIT; michael@0: #endif michael@0: michael@0: if ( ! yy_start ) michael@0: yy_start = 1; /* first start state */ michael@0: michael@0: if ( ! yyin ) michael@0: yyin = stdin; michael@0: michael@0: if ( ! yyout ) michael@0: yyout = stdout; michael@0: michael@0: if ( ! yy_current_buffer ) michael@0: yy_current_buffer = michael@0: yy_create_buffer( yyin, YY_BUF_SIZE ); michael@0: michael@0: yy_load_buffer_state(); michael@0: } michael@0: michael@0: while ( 1 ) /* loops until end-of-file is reached */ michael@0: { michael@0: yy_more_len = 0; michael@0: if ( yy_more_flag ) michael@0: { michael@0: yy_more_len = yy_c_buf_p - yytext_ptr; michael@0: yy_more_flag = 0; michael@0: } michael@0: yy_cp = yy_c_buf_p; michael@0: michael@0: /* Support of yytext. */ michael@0: *yy_cp = yy_hold_char; michael@0: michael@0: /* yy_bp points to the position in yy_ch_buf of the start of michael@0: * the current run. michael@0: */ michael@0: yy_bp = yy_cp; michael@0: michael@0: yy_current_state = yy_start; michael@0: yy_current_state += YY_AT_BOL(); michael@0: yy_match: michael@0: do michael@0: { michael@0: register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; michael@0: if ( yy_accept[yy_current_state] ) michael@0: { michael@0: yy_last_accepting_state = yy_current_state; michael@0: yy_last_accepting_cpos = yy_cp; michael@0: } michael@0: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) michael@0: { michael@0: yy_current_state = (int) yy_def[yy_current_state]; michael@0: if ( yy_current_state >= 67 ) michael@0: yy_c = yy_meta[(unsigned int) yy_c]; michael@0: } michael@0: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; michael@0: ++yy_cp; michael@0: } michael@0: while ( yy_base[yy_current_state] != 205 ); michael@0: michael@0: yy_find_action: michael@0: yy_act = yy_accept[yy_current_state]; michael@0: if ( yy_act == 0 ) michael@0: { /* have to back up */ michael@0: yy_cp = yy_last_accepting_cpos; michael@0: yy_current_state = yy_last_accepting_state; michael@0: yy_act = yy_accept[yy_current_state]; michael@0: } michael@0: michael@0: YY_DO_BEFORE_ACTION; michael@0: michael@0: michael@0: do_action: /* This label is used only to access EOF actions. */ michael@0: michael@0: michael@0: switch ( yy_act ) michael@0: { /* beginning of action switch */ michael@0: case 0: /* must back up */ michael@0: /* undo the effects of YY_DO_BEFORE_ACTION */ michael@0: *yy_cp = yy_hold_char; michael@0: yy_cp = yy_last_accepting_cpos; michael@0: yy_current_state = yy_last_accepting_state; michael@0: goto yy_find_action; michael@0: michael@0: case 1: michael@0: YY_RULE_SETUP michael@0: #line 30 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ZDATE); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 2: michael@0: YY_RULE_SETUP michael@0: #line 36 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 3: michael@0: YY_RULE_SETUP michael@0: #line 42 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT_RANGE); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 4: michael@0: YY_RULE_SETUP michael@0: #line 48 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_OID); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 5: michael@0: YY_RULE_SETUP michael@0: #line 54 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_ISSUER_CONTEXT); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 6: michael@0: YY_RULE_SETUP michael@0: #line 60 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_UPDATE_CONTEXT); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 7: michael@0: YY_RULE_SETUP michael@0: #line 65 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_NEXT_UPDATE_CONTEXT); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 8: michael@0: YY_RULE_SETUP michael@0: #line 71 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_CHANGE_RANGE_CONTEXT); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 9: michael@0: YY_RULE_SETUP michael@0: #line 77 "crlgen_lex_orig.l" michael@0: { michael@0: if (strcmp(yytext, "addcert") == 0) { michael@0: parserStatus = crlgen_createNewLangStruct(parserData, michael@0: CRLGEN_ADD_CERT_CONTEXT); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } else if (strcmp(yytext, "rmcert") == 0) { michael@0: parserStatus = crlgen_createNewLangStruct(parserData, michael@0: CRLGEN_RM_CERT_CONTEXT); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } else if (strcmp(yytext, "addext") == 0) { michael@0: parserStatus = crlgen_createNewLangStruct(parserData, michael@0: CRLGEN_ADD_EXTENSION_CONTEXT); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } else { michael@0: parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ID); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: } michael@0: YY_BREAK michael@0: case 10: michael@0: YY_RULE_SETUP michael@0: #line 100 "crlgen_lex_orig.l" michael@0: michael@0: YY_BREAK michael@0: case 11: michael@0: YY_RULE_SETUP michael@0: #line 102 "crlgen_lex_orig.l" michael@0: { michael@0: if (yytext[yyleng-1] == '\\') { michael@0: yymore(); michael@0: } else { michael@0: register int c; michael@0: c = input(); michael@0: if (c != '\"') { michael@0: printf( "Error: Line ending \" is missing: %c\n", c); michael@0: unput(c); michael@0: } else { michael@0: parserStatus = crlgen_setNextData(parserData, yytext + 1, michael@0: CRLGEN_TYPE_STRING); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: } michael@0: } michael@0: YY_BREAK michael@0: case 12: michael@0: YY_RULE_SETUP michael@0: #line 120 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_STRING); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 13: michael@0: YY_RULE_SETUP michael@0: #line 128 "crlgen_lex_orig.l" michael@0: /* eat up one-line comments */ {} michael@0: YY_BREAK michael@0: case 14: michael@0: YY_RULE_SETUP michael@0: #line 130 "crlgen_lex_orig.l" michael@0: {} michael@0: YY_BREAK michael@0: case 15: michael@0: YY_RULE_SETUP michael@0: #line 132 "crlgen_lex_orig.l" michael@0: { michael@0: parserStatus = crlgen_updateCrl(parserData); michael@0: if (parserStatus != SECSuccess) michael@0: return parserStatus; michael@0: } michael@0: YY_BREAK michael@0: case 16: michael@0: YY_RULE_SETUP michael@0: #line 138 "crlgen_lex_orig.l" michael@0: { michael@0: fprintf(stderr, "Syntax error at line %d: unknown token %s\n", michael@0: parserData->parsedLineNum, yytext); michael@0: return SECFailure; michael@0: } michael@0: YY_BREAK michael@0: case 17: michael@0: YY_RULE_SETUP michael@0: #line 144 "crlgen_lex_orig.l" michael@0: ECHO; michael@0: YY_BREAK michael@0: case YY_STATE_EOF(INITIAL): michael@0: yyterminate(); michael@0: michael@0: case YY_END_OF_BUFFER: michael@0: { michael@0: /* Amount of text matched not including the EOB char. */ michael@0: int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; michael@0: michael@0: /* Undo the effects of YY_DO_BEFORE_ACTION. */ michael@0: *yy_cp = yy_hold_char; michael@0: YY_RESTORE_YY_MORE_OFFSET michael@0: michael@0: if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) michael@0: { michael@0: /* We're scanning a new file or input source. It's michael@0: * possible that this happened because the user michael@0: * just pointed yyin at a new source and called michael@0: * yylex(). If so, then we have to assure michael@0: * consistency between yy_current_buffer and our michael@0: * globals. Here is the right place to do so, because michael@0: * this is the first action (other than possibly a michael@0: * back-up) that will match for the new input source. michael@0: */ michael@0: yy_n_chars = yy_current_buffer->yy_n_chars; michael@0: yy_current_buffer->yy_input_file = yyin; michael@0: yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; michael@0: } michael@0: michael@0: /* Note that here we test for yy_c_buf_p "<=" to the position michael@0: * of the first EOB in the buffer, since yy_c_buf_p will michael@0: * already have been incremented past the NUL character michael@0: * (since all states make transitions on EOB to the michael@0: * end-of-buffer state). Contrast this with the test michael@0: * in input(). michael@0: */ michael@0: if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) michael@0: { /* This was really a NUL. */ michael@0: yy_state_type yy_next_state; michael@0: michael@0: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; michael@0: michael@0: yy_current_state = yy_get_previous_state(); michael@0: michael@0: /* Okay, we're now positioned to make the NUL michael@0: * transition. We couldn't have michael@0: * yy_get_previous_state() go ahead and do it michael@0: * for us because it doesn't know how to deal michael@0: * with the possibility of jamming (and we don't michael@0: * want to build jamming into it because then it michael@0: * will run more slowly). michael@0: */ michael@0: michael@0: yy_next_state = yy_try_NUL_trans( yy_current_state ); michael@0: michael@0: yy_bp = yytext_ptr + YY_MORE_ADJ; michael@0: michael@0: if ( yy_next_state ) michael@0: { michael@0: /* Consume the NUL. */ michael@0: yy_cp = ++yy_c_buf_p; michael@0: yy_current_state = yy_next_state; michael@0: goto yy_match; michael@0: } michael@0: michael@0: else michael@0: { michael@0: yy_cp = yy_c_buf_p; michael@0: goto yy_find_action; michael@0: } michael@0: } michael@0: michael@0: else switch ( yy_get_next_buffer() ) michael@0: { michael@0: case EOB_ACT_END_OF_FILE: michael@0: { michael@0: yy_did_buffer_switch_on_eof = 0; michael@0: michael@0: if ( yywrap() ) michael@0: { michael@0: /* Note: because we've taken care in michael@0: * yy_get_next_buffer() to have set up michael@0: * yytext, we can now set up michael@0: * yy_c_buf_p so that if some total michael@0: * hoser (like flex itself) wants to michael@0: * call the scanner after we return the michael@0: * YY_NULL, it'll still work - another michael@0: * YY_NULL will get returned. michael@0: */ michael@0: yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; michael@0: michael@0: yy_act = YY_STATE_EOF(YY_START); michael@0: goto do_action; michael@0: } michael@0: michael@0: else michael@0: { michael@0: if ( ! yy_did_buffer_switch_on_eof ) michael@0: YY_NEW_FILE; michael@0: } michael@0: break; michael@0: } michael@0: michael@0: case EOB_ACT_CONTINUE_SCAN: michael@0: yy_c_buf_p = michael@0: yytext_ptr + yy_amount_of_matched_text; michael@0: michael@0: yy_current_state = yy_get_previous_state(); michael@0: michael@0: yy_cp = yy_c_buf_p; michael@0: yy_bp = yytext_ptr + YY_MORE_ADJ; michael@0: goto yy_match; michael@0: michael@0: case EOB_ACT_LAST_MATCH: michael@0: yy_c_buf_p = michael@0: &yy_current_buffer->yy_ch_buf[yy_n_chars]; michael@0: michael@0: yy_current_state = yy_get_previous_state(); michael@0: michael@0: yy_cp = yy_c_buf_p; michael@0: yy_bp = yytext_ptr + YY_MORE_ADJ; michael@0: goto yy_find_action; michael@0: } michael@0: break; michael@0: } michael@0: michael@0: default: michael@0: YY_FATAL_ERROR( michael@0: "fatal flex scanner internal error--no action found" ); michael@0: } /* end of action switch */ michael@0: } /* end of scanning one token */ michael@0: } /* end of yylex */ michael@0: michael@0: michael@0: /* yy_get_next_buffer - try to read in a new buffer michael@0: * michael@0: * Returns a code representing an action: michael@0: * EOB_ACT_LAST_MATCH - michael@0: * EOB_ACT_CONTINUE_SCAN - continue scanning from current position michael@0: * EOB_ACT_END_OF_FILE - end of file michael@0: */ michael@0: michael@0: static int yy_get_next_buffer() michael@0: { michael@0: register char *dest = yy_current_buffer->yy_ch_buf; michael@0: register char *source = yytext_ptr; michael@0: register int number_to_move, i; michael@0: int ret_val; michael@0: michael@0: if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) michael@0: YY_FATAL_ERROR( michael@0: "fatal flex scanner internal error--end of buffer missed" ); michael@0: michael@0: if ( yy_current_buffer->yy_fill_buffer == 0 ) michael@0: { /* Don't try to fill the buffer, so this is an EOF. */ michael@0: if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) michael@0: { michael@0: /* We matched a single character, the EOB, so michael@0: * treat this as a final EOF. michael@0: */ michael@0: return EOB_ACT_END_OF_FILE; michael@0: } michael@0: michael@0: else michael@0: { michael@0: /* We matched some text prior to the EOB, first michael@0: * process it. michael@0: */ michael@0: return EOB_ACT_LAST_MATCH; michael@0: } michael@0: } michael@0: michael@0: /* Try to read more data. */ michael@0: michael@0: /* First move last chars to start of buffer. */ michael@0: number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; michael@0: michael@0: for ( i = 0; i < number_to_move; ++i ) michael@0: *(dest++) = *(source++); michael@0: michael@0: if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) michael@0: /* don't do the read, it's not guaranteed to return an EOF, michael@0: * just force an EOF michael@0: */ michael@0: yy_current_buffer->yy_n_chars = yy_n_chars = 0; michael@0: michael@0: else michael@0: { michael@0: int num_to_read = michael@0: yy_current_buffer->yy_buf_size - number_to_move - 1; michael@0: michael@0: while ( num_to_read <= 0 ) michael@0: { /* Not enough room in the buffer - grow it. */ michael@0: #ifdef YY_USES_REJECT michael@0: YY_FATAL_ERROR( michael@0: "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); michael@0: #else michael@0: michael@0: /* just a shorter name for the current buffer */ michael@0: YY_BUFFER_STATE b = yy_current_buffer; michael@0: michael@0: int yy_c_buf_p_offset = michael@0: (int) (yy_c_buf_p - b->yy_ch_buf); michael@0: michael@0: if ( b->yy_is_our_buffer ) michael@0: { michael@0: int new_size = b->yy_buf_size * 2; michael@0: michael@0: if ( new_size <= 0 ) michael@0: b->yy_buf_size += b->yy_buf_size / 8; michael@0: else michael@0: b->yy_buf_size *= 2; michael@0: michael@0: b->yy_ch_buf = (char *) michael@0: /* Include room in for 2 EOB chars. */ michael@0: yy_flex_realloc( (void *) b->yy_ch_buf, michael@0: b->yy_buf_size + 2 ); michael@0: } michael@0: else michael@0: /* Can't grow it, we don't own it. */ michael@0: b->yy_ch_buf = 0; michael@0: michael@0: if ( ! b->yy_ch_buf ) michael@0: YY_FATAL_ERROR( michael@0: "fatal error - scanner input buffer overflow" ); michael@0: michael@0: yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; michael@0: michael@0: num_to_read = yy_current_buffer->yy_buf_size - michael@0: number_to_move - 1; michael@0: #endif michael@0: } michael@0: michael@0: if ( num_to_read > YY_READ_BUF_SIZE ) michael@0: num_to_read = YY_READ_BUF_SIZE; michael@0: michael@0: /* Read in more data. */ michael@0: YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), michael@0: yy_n_chars, num_to_read ); michael@0: michael@0: yy_current_buffer->yy_n_chars = yy_n_chars; michael@0: } michael@0: michael@0: if ( yy_n_chars == 0 ) michael@0: { michael@0: if ( number_to_move == YY_MORE_ADJ ) michael@0: { michael@0: ret_val = EOB_ACT_END_OF_FILE; michael@0: yyrestart( yyin ); michael@0: } michael@0: michael@0: else michael@0: { michael@0: ret_val = EOB_ACT_LAST_MATCH; michael@0: yy_current_buffer->yy_buffer_status = michael@0: YY_BUFFER_EOF_PENDING; michael@0: } michael@0: } michael@0: michael@0: else michael@0: ret_val = EOB_ACT_CONTINUE_SCAN; michael@0: michael@0: yy_n_chars += number_to_move; michael@0: yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; michael@0: yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; michael@0: michael@0: yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; michael@0: michael@0: return ret_val; michael@0: } michael@0: michael@0: michael@0: /* yy_get_previous_state - get the state just before the EOB char was reached */ michael@0: michael@0: static yy_state_type yy_get_previous_state() michael@0: { michael@0: register yy_state_type yy_current_state; michael@0: register char *yy_cp; michael@0: michael@0: yy_current_state = yy_start; michael@0: yy_current_state += YY_AT_BOL(); michael@0: michael@0: for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) michael@0: { michael@0: register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); michael@0: if ( yy_accept[yy_current_state] ) michael@0: { michael@0: yy_last_accepting_state = yy_current_state; michael@0: yy_last_accepting_cpos = yy_cp; michael@0: } michael@0: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) michael@0: { michael@0: yy_current_state = (int) yy_def[yy_current_state]; michael@0: if ( yy_current_state >= 67 ) michael@0: yy_c = yy_meta[(unsigned int) yy_c]; michael@0: } michael@0: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; michael@0: } michael@0: michael@0: return yy_current_state; michael@0: } michael@0: michael@0: michael@0: /* yy_try_NUL_trans - try to make a transition on the NUL character michael@0: * michael@0: * synopsis michael@0: * next_state = yy_try_NUL_trans( current_state ); michael@0: */ michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) michael@0: #else michael@0: static yy_state_type yy_try_NUL_trans( yy_current_state ) michael@0: yy_state_type yy_current_state; michael@0: #endif michael@0: { michael@0: register int yy_is_jam; michael@0: register char *yy_cp = yy_c_buf_p; michael@0: michael@0: register YY_CHAR yy_c = 1; michael@0: if ( yy_accept[yy_current_state] ) michael@0: { michael@0: yy_last_accepting_state = yy_current_state; michael@0: yy_last_accepting_cpos = yy_cp; michael@0: } michael@0: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) michael@0: { michael@0: yy_current_state = (int) yy_def[yy_current_state]; michael@0: if ( yy_current_state >= 67 ) michael@0: yy_c = yy_meta[(unsigned int) yy_c]; michael@0: } michael@0: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; michael@0: yy_is_jam = (yy_current_state == 66); michael@0: michael@0: return yy_is_jam ? 0 : yy_current_state; michael@0: } michael@0: michael@0: michael@0: #ifndef YY_NO_UNPUT michael@0: #ifdef YY_USE_PROTOS michael@0: static void yyunput( int c, register char *yy_bp ) michael@0: #else michael@0: static void yyunput( c, yy_bp ) michael@0: int c; michael@0: register char *yy_bp; michael@0: #endif michael@0: { michael@0: register char *yy_cp = yy_c_buf_p; michael@0: michael@0: /* undo effects of setting up yytext */ michael@0: *yy_cp = yy_hold_char; michael@0: michael@0: if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) michael@0: { /* need to shift things up to make room */ michael@0: /* +2 for EOB chars. */ michael@0: register int number_to_move = yy_n_chars + 2; michael@0: register char *dest = &yy_current_buffer->yy_ch_buf[ michael@0: yy_current_buffer->yy_buf_size + 2]; michael@0: register char *source = michael@0: &yy_current_buffer->yy_ch_buf[number_to_move]; michael@0: michael@0: while ( source > yy_current_buffer->yy_ch_buf ) michael@0: *--dest = *--source; michael@0: michael@0: yy_cp += (int) (dest - source); michael@0: yy_bp += (int) (dest - source); michael@0: yy_current_buffer->yy_n_chars = michael@0: yy_n_chars = yy_current_buffer->yy_buf_size; michael@0: michael@0: if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) michael@0: YY_FATAL_ERROR( "flex scanner push-back overflow" ); michael@0: } michael@0: michael@0: *--yy_cp = (char) c; michael@0: michael@0: michael@0: yytext_ptr = yy_bp; michael@0: yy_hold_char = *yy_cp; michael@0: yy_c_buf_p = yy_cp; michael@0: } michael@0: #endif /* ifndef YY_NO_UNPUT */ michael@0: michael@0: michael@0: #ifndef YY_NO_INPUT michael@0: #ifdef __cplusplus michael@0: static int yyinput() michael@0: #else michael@0: static int input() michael@0: #endif michael@0: { michael@0: int c; michael@0: michael@0: *yy_c_buf_p = yy_hold_char; michael@0: michael@0: if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) michael@0: { michael@0: /* yy_c_buf_p now points to the character we want to return. michael@0: * If this occurs *before* the EOB characters, then it's a michael@0: * valid NUL; if not, then we've hit the end of the buffer. michael@0: */ michael@0: if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) michael@0: /* This was really a NUL. */ michael@0: *yy_c_buf_p = '\0'; michael@0: michael@0: else michael@0: { /* need more input */ michael@0: int offset = yy_c_buf_p - yytext_ptr; michael@0: ++yy_c_buf_p; michael@0: michael@0: switch ( yy_get_next_buffer() ) michael@0: { michael@0: case EOB_ACT_LAST_MATCH: michael@0: /* This happens because yy_g_n_b() michael@0: * sees that we've accumulated a michael@0: * token and flags that we need to michael@0: * try matching the token before michael@0: * proceeding. But for input(), michael@0: * there's no matching to consider. michael@0: * So convert the EOB_ACT_LAST_MATCH michael@0: * to EOB_ACT_END_OF_FILE. michael@0: */ michael@0: michael@0: /* Reset buffer status. */ michael@0: yyrestart( yyin ); michael@0: michael@0: /* fall through */ michael@0: michael@0: case EOB_ACT_END_OF_FILE: michael@0: { michael@0: if ( yywrap() ) michael@0: return EOF; michael@0: michael@0: if ( ! yy_did_buffer_switch_on_eof ) michael@0: YY_NEW_FILE; michael@0: #ifdef __cplusplus michael@0: return yyinput(); michael@0: #else michael@0: return input(); michael@0: #endif michael@0: } michael@0: michael@0: case EOB_ACT_CONTINUE_SCAN: michael@0: yy_c_buf_p = yytext_ptr + offset; michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: michael@0: c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ michael@0: *yy_c_buf_p = '\0'; /* preserve yytext */ michael@0: yy_hold_char = *++yy_c_buf_p; michael@0: michael@0: yy_current_buffer->yy_at_bol = (c == '\n'); michael@0: michael@0: return c; michael@0: } michael@0: #endif /* YY_NO_INPUT */ michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: void yyrestart( FILE *input_file ) michael@0: #else michael@0: void yyrestart( input_file ) michael@0: FILE *input_file; michael@0: #endif michael@0: { michael@0: if ( ! yy_current_buffer ) michael@0: yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); michael@0: michael@0: yy_init_buffer( yy_current_buffer, input_file ); michael@0: yy_load_buffer_state(); michael@0: } michael@0: michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) michael@0: #else michael@0: void yy_switch_to_buffer( new_buffer ) michael@0: YY_BUFFER_STATE new_buffer; michael@0: #endif michael@0: { michael@0: if ( yy_current_buffer == new_buffer ) michael@0: return; michael@0: michael@0: if ( yy_current_buffer ) michael@0: { michael@0: /* Flush out information for old buffer. */ michael@0: *yy_c_buf_p = yy_hold_char; michael@0: yy_current_buffer->yy_buf_pos = yy_c_buf_p; michael@0: yy_current_buffer->yy_n_chars = yy_n_chars; michael@0: } michael@0: michael@0: yy_current_buffer = new_buffer; michael@0: yy_load_buffer_state(); michael@0: michael@0: /* We don't actually know whether we did this switch during michael@0: * EOF (yywrap()) processing, but the only time this flag michael@0: * is looked at is after yywrap() is called, so it's safe michael@0: * to go ahead and always set it. michael@0: */ michael@0: yy_did_buffer_switch_on_eof = 1; michael@0: } michael@0: michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: void yy_load_buffer_state( void ) michael@0: #else michael@0: void yy_load_buffer_state() michael@0: #endif michael@0: { michael@0: yy_n_chars = yy_current_buffer->yy_n_chars; michael@0: yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; michael@0: yyin = yy_current_buffer->yy_input_file; michael@0: yy_hold_char = *yy_c_buf_p; michael@0: } michael@0: michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) michael@0: #else michael@0: YY_BUFFER_STATE yy_create_buffer( file, size ) michael@0: FILE *file; michael@0: int size; michael@0: #endif michael@0: { michael@0: YY_BUFFER_STATE b; michael@0: michael@0: b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); michael@0: if ( ! b ) michael@0: YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); michael@0: michael@0: b->yy_buf_size = size; michael@0: michael@0: /* yy_ch_buf has to be 2 characters longer than the size given because michael@0: * we need to put in 2 end-of-buffer characters. michael@0: */ michael@0: b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); michael@0: if ( ! b->yy_ch_buf ) michael@0: YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); michael@0: michael@0: b->yy_is_our_buffer = 1; michael@0: michael@0: yy_init_buffer( b, file ); michael@0: michael@0: return b; michael@0: } michael@0: michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: void yy_delete_buffer( YY_BUFFER_STATE b ) michael@0: #else michael@0: void yy_delete_buffer( b ) michael@0: YY_BUFFER_STATE b; michael@0: #endif michael@0: { michael@0: if ( ! b ) michael@0: return; michael@0: michael@0: if ( b == yy_current_buffer ) michael@0: yy_current_buffer = (YY_BUFFER_STATE) 0; michael@0: michael@0: if ( b->yy_is_our_buffer ) michael@0: yy_flex_free( (void *) b->yy_ch_buf ); michael@0: michael@0: yy_flex_free( (void *) b ); michael@0: } michael@0: michael@0: michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) michael@0: #else michael@0: void yy_init_buffer( b, file ) michael@0: YY_BUFFER_STATE b; michael@0: FILE *file; michael@0: #endif michael@0: michael@0: michael@0: { michael@0: yy_flush_buffer( b ); michael@0: michael@0: b->yy_input_file = file; michael@0: b->yy_fill_buffer = 1; michael@0: michael@0: #if YY_ALWAYS_INTERACTIVE michael@0: b->yy_is_interactive = 1; michael@0: #else michael@0: #if YY_NEVER_INTERACTIVE michael@0: b->yy_is_interactive = 0; michael@0: #else michael@0: b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; michael@0: #endif michael@0: #endif michael@0: } michael@0: michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: void yy_flush_buffer( YY_BUFFER_STATE b ) michael@0: #else michael@0: void yy_flush_buffer( b ) michael@0: YY_BUFFER_STATE b; michael@0: #endif michael@0: michael@0: { michael@0: if ( ! b ) michael@0: return; michael@0: michael@0: b->yy_n_chars = 0; michael@0: michael@0: /* We always need two end-of-buffer characters. The first causes michael@0: * a transition to the end-of-buffer state. The second causes michael@0: * a jam in that state. michael@0: */ michael@0: b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; michael@0: b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; michael@0: michael@0: b->yy_buf_pos = &b->yy_ch_buf[0]; michael@0: michael@0: b->yy_at_bol = 1; michael@0: b->yy_buffer_status = YY_BUFFER_NEW; michael@0: michael@0: if ( b == yy_current_buffer ) michael@0: yy_load_buffer_state(); michael@0: } michael@0: michael@0: michael@0: #ifndef YY_NO_SCAN_BUFFER michael@0: #ifdef YY_USE_PROTOS michael@0: YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) michael@0: #else michael@0: YY_BUFFER_STATE yy_scan_buffer( base, size ) michael@0: char *base; michael@0: yy_size_t size; michael@0: #endif michael@0: { michael@0: YY_BUFFER_STATE b; michael@0: michael@0: if ( size < 2 || michael@0: base[size-2] != YY_END_OF_BUFFER_CHAR || michael@0: base[size-1] != YY_END_OF_BUFFER_CHAR ) michael@0: /* They forgot to leave room for the EOB's. */ michael@0: return 0; michael@0: michael@0: b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); michael@0: if ( ! b ) michael@0: YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); michael@0: michael@0: b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ michael@0: b->yy_buf_pos = b->yy_ch_buf = base; michael@0: b->yy_is_our_buffer = 0; michael@0: b->yy_input_file = 0; michael@0: b->yy_n_chars = b->yy_buf_size; michael@0: b->yy_is_interactive = 0; michael@0: b->yy_at_bol = 1; michael@0: b->yy_fill_buffer = 0; michael@0: b->yy_buffer_status = YY_BUFFER_NEW; michael@0: michael@0: yy_switch_to_buffer( b ); michael@0: michael@0: return b; michael@0: } michael@0: #endif michael@0: michael@0: michael@0: #ifndef YY_NO_SCAN_STRING michael@0: #ifdef YY_USE_PROTOS michael@0: YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) michael@0: #else michael@0: YY_BUFFER_STATE yy_scan_string( yy_str ) michael@0: yyconst char *yy_str; michael@0: #endif michael@0: { michael@0: int len; michael@0: for ( len = 0; yy_str[len]; ++len ) michael@0: ; michael@0: michael@0: return yy_scan_bytes( yy_str, len ); michael@0: } michael@0: #endif michael@0: michael@0: michael@0: #ifndef YY_NO_SCAN_BYTES michael@0: #ifdef YY_USE_PROTOS michael@0: YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) michael@0: #else michael@0: YY_BUFFER_STATE yy_scan_bytes( bytes, len ) michael@0: yyconst char *bytes; michael@0: int len; michael@0: #endif michael@0: { michael@0: YY_BUFFER_STATE b; michael@0: char *buf; michael@0: yy_size_t n; michael@0: int i; michael@0: michael@0: /* Get memory for full buffer, including space for trailing EOB's. */ michael@0: n = len + 2; michael@0: buf = (char *) yy_flex_alloc( n ); michael@0: if ( ! buf ) michael@0: YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); michael@0: michael@0: for ( i = 0; i < len; ++i ) michael@0: buf[i] = bytes[i]; michael@0: michael@0: buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; michael@0: michael@0: b = yy_scan_buffer( buf, n ); michael@0: if ( ! b ) michael@0: YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); michael@0: michael@0: /* It's okay to grow etc. this buffer, and we should throw it michael@0: * away when we're done. michael@0: */ michael@0: b->yy_is_our_buffer = 1; michael@0: michael@0: return b; michael@0: } michael@0: #endif michael@0: michael@0: michael@0: #ifndef YY_NO_PUSH_STATE michael@0: #ifdef YY_USE_PROTOS michael@0: static void yy_push_state( int new_state ) michael@0: #else michael@0: static void yy_push_state( new_state ) michael@0: int new_state; michael@0: #endif michael@0: { michael@0: if ( yy_start_stack_ptr >= yy_start_stack_depth ) michael@0: { michael@0: yy_size_t new_size; michael@0: michael@0: yy_start_stack_depth += YY_START_STACK_INCR; michael@0: new_size = yy_start_stack_depth * sizeof( int ); michael@0: michael@0: if ( ! yy_start_stack ) michael@0: yy_start_stack = (int *) yy_flex_alloc( new_size ); michael@0: michael@0: else michael@0: yy_start_stack = (int *) yy_flex_realloc( michael@0: (void *) yy_start_stack, new_size ); michael@0: michael@0: if ( ! yy_start_stack ) michael@0: YY_FATAL_ERROR( michael@0: "out of memory expanding start-condition stack" ); michael@0: } michael@0: michael@0: yy_start_stack[yy_start_stack_ptr++] = YY_START; michael@0: michael@0: BEGIN(new_state); michael@0: } michael@0: #endif michael@0: michael@0: michael@0: #ifndef YY_NO_POP_STATE michael@0: static void yy_pop_state() michael@0: { michael@0: if ( --yy_start_stack_ptr < 0 ) michael@0: YY_FATAL_ERROR( "start-condition stack underflow" ); michael@0: michael@0: BEGIN(yy_start_stack[yy_start_stack_ptr]); michael@0: } michael@0: #endif michael@0: michael@0: michael@0: #ifndef YY_NO_TOP_STATE michael@0: static int yy_top_state() michael@0: { michael@0: return yy_start_stack[yy_start_stack_ptr - 1]; michael@0: } michael@0: #endif michael@0: michael@0: #ifndef YY_EXIT_FAILURE michael@0: #define YY_EXIT_FAILURE 2 michael@0: #endif michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: static void yy_fatal_error( yyconst char msg[] ) michael@0: #else michael@0: static void yy_fatal_error( msg ) michael@0: char msg[]; michael@0: #endif michael@0: { michael@0: (void) fprintf( stderr, "%s\n", msg ); michael@0: exit( YY_EXIT_FAILURE ); michael@0: } michael@0: michael@0: michael@0: michael@0: /* Redefine yyless() so it works in section 3 code. */ michael@0: michael@0: #undef yyless michael@0: #define yyless(n) \ michael@0: do \ michael@0: { \ michael@0: /* Undo effects of setting up yytext. */ \ michael@0: yytext[yyleng] = yy_hold_char; \ michael@0: yy_c_buf_p = yytext + n; \ michael@0: yy_hold_char = *yy_c_buf_p; \ michael@0: *yy_c_buf_p = '\0'; \ michael@0: yyleng = n; \ michael@0: } \ michael@0: while ( 0 ) michael@0: michael@0: michael@0: /* Internal utility routines. */ michael@0: michael@0: #ifndef yytext_ptr michael@0: #ifdef YY_USE_PROTOS michael@0: static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) michael@0: #else michael@0: static void yy_flex_strncpy( s1, s2, n ) michael@0: char *s1; michael@0: yyconst char *s2; michael@0: int n; michael@0: #endif michael@0: { michael@0: register int i; michael@0: for ( i = 0; i < n; ++i ) michael@0: s1[i] = s2[i]; michael@0: } michael@0: #endif michael@0: michael@0: #ifdef YY_NEED_STRLEN michael@0: #ifdef YY_USE_PROTOS michael@0: static int yy_flex_strlen( yyconst char *s ) michael@0: #else michael@0: static int yy_flex_strlen( s ) michael@0: yyconst char *s; michael@0: #endif michael@0: { michael@0: register int n; michael@0: for ( n = 0; s[n]; ++n ) michael@0: ; michael@0: michael@0: return n; michael@0: } michael@0: #endif michael@0: michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: static void *yy_flex_alloc( yy_size_t size ) michael@0: #else michael@0: static void *yy_flex_alloc( size ) michael@0: yy_size_t size; michael@0: #endif michael@0: { michael@0: return (void *) malloc( size ); michael@0: } michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: static void *yy_flex_realloc( void *ptr, yy_size_t size ) michael@0: #else michael@0: static void *yy_flex_realloc( ptr, size ) michael@0: void *ptr; michael@0: yy_size_t size; michael@0: #endif michael@0: { michael@0: /* The cast to (char *) in the following accommodates both michael@0: * implementations that use char* generic pointers, and those michael@0: * that use void* generic pointers. It works with the latter michael@0: * because both ANSI C and C++ allow castless assignment from michael@0: * any pointer type to void*, and deal with argument conversions michael@0: * as though doing an assignment. michael@0: */ michael@0: return (void *) realloc( (char *) ptr, size ); michael@0: } michael@0: michael@0: #ifdef YY_USE_PROTOS michael@0: static void yy_flex_free( void *ptr ) michael@0: #else michael@0: static void yy_flex_free( ptr ) michael@0: void *ptr; michael@0: #endif michael@0: { michael@0: free( ptr ); michael@0: } michael@0: michael@0: #if YY_MAIN michael@0: int main() michael@0: { michael@0: yylex(); michael@0: return 0; michael@0: } michael@0: #endif michael@0: #line 144 "crlgen_lex_orig.l" michael@0: michael@0: #include "prlock.h" michael@0: michael@0: static PRLock *parserInvocationLock; michael@0: michael@0: void CRLGEN_InitCrlGenParserLock() michael@0: { michael@0: parserInvocationLock = PR_NewLock(); michael@0: } michael@0: michael@0: void CRLGEN_DestroyCrlGenParserLock() michael@0: { michael@0: PR_DestroyLock(parserInvocationLock); michael@0: } michael@0: michael@0: michael@0: SECStatus CRLGEN_StartCrlGen(CRLGENGeneratorData *parserCtlData) michael@0: { michael@0: SECStatus rv; michael@0: michael@0: PR_Lock(parserInvocationLock); michael@0: michael@0: parserStatus = SECSuccess; michael@0: parserData = parserCtlData; michael@0: src = parserCtlData->src; michael@0: michael@0: rv = yylex(); michael@0: michael@0: PR_Unlock(parserInvocationLock); michael@0: michael@0: return rv; michael@0: } michael@0: michael@0: int yywrap() {return 1;}