~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/security/nss/cmd/modutil/lex.Pk11Install_yy.c

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

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