]> granicus.if.org Git - apache/blob - modules/ssl/ssl_expr_scan.c
Make the ssl expression parser thread-safe. It now requires bison instead of
[apache] / modules / ssl / ssl_expr_scan.c
1 #line 2 "ssl_expr_scan.c"
2
3 #line 4 "ssl_expr_scan.c"
4
5 #define  YY_INT_ALIGNED short int
6
7 /* A lexical scanner generated by flex */
8
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16
17 /* First, we deal with  platform-specific or compiler-specific issues. */
18
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24
25 /* end standard C headers. */
26
27 /* flex integer type definitions */
28
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37  * if you want the limit (max/min) macros for int types. 
38  */
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
42
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t; 
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
57
58 /* Limits of integral types. */
59 #ifndef INT8_MIN
60 #define INT8_MIN               (-128)
61 #endif
62 #ifndef INT16_MIN
63 #define INT16_MIN              (-32767-1)
64 #endif
65 #ifndef INT32_MIN
66 #define INT32_MIN              (-2147483647-1)
67 #endif
68 #ifndef INT8_MAX
69 #define INT8_MAX               (127)
70 #endif
71 #ifndef INT16_MAX
72 #define INT16_MAX              (32767)
73 #endif
74 #ifndef INT32_MAX
75 #define INT32_MAX              (2147483647)
76 #endif
77 #ifndef UINT8_MAX
78 #define UINT8_MAX              (255U)
79 #endif
80 #ifndef UINT16_MAX
81 #define UINT16_MAX             (65535U)
82 #endif
83 #ifndef UINT32_MAX
84 #define UINT32_MAX             (4294967295U)
85 #endif
86
87 #endif /* ! C99 */
88
89 #endif /* ! FLEXINT_H */
90
91 #ifdef __cplusplus
92
93 /* The "const" storage-class-modifier is valid. */
94 #define YY_USE_CONST
95
96 #else   /* ! __cplusplus */
97
98 /* C99 requires __STDC__ to be defined as 1. */
99 #if defined (__STDC__)
100
101 #define YY_USE_CONST
102
103 #endif  /* defined (__STDC__) */
104 #endif  /* ! __cplusplus */
105
106 #ifdef YY_USE_CONST
107 #define yyconst const
108 #else
109 #define yyconst
110 #endif
111
112 /* Returned upon end-of-file. */
113 #define YY_NULL 0
114
115 /* Promotes a possibly negative, possibly signed char to an unsigned
116  * integer for use as an array index.  If the signed char is negative,
117  * we want to instead treat it as an 8-bit unsigned char, hence the
118  * double cast.
119  */
120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121
122 /* An opaque pointer. */
123 #ifndef YY_TYPEDEF_YY_SCANNER_T
124 #define YY_TYPEDEF_YY_SCANNER_T
125 typedef void* yyscan_t;
126 #endif
127
128 /* For convenience, these vars (plus the bison vars far below)
129    are macros in the reentrant scanner. */
130 #define yyin yyg->yyin_r
131 #define yyout yyg->yyout_r
132 #define yyextra yyg->yyextra_r
133 #define yyleng yyg->yyleng_r
134 #define yytext yyg->yytext_r
135 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
136 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
137 #define yy_flex_debug yyg->yy_flex_debug_r
138
139 /* Enter a start condition.  This macro really ought to take a parameter,
140  * but we do it the disgusting crufty way forced on us by the ()-less
141  * definition of BEGIN.
142  */
143 #define BEGIN yyg->yy_start = 1 + 2 *
144
145 /* Translate the current start state into a value that can be later handed
146  * to BEGIN to return to the state.  The YYSTATE alias is for lex
147  * compatibility.
148  */
149 #define YY_START ((yyg->yy_start - 1) / 2)
150 #define YYSTATE YY_START
151
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE ssl_expr_yyrestart(yyin ,yyscanner )
157
158 #define YY_END_OF_BUFFER_CHAR 0
159
160 /* Size of default input buffer. */
161 #ifndef YY_BUF_SIZE
162 #ifdef __ia64__
163 /* On IA-64, the buffer size is 16k, not 8k.
164  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
165  * Ditto for the __ia64__ case accordingly.
166  */
167 #define YY_BUF_SIZE 32768
168 #else
169 #define YY_BUF_SIZE 16384
170 #endif /* __ia64__ */
171 #endif
172
173 /* The state buf must be large enough to hold one state per character in the main buffer.
174  */
175 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
176
177 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
178 #define YY_TYPEDEF_YY_BUFFER_STATE
179 typedef struct yy_buffer_state *YY_BUFFER_STATE;
180 #endif
181
182 #define EOB_ACT_CONTINUE_SCAN 0
183 #define EOB_ACT_END_OF_FILE 1
184 #define EOB_ACT_LAST_MATCH 2
185
186     #define YY_LESS_LINENO(n)
187     
188 /* Return all but the first "n" matched characters back to the input stream. */
189 #define yyless(n) \
190         do \
191                 { \
192                 /* Undo effects of setting up yytext. */ \
193         int yyless_macro_arg = (n); \
194         YY_LESS_LINENO(yyless_macro_arg);\
195                 *yy_cp = yyg->yy_hold_char; \
196                 YY_RESTORE_YY_MORE_OFFSET \
197                 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
198                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
199                 } \
200         while ( 0 )
201
202 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
203
204 #ifndef YY_TYPEDEF_YY_SIZE_T
205 #define YY_TYPEDEF_YY_SIZE_T
206 typedef size_t yy_size_t;
207 #endif
208
209 #ifndef YY_STRUCT_YY_BUFFER_STATE
210 #define YY_STRUCT_YY_BUFFER_STATE
211 struct yy_buffer_state
212         {
213         FILE *yy_input_file;
214
215         char *yy_ch_buf;                /* input buffer */
216         char *yy_buf_pos;               /* current position in input buffer */
217
218         /* Size of input buffer in bytes, not including room for EOB
219          * characters.
220          */
221         yy_size_t yy_buf_size;
222
223         /* Number of characters read into yy_ch_buf, not including EOB
224          * characters.
225          */
226         int yy_n_chars;
227
228         /* Whether we "own" the buffer - i.e., we know we created it,
229          * and can realloc() it to grow it, and should free() it to
230          * delete it.
231          */
232         int yy_is_our_buffer;
233
234         /* Whether this is an "interactive" input source; if so, and
235          * if we're using stdio for input, then we want to use getc()
236          * instead of fread(), to make sure we stop fetching input after
237          * each newline.
238          */
239         int yy_is_interactive;
240
241         /* Whether we're considered to be at the beginning of a line.
242          * If so, '^' rules will be active on the next match, otherwise
243          * not.
244          */
245         int yy_at_bol;
246
247     int yy_bs_lineno; /**< The line count. */
248     int yy_bs_column; /**< The column count. */
249     
250         /* Whether to try to fill the input buffer when we reach the
251          * end of it.
252          */
253         int yy_fill_buffer;
254
255         int yy_buffer_status;
256
257 #define YY_BUFFER_NEW 0
258 #define YY_BUFFER_NORMAL 1
259         /* When an EOF's been seen but there's still some text to process
260          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
261          * shouldn't try reading from the input source any more.  We might
262          * still have a bunch of tokens to match, though, because of
263          * possible backing-up.
264          *
265          * When we actually see the EOF, we change the status to "new"
266          * (via ssl_expr_yyrestart()), so that the user can continue scanning by
267          * just pointing yyin at a new input file.
268          */
269 #define YY_BUFFER_EOF_PENDING 2
270
271         };
272 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
273
274 /* We provide macros for accessing buffer states in case in the
275  * future we want to put the buffer states in a more general
276  * "scanner state".
277  *
278  * Returns the top of the stack, or NULL.
279  */
280 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
281                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
282                           : NULL)
283
284 /* Same as previous macro, but useful when we know that the buffer stack is not
285  * NULL or when we need an lvalue. For internal use only.
286  */
287 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
288
289 void ssl_expr_yyrestart (FILE *input_file ,yyscan_t yyscanner );
290 void ssl_expr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
291 YY_BUFFER_STATE ssl_expr_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
292 void ssl_expr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
293 void ssl_expr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
294 void ssl_expr_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
295 void ssl_expr_yypop_buffer_state (yyscan_t yyscanner );
296
297 static void ssl_expr_yyensure_buffer_stack (yyscan_t yyscanner );
298 static void ssl_expr_yy_load_buffer_state (yyscan_t yyscanner );
299 static void ssl_expr_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
300
301 #define YY_FLUSH_BUFFER ssl_expr_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
302
303 YY_BUFFER_STATE ssl_expr_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
304 YY_BUFFER_STATE ssl_expr_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
305 YY_BUFFER_STATE ssl_expr_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
306
307 void *ssl_expr_yyalloc (yy_size_t ,yyscan_t yyscanner );
308 void *ssl_expr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
309 void ssl_expr_yyfree (void * ,yyscan_t yyscanner );
310
311 #define yy_new_buffer ssl_expr_yy_create_buffer
312
313 #define yy_set_interactive(is_interactive) \
314         { \
315         if ( ! YY_CURRENT_BUFFER ){ \
316         ssl_expr_yyensure_buffer_stack (yyscanner); \
317                 YY_CURRENT_BUFFER_LVALUE =    \
318             ssl_expr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
319         } \
320         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
321         }
322
323 #define yy_set_bol(at_bol) \
324         { \
325         if ( ! YY_CURRENT_BUFFER ){\
326         ssl_expr_yyensure_buffer_stack (yyscanner); \
327                 YY_CURRENT_BUFFER_LVALUE =    \
328             ssl_expr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
329         } \
330         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
331         }
332
333 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
334
335 /* Begin user sect3 */
336
337 #define ssl_expr_yywrap(n) 1
338 #define YY_SKIP_YYWRAP
339
340 typedef unsigned char YY_CHAR;
341
342 typedef int yy_state_type;
343
344 #define yytext_ptr yytext_r
345
346 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
347 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
348 static int yy_get_next_buffer (yyscan_t yyscanner );
349 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
350
351 /* Done after the current pattern has been matched and before the
352  * corresponding action - sets up yytext.
353  */
354 #define YY_DO_BEFORE_ACTION \
355         yyg->yytext_ptr = yy_bp; \
356         yyleng = (size_t) (yy_cp - yy_bp); \
357         yyg->yy_hold_char = *yy_cp; \
358         *yy_cp = '\0'; \
359         yyg->yy_c_buf_p = yy_cp;
360
361 #define YY_NUM_RULES 47
362 #define YY_END_OF_BUFFER 48
363 /* This struct is not used in this scanner,
364    but its presence is necessary. */
365 struct yy_trans_info
366         {
367         flex_int32_t yy_verify;
368         flex_int32_t yy_nxt;
369         };
370 static yyconst flex_int16_t yy_accept[97] =
371     {   0,
372         0,    0,    0,    0,    0,    0,    0,    0,   48,   46,
373         1,   38,    2,   46,   44,   24,   46,   28,   45,   45,
374        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
375        46,   13,    4,    3,   14,   16,   18,   17,    1,   22,
376        32,   34,   44,   26,   20,   31,   30,   45,   45,   45,
377        19,   45,   45,   29,   27,   39,   25,   23,   15,   15,
378        21,   45,   35,   45,   36,   13,   12,    5,    6,   10,
379        11,    7,    8,    9,   45,   33,   45,   45,   37,   45,
380         5,    6,   45,   45,   41,   42,    5,   45,   43,   45,
381        45,   45,   45,   45,   40,    0
382
383     } ;
384
385 static yyconst flex_int32_t yy_ec[256] =
386     {   0,
387         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
388         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
389         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
390         1,    2,    4,    5,    1,    1,    1,    6,    1,    1,
391         1,    1,    1,    1,    7,    1,    1,    8,    8,    8,
392         8,    8,    8,    8,    8,    9,    9,    7,    1,   10,
393        11,   12,    1,    1,   13,   13,   13,   13,   14,   13,
394        13,   13,   15,   13,   13,   16,   13,   13,   13,   17,
395        13,   18,   19,   20,   13,   13,   13,   21,   13,   13,
396         1,   22,    1,    1,    7,    1,   23,   24,   13,   25,
397
398        26,   27,   28,   13,   29,   13,   13,   30,   31,   32,
399        33,   17,   34,   35,   36,   37,   38,   13,   13,   21,
400        13,   13,    1,   39,    1,   40,    1,    1,    1,    1,
401         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
402         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
403         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
404         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
405         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
406         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
407         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
408
409         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
410         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
411         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
412         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
413         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
414         1,    1,    1,    1,    1
415     } ;
416
417 static yyconst flex_int32_t yy_meta[41] =
418     {   0,
419         1,    1,    2,    1,    3,    1,    4,    4,    4,    1,
420         1,    1,    4,    4,    4,    4,    4,    4,    4,    4,
421         4,    3,    4,    4,    4,    4,    4,    4,    4,    4,
422         4,    4,    4,    4,    4,    4,    4,    4,    1,    1
423     } ;
424
425 static yyconst flex_int16_t yy_base[104] =
426     {   0,
427         0,    0,   38,   39,    0,    0,  101,  100,  128,  174,
428        43,   36,  174,  121,   40,  115,   39,  114,    0,   37,
429        92,   89,   29,   27,   90,   28,   79,   29,   82,   81,
430        76,    0,  174,  174,  112,  174,  174,  174,   54,  174,
431       174,  174,   58,  174,  174,  174,  174,    0,   45,   87,
432         0,   81,   80,    0,    0,    0,    0,    0,  174,    0,
433         0,   71,    0,   69,  174,    0,  174,   60,   64,  174,
434       174,  174,  174,  174,   52,    0,   70,   79,    0,   78,
435        66,   69,   68,   74,    0,    0,   84,   78,    0,   66,
436        72,   80,   77,   77,    0,  174,  149,  153,  157,   94,
437
438       161,  165,  169
439     } ;
440
441 static yyconst flex_int16_t yy_def[104] =
442     {   0,
443        96,    1,   97,   97,   98,   98,   99,   99,   96,   96,
444        96,   96,   96,   96,   96,   96,   96,   96,  100,  100,
445       100,  100,  100,  100,  100,  100,  101,  100,  100,  100,
446        96,  102,   96,   96,  103,   96,   96,   96,   96,   96,
447        96,   96,   96,   96,   96,   96,   96,  100,  100,  100,
448       100,  100,  100,  100,  100,  100,  100,  100,   96,  100,
449       100,  100,  100,  100,   96,  102,   96,   96,   96,   96,
450        96,   96,   96,   96,  100,  100,  100,  100,  100,  100,
451        96,   96,  100,  100,  100,  100,   96,  100,  100,  100,
452       100,  100,  100,  100,  100,    0,   96,   96,   96,   96,
453
454        96,   96,   96
455     } ;
456
457 static yyconst flex_int16_t yy_nxt[215] =
458     {   0,
459        10,   11,   11,   12,   13,   14,   10,   15,   15,   16,
460        17,   18,   19,   19,   19,   19,   20,   19,   19,   19,
461        19,   10,   21,   19,   19,   22,   23,   24,   25,   26,
462        27,   28,   29,   19,   19,   19,   30,   19,   31,   10,
463        33,   33,   34,   34,   39,   39,   40,   43,   43,   45,
464        49,   52,   54,   57,   61,   39,   39,   53,   75,   35,
465        35,   62,   49,   55,   58,   43,   43,   81,   82,   83,
466        75,   82,   82,   87,   82,   41,   82,   82,   46,   59,
467        59,   88,   59,   59,   59,   91,   83,   92,   59,   59,
468        59,   82,   82,   88,   93,   94,   95,   48,   90,   89,
469
470        59,   92,   91,   86,   85,   84,   80,   79,   93,   78,
471        77,   76,   94,   95,   65,   64,   63,   59,   59,   68,
472        69,   56,   51,   50,   47,   44,   42,   96,   38,   38,
473        96,   96,   96,   96,   96,   70,   96,   96,   71,   96,
474        96,   96,   96,   72,   96,   96,   73,   96,   74,   32,
475        32,   32,   32,   36,   36,   36,   36,   37,   37,   37,
476        37,   60,   96,   60,   60,   66,   96,   96,   66,   67,
477        67,   67,   67,    9,   96,   96,   96,   96,   96,   96,
478        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
479        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
480
481        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
482        96,   96,   96,   96
483     } ;
484
485 static yyconst flex_int16_t yy_chk[215] =
486     {   0,
487         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
488         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
489         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
490         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
491         3,    4,    3,    4,   11,   11,   12,   15,   15,   17,
492        20,   23,   24,   26,   28,   39,   39,   23,   49,    3,
493         4,   28,   20,   24,   26,   43,   43,   68,   68,   75,
494        49,   69,   69,   81,   81,   12,   82,   82,   17,   27,
495        27,   83,   27,   27,   27,   90,   75,   91,   27,   27,
496        27,   87,   87,   83,   92,   93,   94,  100,   88,   84,
497
498        27,   91,   90,   80,   78,   77,   64,   62,   92,   53,
499        52,   50,   93,   94,   31,   30,   29,   27,   27,   35,
500        35,   25,   22,   21,   18,   16,   14,    9,    8,    7,
501         0,    0,    0,    0,    0,   35,    0,    0,   35,    0,
502         0,    0,    0,   35,    0,    0,   35,    0,   35,   97,
503        97,   97,   97,   98,   98,   98,   98,   99,   99,   99,
504        99,  101,    0,  101,  101,  102,    0,    0,  102,  103,
505       103,  103,  103,   96,   96,   96,   96,   96,   96,   96,
506        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
507        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
508
509        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
510        96,   96,   96,   96
511     } ;
512
513 /* The intent behind this definition is that it'll catch
514  * any uses of REJECT which flex missed.
515  */
516 #define REJECT reject_used_but_not_detected
517 #define yymore() yymore_used_but_not_detected
518 #define YY_MORE_ADJ 0
519 #define YY_RESTORE_YY_MORE_OFFSET
520 #line 1 "ssl_expr_scan.l"
521 /* Licensed to the Apache Software Foundation (ASF) under one or more
522  * contributor license agreements.  See the NOTICE file distributed with
523  * this work for additional information regarding copyright ownership.
524  * The ASF licenses this file to You under the Apache License, Version 2.0
525  * (the "License"); you may not use this file except in compliance with
526  * the License.  You may obtain a copy of the License at
527  *
528  *     http://www.apache.org/licenses/LICENSE-2.0
529  *
530  * Unless required by applicable law or agreed to in writing, software
531  * distributed under the License is distributed on an "AS IS" BASIS,
532  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
533  * See the License for the specific language governing permissions and
534  * limitations under the License.
535  */
536 /*                      _             _ 
537  *  _ __ ___   ___   __| |    ___ ___| |  
538  * | '_ ` _ \ / _ \ / _` |   / __/ __| |  
539  * | | | | | | (_) | (_| |   \__ \__ \ | mod_ssl - Apache Interface to OpenSSL
540  * |_| |_| |_|\___/ \__,_|___|___/___/_| http://www.modssl.org/
541  *                      |_____|         
542  *  ssl_expr_scan.l
543  *  Expression Scanner
544  */
545 /* ``Killing for peace is 
546 like fucking for virginity.''
547 -- Unknown  */
548 /*  _________________________________________________________________
549 **
550 **  Expression Scanner
551 **  _________________________________________________________________
552 */
553 #define YY_NO_INPUT 1
554
555
556 #line 49 "ssl_expr_scan.l"
557 #include "ssl_private.h"
558
559 #include "ssl_expr_parse.h"
560 #include "ssl_expr.h"
561
562 #undef  YY_INPUT
563 #define YY_INPUT(buf,result,max_size)                       \
564 {                                                           \
565     if ((result = MIN(max_size, yyextra->inputbuf           \
566                               + yyextra->inputlen           \
567                               - yyextra->inputptr)) <= 0)   \
568     {                                                       \
569         result = YY_NULL;                                   \
570     }                                                       \
571     else {                                                  \
572         memcpy(buf, yyextra->inputptr, result);             \
573         yyextra->inputptr += result;                        \
574     }                                                       \
575 }
576
577 #define MAX_STR_LEN 2048
578 #define YY_EXTRA_TYPE ssl_expr_info_type*
579 #line 580 "ssl_expr_scan.c"
580
581 #define INITIAL 0
582 #define str 1
583 #define regex 2
584 #define regex_flags 3
585
586 #ifndef YY_NO_UNISTD_H
587 /* Special case for "unistd.h", since it is non-ANSI. We include it way
588  * down here because we want the user's section 1 to have been scanned first.
589  * The user has a chance to override it with an option.
590  */
591 #include <unistd.h>
592 #endif
593
594 #ifndef YY_EXTRA_TYPE
595 #define YY_EXTRA_TYPE void *
596 #endif
597
598 /* Holds the entire state of the reentrant scanner. */
599 struct yyguts_t
600     {
601
602     /* User-defined. Not touched by flex. */
603     YY_EXTRA_TYPE yyextra_r;
604
605     /* The rest are the same as the globals declared in the non-reentrant scanner. */
606     FILE *yyin_r, *yyout_r;
607     size_t yy_buffer_stack_top; /**< index of top of stack. */
608     size_t yy_buffer_stack_max; /**< capacity of stack. */
609     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
610     char yy_hold_char;
611     int yy_n_chars;
612     int yyleng_r;
613     char *yy_c_buf_p;
614     int yy_init;
615     int yy_start;
616     int yy_did_buffer_switch_on_eof;
617     int yy_start_stack_ptr;
618     int yy_start_stack_depth;
619     int *yy_start_stack;
620     yy_state_type yy_last_accepting_state;
621     char* yy_last_accepting_cpos;
622
623     int yylineno_r;
624     int yy_flex_debug_r;
625
626     char *yytext_r;
627     int yy_more_flag;
628     int yy_more_len;
629
630     YYSTYPE * yylval_r;
631
632     }; /* end struct yyguts_t */
633
634 static int yy_init_globals (yyscan_t yyscanner );
635
636     /* This must go here because YYSTYPE and YYLTYPE are included
637      * from bison output in section 1.*/
638     #    define yylval yyg->yylval_r
639     
640 int ssl_expr_yylex_init (yyscan_t* scanner);
641
642 int ssl_expr_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
643
644 /* Accessor methods to globals.
645    These are made visible to non-reentrant scanners for convenience. */
646
647 int ssl_expr_yylex_destroy (yyscan_t yyscanner );
648
649 int ssl_expr_yyget_debug (yyscan_t yyscanner );
650
651 void ssl_expr_yyset_debug (int debug_flag ,yyscan_t yyscanner );
652
653 YY_EXTRA_TYPE ssl_expr_yyget_extra (yyscan_t yyscanner );
654
655 void ssl_expr_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
656
657 FILE *ssl_expr_yyget_in (yyscan_t yyscanner );
658
659 void ssl_expr_yyset_in  (FILE * in_str ,yyscan_t yyscanner );
660
661 FILE *ssl_expr_yyget_out (yyscan_t yyscanner );
662
663 void ssl_expr_yyset_out  (FILE * out_str ,yyscan_t yyscanner );
664
665 int ssl_expr_yyget_leng (yyscan_t yyscanner );
666
667 char *ssl_expr_yyget_text (yyscan_t yyscanner );
668
669 int ssl_expr_yyget_lineno (yyscan_t yyscanner );
670
671 void ssl_expr_yyset_lineno (int line_number ,yyscan_t yyscanner );
672
673 YYSTYPE * ssl_expr_yyget_lval (yyscan_t yyscanner );
674
675 void ssl_expr_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
676
677 /* Macros after this point can all be overridden by user definitions in
678  * section 1.
679  */
680
681 #ifndef YY_SKIP_YYWRAP
682 #ifdef __cplusplus
683 extern "C" int ssl_expr_yywrap (yyscan_t yyscanner );
684 #else
685 extern int ssl_expr_yywrap (yyscan_t yyscanner );
686 #endif
687 #endif
688
689 #ifndef yytext_ptr
690 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
691 #endif
692
693 #ifdef YY_NEED_STRLEN
694 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
695 #endif
696
697 #ifndef YY_NO_INPUT
698
699 #ifdef __cplusplus
700 static int yyinput (yyscan_t yyscanner );
701 #else
702 static int input (yyscan_t yyscanner );
703 #endif
704
705 #endif
706
707 /* Amount of stuff to slurp up with each read. */
708 #ifndef YY_READ_BUF_SIZE
709 #ifdef __ia64__
710 /* On IA-64, the buffer size is 16k, not 8k */
711 #define YY_READ_BUF_SIZE 16384
712 #else
713 #define YY_READ_BUF_SIZE 8192
714 #endif /* __ia64__ */
715 #endif
716
717 /* Copy whatever the last rule matched to the standard output. */
718 #ifndef ECHO
719 /* This used to be an fputs(), but since the string might contain NUL's,
720  * we now use fwrite().
721  */
722 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
723 #endif
724
725 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
726  * is returned in "result".
727  */
728 #ifndef YY_INPUT
729 #define YY_INPUT(buf,result,max_size) \
730         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
731                 { \
732                 int c = '*'; \
733                 size_t n; \
734                 for ( n = 0; n < max_size && \
735                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
736                         buf[n] = (char) c; \
737                 if ( c == '\n' ) \
738                         buf[n++] = (char) c; \
739                 if ( c == EOF && ferror( yyin ) ) \
740                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
741                 result = n; \
742                 } \
743         else \
744                 { \
745                 errno=0; \
746                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
747                         { \
748                         if( errno != EINTR) \
749                                 { \
750                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
751                                 break; \
752                                 } \
753                         errno=0; \
754                         clearerr(yyin); \
755                         } \
756                 }\
757 \
758
759 #endif
760
761 /* No semi-colon after return; correct usage is to write "yyterminate();" -
762  * we don't want an extra ';' after the "return" because that will cause
763  * some compilers to complain about unreachable statements.
764  */
765 #ifndef yyterminate
766 #define yyterminate() return YY_NULL
767 #endif
768
769 /* Number of entries by which start-condition stack grows. */
770 #ifndef YY_START_STACK_INCR
771 #define YY_START_STACK_INCR 25
772 #endif
773
774 /* Report a fatal error. */
775 #ifndef YY_FATAL_ERROR
776 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
777 #endif
778
779 /* end tables serialization structures and prototypes */
780
781 /* Default declaration of generated scanner - a define so the user can
782  * easily add parameters.
783  */
784 #ifndef YY_DECL
785 #define YY_DECL_IS_OURS 1
786
787 extern int ssl_expr_yylex \
788                (YYSTYPE * yylval_param ,yyscan_t yyscanner);
789
790 #define YY_DECL int ssl_expr_yylex \
791                (YYSTYPE * yylval_param , yyscan_t yyscanner)
792 #endif /* !YY_DECL */
793
794 /* Code executed at the beginning of each rule, after yytext and yyleng
795  * have been set up.
796  */
797 #ifndef YY_USER_ACTION
798 #define YY_USER_ACTION
799 #endif
800
801 /* Code executed at the end of each rule. */
802 #ifndef YY_BREAK
803 #define YY_BREAK break;
804 #endif
805
806 #define YY_RULE_SETUP \
807         YY_USER_ACTION
808
809 /** The main scanner function which does all the work.
810  */
811 YY_DECL
812 {
813         register yy_state_type yy_current_state;
814         register char *yy_cp, *yy_bp;
815         register int yy_act;
816     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
817
818 #line 74 "ssl_expr_scan.l"
819
820   
821   char  caStr[MAX_STR_LEN];
822   char *cpStr = NULL;
823   char  caRegex[MAX_STR_LEN];
824   char *cpRegex = NULL;
825   char  cRegexDel = NUL;
826
827  /*
828   * Whitespaces
829   */
830 #line 831 "ssl_expr_scan.c"
831
832     yylval = yylval_param;
833
834         if ( !yyg->yy_init )
835                 {
836                 yyg->yy_init = 1;
837
838 #ifdef YY_USER_INIT
839                 YY_USER_INIT;
840 #endif
841
842                 if ( ! yyg->yy_start )
843                         yyg->yy_start = 1;      /* first start state */
844
845                 if ( ! yyin )
846                         yyin = stdin;
847
848                 if ( ! yyout )
849                         yyout = stdout;
850
851                 if ( ! YY_CURRENT_BUFFER ) {
852                         ssl_expr_yyensure_buffer_stack (yyscanner);
853                         YY_CURRENT_BUFFER_LVALUE =
854                                 ssl_expr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
855                 }
856
857                 ssl_expr_yy_load_buffer_state(yyscanner );
858                 }
859
860         while ( 1 )             /* loops until end-of-file is reached */
861                 {
862                 yy_cp = yyg->yy_c_buf_p;
863
864                 /* Support of yytext. */
865                 *yy_cp = yyg->yy_hold_char;
866
867                 /* yy_bp points to the position in yy_ch_buf of the start of
868                  * the current run.
869                  */
870                 yy_bp = yy_cp;
871
872                 yy_current_state = yyg->yy_start;
873 yy_match:
874                 do
875                         {
876                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
877                         if ( yy_accept[yy_current_state] )
878                                 {
879                                 yyg->yy_last_accepting_state = yy_current_state;
880                                 yyg->yy_last_accepting_cpos = yy_cp;
881                                 }
882                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
883                                 {
884                                 yy_current_state = (int) yy_def[yy_current_state];
885                                 if ( yy_current_state >= 97 )
886                                         yy_c = yy_meta[(unsigned int) yy_c];
887                                 }
888                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
889                         ++yy_cp;
890                         }
891                 while ( yy_current_state != 96 );
892                 yy_cp = yyg->yy_last_accepting_cpos;
893                 yy_current_state = yyg->yy_last_accepting_state;
894
895 yy_find_action:
896                 yy_act = yy_accept[yy_current_state];
897
898                 YY_DO_BEFORE_ACTION;
899
900 do_action:      /* This label is used only to access EOF actions. */
901
902                 switch ( yy_act )
903         { /* beginning of action switch */
904                         case 0: /* must back up */
905                         /* undo the effects of YY_DO_BEFORE_ACTION */
906                         *yy_cp = yyg->yy_hold_char;
907                         yy_cp = yyg->yy_last_accepting_cpos;
908                         yy_current_state = yyg->yy_last_accepting_state;
909                         goto yy_find_action;
910
911 case 1:
912 /* rule 1 can match eol */
913 YY_RULE_SETUP
914 #line 85 "ssl_expr_scan.l"
915
916     /* NOP */
917 }
918         YY_BREAK
919 /*
920   * C-style strings ("...")
921   */
922 case 2:
923 YY_RULE_SETUP
924 #line 92 "ssl_expr_scan.l"
925 {
926     cpStr = caStr;
927     BEGIN(str);
928 }
929         YY_BREAK
930 case 3:
931 YY_RULE_SETUP
932 #line 96 "ssl_expr_scan.l"
933 {
934     BEGIN(INITIAL);
935     *cpStr = NUL;
936     yylval->cpVal = apr_pstrdup(yyextra->pool, caStr);
937     return T_STRING;
938 }
939         YY_BREAK
940 case 4:
941 /* rule 4 can match eol */
942 YY_RULE_SETUP
943 #line 102 "ssl_expr_scan.l"
944 {
945     ssl_expr_yyerror(yyextra, "Unterminated string");
946 }
947         YY_BREAK
948 case 5:
949 YY_RULE_SETUP
950 #line 105 "ssl_expr_scan.l"
951 {
952     int result;
953
954     (void)sscanf(yytext+1, "%o", &result);
955     if (result > 0xff)
956         ssl_expr_yyerror(yyextra, "Escape sequence out of bound");
957     else
958         *cpStr++ = result;
959 }
960         YY_BREAK
961 case 6:
962 YY_RULE_SETUP
963 #line 114 "ssl_expr_scan.l"
964 {
965     ssl_expr_yyerror(yyextra, "Bad escape sequence");
966 }
967         YY_BREAK
968 case 7:
969 YY_RULE_SETUP
970 #line 117 "ssl_expr_scan.l"
971 { *cpStr++ = '\n'; }
972         YY_BREAK
973 case 8:
974 YY_RULE_SETUP
975 #line 118 "ssl_expr_scan.l"
976 { *cpStr++ = '\r'; }
977         YY_BREAK
978 case 9:
979 YY_RULE_SETUP
980 #line 119 "ssl_expr_scan.l"
981 { *cpStr++ = '\t'; }
982         YY_BREAK
983 case 10:
984 YY_RULE_SETUP
985 #line 120 "ssl_expr_scan.l"
986 { *cpStr++ = '\b'; }
987         YY_BREAK
988 case 11:
989 YY_RULE_SETUP
990 #line 121 "ssl_expr_scan.l"
991 { *cpStr++ = '\f'; }
992         YY_BREAK
993 case 12:
994 /* rule 12 can match eol */
995 YY_RULE_SETUP
996 #line 122 "ssl_expr_scan.l"
997 {
998     *cpStr++ = yytext[1];
999 }
1000         YY_BREAK
1001 case 13:
1002 YY_RULE_SETUP
1003 #line 125 "ssl_expr_scan.l"
1004 {
1005     char *cp = yytext;
1006     while (*cp != NUL)
1007         *cpStr++ = *cp++;
1008 }
1009         YY_BREAK
1010 case 14:
1011 YY_RULE_SETUP
1012 #line 130 "ssl_expr_scan.l"
1013 {
1014     *cpStr++ = yytext[1];
1015 }
1016         YY_BREAK
1017 /*
1018   * Regular Expression
1019   */
1020 case 15:
1021 YY_RULE_SETUP
1022 #line 137 "ssl_expr_scan.l"
1023 {
1024     cRegexDel = yytext[1];
1025     cpRegex = caRegex;
1026     BEGIN(regex);
1027 }
1028         YY_BREAK
1029 case 16:
1030 /* rule 16 can match eol */
1031 YY_RULE_SETUP
1032 #line 142 "ssl_expr_scan.l"
1033 {
1034     if (yytext[0] == cRegexDel) {
1035         *cpRegex = NUL;
1036         BEGIN(regex_flags);
1037     }
1038     else {
1039         *cpRegex++ = yytext[0];
1040     }
1041 }
1042         YY_BREAK
1043 case 17:
1044 YY_RULE_SETUP
1045 #line 151 "ssl_expr_scan.l"
1046 {
1047     yylval->cpVal = apr_pstrdup(yyextra->pool, caRegex);
1048     BEGIN(INITIAL);
1049     return T_REGEX_I;
1050 }
1051         YY_BREAK
1052 case 18:
1053 /* rule 18 can match eol */
1054 YY_RULE_SETUP
1055 #line 156 "ssl_expr_scan.l"
1056 {
1057     yylval->cpVal = apr_pstrdup(yyextra->pool, caRegex);
1058     yyless(0);
1059     BEGIN(INITIAL);
1060     return T_REGEX;
1061 }
1062         YY_BREAK
1063 case YY_STATE_EOF(regex_flags):
1064 #line 162 "ssl_expr_scan.l"
1065 {
1066     yylval->cpVal = apr_pstrdup(yyextra->pool, caRegex);
1067     BEGIN(INITIAL);
1068     return T_REGEX;
1069 }
1070         YY_BREAK
1071 /*
1072   * Operators
1073   */
1074 case 19:
1075 YY_RULE_SETUP
1076 #line 171 "ssl_expr_scan.l"
1077 { return T_OP_EQ; }
1078         YY_BREAK
1079 case 20:
1080 YY_RULE_SETUP
1081 #line 172 "ssl_expr_scan.l"
1082 { return T_OP_EQ; }
1083         YY_BREAK
1084 case 21:
1085 YY_RULE_SETUP
1086 #line 173 "ssl_expr_scan.l"
1087 { return T_OP_NE; }
1088         YY_BREAK
1089 case 22:
1090 YY_RULE_SETUP
1091 #line 174 "ssl_expr_scan.l"
1092 { return T_OP_NE; }
1093         YY_BREAK
1094 case 23:
1095 YY_RULE_SETUP
1096 #line 175 "ssl_expr_scan.l"
1097 { return T_OP_LT; }
1098         YY_BREAK
1099 case 24:
1100 YY_RULE_SETUP
1101 #line 176 "ssl_expr_scan.l"
1102 { return T_OP_LT; }
1103         YY_BREAK
1104 case 25:
1105 YY_RULE_SETUP
1106 #line 177 "ssl_expr_scan.l"
1107 { return T_OP_LE; }
1108         YY_BREAK
1109 case 26:
1110 YY_RULE_SETUP
1111 #line 178 "ssl_expr_scan.l"
1112 { return T_OP_LE; }
1113         YY_BREAK
1114 case 27:
1115 YY_RULE_SETUP
1116 #line 179 "ssl_expr_scan.l"
1117 { return T_OP_GT; }
1118         YY_BREAK
1119 case 28:
1120 YY_RULE_SETUP
1121 #line 180 "ssl_expr_scan.l"
1122 { return T_OP_GT; }
1123         YY_BREAK
1124 case 29:
1125 YY_RULE_SETUP
1126 #line 181 "ssl_expr_scan.l"
1127 { return T_OP_GE; }
1128         YY_BREAK
1129 case 30:
1130 YY_RULE_SETUP
1131 #line 182 "ssl_expr_scan.l"
1132 { return T_OP_GE; }
1133         YY_BREAK
1134 case 31:
1135 YY_RULE_SETUP
1136 #line 183 "ssl_expr_scan.l"
1137 { return T_OP_REG; }
1138         YY_BREAK
1139 case 32:
1140 YY_RULE_SETUP
1141 #line 184 "ssl_expr_scan.l"
1142 { return T_OP_NRE; }
1143         YY_BREAK
1144 case 33:
1145 YY_RULE_SETUP
1146 #line 185 "ssl_expr_scan.l"
1147 { return T_OP_AND; }
1148         YY_BREAK
1149 case 34:
1150 YY_RULE_SETUP
1151 #line 186 "ssl_expr_scan.l"
1152 { return T_OP_AND; }
1153         YY_BREAK
1154 case 35:
1155 YY_RULE_SETUP
1156 #line 187 "ssl_expr_scan.l"
1157 { return T_OP_OR; }
1158         YY_BREAK
1159 case 36:
1160 YY_RULE_SETUP
1161 #line 188 "ssl_expr_scan.l"
1162 { return T_OP_OR; }
1163         YY_BREAK
1164 case 37:
1165 YY_RULE_SETUP
1166 #line 189 "ssl_expr_scan.l"
1167 { return T_OP_NOT; }
1168         YY_BREAK
1169 case 38:
1170 YY_RULE_SETUP
1171 #line 190 "ssl_expr_scan.l"
1172 { return T_OP_NOT; }
1173         YY_BREAK
1174 case 39:
1175 YY_RULE_SETUP
1176 #line 191 "ssl_expr_scan.l"
1177 { return T_OP_IN; }
1178         YY_BREAK
1179 case 40:
1180 YY_RULE_SETUP
1181 #line 192 "ssl_expr_scan.l"
1182 { return T_OP_PEEREXTLIST; }
1183         YY_BREAK
1184 /*
1185   * Functions
1186   */
1187 case 41:
1188 YY_RULE_SETUP
1189 #line 197 "ssl_expr_scan.l"
1190 { return T_FUNC_FILE; }
1191         YY_BREAK
1192 /*
1193   * Specials
1194   */
1195 case 42:
1196 YY_RULE_SETUP
1197 #line 202 "ssl_expr_scan.l"
1198 { return T_TRUE; }
1199         YY_BREAK
1200 case 43:
1201 YY_RULE_SETUP
1202 #line 203 "ssl_expr_scan.l"
1203 { return T_FALSE; }
1204         YY_BREAK
1205 /*
1206   * Digits
1207   */
1208 case 44:
1209 YY_RULE_SETUP
1210 #line 208 "ssl_expr_scan.l"
1211 {
1212     yylval->cpVal = apr_pstrdup(yyextra->pool, yytext);
1213     return T_DIGIT;
1214 }
1215         YY_BREAK
1216 /*
1217   * Identifiers
1218   */
1219 case 45:
1220 YY_RULE_SETUP
1221 #line 216 "ssl_expr_scan.l"
1222 {
1223     yylval->cpVal = apr_pstrdup(yyextra->pool, yytext);
1224     return T_ID;
1225 }
1226         YY_BREAK
1227 /*
1228   * Anything else is returned as is...
1229   */
1230 case 46:
1231 /* rule 46 can match eol */
1232 YY_RULE_SETUP
1233 #line 224 "ssl_expr_scan.l"
1234
1235     return yytext[0];
1236 }
1237         YY_BREAK
1238 case 47:
1239 YY_RULE_SETUP
1240 #line 228 "ssl_expr_scan.l"
1241 YY_FATAL_ERROR( "flex scanner jammed" );
1242         YY_BREAK
1243 #line 1244 "ssl_expr_scan.c"
1244 case YY_STATE_EOF(INITIAL):
1245 case YY_STATE_EOF(str):
1246 case YY_STATE_EOF(regex):
1247         yyterminate();
1248
1249         case YY_END_OF_BUFFER:
1250                 {
1251                 /* Amount of text matched not including the EOB char. */
1252                 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1253
1254                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1255                 *yy_cp = yyg->yy_hold_char;
1256                 YY_RESTORE_YY_MORE_OFFSET
1257
1258                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1259                         {
1260                         /* We're scanning a new file or input source.  It's
1261                          * possible that this happened because the user
1262                          * just pointed yyin at a new source and called
1263                          * ssl_expr_yylex().  If so, then we have to assure
1264                          * consistency between YY_CURRENT_BUFFER and our
1265                          * globals.  Here is the right place to do so, because
1266                          * this is the first action (other than possibly a
1267                          * back-up) that will match for the new input source.
1268                          */
1269                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1270                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1271                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1272                         }
1273
1274                 /* Note that here we test for yy_c_buf_p "<=" to the position
1275                  * of the first EOB in the buffer, since yy_c_buf_p will
1276                  * already have been incremented past the NUL character
1277                  * (since all states make transitions on EOB to the
1278                  * end-of-buffer state).  Contrast this with the test
1279                  * in input().
1280                  */
1281                 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1282                         { /* This was really a NUL. */
1283                         yy_state_type yy_next_state;
1284
1285                         yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1286
1287                         yy_current_state = yy_get_previous_state( yyscanner );
1288
1289                         /* Okay, we're now positioned to make the NUL
1290                          * transition.  We couldn't have
1291                          * yy_get_previous_state() go ahead and do it
1292                          * for us because it doesn't know how to deal
1293                          * with the possibility of jamming (and we don't
1294                          * want to build jamming into it because then it
1295                          * will run more slowly).
1296                          */
1297
1298                         yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1299
1300                         yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1301
1302                         if ( yy_next_state )
1303                                 {
1304                                 /* Consume the NUL. */
1305                                 yy_cp = ++yyg->yy_c_buf_p;
1306                                 yy_current_state = yy_next_state;
1307                                 goto yy_match;
1308                                 }
1309
1310                         else
1311                                 {
1312                                 yy_cp = yyg->yy_last_accepting_cpos;
1313                                 yy_current_state = yyg->yy_last_accepting_state;
1314                                 goto yy_find_action;
1315                                 }
1316                         }
1317
1318                 else switch ( yy_get_next_buffer( yyscanner ) )
1319                         {
1320                         case EOB_ACT_END_OF_FILE:
1321                                 {
1322                                 yyg->yy_did_buffer_switch_on_eof = 0;
1323
1324                                 if ( ssl_expr_yywrap(yyscanner ) )
1325                                         {
1326                                         /* Note: because we've taken care in
1327                                          * yy_get_next_buffer() to have set up
1328                                          * yytext, we can now set up
1329                                          * yy_c_buf_p so that if some total
1330                                          * hoser (like flex itself) wants to
1331                                          * call the scanner after we return the
1332                                          * YY_NULL, it'll still work - another
1333                                          * YY_NULL will get returned.
1334                                          */
1335                                         yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1336
1337                                         yy_act = YY_STATE_EOF(YY_START);
1338                                         goto do_action;
1339                                         }
1340
1341                                 else
1342                                         {
1343                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
1344                                                 YY_NEW_FILE;
1345                                         }
1346                                 break;
1347                                 }
1348
1349                         case EOB_ACT_CONTINUE_SCAN:
1350                                 yyg->yy_c_buf_p =
1351                                         yyg->yytext_ptr + yy_amount_of_matched_text;
1352
1353                                 yy_current_state = yy_get_previous_state( yyscanner );
1354
1355                                 yy_cp = yyg->yy_c_buf_p;
1356                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1357                                 goto yy_match;
1358
1359                         case EOB_ACT_LAST_MATCH:
1360                                 yyg->yy_c_buf_p =
1361                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1362
1363                                 yy_current_state = yy_get_previous_state( yyscanner );
1364
1365                                 yy_cp = yyg->yy_c_buf_p;
1366                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1367                                 goto yy_find_action;
1368                         }
1369                 break;
1370                 }
1371
1372         default:
1373                 YY_FATAL_ERROR(
1374                         "fatal flex scanner internal error--no action found" );
1375         } /* end of action switch */
1376                 } /* end of scanning one token */
1377 } /* end of ssl_expr_yylex */
1378
1379 /* yy_get_next_buffer - try to read in a new buffer
1380  *
1381  * Returns a code representing an action:
1382  *      EOB_ACT_LAST_MATCH -
1383  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1384  *      EOB_ACT_END_OF_FILE - end of file
1385  */
1386 static int yy_get_next_buffer (yyscan_t yyscanner)
1387 {
1388     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1389         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1390         register char *source = yyg->yytext_ptr;
1391         register int number_to_move, i;
1392         int ret_val;
1393
1394         if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1395                 YY_FATAL_ERROR(
1396                 "fatal flex scanner internal error--end of buffer missed" );
1397
1398         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1399                 { /* Don't try to fill the buffer, so this is an EOF. */
1400                 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1401                         {
1402                         /* We matched a single character, the EOB, so
1403                          * treat this as a final EOF.
1404                          */
1405                         return EOB_ACT_END_OF_FILE;
1406                         }
1407
1408                 else
1409                         {
1410                         /* We matched some text prior to the EOB, first
1411                          * process it.
1412                          */
1413                         return EOB_ACT_LAST_MATCH;
1414                         }
1415                 }
1416
1417         /* Try to read more data. */
1418
1419         /* First move last chars to start of buffer. */
1420         number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1421
1422         for ( i = 0; i < number_to_move; ++i )
1423                 *(dest++) = *(source++);
1424
1425         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1426                 /* don't do the read, it's not guaranteed to return an EOF,
1427                  * just force an EOF
1428                  */
1429                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1430
1431         else
1432                 {
1433                         int num_to_read =
1434                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1435
1436                 while ( num_to_read <= 0 )
1437                         { /* Not enough room in the buffer - grow it. */
1438
1439                         /* just a shorter name for the current buffer */
1440                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1441
1442                         int yy_c_buf_p_offset =
1443                                 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1444
1445                         if ( b->yy_is_our_buffer )
1446                                 {
1447                                 int new_size = b->yy_buf_size * 2;
1448
1449                                 if ( new_size <= 0 )
1450                                         b->yy_buf_size += b->yy_buf_size / 8;
1451                                 else
1452                                         b->yy_buf_size *= 2;
1453
1454                                 b->yy_ch_buf = (char *)
1455                                         /* Include room in for 2 EOB chars. */
1456                                         ssl_expr_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1457                                 }
1458                         else
1459                                 /* Can't grow it, we don't own it. */
1460                                 b->yy_ch_buf = 0;
1461
1462                         if ( ! b->yy_ch_buf )
1463                                 YY_FATAL_ERROR(
1464                                 "fatal error - scanner input buffer overflow" );
1465
1466                         yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1467
1468                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1469                                                 number_to_move - 1;
1470
1471                         }
1472
1473                 if ( num_to_read > YY_READ_BUF_SIZE )
1474                         num_to_read = YY_READ_BUF_SIZE;
1475
1476                 /* Read in more data. */
1477                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1478                         yyg->yy_n_chars, (size_t) num_to_read );
1479
1480                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1481                 }
1482
1483         if ( yyg->yy_n_chars == 0 )
1484                 {
1485                 if ( number_to_move == YY_MORE_ADJ )
1486                         {
1487                         ret_val = EOB_ACT_END_OF_FILE;
1488                         ssl_expr_yyrestart(yyin  ,yyscanner);
1489                         }
1490
1491                 else
1492                         {
1493                         ret_val = EOB_ACT_LAST_MATCH;
1494                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1495                                 YY_BUFFER_EOF_PENDING;
1496                         }
1497                 }
1498
1499         else
1500                 ret_val = EOB_ACT_CONTINUE_SCAN;
1501
1502         if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1503                 /* Extend the array by 50%, plus the number we really need. */
1504                 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1505                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ssl_expr_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1506                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1507                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1508         }
1509
1510         yyg->yy_n_chars += number_to_move;
1511         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1512         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1513
1514         yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1515
1516         return ret_val;
1517 }
1518
1519 /* yy_get_previous_state - get the state just before the EOB char was reached */
1520
1521     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1522 {
1523         register yy_state_type yy_current_state;
1524         register char *yy_cp;
1525     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1526
1527         yy_current_state = yyg->yy_start;
1528
1529         for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1530                 {
1531                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1532                 if ( yy_accept[yy_current_state] )
1533                         {
1534                         yyg->yy_last_accepting_state = yy_current_state;
1535                         yyg->yy_last_accepting_cpos = yy_cp;
1536                         }
1537                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1538                         {
1539                         yy_current_state = (int) yy_def[yy_current_state];
1540                         if ( yy_current_state >= 97 )
1541                                 yy_c = yy_meta[(unsigned int) yy_c];
1542                         }
1543                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1544                 }
1545
1546         return yy_current_state;
1547 }
1548
1549 /* yy_try_NUL_trans - try to make a transition on the NUL character
1550  *
1551  * synopsis
1552  *      next_state = yy_try_NUL_trans( current_state );
1553  */
1554     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
1555 {
1556         register int yy_is_jam;
1557     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1558         register char *yy_cp = yyg->yy_c_buf_p;
1559
1560         register YY_CHAR yy_c = 1;
1561         if ( yy_accept[yy_current_state] )
1562                 {
1563                 yyg->yy_last_accepting_state = yy_current_state;
1564                 yyg->yy_last_accepting_cpos = yy_cp;
1565                 }
1566         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1567                 {
1568                 yy_current_state = (int) yy_def[yy_current_state];
1569                 if ( yy_current_state >= 97 )
1570                         yy_c = yy_meta[(unsigned int) yy_c];
1571                 }
1572         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1573         yy_is_jam = (yy_current_state == 96);
1574
1575         return yy_is_jam ? 0 : yy_current_state;
1576 }
1577
1578 #ifndef YY_NO_INPUT
1579 #ifdef __cplusplus
1580     static int yyinput (yyscan_t yyscanner)
1581 #else
1582     static int input  (yyscan_t yyscanner)
1583 #endif
1584
1585 {
1586         int c;
1587     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1588
1589         *yyg->yy_c_buf_p = yyg->yy_hold_char;
1590
1591         if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1592                 {
1593                 /* yy_c_buf_p now points to the character we want to return.
1594                  * If this occurs *before* the EOB characters, then it's a
1595                  * valid NUL; if not, then we've hit the end of the buffer.
1596                  */
1597                 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1598                         /* This was really a NUL. */
1599                         *yyg->yy_c_buf_p = '\0';
1600
1601                 else
1602                         { /* need more input */
1603                         int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1604                         ++yyg->yy_c_buf_p;
1605
1606                         switch ( yy_get_next_buffer( yyscanner ) )
1607                                 {
1608                                 case EOB_ACT_LAST_MATCH:
1609                                         /* This happens because yy_g_n_b()
1610                                          * sees that we've accumulated a
1611                                          * token and flags that we need to
1612                                          * try matching the token before
1613                                          * proceeding.  But for input(),
1614                                          * there's no matching to consider.
1615                                          * So convert the EOB_ACT_LAST_MATCH
1616                                          * to EOB_ACT_END_OF_FILE.
1617                                          */
1618
1619                                         /* Reset buffer status. */
1620                                         ssl_expr_yyrestart(yyin ,yyscanner);
1621
1622                                         /*FALLTHROUGH*/
1623
1624                                 case EOB_ACT_END_OF_FILE:
1625                                         {
1626                                         if ( ssl_expr_yywrap(yyscanner ) )
1627                                                 return EOF;
1628
1629                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
1630                                                 YY_NEW_FILE;
1631 #ifdef __cplusplus
1632                                         return yyinput(yyscanner);
1633 #else
1634                                         return input(yyscanner);
1635 #endif
1636                                         }
1637
1638                                 case EOB_ACT_CONTINUE_SCAN:
1639                                         yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1640                                         break;
1641                                 }
1642                         }
1643                 }
1644
1645         c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1646         *yyg->yy_c_buf_p = '\0';        /* preserve yytext */
1647         yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1648
1649         return c;
1650 }
1651 #endif  /* ifndef YY_NO_INPUT */
1652
1653 /** Immediately switch to a different input stream.
1654  * @param input_file A readable stream.
1655  * @param yyscanner The scanner object.
1656  * @note This function does not reset the start condition to @c INITIAL .
1657  */
1658     void ssl_expr_yyrestart  (FILE * input_file , yyscan_t yyscanner)
1659 {
1660     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1661
1662         if ( ! YY_CURRENT_BUFFER ){
1663         ssl_expr_yyensure_buffer_stack (yyscanner);
1664                 YY_CURRENT_BUFFER_LVALUE =
1665             ssl_expr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1666         }
1667
1668         ssl_expr_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1669         ssl_expr_yy_load_buffer_state(yyscanner );
1670 }
1671
1672 /** Switch to a different input buffer.
1673  * @param new_buffer The new input buffer.
1674  * @param yyscanner The scanner object.
1675  */
1676     void ssl_expr_yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
1677 {
1678     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1679
1680         /* TODO. We should be able to replace this entire function body
1681          * with
1682          *              ssl_expr_yypop_buffer_state();
1683          *              ssl_expr_yypush_buffer_state(new_buffer);
1684      */
1685         ssl_expr_yyensure_buffer_stack (yyscanner);
1686         if ( YY_CURRENT_BUFFER == new_buffer )
1687                 return;
1688
1689         if ( YY_CURRENT_BUFFER )
1690                 {
1691                 /* Flush out information for old buffer. */
1692                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1693                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1694                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1695                 }
1696
1697         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1698         ssl_expr_yy_load_buffer_state(yyscanner );
1699
1700         /* We don't actually know whether we did this switch during
1701          * EOF (ssl_expr_yywrap()) processing, but the only time this flag
1702          * is looked at is after ssl_expr_yywrap() is called, so it's safe
1703          * to go ahead and always set it.
1704          */
1705         yyg->yy_did_buffer_switch_on_eof = 1;
1706 }
1707
1708 static void ssl_expr_yy_load_buffer_state  (yyscan_t yyscanner)
1709 {
1710     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1711         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1712         yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1713         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1714         yyg->yy_hold_char = *yyg->yy_c_buf_p;
1715 }
1716
1717 /** Allocate and initialize an input buffer state.
1718  * @param file A readable stream.
1719  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1720  * @param yyscanner The scanner object.
1721  * @return the allocated buffer state.
1722  */
1723     YY_BUFFER_STATE ssl_expr_yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
1724 {
1725         YY_BUFFER_STATE b;
1726     
1727         b = (YY_BUFFER_STATE) ssl_expr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1728         if ( ! b )
1729                 YY_FATAL_ERROR( "out of dynamic memory in ssl_expr_yy_create_buffer()" );
1730
1731         b->yy_buf_size = size;
1732
1733         /* yy_ch_buf has to be 2 characters longer than the size given because
1734          * we need to put in 2 end-of-buffer characters.
1735          */
1736         b->yy_ch_buf = (char *) ssl_expr_yyalloc(b->yy_buf_size + 2 ,yyscanner );
1737         if ( ! b->yy_ch_buf )
1738                 YY_FATAL_ERROR( "out of dynamic memory in ssl_expr_yy_create_buffer()" );
1739
1740         b->yy_is_our_buffer = 1;
1741
1742         ssl_expr_yy_init_buffer(b,file ,yyscanner);
1743
1744         return b;
1745 }
1746
1747 /** Destroy the buffer.
1748  * @param b a buffer created with ssl_expr_yy_create_buffer()
1749  * @param yyscanner The scanner object.
1750  */
1751     void ssl_expr_yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
1752 {
1753     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1754
1755         if ( ! b )
1756                 return;
1757
1758         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1759                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1760
1761         if ( b->yy_is_our_buffer )
1762                 ssl_expr_yyfree((void *) b->yy_ch_buf ,yyscanner );
1763
1764         ssl_expr_yyfree((void *) b ,yyscanner );
1765 }
1766
1767 /* Initializes or reinitializes a buffer.
1768  * This function is sometimes called more than once on the same buffer,
1769  * such as during a ssl_expr_yyrestart() or at EOF.
1770  */
1771     static void ssl_expr_yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
1772
1773 {
1774         int oerrno = errno;
1775     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1776
1777         ssl_expr_yy_flush_buffer(b ,yyscanner);
1778
1779         b->yy_input_file = file;
1780         b->yy_fill_buffer = 1;
1781
1782     /* If b is the current buffer, then ssl_expr_yy_init_buffer was _probably_
1783      * called from ssl_expr_yyrestart() or through yy_get_next_buffer.
1784      * In that case, we don't want to reset the lineno or column.
1785      */
1786     if (b != YY_CURRENT_BUFFER){
1787         b->yy_bs_lineno = 1;
1788         b->yy_bs_column = 0;
1789     }
1790
1791         b->yy_is_interactive = 0;
1792     
1793         errno = oerrno;
1794 }
1795
1796 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1797  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1798  * @param yyscanner The scanner object.
1799  */
1800     void ssl_expr_yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
1801 {
1802     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1803         if ( ! b )
1804                 return;
1805
1806         b->yy_n_chars = 0;
1807
1808         /* We always need two end-of-buffer characters.  The first causes
1809          * a transition to the end-of-buffer state.  The second causes
1810          * a jam in that state.
1811          */
1812         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1813         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1814
1815         b->yy_buf_pos = &b->yy_ch_buf[0];
1816
1817         b->yy_at_bol = 1;
1818         b->yy_buffer_status = YY_BUFFER_NEW;
1819
1820         if ( b == YY_CURRENT_BUFFER )
1821                 ssl_expr_yy_load_buffer_state(yyscanner );
1822 }
1823
1824 /** Pushes the new state onto the stack. The new state becomes
1825  *  the current state. This function will allocate the stack
1826  *  if necessary.
1827  *  @param new_buffer The new state.
1828  *  @param yyscanner The scanner object.
1829  */
1830 void ssl_expr_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1831 {
1832     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1833         if (new_buffer == NULL)
1834                 return;
1835
1836         ssl_expr_yyensure_buffer_stack(yyscanner);
1837
1838         /* This block is copied from ssl_expr_yy_switch_to_buffer. */
1839         if ( YY_CURRENT_BUFFER )
1840                 {
1841                 /* Flush out information for old buffer. */
1842                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1843                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1844                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1845                 }
1846
1847         /* Only push if top exists. Otherwise, replace top. */
1848         if (YY_CURRENT_BUFFER)
1849                 yyg->yy_buffer_stack_top++;
1850         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1851
1852         /* copied from ssl_expr_yy_switch_to_buffer. */
1853         ssl_expr_yy_load_buffer_state(yyscanner );
1854         yyg->yy_did_buffer_switch_on_eof = 1;
1855 }
1856
1857 /** Removes and deletes the top of the stack, if present.
1858  *  The next element becomes the new top.
1859  *  @param yyscanner The scanner object.
1860  */
1861 void ssl_expr_yypop_buffer_state (yyscan_t yyscanner)
1862 {
1863     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1864         if (!YY_CURRENT_BUFFER)
1865                 return;
1866
1867         ssl_expr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1868         YY_CURRENT_BUFFER_LVALUE = NULL;
1869         if (yyg->yy_buffer_stack_top > 0)
1870                 --yyg->yy_buffer_stack_top;
1871
1872         if (YY_CURRENT_BUFFER) {
1873                 ssl_expr_yy_load_buffer_state(yyscanner );
1874                 yyg->yy_did_buffer_switch_on_eof = 1;
1875         }
1876 }
1877
1878 /* Allocates the stack if it does not exist.
1879  *  Guarantees space for at least one push.
1880  */
1881 static void ssl_expr_yyensure_buffer_stack (yyscan_t yyscanner)
1882 {
1883         int num_to_alloc;
1884     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1885
1886         if (!yyg->yy_buffer_stack) {
1887
1888                 /* First allocation is just for 2 elements, since we don't know if this
1889                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1890                  * immediate realloc on the next call.
1891          */
1892                 num_to_alloc = 1;
1893                 yyg->yy_buffer_stack = (struct yy_buffer_state**)ssl_expr_yyalloc
1894                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1895                                                                 , yyscanner);
1896                 if ( ! yyg->yy_buffer_stack )
1897                         YY_FATAL_ERROR( "out of dynamic memory in ssl_expr_yyensure_buffer_stack()" );
1898                                                                   
1899                 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1900                                 
1901                 yyg->yy_buffer_stack_max = num_to_alloc;
1902                 yyg->yy_buffer_stack_top = 0;
1903                 return;
1904         }
1905
1906         if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1907
1908                 /* Increase the buffer to prepare for a possible push. */
1909                 int grow_size = 8 /* arbitrary grow size */;
1910
1911                 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1912                 yyg->yy_buffer_stack = (struct yy_buffer_state**)ssl_expr_yyrealloc
1913                                                                 (yyg->yy_buffer_stack,
1914                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1915                                                                 , yyscanner);
1916                 if ( ! yyg->yy_buffer_stack )
1917                         YY_FATAL_ERROR( "out of dynamic memory in ssl_expr_yyensure_buffer_stack()" );
1918
1919                 /* zero only the new slots.*/
1920                 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1921                 yyg->yy_buffer_stack_max = num_to_alloc;
1922         }
1923 }
1924
1925 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1926  * @param base the character buffer
1927  * @param size the size in bytes of the character buffer
1928  * @param yyscanner The scanner object.
1929  * @return the newly allocated buffer state object. 
1930  */
1931 YY_BUFFER_STATE ssl_expr_yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
1932 {
1933         YY_BUFFER_STATE b;
1934     
1935         if ( size < 2 ||
1936              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1937              base[size-1] != YY_END_OF_BUFFER_CHAR )
1938                 /* They forgot to leave room for the EOB's. */
1939                 return 0;
1940
1941         b = (YY_BUFFER_STATE) ssl_expr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1942         if ( ! b )
1943                 YY_FATAL_ERROR( "out of dynamic memory in ssl_expr_yy_scan_buffer()" );
1944
1945         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1946         b->yy_buf_pos = b->yy_ch_buf = base;
1947         b->yy_is_our_buffer = 0;
1948         b->yy_input_file = 0;
1949         b->yy_n_chars = b->yy_buf_size;
1950         b->yy_is_interactive = 0;
1951         b->yy_at_bol = 1;
1952         b->yy_fill_buffer = 0;
1953         b->yy_buffer_status = YY_BUFFER_NEW;
1954
1955         ssl_expr_yy_switch_to_buffer(b ,yyscanner );
1956
1957         return b;
1958 }
1959
1960 /** Setup the input buffer state to scan a string. The next call to ssl_expr_yylex() will
1961  * scan from a @e copy of @a str.
1962  * @param yystr a NUL-terminated string to scan
1963  * @param yyscanner The scanner object.
1964  * @return the newly allocated buffer state object.
1965  * @note If you want to scan bytes that may contain NUL values, then use
1966  *       ssl_expr_yy_scan_bytes() instead.
1967  */
1968 YY_BUFFER_STATE ssl_expr_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
1969 {
1970     
1971         return ssl_expr_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
1972 }
1973
1974 /** Setup the input buffer state to scan the given bytes. The next call to ssl_expr_yylex() will
1975  * scan from a @e copy of @a bytes.
1976  * @param yybytes the byte buffer to scan
1977  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1978  * @param yyscanner The scanner object.
1979  * @return the newly allocated buffer state object.
1980  */
1981 YY_BUFFER_STATE ssl_expr_yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
1982 {
1983         YY_BUFFER_STATE b;
1984         char *buf;
1985         yy_size_t n;
1986         int i;
1987     
1988         /* Get memory for full buffer, including space for trailing EOB's. */
1989         n = _yybytes_len + 2;
1990         buf = (char *) ssl_expr_yyalloc(n ,yyscanner );
1991         if ( ! buf )
1992                 YY_FATAL_ERROR( "out of dynamic memory in ssl_expr_yy_scan_bytes()" );
1993
1994         for ( i = 0; i < _yybytes_len; ++i )
1995                 buf[i] = yybytes[i];
1996
1997         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1998
1999         b = ssl_expr_yy_scan_buffer(buf,n ,yyscanner);
2000         if ( ! b )
2001                 YY_FATAL_ERROR( "bad buffer in ssl_expr_yy_scan_bytes()" );
2002
2003         /* It's okay to grow etc. this buffer, and we should throw it
2004          * away when we're done.
2005          */
2006         b->yy_is_our_buffer = 1;
2007
2008         return b;
2009 }
2010
2011 #ifndef YY_EXIT_FAILURE
2012 #define YY_EXIT_FAILURE 2
2013 #endif
2014
2015 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2016 {
2017         (void) fprintf( stderr, "%s\n", msg );
2018         exit( YY_EXIT_FAILURE );
2019 }
2020
2021 /* Redefine yyless() so it works in section 3 code. */
2022
2023 #undef yyless
2024 #define yyless(n) \
2025         do \
2026                 { \
2027                 /* Undo effects of setting up yytext. */ \
2028         int yyless_macro_arg = (n); \
2029         YY_LESS_LINENO(yyless_macro_arg);\
2030                 yytext[yyleng] = yyg->yy_hold_char; \
2031                 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2032                 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2033                 *yyg->yy_c_buf_p = '\0'; \
2034                 yyleng = yyless_macro_arg; \
2035                 } \
2036         while ( 0 )
2037
2038 /* Accessor  methods (get/set functions) to struct members. */
2039
2040 /** Get the user-defined data for this scanner.
2041  * @param yyscanner The scanner object.
2042  */
2043 YY_EXTRA_TYPE ssl_expr_yyget_extra  (yyscan_t yyscanner)
2044 {
2045     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2046     return yyextra;
2047 }
2048
2049 /** Get the current line number.
2050  * @param yyscanner The scanner object.
2051  */
2052 int ssl_expr_yyget_lineno  (yyscan_t yyscanner)
2053 {
2054     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2055     
2056         if (! YY_CURRENT_BUFFER)
2057             return 0;
2058     
2059     return yylineno;
2060 }
2061
2062 /** Get the current column number.
2063  * @param yyscanner The scanner object.
2064  */
2065 int ssl_expr_yyget_column  (yyscan_t yyscanner)
2066 {
2067     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2068     
2069         if (! YY_CURRENT_BUFFER)
2070             return 0;
2071     
2072     return yycolumn;
2073 }
2074
2075 /** Get the input stream.
2076  * @param yyscanner The scanner object.
2077  */
2078 FILE *ssl_expr_yyget_in  (yyscan_t yyscanner)
2079 {
2080     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2081     return yyin;
2082 }
2083
2084 /** Get the output stream.
2085  * @param yyscanner The scanner object.
2086  */
2087 FILE *ssl_expr_yyget_out  (yyscan_t yyscanner)
2088 {
2089     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2090     return yyout;
2091 }
2092
2093 /** Get the length of the current token.
2094  * @param yyscanner The scanner object.
2095  */
2096 int ssl_expr_yyget_leng  (yyscan_t yyscanner)
2097 {
2098     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2099     return yyleng;
2100 }
2101
2102 /** Get the current token.
2103  * @param yyscanner The scanner object.
2104  */
2105
2106 char *ssl_expr_yyget_text  (yyscan_t yyscanner)
2107 {
2108     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2109     return yytext;
2110 }
2111
2112 /** Set the user-defined data. This data is never touched by the scanner.
2113  * @param user_defined The data to be associated with this scanner.
2114  * @param yyscanner The scanner object.
2115  */
2116 void ssl_expr_yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
2117 {
2118     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2119     yyextra = user_defined ;
2120 }
2121
2122 /** Set the current line number.
2123  * @param line_number
2124  * @param yyscanner The scanner object.
2125  */
2126 void ssl_expr_yyset_lineno (int  line_number , yyscan_t yyscanner)
2127 {
2128     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2129
2130         /* lineno is only valid if an input buffer exists. */
2131         if (! YY_CURRENT_BUFFER )
2132            yy_fatal_error( "ssl_expr_yyset_lineno called with no buffer" , yyscanner); 
2133     
2134     yylineno = line_number;
2135 }
2136
2137 /** Set the current column.
2138  * @param line_number
2139  * @param yyscanner The scanner object.
2140  */
2141 void ssl_expr_yyset_column (int  column_no , yyscan_t yyscanner)
2142 {
2143     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2144
2145         /* column is only valid if an input buffer exists. */
2146         if (! YY_CURRENT_BUFFER )
2147            yy_fatal_error( "ssl_expr_yyset_column called with no buffer" , yyscanner); 
2148     
2149     yycolumn = column_no;
2150 }
2151
2152 /** Set the input stream. This does not discard the current
2153  * input buffer.
2154  * @param in_str A readable stream.
2155  * @param yyscanner The scanner object.
2156  * @see ssl_expr_yy_switch_to_buffer
2157  */
2158 void ssl_expr_yyset_in (FILE *  in_str , yyscan_t yyscanner)
2159 {
2160     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2161     yyin = in_str ;
2162 }
2163
2164 void ssl_expr_yyset_out (FILE *  out_str , yyscan_t yyscanner)
2165 {
2166     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2167     yyout = out_str ;
2168 }
2169
2170 int ssl_expr_yyget_debug  (yyscan_t yyscanner)
2171 {
2172     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2173     return yy_flex_debug;
2174 }
2175
2176 void ssl_expr_yyset_debug (int  bdebug , yyscan_t yyscanner)
2177 {
2178     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2179     yy_flex_debug = bdebug ;
2180 }
2181
2182 /* Accessor methods for yylval and yylloc */
2183
2184 YYSTYPE * ssl_expr_yyget_lval  (yyscan_t yyscanner)
2185 {
2186     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2187     return yylval;
2188 }
2189
2190 void ssl_expr_yyset_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
2191 {
2192     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2193     yylval = yylval_param;
2194 }
2195
2196 /* User-visible API */
2197
2198 /* ssl_expr_yylex_init is special because it creates the scanner itself, so it is
2199  * the ONLY reentrant function that doesn't take the scanner as the last argument.
2200  * That's why we explicitly handle the declaration, instead of using our macros.
2201  */
2202
2203 int ssl_expr_yylex_init(yyscan_t* ptr_yy_globals)
2204
2205 {
2206     if (ptr_yy_globals == NULL){
2207         errno = EINVAL;
2208         return 1;
2209     }
2210
2211     *ptr_yy_globals = (yyscan_t) ssl_expr_yyalloc ( sizeof( struct yyguts_t ), NULL );
2212
2213     if (*ptr_yy_globals == NULL){
2214         errno = ENOMEM;
2215         return 1;
2216     }
2217
2218     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2219     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2220
2221     return yy_init_globals ( *ptr_yy_globals );
2222 }
2223
2224 /* ssl_expr_yylex_init_extra has the same functionality as ssl_expr_yylex_init, but follows the
2225  * convention of taking the scanner as the last argument. Note however, that
2226  * this is a *pointer* to a scanner, as it will be allocated by this call (and
2227  * is the reason, too, why this function also must handle its own declaration).
2228  * The user defined value in the first argument will be available to ssl_expr_yyalloc in
2229  * the yyextra field.
2230  */
2231
2232 int ssl_expr_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2233
2234 {
2235     struct yyguts_t dummy_yyguts;
2236
2237     ssl_expr_yyset_extra (yy_user_defined, &dummy_yyguts);
2238
2239     if (ptr_yy_globals == NULL){
2240         errno = EINVAL;
2241         return 1;
2242     }
2243         
2244     *ptr_yy_globals = (yyscan_t) ssl_expr_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2245         
2246     if (*ptr_yy_globals == NULL){
2247         errno = ENOMEM;
2248         return 1;
2249     }
2250     
2251     /* By setting to 0xAA, we expose bugs in
2252     yy_init_globals. Leave at 0x00 for releases. */
2253     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2254     
2255     ssl_expr_yyset_extra (yy_user_defined, *ptr_yy_globals);
2256     
2257     return yy_init_globals ( *ptr_yy_globals );
2258 }
2259
2260 static int yy_init_globals (yyscan_t yyscanner)
2261 {
2262     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2263     /* Initialization is the same as for the non-reentrant scanner.
2264      * This function is called from ssl_expr_yylex_destroy(), so don't allocate here.
2265      */
2266
2267     yyg->yy_buffer_stack = 0;
2268     yyg->yy_buffer_stack_top = 0;
2269     yyg->yy_buffer_stack_max = 0;
2270     yyg->yy_c_buf_p = (char *) 0;
2271     yyg->yy_init = 0;
2272     yyg->yy_start = 0;
2273
2274     yyg->yy_start_stack_ptr = 0;
2275     yyg->yy_start_stack_depth = 0;
2276     yyg->yy_start_stack =  NULL;
2277
2278 /* Defined in main.c */
2279 #ifdef YY_STDINIT
2280     yyin = stdin;
2281     yyout = stdout;
2282 #else
2283     yyin = (FILE *) 0;
2284     yyout = (FILE *) 0;
2285 #endif
2286
2287     /* For future reference: Set errno on error, since we are called by
2288      * ssl_expr_yylex_init()
2289      */
2290     return 0;
2291 }
2292
2293 /* ssl_expr_yylex_destroy is for both reentrant and non-reentrant scanners. */
2294 int ssl_expr_yylex_destroy  (yyscan_t yyscanner)
2295 {
2296     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2297
2298     /* Pop the buffer stack, destroying each element. */
2299         while(YY_CURRENT_BUFFER){
2300                 ssl_expr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2301                 YY_CURRENT_BUFFER_LVALUE = NULL;
2302                 ssl_expr_yypop_buffer_state(yyscanner);
2303         }
2304
2305         /* Destroy the stack itself. */
2306         ssl_expr_yyfree(yyg->yy_buffer_stack ,yyscanner);
2307         yyg->yy_buffer_stack = NULL;
2308
2309     /* Destroy the start condition stack. */
2310         ssl_expr_yyfree(yyg->yy_start_stack ,yyscanner );
2311         yyg->yy_start_stack = NULL;
2312
2313     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2314      * ssl_expr_yylex() is called, initialization will occur. */
2315     yy_init_globals( yyscanner);
2316
2317     /* Destroy the main struct (reentrant only). */
2318     ssl_expr_yyfree ( yyscanner , yyscanner );
2319     yyscanner = NULL;
2320     return 0;
2321 }
2322
2323 /*
2324  * Internal utility routines.
2325  */
2326
2327 #ifndef yytext_ptr
2328 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2329 {
2330         register int i;
2331         for ( i = 0; i < n; ++i )
2332                 s1[i] = s2[i];
2333 }
2334 #endif
2335
2336 #ifdef YY_NEED_STRLEN
2337 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2338 {
2339         register int n;
2340         for ( n = 0; s[n]; ++n )
2341                 ;
2342
2343         return n;
2344 }
2345 #endif
2346
2347 void *ssl_expr_yyalloc (yy_size_t  size , yyscan_t yyscanner)
2348 {
2349         return (void *) malloc( size );
2350 }
2351
2352 void *ssl_expr_yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
2353 {
2354         /* The cast to (char *) in the following accommodates both
2355          * implementations that use char* generic pointers, and those
2356          * that use void* generic pointers.  It works with the latter
2357          * because both ANSI C and C++ allow castless assignment from
2358          * any pointer type to void*, and deal with argument conversions
2359          * as though doing an assignment.
2360          */
2361         return (void *) realloc( (char *) ptr, size );
2362 }
2363
2364 void ssl_expr_yyfree (void * ptr , yyscan_t yyscanner)
2365 {
2366         free( (char *) ptr );   /* see ssl_expr_yyrealloc() for (char *) cast */
2367 }
2368
2369 #define YYTABLES_NAME "yytables"
2370
2371 #line 228 "ssl_expr_scan.l"
2372
2373
2374
2375
2376