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