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