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