~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to modules/ssl/ssl_expr_scan.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

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