Back to index

lightning-sunbird  0.9+nobinonly
crlgen_lex.c
Go to the documentation of this file.
00001 /* A lexical scanner generated by flex */
00002 
00003 /* Scanner skeleton version:
00004  * $Header: /cvsroot/mozilla/security/nss/cmd/crlutil/crlgen_lex.c,v 1.1 2005/04/12 02:24:14 alexei.volkov.bugs%sun.com Exp $
00005  */
00006 
00007 #define FLEX_SCANNER
00008 #define YY_FLEX_MAJOR_VERSION 2
00009 #define YY_FLEX_MINOR_VERSION 5
00010 
00011 #include <stdio.h>
00012 #ifndef _WIN32
00013 #include <unistd.h>
00014 #endif
00015 
00016 
00017 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00018 #ifdef c_plusplus
00019 #ifndef __cplusplus
00020 #define __cplusplus
00021 #endif
00022 #endif
00023 
00024 
00025 #ifdef __cplusplus
00026 
00027 #include <stdlib.h>
00028 
00029 /* Use prototypes in function declarations. */
00030 #define YY_USE_PROTOS
00031 
00032 /* The "const" storage-class-modifier is valid. */
00033 #define YY_USE_CONST
00034 
00035 #else  /* ! __cplusplus */
00036 
00037 #if __STDC__
00038 
00039 #define YY_USE_PROTOS
00040 #define YY_USE_CONST
00041 
00042 #endif /* __STDC__ */
00043 #endif /* ! __cplusplus */
00044 
00045 #ifdef __TURBOC__
00046  #pragma warn -rch
00047  #pragma warn -use
00048 #include <io.h>
00049 #include <stdlib.h>
00050 #define YY_USE_CONST
00051 #define YY_USE_PROTOS
00052 #endif
00053 
00054 #ifdef YY_USE_CONST
00055 #define yyconst const
00056 #else
00057 #define yyconst
00058 #endif
00059 
00060 
00061 #ifdef YY_USE_PROTOS
00062 #define YY_PROTO(proto) proto
00063 #else
00064 #define YY_PROTO(proto) ()
00065 #endif
00066 
00067 /* Returned upon end-of-file. */
00068 #define YY_NULL 0
00069 
00070 /* Promotes a possibly negative, possibly signed char to an unsigned
00071  * integer for use as an array index.  If the signed char is negative,
00072  * we want to instead treat it as an 8-bit unsigned char, hence the
00073  * double cast.
00074  */
00075 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00076 
00077 /* Enter a start condition.  This macro really ought to take a parameter,
00078  * but we do it the disgusting crufty way forced on us by the ()-less
00079  * definition of BEGIN.
00080  */
00081 #define BEGIN yy_start = 1 + 2 *
00082 
00083 /* Translate the current start state into a value that can be later handed
00084  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00085  * compatibility.
00086  */
00087 #define YY_START ((yy_start - 1) / 2)
00088 #define YYSTATE YY_START
00089 
00090 /* Action number for EOF rule of a given start state. */
00091 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00092 
00093 /* Special action meaning "start processing a new file". */
00094 #define YY_NEW_FILE yyrestart( yyin )
00095 
00096 #define YY_END_OF_BUFFER_CHAR 0
00097 
00098 /* Size of default input buffer. */
00099 #define YY_BUF_SIZE 16384
00100 
00101 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00102 
00103 extern int yyleng;
00104 extern FILE *yyin, *yyout;
00105 
00106 #define EOB_ACT_CONTINUE_SCAN 0
00107 #define EOB_ACT_END_OF_FILE 1
00108 #define EOB_ACT_LAST_MATCH 2
00109 
00110 /* The funky do-while in the following #define is used to turn the definition
00111  * int a single C statement (which needs a semi-colon terminator).  This
00112  * avoids problems with code like:
00113  *
00114  *     if ( condition_holds )
00115  *            yyless( 5 );
00116  *     else
00117  *            do_something_else();
00118  *
00119  * Prior to using the do-while the compiler would get upset at the
00120  * "else" because it interpreted the "if" statement as being all
00121  * done when it reached the ';' after the yyless() call.
00122  */
00123 
00124 /* Return all but the first 'n' matched characters back to the input stream. */
00125 
00126 #define yyless(n) \
00127        do \
00128               { \
00129               /* Undo effects of setting up yytext. */ \
00130               *yy_cp = yy_hold_char; \
00131               YY_RESTORE_YY_MORE_OFFSET \
00132               yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
00133               YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00134               } \
00135        while ( 0 )
00136 
00137 #define unput(c) yyunput( c, yytext_ptr )
00138 
00139 /* The following is because we cannot portably get our hands on size_t
00140  * (without autoconf's help, which isn't available because we want
00141  * flex-generated scanners to compile on their own).
00142  */
00143 typedef unsigned int yy_size_t;
00144 
00145 
00146 struct yy_buffer_state
00147        {
00148        FILE *yy_input_file;
00149 
00150        char *yy_ch_buf;            /* input buffer */
00151        char *yy_buf_pos;           /* current position in input buffer */
00152 
00153        /* Size of input buffer in bytes, not including room for EOB
00154         * characters.
00155         */
00156        yy_size_t yy_buf_size;
00157 
00158        /* Number of characters read into yy_ch_buf, not including EOB
00159         * characters.
00160         */
00161        int yy_n_chars;
00162 
00163        /* Whether we "own" the buffer - i.e., we know we created it,
00164         * and can realloc() it to grow it, and should free() it to
00165         * delete it.
00166         */
00167        int yy_is_our_buffer;
00168 
00169        /* Whether this is an "interactive" input source; if so, and
00170         * if we're using stdio for input, then we want to use getc()
00171         * instead of fread(), to make sure we stop fetching input after
00172         * each newline.
00173         */
00174        int yy_is_interactive;
00175 
00176        /* Whether we're considered to be at the beginning of a line.
00177         * If so, '^' rules will be active on the next match, otherwise
00178         * not.
00179         */
00180        int yy_at_bol;
00181 
00182        /* Whether to try to fill the input buffer when we reach the
00183         * end of it.
00184         */
00185        int yy_fill_buffer;
00186 
00187        int yy_buffer_status;
00188 #define YY_BUFFER_NEW 0
00189 #define YY_BUFFER_NORMAL 1
00190        /* When an EOF's been seen but there's still some text to process
00191         * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00192         * shouldn't try reading from the input source any more.  We might
00193         * still have a bunch of tokens to match, though, because of
00194         * possible backing-up.
00195         *
00196         * When we actually see the EOF, we change the status to "new"
00197         * (via yyrestart()), so that the user can continue scanning by
00198         * just pointing yyin at a new input file.
00199         */
00200 #define YY_BUFFER_EOF_PENDING 2
00201        };
00202 
00203 static YY_BUFFER_STATE yy_current_buffer = 0;
00204 
00205 /* We provide macros for accessing buffer states in case in the
00206  * future we want to put the buffer states in a more general
00207  * "scanner state".
00208  */
00209 #define YY_CURRENT_BUFFER yy_current_buffer
00210 
00211 
00212 /* yy_hold_char holds the character lost when yytext is formed. */
00213 static char yy_hold_char;
00214 
00215 static int yy_n_chars;             /* number of characters read into yy_ch_buf */
00216 
00217 
00218 int yyleng;
00219 
00220 /* Points to current character in buffer. */
00221 static char *yy_c_buf_p = (char *) 0;
00222 static int yy_init = 1;            /* whether we need to initialize */
00223 static int yy_start = 0;    /* start state number */
00224 
00225 /* Flag which is used to allow yywrap()'s to do buffer switches
00226  * instead of setting up a fresh yyin.  A bit of a hack ...
00227  */
00228 static int yy_did_buffer_switch_on_eof;
00229 
00230 void yyrestart YY_PROTO(( FILE *input_file ));
00231 
00232 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00233 void yy_load_buffer_state YY_PROTO(( void ));
00234 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00235 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00236 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00237 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00238 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
00239 
00240 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
00241 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
00242 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
00243 
00244 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
00245 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
00246 static void yy_flex_free YY_PROTO(( void * ));
00247 
00248 #define yy_new_buffer yy_create_buffer
00249 
00250 #define yy_set_interactive(is_interactive) \
00251        { \
00252        if ( ! yy_current_buffer ) \
00253               yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00254        yy_current_buffer->yy_is_interactive = is_interactive; \
00255        }
00256 
00257 #define yy_set_bol(at_bol) \
00258        { \
00259        if ( ! yy_current_buffer ) \
00260               yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00261        yy_current_buffer->yy_at_bol = at_bol; \
00262        }
00263 
00264 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
00265 
00266 typedef unsigned char YY_CHAR;
00267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00268 typedef int yy_state_type;
00269 extern char *yytext;
00270 #define yytext_ptr yytext
00271 
00272 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00273 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00274 static int yy_get_next_buffer YY_PROTO(( void ));
00275 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00276 
00277 /* Done after the current pattern has been matched and before the
00278  * corresponding action - sets up yytext.
00279  */
00280 #define YY_DO_BEFORE_ACTION \
00281        yytext_ptr = yy_bp; \
00282        yytext_ptr -= yy_more_len; \
00283        yyleng = (int) (yy_cp - yytext_ptr); \
00284        yy_hold_char = *yy_cp; \
00285        *yy_cp = '\0'; \
00286        yy_c_buf_p = yy_cp;
00287 
00288 #define YY_NUM_RULES 17
00289 #define YY_END_OF_BUFFER 18
00290 static yyconst short int yy_accept[67] =
00291     {   0,
00292         0,    0,   18,   16,   14,   15,   16,   11,   12,    2,
00293        10,    9,    9,    9,    9,    9,   13,   14,   15,   11,
00294        12,    0,   12,    2,    9,    9,    9,    9,    9,   13,
00295         3,    4,    2,    9,    9,    9,    9,    2,    9,    9,
00296         9,    9,    2,    2,    9,    9,    8,    9,    2,    5,
00297         9,    6,    2,    9,    2,    9,    2,    9,    2,    7,
00298         2,    2,    2,    2,    1,    0
00299     } ;
00300 
00301 static yyconst int yy_ec[256] =
00302     {   0,
00303         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00304         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
00305         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00306         1,    2,    1,    5,    6,    1,    1,    1,    1,    1,
00307         1,    1,    1,    1,    7,    8,    1,    9,    9,   10,
00308        11,   12,   12,   12,   13,   13,   13,   14,    1,    1,
00309        15,    1,    1,    1,   16,   16,   16,   16,   16,   16,
00310        16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
00311        16,   16,   16,   16,   16,   16,   16,   16,   16,   17,
00312         1,    1,    1,    1,    1,    1,   18,   16,   16,   19,
00313 
00314        20,   16,   21,   16,   22,   16,   16,   16,   16,   23,
00315        16,   24,   16,   25,   26,   27,   28,   16,   16,   29,
00316        16,   16,    1,   14,    1,    1,    1,    1,    1,    1,
00317         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00318         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00319         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00320         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00321         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00322         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00323         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00324 
00325         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00326         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00327         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00328         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00329         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00330         1,    1,    1,    1,    1
00331     } ;
00332 
00333 static yyconst int yy_meta[30] =
00334     {   0,
00335         1,    1,    2,    1,    3,    1,    1,    4,    5,    5,
00336         5,    5,    5,    4,    1,    4,    4,    4,    4,    4,
00337         4,    4,    4,    4,    4,    4,    4,    4,    4
00338     } ;
00339 
00340 static yyconst short int yy_base[72] =
00341     {   0,
00342         0,  149,  154,  205,  138,  205,  103,    0,    0,   23,
00343       205,   29,   30,   31,   32,   33,    0,   99,  205,    0,
00344         0,    0,   50,   55,   34,   61,   41,   63,   64,    0,
00345         0,    0,   79,   65,   68,   86,   66,   99,  105,   88,
00346       106,   90,  118,   76,  107,  110,   89,  125,   43,   91,
00347       127,  128,  138,  144,  113,  129,  154,  160,  160,  130,
00348       172,  166,  177,  144,    0,  205,  190,  192,  194,  199,
00349        76
00350     } ;
00351 
00352 static yyconst short int yy_def[72] =
00353     {   0,
00354        66,    1,   66,   66,   66,   66,   66,   67,   68,   68,
00355        66,   69,   69,   69,   69,   69,   70,   66,   66,   67,
00356        68,   71,   68,   10,   69,   69,   69,   69,   69,   70,
00357        71,   23,   10,   69,   69,   69,   69,   10,   69,   69,
00358        69,   69,   10,   38,   69,   69,   69,   69,   38,   69,
00359        69,   69,   38,   69,   38,   69,   38,   69,   38,   69,
00360        38,   38,   38,   38,   68,    0,   66,   66,   66,   66,
00361        66
00362     } ;
00363 
00364 static yyconst short int yy_nxt[235] =
00365     {   0,
00366         4,    5,    6,    7,    8,    4,    4,    9,   10,   10,
00367        10,   10,   10,    9,   11,   12,   12,   12,   12,   12,
00368        12,   13,   14,   12,   15,   12,   12,   16,   12,   22,
00369        23,   24,   24,   24,   24,   24,   21,   21,   21,   21,
00370        21,   21,   21,   21,   21,   21,   21,   21,   21,   28,
00371        27,   53,   53,   53,   21,   26,   29,   32,   32,   32,
00372        32,   32,   32,   33,   33,   33,   33,   33,   21,   35,
00373        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
00374        31,   21,   37,   42,   44,   36,   34,   38,   38,   38,
00375        38,   38,   39,   21,   40,   21,   21,   21,   21,   21,
00376 
00377        18,   21,   21,   21,   21,   19,   41,   43,   44,   44,
00378        44,   44,   21,   21,   21,   46,   48,   21,   21,   21,
00379        21,   57,   57,   21,   45,   47,   49,   49,   49,   49,
00380        49,   50,   21,   51,   21,   21,   21,   21,   21,   18,
00381        21,   21,   21,   21,   52,   54,   55,   55,   55,   55,
00382        55,   21,   44,   66,   17,   58,   66,   21,   66,   66,
00383        65,   56,   59,   59,   59,   59,   59,   21,   61,   61,
00384        61,   61,   66,   21,   63,   63,   63,   63,   66,   60,
00385        62,   62,   62,   62,   62,   64,   64,   64,   64,   64,
00386        20,   20,   66,   20,   20,   21,   21,   25,   25,   30,
00387 
00388        66,   30,   30,   30,    3,   66,   66,   66,   66,   66,
00389        66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
00390        66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
00391        66,   66,   66,   66
00392     } ;
00393 
00394 static yyconst short int yy_chk[235] =
00395     {   0,
00396         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00397         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00398         1,    1,    1,    1,    1,    1,    1,    1,    1,   10,
00399        10,   10,   10,   10,   10,   10,   12,   13,   14,   15,
00400        16,   25,   12,   13,   14,   15,   16,   25,   27,   15,
00401        14,   49,   49,   49,   27,   13,   16,   23,   23,   23,
00402        23,   23,   23,   24,   24,   24,   24,   24,   26,   27,
00403        28,   29,   34,   37,   26,   35,   28,   29,   34,   37,
00404        71,   35,   29,   37,   44,   28,   26,   33,   33,   33,
00405        33,   33,   34,   36,   35,   40,   47,   42,   50,   36,
00406 
00407        18,   40,   47,   42,   50,    7,   36,   38,   38,   38,
00408        38,   38,   39,   41,   45,   40,   42,   46,   39,   41,
00409        45,   55,   55,   46,   39,   41,   43,   43,   43,   43,
00410        43,   45,   48,   46,   51,   52,   56,   60,   48,    5,
00411        51,   52,   56,   60,   48,   51,   53,   53,   53,   53,
00412        53,   54,   64,    3,    2,   56,    0,   54,    0,    0,
00413        64,   54,   57,   57,   57,   57,   57,   58,   59,   59,
00414        59,   59,    0,   58,   62,   62,   62,   62,    0,   58,
00415        61,   61,   61,   61,   61,   63,   63,   63,   63,   63,
00416        67,   67,    0,   67,   67,   68,   68,   69,   69,   70,
00417 
00418         0,   70,   70,   70,   66,   66,   66,   66,   66,   66,
00419        66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
00420        66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
00421        66,   66,   66,   66
00422     } ;
00423 
00424 static yy_state_type yy_last_accepting_state;
00425 static char *yy_last_accepting_cpos;
00426 
00427 /* The intent behind this definition is that it'll catch
00428  * any uses of REJECT which flex missed.
00429  */
00430 #define REJECT reject_used_but_not_detected
00431 static int yy_more_flag = 0;
00432 static int yy_more_len = 0;
00433 #define yymore() (yy_more_flag = 1)
00434 #define YY_MORE_ADJ yy_more_len
00435 #define YY_RESTORE_YY_MORE_OFFSET
00436 char *yytext;
00437 #line 1 "crlgen_lex_orig.l"
00438 #define INITIAL 0
00439 #line 2 "crlgen_lex_orig.l"
00440 
00441 #include "crlgen.h"
00442 
00443 static SECStatus parserStatus = SECSuccess;
00444 static CRLGENGeneratorData *parserData;
00445 static PRFileDesc *src;
00446 
00447 #define YY_INPUT(buf,result,max_size) \
00448     if ( parserStatus != SECFailure) { \
00449         if (((result = PR_Read(src, buf, max_size)) == 0) && \
00450             ferror( yyin )) \
00451           return SECFailure; \
00452     } else  { return SECFailure; }
00453               
00454 
00455 
00456 /* Macros after this point can all be overridden by user definitions in
00457  * section 1.
00458  */
00459 
00460 #ifndef YY_SKIP_YYWRAP
00461 #ifdef __cplusplus
00462 extern "C" int yywrap YY_PROTO(( void ));
00463 #else
00464 extern int yywrap YY_PROTO(( void ));
00465 #endif
00466 #endif
00467 
00468 #ifndef YY_NO_UNPUT
00469 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00470 #endif
00471 
00472 #ifndef yytext_ptr
00473 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00474 #endif
00475 
00476 #ifdef YY_NEED_STRLEN
00477 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00478 #endif
00479 
00480 #ifndef YY_NO_INPUT
00481 #ifdef __cplusplus
00482 static int yyinput YY_PROTO(( void ));
00483 #else
00484 static int input YY_PROTO(( void ));
00485 #endif
00486 #endif
00487 
00488 #if YY_STACK_USED
00489 static int yy_start_stack_ptr = 0;
00490 static int yy_start_stack_depth = 0;
00491 static int *yy_start_stack = 0;
00492 #ifndef YY_NO_PUSH_STATE
00493 static void yy_push_state YY_PROTO(( int new_state ));
00494 #endif
00495 #ifndef YY_NO_POP_STATE
00496 static void yy_pop_state YY_PROTO(( void ));
00497 #endif
00498 #ifndef YY_NO_TOP_STATE
00499 static int yy_top_state YY_PROTO(( void ));
00500 #endif
00501 
00502 #else
00503 #define YY_NO_PUSH_STATE 1
00504 #define YY_NO_POP_STATE 1
00505 #define YY_NO_TOP_STATE 1
00506 #endif
00507 
00508 #ifdef YY_MALLOC_DECL
00509 YY_MALLOC_DECL
00510 #else
00511 #if __STDC__
00512 #ifndef __cplusplus
00513 #include <stdlib.h>
00514 #endif
00515 #else
00516 /* Just try to get by without declaring the routines.  This will fail
00517  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00518  * or sizeof(void*) != sizeof(int).
00519  */
00520 #endif
00521 #endif
00522 
00523 /* Amount of stuff to slurp up with each read. */
00524 #ifndef YY_READ_BUF_SIZE
00525 #define YY_READ_BUF_SIZE 8192
00526 #endif
00527 
00528 /* Copy whatever the last rule matched to the standard output. */
00529 
00530 #ifndef ECHO
00531 /* This used to be an fputs(), but since the string might contain NUL's,
00532  * we now use fwrite().
00533  */
00534 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00535 #endif
00536 
00537 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00538  * is returned in "result".
00539  */
00540 #ifndef YY_INPUT
00541 #define YY_INPUT(buf,result,max_size) \
00542        if ( yy_current_buffer->yy_is_interactive ) \
00543               { \
00544               int c = '*', n; \
00545               for ( n = 0; n < max_size && \
00546                           (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00547                      buf[n] = (char) c; \
00548               if ( c == '\n' ) \
00549                      buf[n++] = (char) c; \
00550               if ( c == EOF && ferror( yyin ) ) \
00551                      YY_FATAL_ERROR( "input in flex scanner failed" ); \
00552               result = n; \
00553               } \
00554        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
00555                 && ferror( yyin ) ) \
00556               YY_FATAL_ERROR( "input in flex scanner failed" );
00557 #endif
00558 
00559 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00560  * we don't want an extra ';' after the "return" because that will cause
00561  * some compilers to complain about unreachable statements.
00562  */
00563 #ifndef yyterminate
00564 #define yyterminate() return YY_NULL
00565 #endif
00566 
00567 /* Number of entries by which start-condition stack grows. */
00568 #ifndef YY_START_STACK_INCR
00569 #define YY_START_STACK_INCR 25
00570 #endif
00571 
00572 /* Report a fatal error. */
00573 #ifndef YY_FATAL_ERROR
00574 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00575 #endif
00576 
00577 /* Default declaration of generated scanner - a define so the user can
00578  * easily add parameters.
00579  */
00580 #ifndef YY_DECL
00581 #define YY_DECL int yylex YY_PROTO(( void ))
00582 #endif
00583 
00584 /* Code executed at the beginning of each rule, after yytext and yyleng
00585  * have been set up.
00586  */
00587 #ifndef YY_USER_ACTION
00588 #define YY_USER_ACTION
00589 #endif
00590 
00591 /* Code executed at the end of each rule. */
00592 #ifndef YY_BREAK
00593 #define YY_BREAK break;
00594 #endif
00595 
00596 #define YY_RULE_SETUP \
00597        if ( yyleng > 0 ) \
00598               yy_current_buffer->yy_at_bol = \
00599                             (yytext[yyleng - 1] == '\n'); \
00600        YY_USER_ACTION
00601 
00602 YY_DECL
00603        {
00604        register yy_state_type yy_current_state;
00605        register char *yy_cp = NULL, *yy_bp = NULL;
00606        register int yy_act;
00607 
00608 #line 28 "crlgen_lex_orig.l"
00609 
00610 
00611 
00612        if ( yy_init )
00613               {
00614               yy_init = 0;
00615 
00616 #ifdef YY_USER_INIT
00617               YY_USER_INIT;
00618 #endif
00619 
00620               if ( ! yy_start )
00621                      yy_start = 1; /* first start state */
00622 
00623               if ( ! yyin )
00624                      yyin = stdin;
00625 
00626               if ( ! yyout )
00627                      yyout = stdout;
00628 
00629               if ( ! yy_current_buffer )
00630                      yy_current_buffer =
00631                             yy_create_buffer( yyin, YY_BUF_SIZE );
00632 
00633               yy_load_buffer_state();
00634               }
00635 
00636        while ( 1 )          /* loops until end-of-file is reached */
00637               {
00638               yy_more_len = 0;
00639               if ( yy_more_flag )
00640                      {
00641                      yy_more_len = yy_c_buf_p - yytext_ptr;
00642                      yy_more_flag = 0;
00643                      }
00644               yy_cp = yy_c_buf_p;
00645 
00646               /* Support of yytext. */
00647               *yy_cp = yy_hold_char;
00648 
00649               /* yy_bp points to the position in yy_ch_buf of the start of
00650                * the current run.
00651                */
00652               yy_bp = yy_cp;
00653 
00654               yy_current_state = yy_start;
00655               yy_current_state += YY_AT_BOL();
00656 yy_match:
00657               do
00658                      {
00659                      register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00660                      if ( yy_accept[yy_current_state] )
00661                             {
00662                             yy_last_accepting_state = yy_current_state;
00663                             yy_last_accepting_cpos = yy_cp;
00664                             }
00665                      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00666                             {
00667                             yy_current_state = (int) yy_def[yy_current_state];
00668                             if ( yy_current_state >= 67 )
00669                                    yy_c = yy_meta[(unsigned int) yy_c];
00670                             }
00671                      yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00672                      ++yy_cp;
00673                      }
00674               while ( yy_base[yy_current_state] != 205 );
00675 
00676 yy_find_action:
00677               yy_act = yy_accept[yy_current_state];
00678               if ( yy_act == 0 )
00679                      { /* have to back up */
00680                      yy_cp = yy_last_accepting_cpos;
00681                      yy_current_state = yy_last_accepting_state;
00682                      yy_act = yy_accept[yy_current_state];
00683                      }
00684 
00685               YY_DO_BEFORE_ACTION;
00686 
00687 
00688 do_action:    /* This label is used only to access EOF actions. */
00689 
00690 
00691               switch ( yy_act )
00692        { /* beginning of action switch */
00693                      case 0: /* must back up */
00694                      /* undo the effects of YY_DO_BEFORE_ACTION */
00695                      *yy_cp = yy_hold_char;
00696                      yy_cp = yy_last_accepting_cpos;
00697                      yy_current_state = yy_last_accepting_state;
00698                      goto yy_find_action;
00699 
00700 case 1:
00701 YY_RULE_SETUP
00702 #line 30 "crlgen_lex_orig.l"
00703 {
00704 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ZDATE);
00705 if (parserStatus != SECSuccess)
00706     return parserStatus;
00707 }
00708        YY_BREAK
00709 case 2:
00710 YY_RULE_SETUP
00711 #line 36 "crlgen_lex_orig.l"
00712 {
00713 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT);
00714 if (parserStatus != SECSuccess)
00715     return parserStatus;
00716 }
00717        YY_BREAK
00718 case 3:
00719 YY_RULE_SETUP
00720 #line 42 "crlgen_lex_orig.l"
00721 {
00722 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT_RANGE);
00723 if (parserStatus != SECSuccess)
00724     return parserStatus;
00725 }
00726        YY_BREAK
00727 case 4:
00728 YY_RULE_SETUP
00729 #line 48 "crlgen_lex_orig.l"
00730 {
00731 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_OID);
00732 if (parserStatus != SECSuccess)
00733     return parserStatus;
00734 }
00735        YY_BREAK
00736 case 5:
00737 YY_RULE_SETUP
00738 #line 54 "crlgen_lex_orig.l"
00739 {
00740 parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_ISSUER_CONTEXT);
00741 if (parserStatus != SECSuccess)
00742     return parserStatus;
00743 }
00744        YY_BREAK
00745 case 6:
00746 YY_RULE_SETUP
00747 #line 60 "crlgen_lex_orig.l"
00748 {
00749 parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_UPDATE_CONTEXT);
00750 if (parserStatus != SECSuccess)
00751     return parserStatus;
00752 }
00753        YY_BREAK
00754 case 7:
00755 YY_RULE_SETUP
00756 #line 65 "crlgen_lex_orig.l"
00757 {
00758 parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_NEXT_UPDATE_CONTEXT);
00759 if (parserStatus != SECSuccess)
00760     return parserStatus;
00761 }
00762        YY_BREAK
00763 case 8:
00764 YY_RULE_SETUP
00765 #line 71 "crlgen_lex_orig.l"
00766 {
00767 parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_CHANGE_RANGE_CONTEXT);
00768 if (parserStatus != SECSuccess)
00769     return parserStatus;
00770 }
00771        YY_BREAK
00772 case 9:
00773 YY_RULE_SETUP
00774 #line 77 "crlgen_lex_orig.l"
00775 {
00776 if (strcmp(yytext, "addcert") == 0) {
00777     parserStatus = crlgen_createNewLangStruct(parserData,
00778                                     CRLGEN_ADD_CERT_CONTEXT);
00779     if (parserStatus != SECSuccess)
00780         return parserStatus;
00781 } else if (strcmp(yytext, "rmcert") == 0) {
00782     parserStatus = crlgen_createNewLangStruct(parserData,
00783                                     CRLGEN_RM_CERT_CONTEXT);
00784     if (parserStatus != SECSuccess)
00785         return parserStatus;
00786 } else if (strcmp(yytext, "addext") == 0) {
00787     parserStatus = crlgen_createNewLangStruct(parserData,
00788                                     CRLGEN_ADD_EXTENSION_CONTEXT);
00789     if (parserStatus != SECSuccess)
00790         return parserStatus;
00791 } else {
00792     parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ID);
00793     if (parserStatus != SECSuccess)
00794         return parserStatus;
00795 }
00796 }
00797        YY_BREAK
00798 case 10:
00799 YY_RULE_SETUP
00800 #line 100 "crlgen_lex_orig.l"
00801 
00802        YY_BREAK
00803 case 11:
00804 YY_RULE_SETUP
00805 #line 102 "crlgen_lex_orig.l"
00806 {
00807 if (yytext[yyleng-1] == '\\') {
00808     yymore();
00809 } else {
00810     register int c;
00811     c = input();
00812     if (c != '\"') {
00813         printf( "Error: Line ending \" is missing:  %c\n", c);
00814         unput(c);
00815     } else {
00816         parserStatus = crlgen_setNextData(parserData, yytext + 1,
00817                                           CRLGEN_TYPE_STRING);
00818         if (parserStatus != SECSuccess)
00819             return parserStatus;
00820     }
00821 }
00822 }
00823        YY_BREAK
00824 case 12:
00825 YY_RULE_SETUP
00826 #line 120 "crlgen_lex_orig.l"
00827 {
00828 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_STRING);
00829 if (parserStatus != SECSuccess)
00830     return parserStatus;
00831 }
00832        YY_BREAK
00833 case 13:
00834 YY_RULE_SETUP
00835 #line 128 "crlgen_lex_orig.l"
00836 /* eat up one-line comments */ {}
00837        YY_BREAK
00838 case 14:
00839 YY_RULE_SETUP
00840 #line 130 "crlgen_lex_orig.l"
00841 {}
00842        YY_BREAK
00843 case 15:
00844 YY_RULE_SETUP
00845 #line 132 "crlgen_lex_orig.l"
00846 {
00847 parserStatus = crlgen_updateCrl(parserData);
00848 if (parserStatus != SECSuccess)
00849     return parserStatus;
00850 }
00851        YY_BREAK
00852 case 16:
00853 YY_RULE_SETUP
00854 #line 138 "crlgen_lex_orig.l"
00855 {
00856     fprintf(stderr, "Syntax error at line %d: unknown token %s\n",
00857             parserData->parsedLineNum, yytext);
00858     return SECFailure;
00859 }
00860        YY_BREAK
00861 case 17:
00862 YY_RULE_SETUP
00863 #line 144 "crlgen_lex_orig.l"
00864 ECHO;
00865        YY_BREAK
00866 case YY_STATE_EOF(INITIAL):
00867        yyterminate();
00868 
00869        case YY_END_OF_BUFFER:
00870               {
00871               /* Amount of text matched not including the EOB char. */
00872               int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
00873 
00874               /* Undo the effects of YY_DO_BEFORE_ACTION. */
00875               *yy_cp = yy_hold_char;
00876               YY_RESTORE_YY_MORE_OFFSET
00877 
00878               if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
00879                      {
00880                      /* We're scanning a new file or input source.  It's
00881                       * possible that this happened because the user
00882                       * just pointed yyin at a new source and called
00883                       * yylex().  If so, then we have to assure
00884                       * consistency between yy_current_buffer and our
00885                       * globals.  Here is the right place to do so, because
00886                       * this is the first action (other than possibly a
00887                       * back-up) that will match for the new input source.
00888                       */
00889                      yy_n_chars = yy_current_buffer->yy_n_chars;
00890                      yy_current_buffer->yy_input_file = yyin;
00891                      yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
00892                      }
00893 
00894               /* Note that here we test for yy_c_buf_p "<=" to the position
00895                * of the first EOB in the buffer, since yy_c_buf_p will
00896                * already have been incremented past the NUL character
00897                * (since all states make transitions on EOB to the
00898                * end-of-buffer state).  Contrast this with the test
00899                * in input().
00900                */
00901               if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
00902                      { /* This was really a NUL. */
00903                      yy_state_type yy_next_state;
00904 
00905                      yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
00906 
00907                      yy_current_state = yy_get_previous_state();
00908 
00909                      /* Okay, we're now positioned to make the NUL
00910                       * transition.  We couldn't have
00911                       * yy_get_previous_state() go ahead and do it
00912                       * for us because it doesn't know how to deal
00913                       * with the possibility of jamming (and we don't
00914                       * want to build jamming into it because then it
00915                       * will run more slowly).
00916                       */
00917 
00918                      yy_next_state = yy_try_NUL_trans( yy_current_state );
00919 
00920                      yy_bp = yytext_ptr + YY_MORE_ADJ;
00921 
00922                      if ( yy_next_state )
00923                             {
00924                             /* Consume the NUL. */
00925                             yy_cp = ++yy_c_buf_p;
00926                             yy_current_state = yy_next_state;
00927                             goto yy_match;
00928                             }
00929 
00930                      else
00931                             {
00932                             yy_cp = yy_c_buf_p;
00933                             goto yy_find_action;
00934                             }
00935                      }
00936 
00937               else switch ( yy_get_next_buffer() )
00938                      {
00939                      case EOB_ACT_END_OF_FILE:
00940                             {
00941                             yy_did_buffer_switch_on_eof = 0;
00942 
00943                             if ( yywrap() )
00944                                    {
00945                                    /* Note: because we've taken care in
00946                                     * yy_get_next_buffer() to have set up
00947                                     * yytext, we can now set up
00948                                     * yy_c_buf_p so that if some total
00949                                     * hoser (like flex itself) wants to
00950                                     * call the scanner after we return the
00951                                     * YY_NULL, it'll still work - another
00952                                     * YY_NULL will get returned.
00953                                     */
00954                                    yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
00955 
00956                                    yy_act = YY_STATE_EOF(YY_START);
00957                                    goto do_action;
00958                                    }
00959 
00960                             else
00961                                    {
00962                                    if ( ! yy_did_buffer_switch_on_eof )
00963                                           YY_NEW_FILE;
00964                                    }
00965                             break;
00966                             }
00967 
00968                      case EOB_ACT_CONTINUE_SCAN:
00969                             yy_c_buf_p =
00970                                    yytext_ptr + yy_amount_of_matched_text;
00971 
00972                             yy_current_state = yy_get_previous_state();
00973 
00974                             yy_cp = yy_c_buf_p;
00975                             yy_bp = yytext_ptr + YY_MORE_ADJ;
00976                             goto yy_match;
00977 
00978                      case EOB_ACT_LAST_MATCH:
00979                             yy_c_buf_p =
00980                             &yy_current_buffer->yy_ch_buf[yy_n_chars];
00981 
00982                             yy_current_state = yy_get_previous_state();
00983 
00984                             yy_cp = yy_c_buf_p;
00985                             yy_bp = yytext_ptr + YY_MORE_ADJ;
00986                             goto yy_find_action;
00987                      }
00988               break;
00989               }
00990 
00991        default:
00992               YY_FATAL_ERROR(
00993                      "fatal flex scanner internal error--no action found" );
00994        } /* end of action switch */
00995               } /* end of scanning one token */
00996        } /* end of yylex */
00997 
00998 
00999 /* yy_get_next_buffer - try to read in a new buffer
01000  *
01001  * Returns a code representing an action:
01002  *     EOB_ACT_LAST_MATCH -
01003  *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01004  *     EOB_ACT_END_OF_FILE - end of file
01005  */
01006 
01007 static int yy_get_next_buffer()
01008        {
01009        register char *dest = yy_current_buffer->yy_ch_buf;
01010        register char *source = yytext_ptr;
01011        register int number_to_move, i;
01012        int ret_val;
01013 
01014        if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
01015               YY_FATAL_ERROR(
01016               "fatal flex scanner internal error--end of buffer missed" );
01017 
01018        if ( yy_current_buffer->yy_fill_buffer == 0 )
01019               { /* Don't try to fill the buffer, so this is an EOF. */
01020               if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
01021                      {
01022                      /* We matched a single character, the EOB, so
01023                       * treat this as a final EOF.
01024                       */
01025                      return EOB_ACT_END_OF_FILE;
01026                      }
01027 
01028               else
01029                      {
01030                      /* We matched some text prior to the EOB, first
01031                       * process it.
01032                       */
01033                      return EOB_ACT_LAST_MATCH;
01034                      }
01035               }
01036 
01037        /* Try to read more data. */
01038 
01039        /* First move last chars to start of buffer. */
01040        number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
01041 
01042        for ( i = 0; i < number_to_move; ++i )
01043               *(dest++) = *(source++);
01044 
01045        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01046               /* don't do the read, it's not guaranteed to return an EOF,
01047                * just force an EOF
01048                */
01049               yy_current_buffer->yy_n_chars = yy_n_chars = 0;
01050 
01051        else
01052               {
01053               int num_to_read =
01054                      yy_current_buffer->yy_buf_size - number_to_move - 1;
01055 
01056               while ( num_to_read <= 0 )
01057                      { /* Not enough room in the buffer - grow it. */
01058 #ifdef YY_USES_REJECT
01059                      YY_FATAL_ERROR(
01060 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01061 #else
01062 
01063                      /* just a shorter name for the current buffer */
01064                      YY_BUFFER_STATE b = yy_current_buffer;
01065 
01066                      int yy_c_buf_p_offset =
01067                             (int) (yy_c_buf_p - b->yy_ch_buf);
01068 
01069                      if ( b->yy_is_our_buffer )
01070                             {
01071                             int new_size = b->yy_buf_size * 2;
01072 
01073                             if ( new_size <= 0 )
01074                                    b->yy_buf_size += b->yy_buf_size / 8;
01075                             else
01076                                    b->yy_buf_size *= 2;
01077 
01078                             b->yy_ch_buf = (char *)
01079                                    /* Include room in for 2 EOB chars. */
01080                                    yy_flex_realloc( (void *) b->yy_ch_buf,
01081                                                   b->yy_buf_size + 2 );
01082                             }
01083                      else
01084                             /* Can't grow it, we don't own it. */
01085                             b->yy_ch_buf = 0;
01086 
01087                      if ( ! b->yy_ch_buf )
01088                             YY_FATAL_ERROR(
01089                             "fatal error - scanner input buffer overflow" );
01090 
01091                      yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01092 
01093                      num_to_read = yy_current_buffer->yy_buf_size -
01094                                           number_to_move - 1;
01095 #endif
01096                      }
01097 
01098               if ( num_to_read > YY_READ_BUF_SIZE )
01099                      num_to_read = YY_READ_BUF_SIZE;
01100 
01101               /* Read in more data. */
01102               YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01103                      yy_n_chars, num_to_read );
01104 
01105               yy_current_buffer->yy_n_chars = yy_n_chars;
01106               }
01107 
01108        if ( yy_n_chars == 0 )
01109               {
01110               if ( number_to_move == YY_MORE_ADJ )
01111                      {
01112                      ret_val = EOB_ACT_END_OF_FILE;
01113                      yyrestart( yyin );
01114                      }
01115 
01116               else
01117                      {
01118                      ret_val = EOB_ACT_LAST_MATCH;
01119                      yy_current_buffer->yy_buffer_status =
01120                             YY_BUFFER_EOF_PENDING;
01121                      }
01122               }
01123 
01124        else
01125               ret_val = EOB_ACT_CONTINUE_SCAN;
01126 
01127        yy_n_chars += number_to_move;
01128        yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01129        yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01130 
01131        yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01132 
01133        return ret_val;
01134        }
01135 
01136 
01137 /* yy_get_previous_state - get the state just before the EOB char was reached */
01138 
01139 static yy_state_type yy_get_previous_state()
01140        {
01141        register yy_state_type yy_current_state;
01142        register char *yy_cp;
01143 
01144        yy_current_state = yy_start;
01145        yy_current_state += YY_AT_BOL();
01146 
01147        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01148               {
01149               register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01150               if ( yy_accept[yy_current_state] )
01151                      {
01152                      yy_last_accepting_state = yy_current_state;
01153                      yy_last_accepting_cpos = yy_cp;
01154                      }
01155               while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01156                      {
01157                      yy_current_state = (int) yy_def[yy_current_state];
01158                      if ( yy_current_state >= 67 )
01159                             yy_c = yy_meta[(unsigned int) yy_c];
01160                      }
01161               yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01162               }
01163 
01164        return yy_current_state;
01165        }
01166 
01167 
01168 /* yy_try_NUL_trans - try to make a transition on the NUL character
01169  *
01170  * synopsis
01171  *     next_state = yy_try_NUL_trans( current_state );
01172  */
01173 
01174 #ifdef YY_USE_PROTOS
01175 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
01176 #else
01177 static yy_state_type yy_try_NUL_trans( yy_current_state )
01178 yy_state_type yy_current_state;
01179 #endif
01180        {
01181        register int yy_is_jam;
01182        register char *yy_cp = yy_c_buf_p;
01183 
01184        register YY_CHAR yy_c = 1;
01185        if ( yy_accept[yy_current_state] )
01186               {
01187               yy_last_accepting_state = yy_current_state;
01188               yy_last_accepting_cpos = yy_cp;
01189               }
01190        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01191               {
01192               yy_current_state = (int) yy_def[yy_current_state];
01193               if ( yy_current_state >= 67 )
01194                      yy_c = yy_meta[(unsigned int) yy_c];
01195               }
01196        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01197        yy_is_jam = (yy_current_state == 66);
01198 
01199        return yy_is_jam ? 0 : yy_current_state;
01200        }
01201 
01202 
01203 #ifndef YY_NO_UNPUT
01204 #ifdef YY_USE_PROTOS
01205 static void yyunput( int c, register char *yy_bp )
01206 #else
01207 static void yyunput( c, yy_bp )
01208 int c;
01209 register char *yy_bp;
01210 #endif
01211        {
01212        register char *yy_cp = yy_c_buf_p;
01213 
01214        /* undo effects of setting up yytext */
01215        *yy_cp = yy_hold_char;
01216 
01217        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01218               { /* need to shift things up to make room */
01219               /* +2 for EOB chars. */
01220               register int number_to_move = yy_n_chars + 2;
01221               register char *dest = &yy_current_buffer->yy_ch_buf[
01222                                    yy_current_buffer->yy_buf_size + 2];
01223               register char *source =
01224                             &yy_current_buffer->yy_ch_buf[number_to_move];
01225 
01226               while ( source > yy_current_buffer->yy_ch_buf )
01227                      *--dest = *--source;
01228 
01229               yy_cp += (int) (dest - source);
01230               yy_bp += (int) (dest - source);
01231               yy_current_buffer->yy_n_chars =
01232                      yy_n_chars = yy_current_buffer->yy_buf_size;
01233 
01234               if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01235                      YY_FATAL_ERROR( "flex scanner push-back overflow" );
01236               }
01237 
01238        *--yy_cp = (char) c;
01239 
01240 
01241        yytext_ptr = yy_bp;
01242        yy_hold_char = *yy_cp;
01243        yy_c_buf_p = yy_cp;
01244        }
01245 #endif /* ifndef YY_NO_UNPUT */
01246 
01247 
01248 #ifndef YY_NO_INPUT
01249 #ifdef __cplusplus
01250 static int yyinput()
01251 #else
01252 static int input()
01253 #endif
01254        {
01255        int c;
01256 
01257        *yy_c_buf_p = yy_hold_char;
01258 
01259        if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01260               {
01261               /* yy_c_buf_p now points to the character we want to return.
01262                * If this occurs *before* the EOB characters, then it's a
01263                * valid NUL; if not, then we've hit the end of the buffer.
01264                */
01265               if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01266                      /* This was really a NUL. */
01267                      *yy_c_buf_p = '\0';
01268 
01269               else
01270                      { /* need more input */
01271                      int offset = yy_c_buf_p - yytext_ptr;
01272                      ++yy_c_buf_p;
01273 
01274                      switch ( yy_get_next_buffer() )
01275                             {
01276                             case EOB_ACT_LAST_MATCH:
01277                                    /* This happens because yy_g_n_b()
01278                                     * sees that we've accumulated a
01279                                     * token and flags that we need to
01280                                     * try matching the token before
01281                                     * proceeding.  But for input(),
01282                                     * there's no matching to consider.
01283                                     * So convert the EOB_ACT_LAST_MATCH
01284                                     * to EOB_ACT_END_OF_FILE.
01285                                     */
01286 
01287                                    /* Reset buffer status. */
01288                                    yyrestart( yyin );
01289 
01290                                    /* fall through */
01291 
01292                             case EOB_ACT_END_OF_FILE:
01293                                    {
01294                                    if ( yywrap() )
01295                                           return EOF;
01296 
01297                                    if ( ! yy_did_buffer_switch_on_eof )
01298                                           YY_NEW_FILE;
01299 #ifdef __cplusplus
01300                                    return yyinput();
01301 #else
01302                                    return input();
01303 #endif
01304                                    }
01305 
01306                             case EOB_ACT_CONTINUE_SCAN:
01307                                    yy_c_buf_p = yytext_ptr + offset;
01308                                    break;
01309                             }
01310                      }
01311               }
01312 
01313        c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
01314        *yy_c_buf_p = '\0';  /* preserve yytext */
01315        yy_hold_char = *++yy_c_buf_p;
01316 
01317        yy_current_buffer->yy_at_bol = (c == '\n');
01318 
01319        return c;
01320        }
01321 #endif /* YY_NO_INPUT */
01322 
01323 #ifdef YY_USE_PROTOS
01324 void yyrestart( FILE *input_file )
01325 #else
01326 void yyrestart( input_file )
01327 FILE *input_file;
01328 #endif
01329        {
01330        if ( ! yy_current_buffer )
01331               yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01332 
01333        yy_init_buffer( yy_current_buffer, input_file );
01334        yy_load_buffer_state();
01335        }
01336 
01337 
01338 #ifdef YY_USE_PROTOS
01339 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01340 #else
01341 void yy_switch_to_buffer( new_buffer )
01342 YY_BUFFER_STATE new_buffer;
01343 #endif
01344        {
01345        if ( yy_current_buffer == new_buffer )
01346               return;
01347 
01348        if ( yy_current_buffer )
01349               {
01350               /* Flush out information for old buffer. */
01351               *yy_c_buf_p = yy_hold_char;
01352               yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01353               yy_current_buffer->yy_n_chars = yy_n_chars;
01354               }
01355 
01356        yy_current_buffer = new_buffer;
01357        yy_load_buffer_state();
01358 
01359        /* We don't actually know whether we did this switch during
01360         * EOF (yywrap()) processing, but the only time this flag
01361         * is looked at is after yywrap() is called, so it's safe
01362         * to go ahead and always set it.
01363         */
01364        yy_did_buffer_switch_on_eof = 1;
01365        }
01366 
01367 
01368 #ifdef YY_USE_PROTOS
01369 void yy_load_buffer_state( void )
01370 #else
01371 void yy_load_buffer_state()
01372 #endif
01373        {
01374        yy_n_chars = yy_current_buffer->yy_n_chars;
01375        yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01376        yyin = yy_current_buffer->yy_input_file;
01377        yy_hold_char = *yy_c_buf_p;
01378        }
01379 
01380 
01381 #ifdef YY_USE_PROTOS
01382 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01383 #else
01384 YY_BUFFER_STATE yy_create_buffer( file, size )
01385 FILE *file;
01386 int size;
01387 #endif
01388        {
01389        YY_BUFFER_STATE b;
01390 
01391        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01392        if ( ! b )
01393               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01394 
01395        b->yy_buf_size = size;
01396 
01397        /* yy_ch_buf has to be 2 characters longer than the size given because
01398         * we need to put in 2 end-of-buffer characters.
01399         */
01400        b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
01401        if ( ! b->yy_ch_buf )
01402               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01403 
01404        b->yy_is_our_buffer = 1;
01405 
01406        yy_init_buffer( b, file );
01407 
01408        return b;
01409        }
01410 
01411 
01412 #ifdef YY_USE_PROTOS
01413 void yy_delete_buffer( YY_BUFFER_STATE b )
01414 #else
01415 void yy_delete_buffer( b )
01416 YY_BUFFER_STATE b;
01417 #endif
01418        {
01419        if ( ! b )
01420               return;
01421 
01422        if ( b == yy_current_buffer )
01423               yy_current_buffer = (YY_BUFFER_STATE) 0;
01424 
01425        if ( b->yy_is_our_buffer )
01426               yy_flex_free( (void *) b->yy_ch_buf );
01427 
01428        yy_flex_free( (void *) b );
01429        }
01430 
01431 
01432 
01433 #ifdef YY_USE_PROTOS
01434 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01435 #else
01436 void yy_init_buffer( b, file )
01437 YY_BUFFER_STATE b;
01438 FILE *file;
01439 #endif
01440 
01441 
01442        {
01443        yy_flush_buffer( b );
01444 
01445        b->yy_input_file = file;
01446        b->yy_fill_buffer = 1;
01447 
01448 #if YY_ALWAYS_INTERACTIVE
01449        b->yy_is_interactive = 1;
01450 #else
01451 #if YY_NEVER_INTERACTIVE
01452        b->yy_is_interactive = 0;
01453 #else
01454        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01455 #endif
01456 #endif
01457        }
01458 
01459 
01460 #ifdef YY_USE_PROTOS
01461 void yy_flush_buffer( YY_BUFFER_STATE b )
01462 #else
01463 void yy_flush_buffer( b )
01464 YY_BUFFER_STATE b;
01465 #endif
01466 
01467        {
01468        if ( ! b )
01469               return;
01470 
01471        b->yy_n_chars = 0;
01472 
01473        /* We always need two end-of-buffer characters.  The first causes
01474         * a transition to the end-of-buffer state.  The second causes
01475         * a jam in that state.
01476         */
01477        b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01478        b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01479 
01480        b->yy_buf_pos = &b->yy_ch_buf[0];
01481 
01482        b->yy_at_bol = 1;
01483        b->yy_buffer_status = YY_BUFFER_NEW;
01484 
01485        if ( b == yy_current_buffer )
01486               yy_load_buffer_state();
01487        }
01488 
01489 
01490 #ifndef YY_NO_SCAN_BUFFER
01491 #ifdef YY_USE_PROTOS
01492 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
01493 #else
01494 YY_BUFFER_STATE yy_scan_buffer( base, size )
01495 char *base;
01496 yy_size_t size;
01497 #endif
01498        {
01499        YY_BUFFER_STATE b;
01500 
01501        if ( size < 2 ||
01502             base[size-2] != YY_END_OF_BUFFER_CHAR ||
01503             base[size-1] != YY_END_OF_BUFFER_CHAR )
01504               /* They forgot to leave room for the EOB's. */
01505               return 0;
01506 
01507        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01508        if ( ! b )
01509               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01510 
01511        b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
01512        b->yy_buf_pos = b->yy_ch_buf = base;
01513        b->yy_is_our_buffer = 0;
01514        b->yy_input_file = 0;
01515        b->yy_n_chars = b->yy_buf_size;
01516        b->yy_is_interactive = 0;
01517        b->yy_at_bol = 1;
01518        b->yy_fill_buffer = 0;
01519        b->yy_buffer_status = YY_BUFFER_NEW;
01520 
01521        yy_switch_to_buffer( b );
01522 
01523        return b;
01524        }
01525 #endif
01526 
01527 
01528 #ifndef YY_NO_SCAN_STRING
01529 #ifdef YY_USE_PROTOS
01530 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
01531 #else
01532 YY_BUFFER_STATE yy_scan_string( yy_str )
01533 yyconst char *yy_str;
01534 #endif
01535        {
01536        int len;
01537        for ( len = 0; yy_str[len]; ++len )
01538               ;
01539 
01540        return yy_scan_bytes( yy_str, len );
01541        }
01542 #endif
01543 
01544 
01545 #ifndef YY_NO_SCAN_BYTES
01546 #ifdef YY_USE_PROTOS
01547 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
01548 #else
01549 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
01550 yyconst char *bytes;
01551 int len;
01552 #endif
01553        {
01554        YY_BUFFER_STATE b;
01555        char *buf;
01556        yy_size_t n;
01557        int i;
01558 
01559        /* Get memory for full buffer, including space for trailing EOB's. */
01560        n = len + 2;
01561        buf = (char *) yy_flex_alloc( n );
01562        if ( ! buf )
01563               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01564 
01565        for ( i = 0; i < len; ++i )
01566               buf[i] = bytes[i];
01567 
01568        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
01569 
01570        b = yy_scan_buffer( buf, n );
01571        if ( ! b )
01572               YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01573 
01574        /* It's okay to grow etc. this buffer, and we should throw it
01575         * away when we're done.
01576         */
01577        b->yy_is_our_buffer = 1;
01578 
01579        return b;
01580        }
01581 #endif
01582 
01583 
01584 #ifndef YY_NO_PUSH_STATE
01585 #ifdef YY_USE_PROTOS
01586 static void yy_push_state( int new_state )
01587 #else
01588 static void yy_push_state( new_state )
01589 int new_state;
01590 #endif
01591        {
01592        if ( yy_start_stack_ptr >= yy_start_stack_depth )
01593               {
01594               yy_size_t new_size;
01595 
01596               yy_start_stack_depth += YY_START_STACK_INCR;
01597               new_size = yy_start_stack_depth * sizeof( int );
01598 
01599               if ( ! yy_start_stack )
01600                      yy_start_stack = (int *) yy_flex_alloc( new_size );
01601 
01602               else
01603                      yy_start_stack = (int *) yy_flex_realloc(
01604                                    (void *) yy_start_stack, new_size );
01605 
01606               if ( ! yy_start_stack )
01607                      YY_FATAL_ERROR(
01608                      "out of memory expanding start-condition stack" );
01609               }
01610 
01611        yy_start_stack[yy_start_stack_ptr++] = YY_START;
01612 
01613        BEGIN(new_state);
01614        }
01615 #endif
01616 
01617 
01618 #ifndef YY_NO_POP_STATE
01619 static void yy_pop_state()
01620        {
01621        if ( --yy_start_stack_ptr < 0 )
01622               YY_FATAL_ERROR( "start-condition stack underflow" );
01623 
01624        BEGIN(yy_start_stack[yy_start_stack_ptr]);
01625        }
01626 #endif
01627 
01628 
01629 #ifndef YY_NO_TOP_STATE
01630 static int yy_top_state()
01631        {
01632        return yy_start_stack[yy_start_stack_ptr - 1];
01633        }
01634 #endif
01635 
01636 #ifndef YY_EXIT_FAILURE
01637 #define YY_EXIT_FAILURE 2
01638 #endif
01639 
01640 #ifdef YY_USE_PROTOS
01641 static void yy_fatal_error( yyconst char msg[] )
01642 #else
01643 static void yy_fatal_error( msg )
01644 char msg[];
01645 #endif
01646        {
01647        (void) fprintf( stderr, "%s\n", msg );
01648        exit( YY_EXIT_FAILURE );
01649        }
01650 
01651 
01652 
01653 /* Redefine yyless() so it works in section 3 code. */
01654 
01655 #undef yyless
01656 #define yyless(n) \
01657        do \
01658               { \
01659               /* Undo effects of setting up yytext. */ \
01660               yytext[yyleng] = yy_hold_char; \
01661               yy_c_buf_p = yytext + n; \
01662               yy_hold_char = *yy_c_buf_p; \
01663               *yy_c_buf_p = '\0'; \
01664               yyleng = n; \
01665               } \
01666        while ( 0 )
01667 
01668 
01669 /* Internal utility routines. */
01670 
01671 #ifndef yytext_ptr
01672 #ifdef YY_USE_PROTOS
01673 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
01674 #else
01675 static void yy_flex_strncpy( s1, s2, n )
01676 char *s1;
01677 yyconst char *s2;
01678 int n;
01679 #endif
01680        {
01681        register int i;
01682        for ( i = 0; i < n; ++i )
01683               s1[i] = s2[i];
01684        }
01685 #endif
01686 
01687 #ifdef YY_NEED_STRLEN
01688 #ifdef YY_USE_PROTOS
01689 static int yy_flex_strlen( yyconst char *s )
01690 #else
01691 static int yy_flex_strlen( s )
01692 yyconst char *s;
01693 #endif
01694        {
01695        register int n;
01696        for ( n = 0; s[n]; ++n )
01697               ;
01698 
01699        return n;
01700        }
01701 #endif
01702 
01703 
01704 #ifdef YY_USE_PROTOS
01705 static void *yy_flex_alloc( yy_size_t size )
01706 #else
01707 static void *yy_flex_alloc( size )
01708 yy_size_t size;
01709 #endif
01710        {
01711        return (void *) malloc( size );
01712        }
01713 
01714 #ifdef YY_USE_PROTOS
01715 static void *yy_flex_realloc( void *ptr, yy_size_t size )
01716 #else
01717 static void *yy_flex_realloc( ptr, size )
01718 void *ptr;
01719 yy_size_t size;
01720 #endif
01721        {
01722        /* The cast to (char *) in the following accommodates both
01723         * implementations that use char* generic pointers, and those
01724         * that use void* generic pointers.  It works with the latter
01725         * because both ANSI C and C++ allow castless assignment from
01726         * any pointer type to void*, and deal with argument conversions
01727         * as though doing an assignment.
01728         */
01729        return (void *) realloc( (char *) ptr, size );
01730        }
01731 
01732 #ifdef YY_USE_PROTOS
01733 static void yy_flex_free( void *ptr )
01734 #else
01735 static void yy_flex_free( ptr )
01736 void *ptr;
01737 #endif
01738        {
01739        free( ptr );
01740        }
01741 
01742 #if YY_MAIN
01743 int main()
01744        {
01745        yylex();
01746        return 0;
01747        }
01748 #endif
01749 #line 144 "crlgen_lex_orig.l"
01750 
01751 #include "prlock.h"
01752 
01753 static PRLock *parserInvocationLock;
01754 
01755 void CRLGEN_InitCrlGenParserLock()
01756 {
01757     parserInvocationLock = PR_NewLock();
01758 }
01759 
01760 void CRLGEN_DestroyCrlGenParserLock()
01761 {
01762     PR_DestroyLock(parserInvocationLock);
01763 }
01764 
01765 
01766 SECStatus CRLGEN_StartCrlGen(CRLGENGeneratorData *parserCtlData)
01767 {
01768     SECStatus rv;
01769 
01770     PR_Lock(parserInvocationLock);
01771 
01772     parserStatus = SECSuccess;
01773     parserData = parserCtlData;
01774     src = parserCtlData->src;
01775 
01776     rv = yylex();
01777 
01778     PR_Unlock(parserInvocationLock);
01779 
01780     return rv;
01781 }
01782 
01783 int yywrap() {return 1;}