tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

crlgen_lex.c (54123B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 /* A lexical scanner generated by flex */
      6 
      7 #define FLEX_SCANNER
      8 #define YY_FLEX_MAJOR_VERSION 2
      9 #define YY_FLEX_MINOR_VERSION 5
     10 
     11 #include <stdio.h>
     12 #ifdef _WIN32
     13 #include <io.h>
     14 #else
     15 #include <unistd.h>
     16 #endif
     17 
     18 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
     19 #ifdef c_plusplus
     20 #ifndef __cplusplus
     21 #define __cplusplus
     22 #endif
     23 #endif
     24 
     25 #ifdef __cplusplus
     26 
     27 #include <stdlib.h>
     28 
     29 /* Use prototypes in function declarations. */
     30 #define YY_USE_PROTOS
     31 
     32 /* The "const" storage-class-modifier is valid. */
     33 #define YY_USE_CONST
     34 
     35 #else /* ! __cplusplus */
     36 
     37 #if __STDC__
     38 
     39 #define YY_USE_PROTOS
     40 #define YY_USE_CONST
     41 
     42 #endif /* __STDC__ */
     43 #endif /* ! __cplusplus */
     44 
     45 #ifdef __TURBOC__
     46 #pragma warn - rch
     47 #pragma warn - use
     48 #include <io.h>
     49 #include <stdlib.h>
     50 #define YY_USE_CONST
     51 #define YY_USE_PROTOS
     52 #endif
     53 
     54 #ifdef YY_USE_CONST
     55 #define yyconst const
     56 #else
     57 #define yyconst
     58 #endif
     59 
     60 #ifdef YY_USE_PROTOS
     61 #define YY_PROTO(proto) proto
     62 #else
     63 #define YY_PROTO(proto) ()
     64 #endif
     65 
     66 /* Returned upon end-of-file. */
     67 #define YY_NULL 0
     68 
     69 /* Promotes a possibly negative, possibly signed char to an unsigned
     70 * integer for use as an array index.  If the signed char is negative,
     71 * we want to instead treat it as an 8-bit unsigned char, hence the
     72 * double cast.
     73 */
     74 #define YY_SC_TO_UI(c) ((unsigned int)(unsigned char)c)
     75 
     76 /* Enter a start condition.  This macro really ought to take a parameter,
     77 * but we do it the disgusting crufty way forced on us by the ()-less
     78 * definition of BEGIN.
     79 */
     80 #define BEGIN yy_start = 1 + 2 *
     81 
     82 /* Translate the current start state into a value that can be later handed
     83 * to BEGIN to return to the state.  The YYSTATE alias is for lex
     84 * compatibility.
     85 */
     86 #define YY_START ((yy_start - 1) / 2)
     87 #define YYSTATE YY_START
     88 
     89 /* Action number for EOF rule of a given start state. */
     90 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
     91 
     92 /* Special action meaning "start processing a new file". */
     93 #define YY_NEW_FILE yyrestart(yyin)
     94 
     95 #define YY_END_OF_BUFFER_CHAR 0
     96 
     97 /* Size of default input buffer. */
     98 #define YY_BUF_SIZE 16384
     99 
    100 typedef struct yy_buffer_state *YY_BUFFER_STATE;
    101 
    102 extern int yyleng;
    103 extern FILE *yyin, *yyout;
    104 
    105 #define EOB_ACT_CONTINUE_SCAN 0
    106 #define EOB_ACT_END_OF_FILE 1
    107 #define EOB_ACT_LAST_MATCH 2
    108 
    109 /* The funky do-while in the following #define is used to turn the definition
    110 * int a single C statement (which needs a semi-colon terminator).  This
    111 * avoids problems with code like:
    112 *
    113 *  if ( condition_holds )
    114 *    yyless( 5 );
    115 *  else
    116 *    do_something_else();
    117 *
    118 * Prior to using the do-while the compiler would get upset at the
    119 * "else" because it interpreted the "if" statement as being all
    120 * done when it reached the ';' after the yyless() call.
    121 */
    122 
    123 /* Return all but the first 'n' matched characters back to the input stream. */
    124 
    125 #define yyless(n)                                      \
    126    do {                                               \
    127        /* Undo effects of setting up yytext. */       \
    128        *yy_cp = yy_hold_char;                         \
    129        YY_RESTORE_YY_MORE_OFFSET                      \
    130        yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ;  \
    131        YY_DO_BEFORE_ACTION; /* set up yytext again */ \
    132    } while (0)
    133 
    134 #define unput(c) yyunput(c, yytext_ptr)
    135 
    136 /* The following is because we cannot portably get our hands on size_t
    137 * (without autoconf's help, which isn't available because we want
    138 * flex-generated scanners to compile on their own).
    139 */
    140 typedef unsigned int yy_size_t;
    141 
    142 struct yy_buffer_state {
    143    FILE *yy_input_file;
    144 
    145    char *yy_ch_buf;  /* input buffer */
    146    char *yy_buf_pos; /* current position in input buffer */
    147 
    148    /* Size of input buffer in bytes, not including room for EOB
    149     * characters.
    150     */
    151    yy_size_t yy_buf_size;
    152 
    153    /* Number of characters read into yy_ch_buf, not including EOB
    154     * characters.
    155     */
    156    int yy_n_chars;
    157 
    158    /* Whether we "own" the buffer - i.e., we know we created it,
    159     * and can realloc() it to grow it, and should free() it to
    160     * delete it.
    161     */
    162    int yy_is_our_buffer;
    163 
    164    /* Whether this is an "interactive" input source; if so, and
    165     * if we're using stdio for input, then we want to use getc()
    166     * instead of fread(), to make sure we stop fetching input after
    167     * each newline.
    168     */
    169    int yy_is_interactive;
    170 
    171    /* Whether we're considered to be at the beginning of a line.
    172     * If so, '^' rules will be active on the next match, otherwise
    173     * not.
    174     */
    175    int yy_at_bol;
    176 
    177    /* Whether to try to fill the input buffer when we reach the
    178     * end of it.
    179     */
    180    int yy_fill_buffer;
    181 
    182    int yy_buffer_status;
    183 #define YY_BUFFER_NEW 0
    184 #define YY_BUFFER_NORMAL 1
    185 /* When an EOF's been seen but there's still some text to process
    186 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
    187 * shouldn't try reading from the input source any more.  We might
    188 * still have a bunch of tokens to match, though, because of
    189 * possible backing-up.
    190 *
    191 * When we actually see the EOF, we change the status to "new"
    192 * (via yyrestart()), so that the user can continue scanning by
    193 * just pointing yyin at a new input file.
    194 */
    195 #define YY_BUFFER_EOF_PENDING 2
    196 };
    197 
    198 static YY_BUFFER_STATE yy_current_buffer = 0;
    199 
    200 /* We provide macros for accessing buffer states in case in the
    201 * future we want to put the buffer states in a more general
    202 * "scanner state".
    203 */
    204 #define YY_CURRENT_BUFFER yy_current_buffer
    205 
    206 /* yy_hold_char holds the character lost when yytext is formed. */
    207 static char yy_hold_char;
    208 
    209 static int yy_n_chars; /* number of characters read into yy_ch_buf */
    210 
    211 int yyleng;
    212 
    213 /* Points to current character in buffer. */
    214 static char *yy_c_buf_p = (char *)0;
    215 static int yy_init = 1;  /* whether we need to initialize */
    216 static int yy_start = 0; /* start state number */
    217 
    218 /* Flag which is used to allow yywrap()'s to do buffer switches
    219 * instead of setting up a fresh yyin.  A bit of a hack ...
    220 */
    221 static int yy_did_buffer_switch_on_eof;
    222 
    223 void yyrestart YY_PROTO((FILE * input_file));
    224 
    225 void yy_switch_to_buffer YY_PROTO((YY_BUFFER_STATE new_buffer));
    226 void yy_load_buffer_state YY_PROTO((void));
    227 YY_BUFFER_STATE yy_create_buffer YY_PROTO((FILE * file, int size));
    228 void yy_delete_buffer YY_PROTO((YY_BUFFER_STATE b));
    229 void yy_init_buffer YY_PROTO((YY_BUFFER_STATE b, FILE *file));
    230 void yy_flush_buffer YY_PROTO((YY_BUFFER_STATE b));
    231 #define YY_FLUSH_BUFFER yy_flush_buffer(yy_current_buffer)
    232 
    233 YY_BUFFER_STATE yy_scan_buffer YY_PROTO((char *base, yy_size_t size));
    234 YY_BUFFER_STATE yy_scan_string YY_PROTO((yyconst char *yy_str));
    235 YY_BUFFER_STATE yy_scan_bytes YY_PROTO((yyconst char *bytes, int len));
    236 
    237 static void *yy_flex_alloc YY_PROTO((yy_size_t));
    238 static void *yy_flex_realloc YY_PROTO((void *, yy_size_t));
    239 static void yy_flex_free YY_PROTO((void *));
    240 
    241 #define yy_new_buffer yy_create_buffer
    242 
    243 #define yy_set_interactive(is_interactive)                           \
    244    {                                                                \
    245        if (!yy_current_buffer)                                      \
    246            yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); \
    247        yy_current_buffer->yy_is_interactive = is_interactive;       \
    248    }
    249 
    250 #define yy_set_bol(at_bol)                                           \
    251    {                                                                \
    252        if (!yy_current_buffer)                                      \
    253            yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); \
    254        yy_current_buffer->yy_at_bol = at_bol;                       \
    255    }
    256 
    257 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
    258 
    259 typedef unsigned char YY_CHAR;
    260 FILE *yyin = (FILE *)0, *yyout = (FILE *)0;
    261 typedef int yy_state_type;
    262 extern char *yytext;
    263 #define yytext_ptr yytext
    264 
    265 static yy_state_type yy_get_previous_state YY_PROTO((void));
    266 static yy_state_type yy_try_NUL_trans YY_PROTO((yy_state_type current_state));
    267 static int yy_get_next_buffer YY_PROTO((void));
    268 static void yy_fatal_error YY_PROTO((yyconst char msg[]));
    269 
    270 /* Done after the current pattern has been matched and before the
    271 * corresponding action - sets up yytext.
    272 */
    273 #define YY_DO_BEFORE_ACTION             \
    274    yytext_ptr = yy_bp;                 \
    275    yytext_ptr -= yy_more_len;          \
    276    yyleng = (int)(yy_cp - yytext_ptr); \
    277    yy_hold_char = *yy_cp;              \
    278    *yy_cp = '\0';                      \
    279    yy_c_buf_p = yy_cp;
    280 
    281 #define YY_NUM_RULES 17
    282 #define YY_END_OF_BUFFER 18
    283 /* clang-format off */
    284 static yyconst short int yy_accept[67] =
    285    {   0,
    286        0,    0,   18,   16,   14,   15,   16,   11,   12,    2,
    287       10,    9,    9,    9,    9,    9,   13,   14,   15,   11,
    288       12,    0,   12,    2,    9,    9,    9,    9,    9,   13,
    289        3,    4,    2,    9,    9,    9,    9,    2,    9,    9,
    290        9,    9,    2,    2,    9,    9,    8,    9,    2,    5,
    291        9,    6,    2,    9,    2,    9,    2,    9,    2,    7,
    292        2,    2,    2,    2,    1,    0
    293    } ;
    294 
    295 static yyconst int yy_ec[256] =
    296    {   0,
    297        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
    298        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
    299        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    300        1,    2,    1,    5,    6,    1,    1,    1,    1,    1,
    301        1,    1,    1,    1,    7,    8,    1,    9,    9,   10,
    302       11,   12,   12,   12,   13,   13,   13,   14,    1,    1,
    303       15,    1,    1,    1,   16,   16,   16,   16,   16,   16,
    304       16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
    305       16,   16,   16,   16,   16,   16,   16,   16,   16,   17,
    306        1,    1,    1,    1,    1,    1,   18,   16,   16,   19,
    307 
    308       20,   16,   21,   16,   22,   16,   16,   16,   16,   23,
    309       16,   24,   16,   25,   26,   27,   28,   16,   16,   29,
    310       16,   16,    1,   14,    1,    1,    1,    1,    1,    1,
    311        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    312        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    313        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    314        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    315        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    316        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    317        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    318 
    319        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    320        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    321        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    322        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    323        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    324        1,    1,    1,    1,    1
    325    } ;
    326 
    327 static yyconst int yy_meta[30] =
    328    {   0,
    329        1,    1,    2,    1,    3,    1,    1,    4,    5,    5,
    330        5,    5,    5,    4,    1,    4,    4,    4,    4,    4,
    331        4,    4,    4,    4,    4,    4,    4,    4,    4
    332    } ;
    333 
    334 static yyconst short int yy_base[72] =
    335    {   0,
    336        0,  149,  154,  205,  138,  205,  103,    0,    0,   23,
    337      205,   29,   30,   31,   32,   33,    0,   99,  205,    0,
    338        0,    0,   50,   55,   34,   61,   41,   63,   64,    0,
    339        0,    0,   79,   65,   68,   86,   66,   99,  105,   88,
    340      106,   90,  118,   76,  107,  110,   89,  125,   43,   91,
    341      127,  128,  138,  144,  113,  129,  154,  160,  160,  130,
    342      172,  166,  177,  144,    0,  205,  190,  192,  194,  199,
    343       76
    344    } ;
    345 
    346 static yyconst short int yy_def[72] =
    347    {   0,
    348       66,    1,   66,   66,   66,   66,   66,   67,   68,   68,
    349       66,   69,   69,   69,   69,   69,   70,   66,   66,   67,
    350       68,   71,   68,   10,   69,   69,   69,   69,   69,   70,
    351       71,   23,   10,   69,   69,   69,   69,   10,   69,   69,
    352       69,   69,   10,   38,   69,   69,   69,   69,   38,   69,
    353       69,   69,   38,   69,   38,   69,   38,   69,   38,   69,
    354       38,   38,   38,   38,   68,    0,   66,   66,   66,   66,
    355       66
    356    } ;
    357 
    358 static yyconst short int yy_nxt[235] =
    359    {   0,
    360        4,    5,    6,    7,    8,    4,    4,    9,   10,   10,
    361       10,   10,   10,    9,   11,   12,   12,   12,   12,   12,
    362       12,   13,   14,   12,   15,   12,   12,   16,   12,   22,
    363       23,   24,   24,   24,   24,   24,   21,   21,   21,   21,
    364       21,   21,   21,   21,   21,   21,   21,   21,   21,   28,
    365       27,   53,   53,   53,   21,   26,   29,   32,   32,   32,
    366       32,   32,   32,   33,   33,   33,   33,   33,   21,   35,
    367       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
    368       31,   21,   37,   42,   44,   36,   34,   38,   38,   38,
    369       38,   38,   39,   21,   40,   21,   21,   21,   21,   21,
    370 
    371       18,   21,   21,   21,   21,   19,   41,   43,   44,   44,
    372       44,   44,   21,   21,   21,   46,   48,   21,   21,   21,
    373       21,   57,   57,   21,   45,   47,   49,   49,   49,   49,
    374       49,   50,   21,   51,   21,   21,   21,   21,   21,   18,
    375       21,   21,   21,   21,   52,   54,   55,   55,   55,   55,
    376       55,   21,   44,   66,   17,   58,   66,   21,   66,   66,
    377       65,   56,   59,   59,   59,   59,   59,   21,   61,   61,
    378       61,   61,   66,   21,   63,   63,   63,   63,   66,   60,
    379       62,   62,   62,   62,   62,   64,   64,   64,   64,   64,
    380       20,   20,   66,   20,   20,   21,   21,   25,   25,   30,
    381 
    382       66,   30,   30,   30,    3,   66,   66,   66,   66,   66,
    383       66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
    384       66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
    385       66,   66,   66,   66
    386    } ;
    387 
    388 static yyconst short int yy_chk[235] =
    389    {   0,
    390        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    391        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    392        1,    1,    1,    1,    1,    1,    1,    1,    1,   10,
    393       10,   10,   10,   10,   10,   10,   12,   13,   14,   15,
    394       16,   25,   12,   13,   14,   15,   16,   25,   27,   15,
    395       14,   49,   49,   49,   27,   13,   16,   23,   23,   23,
    396       23,   23,   23,   24,   24,   24,   24,   24,   26,   27,
    397       28,   29,   34,   37,   26,   35,   28,   29,   34,   37,
    398       71,   35,   29,   37,   44,   28,   26,   33,   33,   33,
    399       33,   33,   34,   36,   35,   40,   47,   42,   50,   36,
    400 
    401       18,   40,   47,   42,   50,    7,   36,   38,   38,   38,
    402       38,   38,   39,   41,   45,   40,   42,   46,   39,   41,
    403       45,   55,   55,   46,   39,   41,   43,   43,   43,   43,
    404       43,   45,   48,   46,   51,   52,   56,   60,   48,    5,
    405       51,   52,   56,   60,   48,   51,   53,   53,   53,   53,
    406       53,   54,   64,    3,    2,   56,    0,   54,    0,    0,
    407       64,   54,   57,   57,   57,   57,   57,   58,   59,   59,
    408       59,   59,    0,   58,   62,   62,   62,   62,    0,   58,
    409       61,   61,   61,   61,   61,   63,   63,   63,   63,   63,
    410       67,   67,    0,   67,   67,   68,   68,   69,   69,   70,
    411 
    412        0,   70,   70,   70,   66,   66,   66,   66,   66,   66,
    413       66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
    414       66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
    415       66,   66,   66,   66
    416    } ;
    417 /* clang-format on */
    418 
    419 static yy_state_type yy_last_accepting_state;
    420 static char *yy_last_accepting_cpos;
    421 
    422 /* The intent behind this definition is that it'll catch
    423 * any uses of REJECT which flex missed.
    424 */
    425 #define REJECT reject_used_but_not_detected
    426 static int yy_more_flag = 0;
    427 static int yy_more_len = 0;
    428 #define yymore() (yy_more_flag = 1)
    429 #define YY_MORE_ADJ yy_more_len
    430 #define YY_RESTORE_YY_MORE_OFFSET
    431 char *yytext;
    432 #line 1 "crlgen_lex_orig.l"
    433 #define INITIAL 0
    434 #line 2 "crlgen_lex_orig.l"
    435 
    436 #include "crlgen.h"
    437 
    438 static SECStatus parserStatus = SECSuccess;
    439 static CRLGENGeneratorData *parserData;
    440 static PRFileDesc *src;
    441 
    442 #define YY_INPUT(buf, result, max_size)                      \
    443    if (parserStatus != SECFailure) {                        \
    444        if (((result = PR_Read(src, buf, max_size)) == 0) && \
    445            ferror(yyin))                                    \
    446            return SECFailure;                               \
    447    } else {                                                 \
    448        return SECFailure;                                   \
    449    }
    450 
    451 /* Macros after this point can all be overridden by user definitions in
    452 * section 1.
    453 */
    454 
    455 #ifndef YY_SKIP_YYWRAP
    456 #ifdef __cplusplus
    457 extern "C" int yywrap YY_PROTO((void));
    458 #else
    459 extern int yywrap YY_PROTO((void));
    460 #endif
    461 #endif
    462 
    463 #ifndef YY_NO_UNPUT
    464 static void yyunput YY_PROTO((int c, char *buf_ptr));
    465 #endif
    466 
    467 #ifndef yytext_ptr
    468 static void yy_flex_strncpy YY_PROTO((char *, yyconst char *, int));
    469 #endif
    470 
    471 #ifdef YY_NEED_STRLEN
    472 static int yy_flex_strlen YY_PROTO((yyconst char *));
    473 #endif
    474 
    475 #ifndef YY_NO_INPUT
    476 #ifdef __cplusplus
    477 static int yyinput YY_PROTO((void));
    478 #else
    479 static int input YY_PROTO((void));
    480 #endif
    481 #endif
    482 
    483 #if YY_STACK_USED
    484 static int yy_start_stack_ptr = 0;
    485 static int yy_start_stack_depth = 0;
    486 static int *yy_start_stack = 0;
    487 #ifndef YY_NO_PUSH_STATE
    488 static void yy_push_state YY_PROTO((int new_state));
    489 #endif
    490 #ifndef YY_NO_POP_STATE
    491 static void yy_pop_state YY_PROTO((void));
    492 #endif
    493 #ifndef YY_NO_TOP_STATE
    494 static int yy_top_state YY_PROTO((void));
    495 #endif
    496 
    497 #else
    498 #define YY_NO_PUSH_STATE 1
    499 #define YY_NO_POP_STATE 1
    500 #define YY_NO_TOP_STATE 1
    501 #endif
    502 
    503 #ifdef YY_MALLOC_DECL
    504 YY_MALLOC_DECL
    505 #else
    506 #if __STDC__
    507 #ifndef __cplusplus
    508 #include <stdlib.h>
    509 #endif
    510 #else
    511 /* Just try to get by without declaring the routines.  This will fail
    512 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
    513 * or sizeof(void*) != sizeof(int).
    514 */
    515 #endif
    516 #endif
    517 
    518 /* Amount of stuff to slurp up with each read. */
    519 #ifndef YY_READ_BUF_SIZE
    520 #define YY_READ_BUF_SIZE 8192
    521 #endif
    522 
    523 /* Copy whatever the last rule matched to the standard output. */
    524 
    525 #ifndef ECHO
    526 /* This used to be an fputs(), but since the string might contain NUL's,
    527 * we now use fwrite().
    528 */
    529 #define ECHO (void)fwrite(yytext, yyleng, 1, yyout)
    530 #endif
    531 
    532 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
    533 * is returned in "result".
    534 */
    535 #ifndef YY_INPUT
    536 #define YY_INPUT(buf, result, max_size)                           \
    537    if (yy_current_buffer->yy_is_interactive) {                   \
    538        int c = '*', n;                                           \
    539        for (n = 0; n < max_size &&                               \
    540                    (c = getc(yyin)) != EOF && c != '\n';         \
    541             ++n)                                                 \
    542            buf[n] = (char)c;                                     \
    543        if (c == '\n')                                            \
    544            buf[n++] = (char)c;                                   \
    545        if (c == EOF && ferror(yyin))                             \
    546            YY_FATAL_ERROR("input in flex scanner failed");       \
    547        result = n;                                               \
    548    } else if (((result = fread(buf, 1, max_size, yyin)) == 0) && \
    549               ferror(yyin))                                      \
    550        YY_FATAL_ERROR("input in flex scanner failed");
    551 #endif
    552 
    553 /* No semi-colon after return; correct usage is to write "yyterminate();" -
    554 * we don't want an extra ';' after the "return" because that will cause
    555 * some compilers to complain about unreachable statements.
    556 */
    557 #ifndef yyterminate
    558 #define yyterminate() return YY_NULL
    559 #endif
    560 
    561 /* Number of entries by which start-condition stack grows. */
    562 #ifndef YY_START_STACK_INCR
    563 #define YY_START_STACK_INCR 25
    564 #endif
    565 
    566 /* Report a fatal error. */
    567 #ifndef YY_FATAL_ERROR
    568 #define YY_FATAL_ERROR(msg) yy_fatal_error(msg)
    569 #endif
    570 
    571 /* Default declaration of generated scanner - a define so the user can
    572 * easily add parameters.
    573 */
    574 #ifndef YY_DECL
    575 #define YY_DECL int yylex YY_PROTO((void))
    576 #endif
    577 
    578 /* Code executed at the beginning of each rule, after yytext and yyleng
    579 * have been set up.
    580 */
    581 #ifndef YY_USER_ACTION
    582 #define YY_USER_ACTION
    583 #endif
    584 
    585 /* Code executed at the end of each rule. */
    586 #ifndef YY_BREAK
    587 #define YY_BREAK break;
    588 #endif
    589 
    590 #define YY_RULE_SETUP                     \
    591    if (yyleng > 0)                       \
    592        yy_current_buffer->yy_at_bol =    \
    593            (yytext[yyleng - 1] == '\n'); \
    594    YY_USER_ACTION
    595 
    596 YY_DECL
    597 {
    598    register yy_state_type yy_current_state;
    599    register char *yy_cp = NULL, *yy_bp = NULL;
    600    register int yy_act;
    601 
    602 #line 28 "crlgen_lex_orig.l"
    603 
    604    if (yy_init) {
    605        yy_init = 0;
    606 
    607 #ifdef YY_USER_INIT
    608        YY_USER_INIT;
    609 #endif
    610 
    611        if (!yy_start)
    612            yy_start = 1; /* first start state */
    613 
    614        if (!yyin)
    615            yyin = stdin;
    616 
    617        if (!yyout)
    618            yyout = stdout;
    619 
    620        if (!yy_current_buffer)
    621            yy_current_buffer =
    622                yy_create_buffer(yyin, YY_BUF_SIZE);
    623 
    624        yy_load_buffer_state();
    625    }
    626 
    627    while (1) /* loops until end-of-file is reached */
    628    {
    629        yy_more_len = 0;
    630        if (yy_more_flag) {
    631            yy_more_len = yy_c_buf_p - yytext_ptr;
    632            yy_more_flag = 0;
    633        }
    634        yy_cp = yy_c_buf_p;
    635 
    636        /* Support of yytext. */
    637        *yy_cp = yy_hold_char;
    638 
    639        /* yy_bp points to the position in yy_ch_buf of the start of
    640         * the current run.
    641         */
    642        yy_bp = yy_cp;
    643 
    644        yy_current_state = yy_start;
    645        yy_current_state += YY_AT_BOL();
    646    yy_match:
    647        do {
    648            register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
    649            if (yy_accept[yy_current_state]) {
    650                yy_last_accepting_state = yy_current_state;
    651                yy_last_accepting_cpos = yy_cp;
    652            }
    653            while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) {
    654                yy_current_state = (int)yy_def[yy_current_state];
    655                if (yy_current_state >= 67)
    656                    yy_c = yy_meta[(unsigned int)yy_c];
    657            }
    658            yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c];
    659            ++yy_cp;
    660        } while (yy_base[yy_current_state] != 205);
    661 
    662    yy_find_action:
    663        yy_act = yy_accept[yy_current_state];
    664        if (yy_act == 0) { /* have to back up */
    665            yy_cp = yy_last_accepting_cpos;
    666            yy_current_state = yy_last_accepting_state;
    667            yy_act = yy_accept[yy_current_state];
    668        }
    669 
    670        YY_DO_BEFORE_ACTION;
    671 
    672    do_action: /* This label is used only to access EOF actions. */
    673 
    674        switch (yy_act) { /* beginning of action switch */
    675            case 0:       /* must back up */
    676                /* undo the effects of YY_DO_BEFORE_ACTION */
    677                *yy_cp = yy_hold_char;
    678                yy_cp = yy_last_accepting_cpos;
    679                yy_current_state = yy_last_accepting_state;
    680                goto yy_find_action;
    681 
    682            case 1:
    683                YY_RULE_SETUP
    684 #line 30 "crlgen_lex_orig.l"
    685                {
    686                    parserStatus =
    687                        crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ZDATE);
    688                    if (parserStatus !=
    689                        SECSuccess)
    690                        return parserStatus;
    691                }
    692                YY_BREAK
    693            case 2:
    694                YY_RULE_SETUP
    695 #line 36 "crlgen_lex_orig.l"
    696                {
    697                    parserStatus =
    698                        crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT);
    699                    if (parserStatus !=
    700                        SECSuccess)
    701                        return parserStatus;
    702                }
    703                YY_BREAK
    704            case 3:
    705                YY_RULE_SETUP
    706 #line 42 "crlgen_lex_orig.l"
    707                {
    708                    parserStatus =
    709                        crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT_RANGE);
    710                    if (parserStatus !=
    711                        SECSuccess)
    712                        return parserStatus;
    713                }
    714                YY_BREAK
    715            case 4:
    716                YY_RULE_SETUP
    717 #line 48 "crlgen_lex_orig.l"
    718                {
    719                    parserStatus =
    720                        crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_OID);
    721                    if (parserStatus !=
    722                        SECSuccess)
    723                        return parserStatus;
    724                }
    725                YY_BREAK
    726            case 5:
    727                YY_RULE_SETUP
    728 #line 54 "crlgen_lex_orig.l"
    729                {
    730                    parserStatus =
    731                        crlgen_createNewLangStruct(parserData, CRLGEN_ISSUER_CONTEXT);
    732                    if (parserStatus !=
    733                        SECSuccess)
    734                        return parserStatus;
    735                }
    736                YY_BREAK
    737            case 6:
    738                YY_RULE_SETUP
    739 #line 60 "crlgen_lex_orig.l"
    740                {
    741                    parserStatus =
    742                        crlgen_createNewLangStruct(parserData, CRLGEN_UPDATE_CONTEXT);
    743                    if (parserStatus !=
    744                        SECSuccess)
    745                        return parserStatus;
    746                }
    747                YY_BREAK
    748            case 7:
    749                YY_RULE_SETUP
    750 #line 65 "crlgen_lex_orig.l"
    751                {
    752                    parserStatus =
    753                        crlgen_createNewLangStruct(parserData, CRLGEN_NEXT_UPDATE_CONTEXT);
    754                    if (parserStatus !=
    755                        SECSuccess)
    756                        return parserStatus;
    757                }
    758                YY_BREAK
    759            case 8:
    760                YY_RULE_SETUP
    761 #line 71 "crlgen_lex_orig.l"
    762                {
    763                    parserStatus =
    764                        crlgen_createNewLangStruct(parserData, CRLGEN_CHANGE_RANGE_CONTEXT);
    765                    if (parserStatus !=
    766                        SECSuccess)
    767                        return parserStatus;
    768                }
    769                YY_BREAK
    770            case 9:
    771                YY_RULE_SETUP
    772 #line 77 "crlgen_lex_orig.l"
    773                {
    774                    if (strcmp(yytext, "addcert") ==
    775                        0) {
    776                        parserStatus =
    777                            crlgen_createNewLangStruct(parserData,
    778                                                       CRLGEN_ADD_CERT_CONTEXT);
    779                        if (parserStatus !=
    780                            SECSuccess)
    781                            return parserStatus;
    782                    } else if (strcmp(yytext, "rmcert") ==
    783                               0) {
    784                        parserStatus =
    785                            crlgen_createNewLangStruct(parserData,
    786                                                       CRLGEN_RM_CERT_CONTEXT);
    787                        if (parserStatus !=
    788                            SECSuccess)
    789                            return parserStatus;
    790                    } else if (strcmp(yytext, "addext") ==
    791                               0) {
    792                        parserStatus =
    793                            crlgen_createNewLangStruct(parserData,
    794                                                       CRLGEN_ADD_EXTENSION_CONTEXT);
    795                        if (parserStatus !=
    796                            SECSuccess)
    797                            return parserStatus;
    798                    } else {
    799                        parserStatus =
    800                            crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ID);
    801                        if (parserStatus !=
    802                            SECSuccess)
    803                            return parserStatus;
    804                    }
    805                }
    806                YY_BREAK
    807            case 10:
    808                YY_RULE_SETUP
    809 #line 100 "crlgen_lex_orig.l"
    810 
    811                YY_BREAK
    812            case 11:
    813                YY_RULE_SETUP
    814 #line 102 "crlgen_lex_orig.l"
    815                {
    816                    if (yytext[yyleng -
    817                               1] ==
    818                        '\\') {
    819                        yymore();
    820                    } else {
    821                        register int c;
    822                        c =
    823                            input();
    824                        if (c !=
    825                            '\"') {
    826                            printf("Error: Line ending \" is missing:  %c\n", c);
    827                            unput(c);
    828                        } else {
    829                            parserStatus =
    830                                crlgen_setNextData(parserData, yytext + 1,
    831                                                   CRLGEN_TYPE_STRING);
    832                            if (parserStatus !=
    833                                SECSuccess)
    834                                return parserStatus;
    835                        }
    836                    }
    837                }
    838                YY_BREAK
    839            case 12:
    840                YY_RULE_SETUP
    841 #line 120 "crlgen_lex_orig.l"
    842                {
    843                    parserStatus =
    844                        crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_STRING);
    845                    if (parserStatus !=
    846                        SECSuccess)
    847                        return parserStatus;
    848                }
    849                YY_BREAK
    850            case 13:
    851                YY_RULE_SETUP
    852 #line 128 "crlgen_lex_orig.l"
    853                /* eat up one-line comments */ {}
    854                YY_BREAK
    855            case 14:
    856                YY_RULE_SETUP
    857 #line 130 "crlgen_lex_orig.l"
    858                {
    859                }
    860                YY_BREAK
    861            case 15:
    862                YY_RULE_SETUP
    863 #line 132 "crlgen_lex_orig.l"
    864                {
    865                    parserStatus =
    866                        crlgen_updateCrl(parserData);
    867                    if (parserStatus !=
    868                        SECSuccess)
    869                        return parserStatus;
    870                }
    871                YY_BREAK
    872            case 16:
    873                YY_RULE_SETUP
    874 #line 138 "crlgen_lex_orig.l"
    875                {
    876                    fprintf(stderr, "Syntax error at line %d: unknown token %s\n",
    877                            parserData->parsedLineNum, yytext);
    878                    return SECFailure;
    879                }
    880                YY_BREAK
    881            case 17:
    882                YY_RULE_SETUP
    883 #line 144 "crlgen_lex_orig.l"
    884                ECHO;
    885                YY_BREAK
    886            case YY_STATE_EOF(INITIAL):
    887                yyterminate();
    888 
    889            case YY_END_OF_BUFFER: {
    890                /* Amount of text matched not including the EOB char. */
    891                int yy_amount_of_matched_text = (int)(yy_cp - yytext_ptr) - 1;
    892 
    893                /* Undo the effects of YY_DO_BEFORE_ACTION. */
    894                *yy_cp = yy_hold_char;
    895                YY_RESTORE_YY_MORE_OFFSET
    896 
    897                if (yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW) {
    898                    /* We're scanning a new file or input source.  It's
    899                     * possible that this happened because the user
    900                     * just pointed yyin at a new source and called
    901                     * yylex().  If so, then we have to assure
    902                     * consistency between yy_current_buffer and our
    903                     * globals.  Here is the right place to do so, because
    904                     * this is the first action (other than possibly a
    905                     * back-up) that will match for the new input source.
    906                     */
    907                    yy_n_chars = yy_current_buffer->yy_n_chars;
    908                    yy_current_buffer->yy_input_file = yyin;
    909                    yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
    910                }
    911 
    912                /* Note that here we test for yy_c_buf_p "<=" to the position
    913                 * of the first EOB in the buffer, since yy_c_buf_p will
    914                 * already have been incremented past the NUL character
    915                 * (since all states make transitions on EOB to the
    916                 * end-of-buffer state).  Contrast this with the test
    917                 * in input().
    918                 */
    919                if (yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars]) { /* This was really a NUL. */
    920                    yy_state_type yy_next_state;
    921 
    922                    yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
    923 
    924                    yy_current_state = yy_get_previous_state();
    925 
    926                    /* Okay, we're now positioned to make the NUL
    927                     * transition.  We couldn't have
    928                     * yy_get_previous_state() go ahead and do it
    929                     * for us because it doesn't know how to deal
    930                     * with the possibility of jamming (and we don't
    931                     * want to build jamming into it because then it
    932                     * will run more slowly).
    933                     */
    934 
    935                    yy_next_state = yy_try_NUL_trans(yy_current_state);
    936 
    937                    yy_bp = yytext_ptr + YY_MORE_ADJ;
    938 
    939                    if (yy_next_state) {
    940                        /* Consume the NUL. */
    941                        yy_cp = ++yy_c_buf_p;
    942                        yy_current_state = yy_next_state;
    943                        goto yy_match;
    944                    }
    945 
    946                    else {
    947                        yy_cp = yy_c_buf_p;
    948                        goto yy_find_action;
    949                    }
    950                }
    951 
    952                else
    953                    switch (yy_get_next_buffer()) {
    954                        case EOB_ACT_END_OF_FILE: {
    955                            yy_did_buffer_switch_on_eof = 0;
    956 
    957                            if (yywrap()) {
    958                                /* Note: because we've taken care in
    959                                 * yy_get_next_buffer() to have set up
    960                                 * yytext, we can now set up
    961                                 * yy_c_buf_p so that if some total
    962                                 * hoser (like flex itself) wants to
    963                                 * call the scanner after we return the
    964                                 * YY_NULL, it'll still work - another
    965                                 * YY_NULL will get returned.
    966                                 */
    967                                yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
    968 
    969                                yy_act = YY_STATE_EOF(YY_START);
    970                                goto do_action;
    971                            }
    972 
    973                            else {
    974                                if (!yy_did_buffer_switch_on_eof)
    975                                    YY_NEW_FILE;
    976                            }
    977                            break;
    978                        }
    979 
    980                        case EOB_ACT_CONTINUE_SCAN:
    981                            yy_c_buf_p =
    982                                yytext_ptr + yy_amount_of_matched_text;
    983 
    984                            yy_current_state = yy_get_previous_state();
    985 
    986                            yy_cp = yy_c_buf_p;
    987                            yy_bp = yytext_ptr + YY_MORE_ADJ;
    988                            goto yy_match;
    989 
    990                        case EOB_ACT_LAST_MATCH:
    991                            yy_c_buf_p =
    992                                &yy_current_buffer->yy_ch_buf[yy_n_chars];
    993 
    994                            yy_current_state = yy_get_previous_state();
    995 
    996                            yy_cp = yy_c_buf_p;
    997                            yy_bp = yytext_ptr + YY_MORE_ADJ;
    998                            goto yy_find_action;
    999                    }
   1000                break;
   1001            }
   1002 
   1003            default:
   1004                YY_FATAL_ERROR(
   1005                    "fatal flex scanner internal error--no action found");
   1006        } /* end of action switch */
   1007    }     /* end of scanning one token */
   1008 } /* end of yylex */
   1009 
   1010 /* yy_get_next_buffer - try to read in a new buffer
   1011 *
   1012 * Returns a code representing an action:
   1013 *  EOB_ACT_LAST_MATCH -
   1014 *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
   1015 *  EOB_ACT_END_OF_FILE - end of file
   1016 */
   1017 
   1018 static int
   1019 yy_get_next_buffer()
   1020 {
   1021    register char *dest = yy_current_buffer->yy_ch_buf;
   1022    register char *source = yytext_ptr;
   1023    register int number_to_move, i;
   1024    int ret_val;
   1025 
   1026    if (yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1])
   1027        YY_FATAL_ERROR(
   1028            "fatal flex scanner internal error--end of buffer missed");
   1029 
   1030    if (yy_current_buffer->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */
   1031        if (yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1) {
   1032            /* We matched a single character, the EOB, so
   1033             * treat this as a final EOF.
   1034             */
   1035            return EOB_ACT_END_OF_FILE;
   1036        }
   1037 
   1038        else {
   1039            /* We matched some text prior to the EOB, first
   1040             * process it.
   1041             */
   1042            return EOB_ACT_LAST_MATCH;
   1043        }
   1044    }
   1045 
   1046    /* Try to read more data. */
   1047 
   1048    /* First move last chars to start of buffer. */
   1049    number_to_move = (int)(yy_c_buf_p - yytext_ptr) - 1;
   1050 
   1051    for (i = 0; i < number_to_move; ++i)
   1052        *(dest++) = *(source++);
   1053 
   1054    if (yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING)
   1055        /* don't do the read, it's not guaranteed to return an EOF,
   1056         * just force an EOF
   1057         */
   1058        yy_current_buffer->yy_n_chars = yy_n_chars = 0;
   1059 
   1060    else {
   1061        int num_to_read =
   1062            yy_current_buffer->yy_buf_size - number_to_move - 1;
   1063 
   1064        while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */
   1065 #ifdef YY_USES_REJECT
   1066            YY_FATAL_ERROR(
   1067                "input buffer overflow, can't enlarge buffer because scanner uses REJECT");
   1068 #else
   1069 
   1070            /* just a shorter name for the current buffer */
   1071            YY_BUFFER_STATE b = yy_current_buffer;
   1072 
   1073            int yy_c_buf_p_offset =
   1074                (int)(yy_c_buf_p - b->yy_ch_buf);
   1075 
   1076            if (b->yy_is_our_buffer) {
   1077                int new_size = b->yy_buf_size * 2;
   1078 
   1079                if (new_size <= 0)
   1080                    b->yy_buf_size += b->yy_buf_size / 8;
   1081                else
   1082                    b->yy_buf_size *= 2;
   1083 
   1084                b->yy_ch_buf = (char *)
   1085                    /* Include room in for 2 EOB chars. */
   1086                    yy_flex_realloc((void *)b->yy_ch_buf,
   1087                                    b->yy_buf_size + 2);
   1088            } else
   1089                /* Can't grow it, we don't own it. */
   1090                b->yy_ch_buf = 0;
   1091 
   1092            if (!b->yy_ch_buf)
   1093                YY_FATAL_ERROR(
   1094                    "fatal error - scanner input buffer overflow");
   1095 
   1096            yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
   1097 
   1098            num_to_read = yy_current_buffer->yy_buf_size -
   1099                          number_to_move - 1;
   1100 #endif
   1101        }
   1102 
   1103        if (num_to_read > YY_READ_BUF_SIZE)
   1104            num_to_read = YY_READ_BUF_SIZE;
   1105 
   1106        /* Read in more data. */
   1107        YY_INPUT((&yy_current_buffer->yy_ch_buf[number_to_move]),
   1108                 yy_n_chars, num_to_read);
   1109 
   1110        yy_current_buffer->yy_n_chars = yy_n_chars;
   1111    }
   1112 
   1113    if (yy_n_chars == 0) {
   1114        if (number_to_move == YY_MORE_ADJ) {
   1115            ret_val = EOB_ACT_END_OF_FILE;
   1116            yyrestart(yyin);
   1117        }
   1118 
   1119        else {
   1120            ret_val = EOB_ACT_LAST_MATCH;
   1121            yy_current_buffer->yy_buffer_status =
   1122                YY_BUFFER_EOF_PENDING;
   1123        }
   1124    }
   1125 
   1126    else
   1127        ret_val = EOB_ACT_CONTINUE_SCAN;
   1128 
   1129    yy_n_chars += number_to_move;
   1130    yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
   1131    yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
   1132 
   1133    yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
   1134 
   1135    return ret_val;
   1136 }
   1137 
   1138 /* yy_get_previous_state - get the state just before the EOB char was reached */
   1139 
   1140 static yy_state_type
   1141 yy_get_previous_state()
   1142 {
   1143    register yy_state_type yy_current_state;
   1144    register char *yy_cp;
   1145 
   1146    yy_current_state = yy_start;
   1147    yy_current_state += YY_AT_BOL();
   1148 
   1149    for (yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp) {
   1150        register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
   1151        if (yy_accept[yy_current_state]) {
   1152            yy_last_accepting_state = yy_current_state;
   1153            yy_last_accepting_cpos = yy_cp;
   1154        }
   1155        while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) {
   1156            yy_current_state = (int)yy_def[yy_current_state];
   1157            if (yy_current_state >= 67)
   1158                yy_c = yy_meta[(unsigned int)yy_c];
   1159        }
   1160        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c];
   1161    }
   1162 
   1163    return yy_current_state;
   1164 }
   1165 
   1166 /* yy_try_NUL_trans - try to make a transition on the NUL character
   1167 *
   1168 * synopsis
   1169 *  next_state = yy_try_NUL_trans( current_state );
   1170 */
   1171 
   1172 #ifdef YY_USE_PROTOS
   1173 static yy_state_type
   1174 yy_try_NUL_trans(yy_state_type yy_current_state)
   1175 #else
   1176 static yy_state_type
   1177 yy_try_NUL_trans(yy_current_state)
   1178 yy_state_type yy_current_state;
   1179 #endif
   1180 {
   1181    register int yy_is_jam;
   1182    register char *yy_cp = yy_c_buf_p;
   1183 
   1184    register YY_CHAR yy_c = 1;
   1185    if (yy_accept[yy_current_state]) {
   1186        yy_last_accepting_state = yy_current_state;
   1187        yy_last_accepting_cpos = yy_cp;
   1188    }
   1189    while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) {
   1190        yy_current_state = (int)yy_def[yy_current_state];
   1191        if (yy_current_state >= 67)
   1192            yy_c = yy_meta[(unsigned int)yy_c];
   1193    }
   1194    yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c];
   1195    yy_is_jam = (yy_current_state == 66);
   1196 
   1197    return yy_is_jam ? 0 : yy_current_state;
   1198 }
   1199 
   1200 #ifndef YY_NO_UNPUT
   1201 #ifdef YY_USE_PROTOS
   1202 static void
   1203 yyunput(int c, register char *yy_bp)
   1204 #else
   1205 static void yyunput(c, yy_bp) int c;
   1206 register char *yy_bp;
   1207 #endif
   1208 {
   1209    register char *yy_cp = yy_c_buf_p;
   1210 
   1211    /* undo effects of setting up yytext */
   1212    *yy_cp = yy_hold_char;
   1213 
   1214    if (yy_cp < yy_current_buffer->yy_ch_buf + 2) { /* need to shift things up to make room */
   1215        /* +2 for EOB chars. */
   1216        register int number_to_move = yy_n_chars + 2;
   1217        register char *dest = &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size +
   1218                                                            2];
   1219        register char *source =
   1220            &yy_current_buffer->yy_ch_buf[number_to_move];
   1221 
   1222        while (source > yy_current_buffer->yy_ch_buf)
   1223            *--dest = *--source;
   1224 
   1225        yy_cp += (int)(dest - source);
   1226        yy_bp += (int)(dest - source);
   1227        yy_current_buffer->yy_n_chars =
   1228            yy_n_chars = yy_current_buffer->yy_buf_size;
   1229 
   1230        if (yy_cp < yy_current_buffer->yy_ch_buf + 2)
   1231            YY_FATAL_ERROR("flex scanner push-back overflow");
   1232    }
   1233 
   1234    *--yy_cp = (char)c;
   1235 
   1236    yytext_ptr = yy_bp;
   1237    yy_hold_char = *yy_cp;
   1238    yy_c_buf_p = yy_cp;
   1239 }
   1240 #endif /* ifndef YY_NO_UNPUT */
   1241 
   1242 #ifndef YY_NO_INPUT
   1243 #ifdef __cplusplus
   1244 static int
   1245 yyinput()
   1246 #else
   1247 static int
   1248 input()
   1249 #endif
   1250 {
   1251    int c;
   1252 
   1253    *yy_c_buf_p = yy_hold_char;
   1254 
   1255    if (*yy_c_buf_p == YY_END_OF_BUFFER_CHAR) {
   1256        /* yy_c_buf_p now points to the character we want to return.
   1257         * If this occurs *before* the EOB characters, then it's a
   1258         * valid NUL; if not, then we've hit the end of the buffer.
   1259         */
   1260        if (yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars])
   1261            /* This was really a NUL. */
   1262            *yy_c_buf_p = '\0';
   1263 
   1264        else { /* need more input */
   1265            int offset = yy_c_buf_p - yytext_ptr;
   1266            ++yy_c_buf_p;
   1267 
   1268            switch (yy_get_next_buffer()) {
   1269                case EOB_ACT_LAST_MATCH:
   1270                    /* This happens because yy_g_n_b()
   1271                     * sees that we've accumulated a
   1272                     * token and flags that we need to
   1273                     * try matching the token before
   1274                     * proceeding.  But for input(),
   1275                     * there's no matching to consider.
   1276                     * So convert the EOB_ACT_LAST_MATCH
   1277                     * to EOB_ACT_END_OF_FILE.
   1278                     */
   1279 
   1280                    /* Reset buffer status. */
   1281                    yyrestart(yyin);
   1282 
   1283                    /* fall through */
   1284 
   1285                case EOB_ACT_END_OF_FILE: {
   1286                    if (yywrap())
   1287                        return EOF;
   1288 
   1289                    if (!yy_did_buffer_switch_on_eof)
   1290                        YY_NEW_FILE;
   1291 #ifdef __cplusplus
   1292                    return yyinput();
   1293 #else
   1294                    return input();
   1295 #endif
   1296                }
   1297 
   1298                case EOB_ACT_CONTINUE_SCAN:
   1299                    yy_c_buf_p = yytext_ptr + offset;
   1300                    break;
   1301            }
   1302        }
   1303    }
   1304 
   1305    c = *(unsigned char *)yy_c_buf_p; /* cast for 8-bit char's */
   1306    *yy_c_buf_p = '\0';               /* preserve yytext */
   1307    yy_hold_char = *++yy_c_buf_p;
   1308 
   1309    yy_current_buffer->yy_at_bol = (c == '\n');
   1310 
   1311    return c;
   1312 }
   1313 #endif /* YY_NO_INPUT */
   1314 
   1315 #ifdef YY_USE_PROTOS
   1316 void
   1317 yyrestart(FILE *input_file)
   1318 #else
   1319 void yyrestart(input_file)
   1320    FILE *input_file;
   1321 #endif
   1322 {
   1323    if (!yy_current_buffer)
   1324        yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE);
   1325 
   1326    yy_init_buffer(yy_current_buffer, input_file);
   1327    yy_load_buffer_state();
   1328 }
   1329 
   1330 #ifdef YY_USE_PROTOS
   1331 void
   1332 yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)
   1333 #else
   1334 void yy_switch_to_buffer(new_buffer)
   1335    YY_BUFFER_STATE new_buffer;
   1336 #endif
   1337 {
   1338    if (yy_current_buffer == new_buffer)
   1339        return;
   1340 
   1341    if (yy_current_buffer) {
   1342        /* Flush out information for old buffer. */
   1343        *yy_c_buf_p = yy_hold_char;
   1344        yy_current_buffer->yy_buf_pos = yy_c_buf_p;
   1345        yy_current_buffer->yy_n_chars = yy_n_chars;
   1346    }
   1347 
   1348    yy_current_buffer = new_buffer;
   1349    yy_load_buffer_state();
   1350 
   1351    /* We don't actually know whether we did this switch during
   1352     * EOF (yywrap()) processing, but the only time this flag
   1353     * is looked at is after yywrap() is called, so it's safe
   1354     * to go ahead and always set it.
   1355     */
   1356    yy_did_buffer_switch_on_eof = 1;
   1357 }
   1358 
   1359 #ifdef YY_USE_PROTOS
   1360 void
   1361 yy_load_buffer_state(void)
   1362 #else
   1363 void
   1364 yy_load_buffer_state()
   1365 #endif
   1366 {
   1367    yy_n_chars = yy_current_buffer->yy_n_chars;
   1368    yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
   1369    yyin = yy_current_buffer->yy_input_file;
   1370    yy_hold_char = *yy_c_buf_p;
   1371 }
   1372 
   1373 #ifdef YY_USE_PROTOS
   1374 YY_BUFFER_STATE
   1375 yy_create_buffer(FILE *file, int size)
   1376 #else
   1377 YY_BUFFER_STATE
   1378 yy_create_buffer(file, size)
   1379    FILE *file;
   1380 int size;
   1381 #endif
   1382 {
   1383    YY_BUFFER_STATE b;
   1384 
   1385    b = (YY_BUFFER_STATE)yy_flex_alloc(sizeof(struct yy_buffer_state));
   1386    if (!b)
   1387        YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()");
   1388 
   1389    b->yy_buf_size = size;
   1390 
   1391    /* yy_ch_buf has to be 2 characters longer than the size given because
   1392     * we need to put in 2 end-of-buffer characters.
   1393     */
   1394    b->yy_ch_buf = (char *)yy_flex_alloc(b->yy_buf_size + 2);
   1395    if (!b->yy_ch_buf)
   1396        YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()");
   1397 
   1398    b->yy_is_our_buffer = 1;
   1399 
   1400    yy_init_buffer(b, file);
   1401 
   1402    return b;
   1403 }
   1404 
   1405 #ifdef YY_USE_PROTOS
   1406 void
   1407 yy_delete_buffer(YY_BUFFER_STATE b)
   1408 #else
   1409 void yy_delete_buffer(b)
   1410    YY_BUFFER_STATE b;
   1411 #endif
   1412 {
   1413    if (!b)
   1414        return;
   1415 
   1416    if (b == yy_current_buffer)
   1417        yy_current_buffer = (YY_BUFFER_STATE)0;
   1418 
   1419    if (b->yy_is_our_buffer)
   1420        yy_flex_free((void *)b->yy_ch_buf);
   1421 
   1422    yy_flex_free((void *)b);
   1423 }
   1424 
   1425 #ifdef YY_USE_PROTOS
   1426 void
   1427 yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
   1428 #else
   1429 void yy_init_buffer(b, file)
   1430    YY_BUFFER_STATE b;
   1431 FILE *file;
   1432 #endif
   1433 
   1434 {
   1435    yy_flush_buffer(b);
   1436 
   1437    b->yy_input_file = file;
   1438    b->yy_fill_buffer = 1;
   1439 
   1440 #if YY_ALWAYS_INTERACTIVE
   1441    b->yy_is_interactive = 1;
   1442 #else
   1443 #if YY_NEVER_INTERACTIVE
   1444    b->yy_is_interactive = 0;
   1445 #else
   1446    b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0;
   1447 #endif
   1448 #endif
   1449 }
   1450 
   1451 #ifdef YY_USE_PROTOS
   1452 void
   1453 yy_flush_buffer(YY_BUFFER_STATE b)
   1454 #else
   1455 void yy_flush_buffer(b)
   1456    YY_BUFFER_STATE b;
   1457 #endif
   1458 
   1459 {
   1460    if (!b)
   1461        return;
   1462 
   1463    b->yy_n_chars = 0;
   1464 
   1465    /* We always need two end-of-buffer characters.  The first causes
   1466     * a transition to the end-of-buffer state.  The second causes
   1467     * a jam in that state.
   1468     */
   1469    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
   1470    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
   1471 
   1472    b->yy_buf_pos = &b->yy_ch_buf[0];
   1473 
   1474    b->yy_at_bol = 1;
   1475    b->yy_buffer_status = YY_BUFFER_NEW;
   1476 
   1477    if (b == yy_current_buffer)
   1478        yy_load_buffer_state();
   1479 }
   1480 
   1481 #ifndef YY_NO_SCAN_BUFFER
   1482 #ifdef YY_USE_PROTOS
   1483 YY_BUFFER_STATE
   1484 yy_scan_buffer(char *base, yy_size_t size)
   1485 #else
   1486 YY_BUFFER_STATE
   1487 yy_scan_buffer(base, size) char *base;
   1488 yy_size_t size;
   1489 #endif
   1490 {
   1491    YY_BUFFER_STATE b;
   1492 
   1493    if (size < 2 ||
   1494        base[size - 2] != YY_END_OF_BUFFER_CHAR ||
   1495        base[size - 1] != YY_END_OF_BUFFER_CHAR)
   1496        /* They forgot to leave room for the EOB's. */
   1497        return 0;
   1498 
   1499    b = (YY_BUFFER_STATE)yy_flex_alloc(sizeof(struct yy_buffer_state));
   1500    if (!b)
   1501        YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()");
   1502 
   1503    b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
   1504    b->yy_buf_pos = b->yy_ch_buf = base;
   1505    b->yy_is_our_buffer = 0;
   1506    b->yy_input_file = 0;
   1507    b->yy_n_chars = b->yy_buf_size;
   1508    b->yy_is_interactive = 0;
   1509    b->yy_at_bol = 1;
   1510    b->yy_fill_buffer = 0;
   1511    b->yy_buffer_status = YY_BUFFER_NEW;
   1512 
   1513    yy_switch_to_buffer(b);
   1514 
   1515    return b;
   1516 }
   1517 #endif
   1518 
   1519 #ifndef YY_NO_SCAN_STRING
   1520 #ifdef YY_USE_PROTOS
   1521 YY_BUFFER_STATE
   1522 yy_scan_string(yyconst char *yy_str)
   1523 #else
   1524 YY_BUFFER_STATE
   1525 yy_scan_string(yy_str)
   1526    yyconst char *yy_str;
   1527 #endif
   1528 {
   1529    int len;
   1530    for (len = 0; yy_str[len]; ++len)
   1531        ;
   1532 
   1533    return yy_scan_bytes(yy_str, len);
   1534 }
   1535 #endif
   1536 
   1537 #ifndef YY_NO_SCAN_BYTES
   1538 #ifdef YY_USE_PROTOS
   1539 YY_BUFFER_STATE
   1540 yy_scan_bytes(yyconst char *bytes, int len)
   1541 #else
   1542 YY_BUFFER_STATE
   1543 yy_scan_bytes(bytes, len)
   1544    yyconst char *bytes;
   1545 int len;
   1546 #endif
   1547 {
   1548    YY_BUFFER_STATE b;
   1549    char *buf;
   1550    yy_size_t n;
   1551    int i;
   1552 
   1553    /* Get memory for full buffer, including space for trailing EOB's. */
   1554    n = len + 2;
   1555    buf = (char *)yy_flex_alloc(n);
   1556    if (!buf)
   1557        YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()");
   1558 
   1559    for (i = 0; i < len; ++i)
   1560        buf[i] = bytes[i];
   1561 
   1562    buf[len] = buf[len + 1] = YY_END_OF_BUFFER_CHAR;
   1563 
   1564    b = yy_scan_buffer(buf, n);
   1565    if (!b)
   1566        YY_FATAL_ERROR("bad buffer in yy_scan_bytes()");
   1567 
   1568    /* It's okay to grow etc. this buffer, and we should throw it
   1569     * away when we're done.
   1570     */
   1571    b->yy_is_our_buffer = 1;
   1572 
   1573    return b;
   1574 }
   1575 #endif
   1576 
   1577 #ifndef YY_NO_PUSH_STATE
   1578 #ifdef YY_USE_PROTOS
   1579 static void
   1580 yy_push_state(int new_state)
   1581 #else
   1582 static void yy_push_state(new_state) int new_state;
   1583 #endif
   1584 {
   1585    if (yy_start_stack_ptr >= yy_start_stack_depth) {
   1586        yy_size_t new_size;
   1587 
   1588        yy_start_stack_depth += YY_START_STACK_INCR;
   1589        new_size = yy_start_stack_depth * sizeof(int);
   1590 
   1591        if (!yy_start_stack)
   1592            yy_start_stack = (int *)yy_flex_alloc(new_size);
   1593 
   1594        else
   1595            yy_start_stack = (int *)yy_flex_realloc(
   1596                (void *)yy_start_stack, new_size);
   1597 
   1598        if (!yy_start_stack)
   1599            YY_FATAL_ERROR(
   1600                "out of memory expanding start-condition stack");
   1601    }
   1602 
   1603    yy_start_stack[yy_start_stack_ptr++] = YY_START;
   1604 
   1605    BEGIN(new_state);
   1606 }
   1607 #endif
   1608 
   1609 #ifndef YY_NO_POP_STATE
   1610 static void
   1611 yy_pop_state()
   1612 {
   1613    if (--yy_start_stack_ptr < 0)
   1614        YY_FATAL_ERROR("start-condition stack underflow");
   1615 
   1616    BEGIN(yy_start_stack[yy_start_stack_ptr]);
   1617 }
   1618 #endif
   1619 
   1620 #ifndef YY_NO_TOP_STATE
   1621 static int
   1622 yy_top_state()
   1623 {
   1624    return yy_start_stack[yy_start_stack_ptr - 1];
   1625 }
   1626 #endif
   1627 
   1628 #ifndef YY_EXIT_FAILURE
   1629 #define YY_EXIT_FAILURE 2
   1630 #endif
   1631 
   1632 #ifdef YY_USE_PROTOS
   1633 static void
   1634 yy_fatal_error(yyconst char msg[])
   1635 #else
   1636 static void yy_fatal_error(msg) char msg[];
   1637 #endif
   1638 {
   1639    (void)fprintf(stderr, "%s\n", msg);
   1640    exit(YY_EXIT_FAILURE);
   1641 }
   1642 
   1643 /* Redefine yyless() so it works in section 3 code. */
   1644 
   1645 #undef yyless
   1646 #define yyless(n)                                \
   1647    do {                                         \
   1648        /* Undo effects of setting up yytext. */ \
   1649        yytext[yyleng] = yy_hold_char;           \
   1650        yy_c_buf_p = yytext + n;                 \
   1651        yy_hold_char = *yy_c_buf_p;              \
   1652        *yy_c_buf_p = '\0';                      \
   1653        yyleng = n;                              \
   1654    } while (0)
   1655 
   1656 /* Internal utility routines. */
   1657 
   1658 #ifndef yytext_ptr
   1659 #ifdef YY_USE_PROTOS
   1660 static void
   1661 yy_flex_strncpy(char *s1, yyconst char *s2, int n)
   1662 #else
   1663 static void yy_flex_strncpy(s1, s2, n) char *s1;
   1664 yyconst char *s2;
   1665 int n;
   1666 #endif
   1667 {
   1668    register int i;
   1669    for (i = 0; i < n; ++i)
   1670        s1[i] = s2[i];
   1671 }
   1672 #endif
   1673 
   1674 #ifdef YY_NEED_STRLEN
   1675 #ifdef YY_USE_PROTOS
   1676 static int
   1677 yy_flex_strlen(yyconst char *s)
   1678 #else
   1679 static int
   1680 yy_flex_strlen(s)
   1681 yyconst char *s;
   1682 #endif
   1683 {
   1684    register int n;
   1685    for (n = 0; s[n]; ++n)
   1686        ;
   1687 
   1688    return n;
   1689 }
   1690 #endif
   1691 
   1692 #ifdef YY_USE_PROTOS
   1693 static void *
   1694 yy_flex_alloc(yy_size_t size)
   1695 #else
   1696 static void *
   1697 yy_flex_alloc(size)
   1698 yy_size_t size;
   1699 #endif
   1700 {
   1701    return (void *)malloc(size);
   1702 }
   1703 
   1704 #ifdef YY_USE_PROTOS
   1705 static void *
   1706 yy_flex_realloc(void *ptr, yy_size_t size)
   1707 #else
   1708 static void *yy_flex_realloc(ptr, size) void *ptr;
   1709 yy_size_t size;
   1710 #endif
   1711 {
   1712    /* The cast to (char *) in the following accommodates both
   1713     * implementations that use char* generic pointers, and those
   1714     * that use void* generic pointers.  It works with the latter
   1715     * because both ANSI C and C++ allow castless assignment from
   1716     * any pointer type to void*, and deal with argument conversions
   1717     * as though doing an assignment.
   1718     */
   1719    return (void *)realloc((char *)ptr, size);
   1720 }
   1721 
   1722 #ifdef YY_USE_PROTOS
   1723 static void
   1724 yy_flex_free(void *ptr)
   1725 #else
   1726 static void yy_flex_free(ptr) void *ptr;
   1727 #endif
   1728 {
   1729    free(ptr);
   1730 }
   1731 
   1732 #if YY_MAIN
   1733 int
   1734 main()
   1735 {
   1736    yylex();
   1737    return 0;
   1738 }
   1739 #endif
   1740 #line 144 "crlgen_lex_orig.l"
   1741 
   1742 #include "prlock.h"
   1743 
   1744 static PRLock *parserInvocationLock;
   1745 
   1746 void
   1747 CRLGEN_InitCrlGenParserLock()
   1748 {
   1749    parserInvocationLock = PR_NewLock();
   1750 }
   1751 
   1752 void
   1753 CRLGEN_DestroyCrlGenParserLock()
   1754 {
   1755    PR_DestroyLock(parserInvocationLock);
   1756 }
   1757 
   1758 SECStatus
   1759 CRLGEN_StartCrlGen(CRLGENGeneratorData *parserCtlData)
   1760 {
   1761    SECStatus rv;
   1762 
   1763    PR_Lock(parserInvocationLock);
   1764 
   1765    parserStatus = SECSuccess;
   1766    parserData = parserCtlData;
   1767    src = parserCtlData->src;
   1768 
   1769    rv = yylex();
   1770 
   1771    PR_Unlock(parserInvocationLock);
   1772 
   1773    return rv;
   1774 }
   1775 
   1776 int
   1777 yywrap()
   1778 {
   1779    return 1;
   1780 }