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