util_expr_scan.c revision ecf81a95050b12e1e0cc25d05714199735225794
db878466c5e95073429dda0bdd001f45e9486e16fielding#define YY_INT_ALIGNED short int
db878466c5e95073429dda0bdd001f45e9486e16fielding/* A lexical scanner generated by flex */
beaad6ac31022179c44d88536811e9ccd9425696nd/* First, we deal with platform-specific or compiler-specific issues. */
beaad6ac31022179c44d88536811e9ccd9425696nd/* begin standard C headers. */
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd/* end standard C headers. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* flex integer type definitions */
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd * if you want the limit (max/min) macros for int types.
66e48875fca2df6669dab4f2690ee36c6913c0ffndtypedef signed char flex_int8_t;
7e68fce3cbd2246164e045a51ecd77f9f26680edndtypedef short int flex_int16_t;
7e68fce3cbd2246164e045a51ecd77f9f26680edndtypedef unsigned char flex_uint8_t;
7e68fce3cbd2246164e045a51ecd77f9f26680edndtypedef unsigned short int flex_uint16_t;
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndtypedef unsigned int flex_uint32_t;
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Limits of integral types. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#endif /* ! C99 */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#endif /* ! FLEXINT_H */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* The "const" storage-class-modifier is valid. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#else /* ! __cplusplus */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* C99 requires __STDC__ to be defined as 1. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#if defined (__STDC__)
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#endif /* defined (__STDC__) */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#endif /* ! __cplusplus */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#define yyconst const
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Returned upon end-of-file. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Promotes a possibly negative, possibly signed char to an unsigned
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * integer for use as an array index. If the signed char is negative,
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * we want to instead treat it as an 8-bit unsigned char, hence the
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * double cast.
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* An opaque pointer. */
7e68fce3cbd2246164e045a51ecd77f9f26680edndtypedef void* yyscan_t;
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* For convenience, these vars (plus the bison vars far below)
7e68fce3cbd2246164e045a51ecd77f9f26680ednd are macros in the reentrant scanner. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Enter a start condition. This macro really ought to take a parameter,
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * but we do it the disgusting crufty way forced on us by the ()-less
7e68fce3cbd2246164e045a51ecd77f9f26680ednd * definition of BEGIN.
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Translate the current start state into a value that can be later handed
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd * to BEGIN to return to the state. The YYSTATE alias is for lex
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd * compatibility.
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Action number for EOF rule of a given start state. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Special action meaning "start processing a new file". */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Size of default input buffer. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* On IA-64, the buffer size is 16k, not 8k.
66e48875fca2df6669dab4f2690ee36c6913c0ffnd * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd * Ditto for the __ia64__ case accordingly.
66e48875fca2df6669dab4f2690ee36c6913c0ffnd#endif /* __ia64__ */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* The state buf must be large enough to hold one state per character in the main buffer.
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
7e68fce3cbd2246164e045a51ecd77f9f26680ednd/* Return all but the first "n" matched characters back to the input stream. */
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#define yyless(n) \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd /* Undo effects of setting up yytext. */ \
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd while ( 0 )
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
int yy_n_chars;
int yy_is_our_buffer;
int yy_is_interactive;
int yy_at_bol;
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
: NULL)
if ( ! YY_CURRENT_BUFFER ){ \
if ( ! YY_CURRENT_BUFFER ){\
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
typedef int yy_state_type;
#define YY_DO_BEFORE_ACTION \
struct yy_trans_info
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
#include "util_expr_private.h"
#include "util_expr_parse.h"
#define STR_APPEND(c) do { \
*str_ptr++ = (c); \
#define INITIAL 0
#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
#include <unistd.h>
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
struct yyguts_t
char yy_hold_char;
int yy_n_chars;
int yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
int yy_start_stack_ptr;
int yy_start_stack_depth;
int *yy_start_stack;
char* yy_last_accepting_cpos;
int yylineno_r;
int yy_flex_debug_r;
char *yytext_r;
int yy_more_flag;
int yy_more_len;
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
#ifndef yytext_ptr
#ifdef YY_NEED_STRLEN
#ifndef YY_NO_INPUT
#ifdef __cplusplus
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
#ifndef ECHO
#ifndef YY_INPUT
size_t n; \
for ( n = 0; n < max_size && \
buf[n] = (char) c; \
buf[n++] = (char) c; \
result = n; \
errno=0; \
errno=0; \
#ifndef yyterminate
#ifndef YY_START_STACK_INCR
#ifndef YY_FATAL_ERROR
#ifndef YY_DECL
extern int ap_expr_yylex \
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#ifndef YY_BREAK
#define YY_BREAK break;
#define YY_RULE_SETUP \
register int yy_act;
return T_EXPR_STRING;
return T_EXPR_BOOL;
#ifdef YY_USER_INIT
if ( ! yyin )
if ( ! yyout )
if ( ! YY_CURRENT_BUFFER ) {
++yy_cp;
switch ( yy_act )
goto yy_find_action;
return T_STR_BEGIN;
return T_STR_END;
yyless(0);
return T_STRING;
return T_STRING;
int result;
yyless(0);
return T_STRING;
return T_REGEX_BACKREF;
cp++;
yyless(0);
return T_STRING;
return T_VAR_BEGIN;
return T_VAR_BEGIN;
return T_REGEX_BACKREF;
return T_ID;
return T_VAR_END;
return yytext[0];
yyless(0);
return T_STRING;
return T_VAR_END;
return T_REGEX_I;
yyless(0);
return T_REGEX;
return T_REGEX;
{ return T_OP_STR_EQ; }
{ return T_OP_STR_NE; }
{ return T_OP_STR_LT; }
{ return T_OP_STR_LE; }
{ return T_OP_STR_GT; }
{ return T_OP_STR_GE; }
{ return T_OP_REG; }
{ return T_OP_NRE; }
{ return T_OP_AND; }
{ return T_OP_AND; }
{ return T_OP_OR; }
{ return T_OP_OR; }
{ return T_OP_NOT; }
{ return T_OP_NOT; }
{ return T_OP_CONCAT; }
{ return T_OP_IN; }
{ return T_OP_EQ; }
{ return T_OP_NE; }
{ return T_OP_GE; }
{ return T_OP_LE; }
{ return T_OP_GT; }
{ return T_OP_LT; }
{ return T_OP_LT; }
{ return T_OP_LE; }
{ return T_OP_GT; }
{ return T_OP_GE; }
{ return T_OP_NE; }
{ return T_OP_EQ; }
{ return T_OP_IN; }
return T_OP_UNARY;
return T_OP_BINARY;
{ return T_TRUE; }
{ return T_FALSE; }
return T_DIGIT;
return T_ID;
return yytext[0];
yyterminate();
case YY_END_OF_BUFFER:
if ( yy_next_state )
goto yy_match;
goto yy_find_action;
case EOB_ACT_END_OF_FILE:
goto do_action;
case EOB_ACT_CONTINUE_SCAN:
goto yy_match;
case EOB_ACT_LAST_MATCH:
goto yy_find_action;
register int number_to_move, i;
int ret_val;
return EOB_ACT_END_OF_FILE;
return EOB_ACT_LAST_MATCH;
for ( i = 0; i < number_to_move; ++i )
int num_to_read =
while ( num_to_read <= 0 )
int yy_c_buf_p_offset =
if ( b->yy_is_our_buffer )
if ( new_size <= 0 )
b->yy_ch_buf = (char *)
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ap_expr_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
return ret_val;
register char *yy_cp;
return yy_current_state;
register int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
case EOB_ACT_LAST_MATCH:
case EOB_ACT_END_OF_FILE:
return EOF;
#ifdef __cplusplus
case EOB_ACT_CONTINUE_SCAN:
if ( ! YY_CURRENT_BUFFER ){
if ( YY_CURRENT_BUFFER )
if ( ! b->yy_ch_buf )
if ( b->yy_is_our_buffer )
if (b != YY_CURRENT_BUFFER){
b->yy_bs_column = 0;
b->yy_is_interactive = 0;
b->yy_n_chars = 0;
if ( b == YY_CURRENT_BUFFER )
if ( YY_CURRENT_BUFFER )
if (YY_CURRENT_BUFFER)
if (!YY_CURRENT_BUFFER)
if (YY_CURRENT_BUFFER) {
int num_to_alloc;
, yyscanner);
, yyscanner);
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_is_interactive = 0;
b->yy_fill_buffer = 0;
YY_BUFFER_STATE ap_expr_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
char *buf;
yy_size_t n;
if ( ! buf )
for ( i = 0; i < _yybytes_len; ++i )
#ifndef YY_EXIT_FAILURE
#define yyless(n) \
int yyless_macro_arg = (n); \
return yyextra;
if (! YY_CURRENT_BUFFER)
return yylineno;
return yyin;
return yyout;
return yyleng;
return yytext;
if (! YY_CURRENT_BUFFER )
return yy_flex_debug;
return yylval;
/* Defined in main.c */
#ifdef YY_STDINIT
while(YY_CURRENT_BUFFER){
#ifndef yytext_ptr
#ifdef YY_NEED_STRLEN