Back to index

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