Coverage Report

Created: 2025-07-18 06:33

/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.05k
#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
269M
#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
19.5k
#define yyin yyg->yyin_r
119
5.85k
#define yyout yyg->yyout_r
120
1.71M
#define yyextra yyg->yyextra_r
121
466k
#define yyleng yyg->yyleng_r
122
224k
#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
39.2k
#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
21.0k
#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.34k
#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
23.7k
#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.46k
#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
7.20k
#define EOB_ACT_CONTINUE_SCAN 0
176
5.34k
#define EOB_ACT_END_OF_FILE 1
177
2.97k
#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
15.5k
  do \
185
15.5k
    { \
186
15.5k
    /* Undo effects of setting up yytext. */ \
187
15.5k
        int yyless_macro_arg = (n); \
188
15.5k
        YY_LESS_LINENO(yyless_macro_arg);\
189
15.5k
    *yy_cp = yyg->yy_hold_char; \
190
15.5k
    YY_RESTORE_YY_MORE_OFFSET \
191
15.5k
    yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
192
15.5k
    YY_DO_BEFORE_ACTION; /* set up yytext again */ \
193
15.5k
    } \
194
15.5k
  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
11.8k
#define YY_BUFFER_NEW 0
247
2.79k
#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
9.25k
#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
22.3k
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
270
22.3k
                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
271
22.3k
                          : 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
128k
#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.67k
#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
520k
#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
466k
  yyg->yytext_ptr = yy_bp; \
345
466k
  yyleng = (int) (yy_cp - yy_bp); \
346
466k
  yyg->yy_hold_char = *yy_cp; \
347
466k
  *yy_cp = '\0'; \
348
466k
  yyg->yy_c_buf_p = yy_cp;
349
350
#define YY_NUM_RULES 73
351
13.1k
#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
32.5k
#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
6.33k
#define YY_INPUT(buf,result,max_size)                       \
609
6.33k
{                                                           \
610
6.33k
    if ((result = MIN(max_size, yyextra->inputbuf           \
611
6.33k
                              + yyextra->inputlen           \
612
6.33k
                              - yyextra->inputptr)) <= 0)   \
613
6.33k
    {                                                       \
614
2.73k
        result = YY_NULL;                                   \
615
2.73k
    }                                                       \
616
6.33k
    else {                                                  \
617
3.60k
        memcpy(buf, yyextra->inputptr, result);             \
618
3.60k
        yyextra->inputptr += result;                        \
619
3.60k
    }                                                       \
620
6.33k
}
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
94
#define PERROR(msg) do {    \
646
94
    yyextra->error2 = msg;  \
647
94
    return T_ERROR;         \
648
94
} while (0)
649
650
37
#define PERROR_CHAR(prefix, chr) do {                                       \
651
37
    char *msg;                                                              \
652
37
    if (apr_isprint((chr))) {                                               \
653
9
        msg = apr_psprintf(yyextra->pool, prefix "'%c'", (char)(chr));      \
654
9
    }                                                                       \
655
37
    else {                                                                  \
656
28
        msg = apr_psprintf(yyextra->pool, prefix "'\\x%.2X'", (int)(chr));  \
657
28
    }                                                                       \
658
37
    PERROR(msg);                                                            \
659
37
} while (0)
660
661
8.64k
#define STACK_PUSH() do {                               \
662
8.64k
    ap_expr_parser_stack_t *sk;                         \
663
8.64k
    if (yyextra->spares) {                              \
664
7.08k
        sk = yyextra->spares;                           \
665
7.08k
        yyextra->spares = sk->next;                     \
666
7.08k
    }                                                   \
667
8.64k
    else {                                              \
668
1.55k
        sk = apr_palloc(yyextra->ptemp, sizeof(*sk));   \
669
1.55k
    }                                                   \
670
8.64k
    sk->scan_ptr  = sk->scan_buf;                       \
671
8.64k
    sk->scan_stop = sk->scan_buf[0] = '\0';             \
672
8.64k
    sk->scan_flag = 0;                                  \
673
8.64k
    sk->next = yyextra->current;                        \
674
8.64k
    yyextra->current = sk;                              \
675
8.64k
} while (0)
676
677
8.47k
#define STACK_POP() do {            \
678
8.47k
    ap_expr_parser_stack_t *sk;     \
679
8.47k
    sk = yyextra->current;          \
680
8.47k
    yyextra->current = sk->next;    \
681
8.47k
    sk->next = yyextra->spares;     \
682
8.47k
    yyextra->spares = sk;           \
683
8.47k
} while (0)
684
685
19.6k
#define STATE_PUSH(st, sk) do {     \
686
19.6k
    yy_push_state((st), yyscanner); \
687
19.6k
    if ((sk)) {                     \
688
8.64k
        STACK_PUSH();               \
689
8.64k
    }                               \
690
19.6k
} while (0)
691
692
19.5k
#define STATE_POP(sk) do {          \
693
19.5k
    if ((sk)) {                     \
694
7.26k
        STACK_POP();                \
695
7.26k
    }                               \
696
19.5k
    yy_pop_state(yyscanner);        \
697
19.5k
} while (0)
698
699
639k
#define str_ptr  (yyextra->current->scan_ptr)
700
612k
#define str_buf  (yyextra->current->scan_buf)
701
156k
#define str_stop (yyextra->current->scan_stop)
702
18.0k
#define str_flag (yyextra->current->scan_flag)
703
704
283k
#define STR_APPEND_CHECK(chr, chk) do {                     \
705
283k
    if ((chk) && apr_iscntrl((chr))) {                      \
706
26
        PERROR_CHAR("Invalid string character ", (chr));    \
707
26
    }                                                       \
708
283k
    if (str_ptr >= str_buf + sizeof(str_buf) - 1) {         \
709
7
        PERROR("String too long");                          \
710
7
    }                                                       \
711
283k
    *str_ptr++ = (char)(chr);                               \
712
283k
} while (0)
713
714
#define STR_APPEND_NOCHECK(chr) \
715
25.1k
    STR_APPEND_CHECK((chr), 0)
716
717
#define STR_EMPTY() \
718
18.2k
    (str_ptr == str_buf)
719
720
#define STR_RETURN() \
721
27.8k
    (apr_pstrdup(yyextra->pool, (*str_ptr = '\0', str_ptr = str_buf)))
722
723
#line 724 "util_expr_scan.c"
724
725
1.33k
#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
214k
    #    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
12.1k
#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.32k
#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.46k
#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
289k
#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
157k
{
973
157k
  yy_state_type yy_current_state;
974
157k
  char *yy_cp, *yy_bp;
975
157k
  int yy_act;
976
157k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
977
978
157k
    yylval = yylval_param;
979
980
157k
  if ( !yyg->yy_init )
981
1.46k
    {
982
1.46k
    yyg->yy_init = 1;
983
984
#ifdef YY_USER_INIT
985
    YY_USER_INIT;
986
#endif
987
988
1.46k
    if ( ! yyg->yy_start )
989
1.46k
      yyg->yy_start = 1; /* first start state */
990
991
1.46k
    if ( ! yyin )
992
1.46k
      yyin = stdin;
993
994
1.46k
    if ( ! yyout )
995
1.46k
      yyout = stdout;
996
997
1.46k
    if ( ! YY_CURRENT_BUFFER ) {
998
1.46k
      ap_expr_yyensure_buffer_stack (yyscanner);
999
1.46k
      YY_CURRENT_BUFFER_LVALUE =
1000
1.46k
        ap_expr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1001
1.46k
    }
1002
1003
1.46k
    ap_expr_yy_load_buffer_state(yyscanner );
1004
1.46k
    }
1005
1006
157k
  {
1007
157k
#line 179 "util_expr_scan.l"
1008
1009
1010
1011
 /*
1012
  * Set initial state for string expressions
1013
  */
1014
157k
  if (yyextra->at_start) {
1015
1.46k
    yyextra->at_start = 0;
1016
1.46k
    if (yyextra->flags & AP_EXPR_FLAG_STRING_RESULT) {
1017
1.26k
        STATE_PUSH(str, 1);
1018
1.26k
        return T_EXPR_STRING;
1019
1.26k
    }
1020
198
    else {
1021
198
        STATE_PUSH(expr, 1);
1022
198
        return T_EXPR_BOOL;
1023
198
    }
1024
1.46k
  }
1025
1026
1027
 /*
1028
  * Back off INITIAL pushes
1029
  */
1030
156k
#line 1031 "util_expr_scan.c"
1031
1032
445k
  while ( /*CONSTCOND*/1 )    /* loops until end-of-file is reached */
1033
445k
    {
1034
445k
    yy_cp = yyg->yy_c_buf_p;
1035
1036
    /* Support of yytext. */
1037
445k
    *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
445k
    yy_bp = yy_cp;
1043
1044
445k
    yy_current_state = yyg->yy_start;
1045
449k
yy_match:
1046
449k
    do
1047
16.2M
      {
1048
16.2M
      YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1049
16.2M
      if ( yy_accept[yy_current_state] )
1050
15.8M
        {
1051
15.8M
        yyg->yy_last_accepting_state = yy_current_state;
1052
15.8M
        yyg->yy_last_accepting_cpos = yy_cp;
1053
15.8M
        }
1054
28.9M
      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1055
12.6M
        {
1056
12.6M
        yy_current_state = (int) yy_def[yy_current_state];
1057
12.6M
        if ( yy_current_state >= 155 )
1058
12.1M
          yy_c = yy_meta[(unsigned int) yy_c];
1059
12.6M
        }
1060
16.2M
      yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
1061
16.2M
      ++yy_cp;
1062
16.2M
      }
1063
16.2M
    while ( yy_current_state != 154 );
1064
449k
    yy_cp = yyg->yy_last_accepting_cpos;
1065
449k
    yy_current_state = yyg->yy_last_accepting_state;
1066
1067
450k
yy_find_action:
1068
450k
    yy_act = yy_accept[yy_current_state];
1069
1070
450k
    YY_DO_BEFORE_ACTION;
1071
1072
453k
do_action:  /* This label is used only to access EOF actions. */
1073
1074
453k
    switch ( yy_act )
1075
453k
  { /* 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.21k
case YY_STATE_EOF(str):
1084
1.21k
#line 201 "util_expr_scan.l"
1085
1.21k
{
1086
1.21k
    STATE_POP(0); /* <str> */
1087
1.21k
    if (YY_START != INITIAL) {
1088
13
        PERROR("Unterminated string");
1089
13
    }
1090
1.20k
    yylval->cpVal = STR_RETURN();
1091
1.20k
    STACK_POP(); /* ^ after this */
1092
1.20k
    return T_STRING;
1093
1.21k
}
1094
0
  YY_BREAK
1095
116
case YY_STATE_EOF(expr):
1096
116
#line 210 "util_expr_scan.l"
1097
116
{
1098
116
    STATE_POP(1); /* <expr> */
1099
116
    if (YY_START != INITIAL) {
1100
0
        PERROR("Unterminated expression");
1101
0
    }
1102
116
}
1103
116
  YY_BREAK
1104
6.70k
case 1:
1105
6.70k
YY_RULE_SETUP
1106
6.70k
#line 217 "util_expr_scan.l"
1107
6.70k
{
1108
6.70k
    if (yytext[0] == str_stop) {
1109
405
        if (!STR_EMPTY()) {
1110
70
            yyless(0); /* come back below */
1111
70
            yylval->cpVal = STR_RETURN();
1112
70
            return T_STRING;
1113
70
        }
1114
335
        STATE_POP(1); /* <str> */
1115
335
        return T_STR_END;
1116
405
    }
1117
6.29k
    STR_APPEND_NOCHECK(yytext[0]);
1118
6.29k
}
1119
6.29k
  YY_BREAK
1120
/* regexp backref inside string/arg */
1121
17.8k
case 2:
1122
17.8k
YY_RULE_SETUP
1123
17.8k
#line 231 "util_expr_scan.l"
1124
17.8k
{
1125
17.8k
    if (!STR_EMPTY()) {
1126
8.71k
        yyless(0); /* come back below */
1127
8.71k
        yylval->cpVal = STR_RETURN();
1128
8.71k
        return T_STRING;
1129
8.71k
    }
1130
9.13k
    yylval->num = yytext[1] - '0';
1131
9.13k
    return T_BACKREF;
1132
17.8k
}
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
34
case 14:
1218
/* rule 14 can match eol */
1219
34
YY_RULE_SETUP
1220
34
#line 283 "util_expr_scan.l"
1221
34
{
1222
34
    PERROR("Unterminated string or variable");
1223
34
}
1224
0
  YY_BREAK
1225
126k
case 15:
1226
/* rule 15 can match eol */
1227
126k
YY_RULE_SETUP
1228
126k
#line 287 "util_expr_scan.l"
1229
126k
{
1230
126k
    STR_APPEND_CHECK(yytext[0], 1);
1231
126k
}
1232
126k
  YY_BREAK
1233
126k
case 16:
1234
/* rule 16 can match eol */
1235
5.96k
YY_RULE_SETUP
1236
5.96k
#line 291 "util_expr_scan.l"
1237
5.96k
{ 
1238
    /* NOP */
1239
5.96k
}
1240
5.96k
  YY_BREAK
1241
354
case 17:
1242
354
YY_RULE_SETUP
1243
354
#line 295 "util_expr_scan.l"
1244
354
{
1245
354
    STATE_PUSH(str, 1);
1246
354
    str_stop = yytext[0];
1247
354
    return T_STR_BEGIN;
1248
126k
}
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
126k
}
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
126k
}
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
126k
}
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
126k
}
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
126k
}
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
126k
}
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
2.43k
case 27:
1335
2.43k
YY_RULE_SETUP
1336
2.43k
#line 347 "util_expr_scan.l"
1337
2.43k
{
1338
2.43k
    STATE_PUSH(regex, 1);
1339
2.43k
    str_stop = yytext[0];
1340
2.43k
    str_flag = 'm';
1341
2.43k
    return T_REGEX;
1342
0
}
1343
0
  YY_BREAK
1344
4.39k
case 28:
1345
4.39k
YY_RULE_SETUP
1346
4.39k
#line 353 "util_expr_scan.l"
1347
4.39k
{
1348
4.39k
    STATE_PUSH(regex, 1);
1349
4.39k
    str_stop = yytext[1];
1350
4.39k
    str_flag = yytext[0];
1351
4.39k
    return (str_flag == 'm') ? T_REGEX : T_REGSUB;
1352
0
}
1353
0
  YY_BREAK
1354
23.8k
case 29:
1355
/* rule 29 can match eol */
1356
23.8k
YY_RULE_SETUP
1357
23.8k
#line 359 "util_expr_scan.l"
1358
23.8k
{
1359
23.8k
    if (yytext[0] == str_stop) {
1360
6.82k
        yylval->cpVal = STR_RETURN();
1361
6.82k
        STATE_POP(0); /* <regex> */
1362
6.82k
        if (str_flag == 'm') {
1363
2.58k
            STATE_PUSH(regflags, 0);
1364
2.58k
        }
1365
4.23k
        else {
1366
4.23k
            STATE_PUSH(regsub, 0);
1367
4.23k
        }
1368
6.82k
        return T_REG_MATCH;
1369
6.82k
    }
1370
17.0k
    STR_APPEND_CHECK(yytext[0], 1);
1371
17.0k
}
1372
17.0k
  YY_BREAK
1373
118k
case 30:
1374
/* rule 30 can match eol */
1375
118k
YY_RULE_SETUP
1376
118k
#line 373 "util_expr_scan.l"
1377
118k
{
1378
118k
    if (yytext[0] == str_stop) {
1379
4.23k
        yylval->cpVal = STR_RETURN();
1380
4.23k
        STATE_POP(0); /* <regsub> */
1381
4.23k
        STATE_PUSH(regflags, 0);
1382
4.23k
        return T_STRING;
1383
4.23k
    }
1384
114k
    STR_APPEND_CHECK(yytext[0], 1);
1385
114k
}
1386
114k
  YY_BREAK
1387
114k
case 31:
1388
/* rule 31 can match eol */
1389
25.7k
YY_RULE_SETUP
1390
25.7k
#line 382 "util_expr_scan.l"
1391
25.7k
{
1392
25.7k
    if (!ap_strchr_c("ismg", yytext[0])) {
1393
6.80k
        if (apr_isalnum(yytext[0])) {
1394
1
            PERROR("Invalid regexp flag(s)");
1395
1
        }
1396
6.80k
        yyless(0); /* not a flags, rewind */
1397
6.80k
        yylval->cpVal = STR_RETURN();
1398
6.80k
        STATE_POP(1); /* <regflags> */
1399
6.80k
        return T_REG_FLAGS;
1400
6.80k
    }
1401
18.8k
    STR_APPEND_NOCHECK(yytext[0]);
1402
18.8k
}
1403
18.8k
  YY_BREAK
1404
18.8k
case YY_STATE_EOF(regflags):
1405
14
#line 394 "util_expr_scan.l"
1406
14
{
1407
14
    yylval->cpVal = STR_RETURN();
1408
14
    STATE_POP(1); /* <regflags> */
1409
14
    return T_REG_FLAGS;
1410
18.8k
}
1411
0
  YY_BREAK
1412
0
case YY_STATE_EOF(regex):
1413
2
case YY_STATE_EOF(regsub):
1414
2
#line 399 "util_expr_scan.l"
1415
2
{
1416
2
    PERROR("Unterminated regexp");
1417
2
}
1418
0
  YY_BREAK
1419
285
case 32:
1420
285
YY_RULE_SETUP
1421
285
#line 403 "util_expr_scan.l"
1422
285
{
1423
285
    yylval->num = yytext[1] - '0';
1424
285
    return T_BACKREF;
1425
2
}
1426
0
  YY_BREAK
1427
/*
1428
  * Operators
1429
  */
1430
1
case 33:
1431
1
YY_RULE_SETUP
1432
1
#line 411 "util_expr_scan.l"
1433
1
{ return T_OP_STR_EQ; }
1434
0
  YY_BREAK
1435
128
case 34:
1436
128
YY_RULE_SETUP
1437
128
#line 412 "util_expr_scan.l"
1438
128
{ return T_OP_STR_NE; }
1439
0
  YY_BREAK
1440
100
case 35:
1441
100
YY_RULE_SETUP
1442
100
#line 413 "util_expr_scan.l"
1443
100
{ return T_OP_STR_LT; }
1444
0
  YY_BREAK
1445
32
case 36:
1446
32
YY_RULE_SETUP
1447
32
#line 414 "util_expr_scan.l"
1448
32
{ return T_OP_STR_LE; }
1449
0
  YY_BREAK
1450
172
case 37:
1451
172
YY_RULE_SETUP
1452
172
#line 415 "util_expr_scan.l"
1453
172
{ return T_OP_STR_GT; }
1454
0
  YY_BREAK
1455
5
case 38:
1456
5
YY_RULE_SETUP
1457
5
#line 416 "util_expr_scan.l"
1458
5
{ return T_OP_STR_GE; }
1459
0
  YY_BREAK
1460
459
case 39:
1461
459
YY_RULE_SETUP
1462
459
#line 417 "util_expr_scan.l"
1463
459
{ return T_OP_REG; }
1464
0
  YY_BREAK
1465
221
case 40:
1466
221
YY_RULE_SETUP
1467
221
#line 418 "util_expr_scan.l"
1468
221
{ 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
820
case 42:
1476
820
YY_RULE_SETUP
1477
820
#line 420 "util_expr_scan.l"
1478
820
{ return T_OP_AND; }
1479
0
  YY_BREAK
1480
128
case 43:
1481
128
YY_RULE_SETUP
1482
128
#line 421 "util_expr_scan.l"
1483
128
{ return T_OP_OR; }
1484
0
  YY_BREAK
1485
1.19k
case 44:
1486
1.19k
YY_RULE_SETUP
1487
1.19k
#line 422 "util_expr_scan.l"
1488
1.19k
{ return T_OP_OR; }
1489
0
  YY_BREAK
1490
569
case 45:
1491
569
YY_RULE_SETUP
1492
569
#line 423 "util_expr_scan.l"
1493
569
{ return T_OP_NOT; }
1494
0
  YY_BREAK
1495
40.5k
case 46:
1496
40.5k
YY_RULE_SETUP
1497
40.5k
#line 424 "util_expr_scan.l"
1498
40.5k
{ return T_OP_NOT; }
1499
0
  YY_BREAK
1500
3.45k
case 47:
1501
3.45k
YY_RULE_SETUP
1502
3.45k
#line 425 "util_expr_scan.l"
1503
3.45k
{ return T_OP_CONCAT; }
1504
0
  YY_BREAK
1505
153
case 48:
1506
153
YY_RULE_SETUP
1507
153
#line 426 "util_expr_scan.l"
1508
153
{ 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
1
case 50:
1516
1
YY_RULE_SETUP
1517
1
#line 428 "util_expr_scan.l"
1518
1
{ 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
128
case 53:
1531
128
YY_RULE_SETUP
1532
128
#line 431 "util_expr_scan.l"
1533
128
{ 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
369
case 61:
1572
369
YY_RULE_SETUP
1573
369
#line 441 "util_expr_scan.l"
1574
369
{ return T_OP_IN; }
1575
0
  YY_BREAK
1576
311
case 62:
1577
311
YY_RULE_SETUP
1578
311
#line 443 "util_expr_scan.l"
1579
311
{
1580
311
    yylval->cpVal = apr_pstrdup(yyextra->pool, yytext + 1);
1581
311
    return T_OP_BINARY;
1582
2
}
1583
0
  YY_BREAK
1584
132
case 63:
1585
132
YY_RULE_SETUP
1586
132
#line 448 "util_expr_scan.l"
1587
132
{
1588
132
    yylval->cpVal = apr_pstrdup(yyextra->pool, yytext + 1);
1589
132
    return T_OP_UNARY;
1590
2
}
1591
0
  YY_BREAK
1592
/* Apply subtitution to a string */
1593
4.10k
case 64:
1594
4.10k
YY_RULE_SETUP
1595
4.10k
#line 454 "util_expr_scan.l"
1596
4.10k
{
1597
4.10k
    return T_OP_SUB;
1598
2
}
1599
0
  YY_BREAK
1600
/* Join a list into a string */
1601
1.35k
case 65:
1602
1.35k
YY_RULE_SETUP
1603
1.35k
#line 459 "util_expr_scan.l"
1604
1.35k
{
1605
1.35k
    return T_OP_JOIN;
1606
2
}
1607
0
  YY_BREAK
1608
/* Split a string (or list) into a(nother) list */
1609
2.03k
case 66:
1610
2.03k
YY_RULE_SETUP
1611
2.03k
#line 464 "util_expr_scan.l"
1612
2.03k
{
1613
2.03k
    return T_OP_SPLIT;
1614
2
}
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
8.15k
case 69:
1633
8.15k
YY_RULE_SETUP
1634
8.15k
#line 477 "util_expr_scan.l"
1635
8.15k
{
1636
8.15k
    yylval->cpVal = apr_pstrdup(yyextra->pool, yytext);
1637
8.15k
    return T_DIGIT;
1638
2
}
1639
0
  YY_BREAK
1640
/*
1641
  * Identifiers
1642
  */
1643
10.5k
case 70:
1644
10.5k
YY_RULE_SETUP
1645
10.5k
#line 485 "util_expr_scan.l"
1646
10.5k
{
1647
10.5k
    yylval->cpVal = apr_pstrdup(yyextra->pool, yytext);
1648
10.5k
    return T_ID;
1649
2
}
1650
0
  YY_BREAK
1651
/*
1652
  * These are parts of the grammar and are returned as is
1653
  */
1654
35.2k
case 71:
1655
35.2k
YY_RULE_SETUP
1656
35.2k
#line 493 "util_expr_scan.l"
1657
35.2k
{
1658
35.2k
    return yytext[0];
1659
2
}
1660
0
  YY_BREAK
1661
/*
1662
  * Anything else is an error
1663
  */
1664
11
case 72:
1665
/* rule 72 can match eol */
1666
11
YY_RULE_SETUP
1667
11
#line 500 "util_expr_scan.l"
1668
11
{
1669
11
    PERROR_CHAR("Parse error near character ", yytext[0]);
1670
11
}
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.32k
case YY_STATE_EOF(INITIAL):
1679
1.32k
  yyterminate();
1680
1681
7.76k
  case YY_END_OF_BUFFER:
1682
7.76k
    {
1683
    /* Amount of text matched not including the EOB char. */
1684
7.76k
    int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1685
1686
    /* Undo the effects of YY_DO_BEFORE_ACTION. */
1687
7.76k
    *yy_cp = yyg->yy_hold_char;
1688
7.76k
    YY_RESTORE_YY_MORE_OFFSET
1689
1690
7.76k
    if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1691
2.79k
      {
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.79k
      yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1702
2.79k
      YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1703
2.79k
      YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1704
2.79k
      }
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
7.76k
    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
7.76k
    else switch ( yy_get_next_buffer( yyscanner ) )
1751
7.76k
      {
1752
2.67k
      case EOB_ACT_END_OF_FILE:
1753
2.67k
        {
1754
2.67k
        yyg->yy_did_buffer_switch_on_eof = 0;
1755
1756
2.67k
        if ( ap_expr_yywrap(yyscanner ) )
1757
2.67k
          {
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.67k
          yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1768
1769
2.67k
          yy_act = YY_STATE_EOF(YY_START);
1770
2.67k
          goto do_action;
1771
2.67k
          }
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.67k
        }
1780
1781
3.60k
      case EOB_ACT_CONTINUE_SCAN:
1782
3.60k
        yyg->yy_c_buf_p =
1783
3.60k
          yyg->yytext_ptr + yy_amount_of_matched_text;
1784
1785
3.60k
        yy_current_state = yy_get_previous_state( yyscanner );
1786
1787
3.60k
        yy_cp = yyg->yy_c_buf_p;
1788
3.60k
        yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1789
3.60k
        goto yy_match;
1790
1791
1.48k
      case EOB_ACT_LAST_MATCH:
1792
1.48k
        yyg->yy_c_buf_p =
1793
1.48k
        &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1794
1795
1.48k
        yy_current_state = yy_get_previous_state( yyscanner );
1796
1797
1.48k
        yy_cp = yyg->yy_c_buf_p;
1798
1.48k
        yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1799
1.48k
        goto yy_find_action;
1800
7.76k
      }
1801
0
    break;
1802
7.76k
    }
1803
1804
0
  default:
1805
0
    YY_FATAL_ERROR(
1806
453k
      "fatal flex scanner internal error--no action found" );
1807
453k
  } /* end of action switch */
1808
453k
    } /* end of scanning one token */
1809
156k
  } /* end of user's declarations */
1810
156k
} /* 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
7.76k
{
1821
7.76k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1822
7.76k
  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1823
7.76k
  char *source = yyg->yytext_ptr;
1824
7.76k
  int number_to_move, i;
1825
7.76k
  int ret_val;
1826
1827
7.76k
  if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1828
0
    YY_FATAL_ERROR(
1829
7.76k
    "fatal flex scanner internal error--end of buffer missed" );
1830
1831
7.76k
  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
7.76k
  number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1854
1855
253M
  for ( i = 0; i < number_to_move; ++i )
1856
253M
    *(dest++) = *(source++);
1857
1858
7.76k
  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.42k
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1863
1864
6.33k
  else
1865
6.33k
    {
1866
6.33k
      int num_to_read =
1867
6.33k
      YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1868
1869
6.45k
    while ( num_to_read <= 0 )
1870
122
      { /* Not enough room in the buffer - grow it. */
1871
1872
      /* just a shorter name for the current buffer */
1873
122
      YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1874
1875
122
      int yy_c_buf_p_offset =
1876
122
        (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1877
1878
122
      if ( b->yy_is_our_buffer )
1879
122
        {
1880
122
        int new_size = b->yy_buf_size * 2;
1881
1882
122
        if ( new_size <= 0 )
1883
0
          b->yy_buf_size += b->yy_buf_size / 8;
1884
122
        else
1885
122
          b->yy_buf_size *= 2;
1886
1887
122
        b->yy_ch_buf = (char *)
1888
          /* Include room in for 2 EOB chars. */
1889
122
          ap_expr_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1890
122
        }
1891
0
      else
1892
        /* Can't grow it, we don't own it. */
1893
0
        b->yy_ch_buf = NULL;
1894
1895
122
      if ( ! b->yy_ch_buf )
1896
0
        YY_FATAL_ERROR(
1897
122
        "fatal error - scanner input buffer overflow" );
1898
1899
122
      yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1900
1901
122
      num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1902
122
            number_to_move - 1;
1903
1904
122
      }
1905
1906
6.33k
    if ( num_to_read > YY_READ_BUF_SIZE )
1907
5.84k
      num_to_read = YY_READ_BUF_SIZE;
1908
1909
    /* Read in more data. */
1910
6.33k
    YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1911
6.33k
      yyg->yy_n_chars, num_to_read );
1912
1913
6.33k
    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1914
6.33k
    }
1915
1916
7.76k
  if ( yyg->yy_n_chars == 0 )
1917
4.16k
    {
1918
4.16k
    if ( number_to_move == YY_MORE_ADJ )
1919
2.67k
      {
1920
2.67k
      ret_val = EOB_ACT_END_OF_FILE;
1921
2.67k
      ap_expr_yyrestart(yyin  ,yyscanner);
1922
2.67k
      }
1923
1924
1.48k
    else
1925
1.48k
      {
1926
1.48k
      ret_val = EOB_ACT_LAST_MATCH;
1927
1.48k
      YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1928
1.48k
        YY_BUFFER_EOF_PENDING;
1929
1.48k
      }
1930
4.16k
    }
1931
1932
3.60k
  else
1933
3.60k
    ret_val = EOB_ACT_CONTINUE_SCAN;
1934
1935
7.76k
  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
7.76k
  yyg->yy_n_chars += number_to_move;
1944
7.76k
  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1945
7.76k
  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1946
1947
7.76k
  yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1948
1949
7.76k
  return ret_val;
1950
7.76k
}
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
5.09k
{
1956
5.09k
  yy_state_type yy_current_state;
1957
5.09k
  char *yy_cp;
1958
5.09k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1959
1960
5.09k
  yy_current_state = yyg->yy_start;
1961
1962
253M
  for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1963
253M
    {
1964
253M
    YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1965
253M
    if ( yy_accept[yy_current_state] )
1966
253M
      {
1967
253M
      yyg->yy_last_accepting_state = yy_current_state;
1968
253M
      yyg->yy_last_accepting_cpos = yy_cp;
1969
253M
      }
1970
388M
    while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1971
135M
      {
1972
135M
      yy_current_state = (int) yy_def[yy_current_state];
1973
135M
      if ( yy_current_state >= 155 )
1974
135M
        yy_c = yy_meta[(unsigned int) yy_c];
1975
135M
      }
1976
253M
    yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
1977
253M
    }
1978
1979
5.09k
  return yy_current_state;
1980
5.09k
}
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.67k
{
2098
2.67k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2099
2100
2.67k
  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.67k
  ap_expr_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2107
2.67k
  ap_expr_yy_load_buffer_state(yyscanner );
2108
2.67k
}
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.80k
{
2148
6.80k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2149
6.80k
  yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2150
6.80k
  yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2151
6.80k
  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2152
6.80k
  yyg->yy_hold_char = *yyg->yy_c_buf_p;
2153
6.80k
}
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.46k
{
2163
1.46k
  YY_BUFFER_STATE b;
2164
    
2165
1.46k
  b = (YY_BUFFER_STATE) ap_expr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2166
1.46k
  if ( ! b )
2167
0
    YY_FATAL_ERROR( "out of dynamic memory in ap_expr_yy_create_buffer()" );
2168
2169
1.46k
  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.46k
  b->yy_ch_buf = (char *) ap_expr_yyalloc(b->yy_buf_size + 2 ,yyscanner );
2175
1.46k
  if ( ! b->yy_ch_buf )
2176
0
    YY_FATAL_ERROR( "out of dynamic memory in ap_expr_yy_create_buffer()" );
2177
2178
1.46k
  b->yy_is_our_buffer = 1;
2179
2180
1.46k
  ap_expr_yy_init_buffer(b,file ,yyscanner);
2181
2182
1.46k
  return b;
2183
1.46k
}
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.46k
{
2191
1.46k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2192
2193
1.46k
  if ( ! b )
2194
0
    return;
2195
2196
1.46k
  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2197
1.46k
    YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2198
2199
1.46k
  if ( b->yy_is_our_buffer )
2200
1.46k
    ap_expr_yyfree((void *) b->yy_ch_buf ,yyscanner );
2201
2202
1.46k
  ap_expr_yyfree((void *) b ,yyscanner );
2203
1.46k
}
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.13k
{
2212
4.13k
  int oerrno = errno;
2213
4.13k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2214
2215
4.13k
  ap_expr_yy_flush_buffer(b ,yyscanner);
2216
2217
4.13k
  b->yy_input_file = file;
2218
4.13k
  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.13k
    if (b != YY_CURRENT_BUFFER){
2225
1.46k
        b->yy_bs_lineno = 1;
2226
1.46k
        b->yy_bs_column = 0;
2227
1.46k
    }
2228
2229
4.13k
        b->yy_is_interactive = 0;
2230
    
2231
4.13k
  errno = oerrno;
2232
4.13k
}
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.13k
{
2240
4.13k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2241
4.13k
  if ( ! b )
2242
0
    return;
2243
2244
4.13k
  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.13k
  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2251
4.13k
  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2252
2253
4.13k
  b->yy_buf_pos = &b->yy_ch_buf[0];
2254
2255
4.13k
  b->yy_at_bol = 1;
2256
4.13k
  b->yy_buffer_status = YY_BUFFER_NEW;
2257
2258
4.13k
  if ( b == YY_CURRENT_BUFFER )
2259
2.67k
    ap_expr_yy_load_buffer_state(yyscanner );
2260
4.13k
}
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.46k
{
2301
1.46k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2302
1.46k
  if (!YY_CURRENT_BUFFER)
2303
1.46k
    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.46k
{
2321
1.46k
  int num_to_alloc;
2322
1.46k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2323
2324
1.46k
  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.46k
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2331
1.46k
    yyg->yy_buffer_stack = (struct yy_buffer_state**)ap_expr_yyalloc
2332
1.46k
                (num_to_alloc * sizeof(struct yy_buffer_state*)
2333
1.46k
                , yyscanner);
2334
1.46k
    if ( ! yyg->yy_buffer_stack )
2335
0
      YY_FATAL_ERROR( "out of dynamic memory in ap_expr_yyensure_buffer_stack()" );
2336
2337
1.46k
    memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2338
2339
1.46k
    yyg->yy_buffer_stack_max = num_to_alloc;
2340
1.46k
    yyg->yy_buffer_stack_top = 0;
2341
1.46k
    return;
2342
1.46k
  }
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
19.6k
{
2451
19.6k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2452
19.6k
  if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
2453
1.46k
    {
2454
1.46k
    yy_size_t new_size;
2455
2456
1.46k
    yyg->yy_start_stack_depth += YY_START_STACK_INCR;
2457
1.46k
    new_size = (yy_size_t) yyg->yy_start_stack_depth * sizeof( int );
2458
2459
1.46k
    if ( ! yyg->yy_start_stack )
2460
1.46k
      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.46k
    if ( ! yyg->yy_start_stack )
2466
0
      YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2467
1.46k
    }
2468
2469
19.6k
  yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
2470
2471
19.6k
  BEGIN(_new_state);
2472
19.6k
}
2473
2474
    static void yy_pop_state  (yyscan_t yyscanner)
2475
19.5k
{
2476
19.5k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2477
19.5k
  if ( --yyg->yy_start_stack_ptr < 0 )
2478
0
    YY_FATAL_ERROR( "start-condition stack underflow" );
2479
2480
19.5k
  BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
2481
19.5k
}
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.46k
{
2583
1.46k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2584
1.46k
    yyextra = user_defined ;
2585
1.46k
}
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.46k
{
2661
1.46k
    if (ptr_yy_globals == NULL){
2662
0
        errno = EINVAL;
2663
0
        return 1;
2664
0
    }
2665
2666
1.46k
    *ptr_yy_globals = (yyscan_t) ap_expr_yyalloc ( sizeof( struct yyguts_t ), NULL );
2667
2668
1.46k
    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.46k
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2675
2676
1.46k
    return yy_init_globals ( *ptr_yy_globals );
2677
1.46k
}
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
2.92k
{
2717
2.92k
    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
2.92k
    yyg->yy_buffer_stack = NULL;
2723
2.92k
    yyg->yy_buffer_stack_top = 0;
2724
2.92k
    yyg->yy_buffer_stack_max = 0;
2725
2.92k
    yyg->yy_c_buf_p = NULL;
2726
2.92k
    yyg->yy_init = 0;
2727
2.92k
    yyg->yy_start = 0;
2728
2729
2.92k
    yyg->yy_start_stack_ptr = 0;
2730
2.92k
    yyg->yy_start_stack_depth = 0;
2731
2.92k
    yyg->yy_start_stack =  NULL;
2732
2733
/* Defined in main.c */
2734
#ifdef YY_STDINIT
2735
    yyin = stdin;
2736
    yyout = stdout;
2737
#else
2738
2.92k
    yyin = NULL;
2739
2.92k
    yyout = NULL;
2740
2.92k
#endif
2741
2742
    /* For future reference: Set errno on error, since we are called by
2743
     * ap_expr_yylex_init()
2744
     */
2745
2.92k
    return 0;
2746
2.92k
}
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.46k
{
2751
1.46k
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2752
2753
    /* Pop the buffer stack, destroying each element. */
2754
2.92k
  while(YY_CURRENT_BUFFER){
2755
1.46k
    ap_expr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2756
1.46k
    YY_CURRENT_BUFFER_LVALUE = NULL;
2757
1.46k
    ap_expr_yypop_buffer_state(yyscanner);
2758
1.46k
  }
2759
2760
  /* Destroy the stack itself. */
2761
1.46k
  ap_expr_yyfree(yyg->yy_buffer_stack ,yyscanner);
2762
1.46k
  yyg->yy_buffer_stack = NULL;
2763
2764
    /* Destroy the start condition stack. */
2765
1.46k
        ap_expr_yyfree(yyg->yy_start_stack ,yyscanner );
2766
1.46k
        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.46k
    yy_init_globals( yyscanner);
2771
2772
    /* Destroy the main struct (reentrant only). */
2773
1.46k
    ap_expr_yyfree ( yyscanner , yyscanner );
2774
1.46k
    yyscanner = NULL;
2775
1.46k
    return 0;
2776
1.46k
}
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.31k
{
2807
7.31k
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2808
7.31k
  (void)yyg;
2809
7.31k
  return malloc(size);
2810
7.31k
}
2811
2812
void *ap_expr_yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
2813
122
{
2814
122
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2815
122
  (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
122
  return realloc(ptr, size);
2825
122
}
2826
2827
void ap_expr_yyfree (void * ptr , yyscan_t yyscanner)
2828
7.31k
{
2829
7.31k
  struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2830
7.31k
  (void)yyg;
2831
7.31k
  free( (char *) ptr ); /* see ap_expr_yyrealloc() for (char *) cast */
2832
7.31k
}
2833
2834
#define YYTABLES_NAME "yytables"
2835
2836
#line 504 "util_expr_scan.l"
2837
2838
2839
2840
2841