#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 26
+#define YYFINAL 27
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 122
+#define YYLAST 120
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 45
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 14
/* YYNRULES -- Number of rules. */
-#define YYNRULES 51
+#define YYNRULES 52
/* YYNRULES -- Number of states. */
-#define YYNSTATES 94
+#define YYNSTATES 95
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
0, 0, 3, 6, 9, 11, 13, 15, 18, 22,
26, 28, 31, 35, 39, 43, 47, 51, 55, 59,
63, 67, 71, 75, 79, 83, 87, 91, 95, 99,
- 101, 105, 107, 111, 114, 116, 118, 120, 122, 126,
- 132, 134, 138, 140, 142, 144, 148, 151, 153, 155,
- 157, 162
+ 101, 105, 107, 111, 114, 116, 118, 120, 122, 124,
+ 128, 134, 136, 140, 142, 144, 146, 150, 153, 155,
+ 157, 159, 164
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
33, 54, -1, 54, 34, 54, -1, 54, 28, 49,
-1, 54, 26, 55, -1, 54, 27, 55, -1, 57,
-1, 41, 50, 42, -1, 54, -1, 50, 43, 54,
- -1, 51, 52, -1, 52, -1, 10, -1, 53, -1,
- 56, -1, 18, 9, 19, -1, 18, 9, 44, 51,
- 19, -1, 8, -1, 54, 35, 54, -1, 53, -1,
- 56, -1, 58, -1, 16, 51, 17, -1, 16, 17,
- -1, 11, -1, 12, -1, 13, -1, 9, 39, 54,
- 40, -1, 9, 39, 54, 40, -1
+ -1, 51, 52, -1, 52, -1, 7, -1, 10, -1,
+ 53, -1, 56, -1, 18, 9, 19, -1, 18, 9,
+ 44, 51, 19, -1, 8, -1, 54, 35, 54, -1,
+ 53, -1, 56, -1, 58, -1, 16, 51, 17, -1,
+ 16, 17, -1, 11, -1, 12, -1, 13, -1, 9,
+ 39, 54, 40, -1, 9, 39, 54, 40, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
0, 112, 112, 113, 114, 117, 118, 119, 120, 121,
122, 123, 124, 125, 128, 129, 130, 131, 132, 133,
134, 135, 136, 137, 138, 139, 140, 141, 142, 145,
- 146, 149, 150, 153, 154, 157, 158, 159, 162, 163,
- 166, 167, 168, 169, 170, 171, 172, 175, 184, 195,
- 202, 205
+ 146, 149, 150, 153, 154, 155, 158, 159, 160, 163,
+ 164, 167, 168, 169, 170, 171, 172, 173, 176, 185,
+ 196, 203, 206
};
#endif
0, 45, 46, 46, 46, 47, 47, 47, 47, 47,
47, 47, 47, 47, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 49,
- 49, 50, 50, 51, 51, 52, 52, 52, 53, 53,
- 54, 54, 54, 54, 54, 54, 54, 55, 55, 56,
- 57, 58
+ 49, 50, 50, 51, 51, 51, 52, 52, 52, 53,
+ 53, 54, 54, 54, 54, 54, 54, 54, 55, 55,
+ 56, 57, 58
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
0, 2, 2, 2, 1, 1, 1, 2, 3, 3,
1, 2, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
- 3, 1, 3, 2, 1, 1, 1, 1, 3, 5,
- 1, 3, 1, 1, 1, 3, 2, 1, 1, 1,
- 4, 4
+ 3, 1, 3, 2, 1, 1, 1, 1, 1, 3,
+ 5, 1, 3, 1, 1, 1, 3, 2, 1, 1,
+ 1, 4, 4
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 0, 0, 0, 4, 0, 5, 6, 40, 0, 49,
- 0, 0, 0, 0, 0, 2, 10, 42, 0, 43,
- 44, 35, 3, 34, 36, 37, 1, 0, 11, 46,
- 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4, 0, 5, 6, 41, 0, 50,
+ 0, 0, 0, 0, 0, 2, 10, 43, 0, 44,
+ 45, 35, 36, 3, 34, 37, 38, 1, 0, 11,
+ 47, 0, 0, 7, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 33, 0, 45, 38, 0, 13, 8,
- 9, 12, 14, 15, 16, 17, 18, 19, 47, 48,
- 27, 28, 0, 0, 26, 29, 20, 21, 22, 23,
- 24, 25, 41, 51, 0, 0, 0, 31, 39, 0,
- 30, 0, 50, 32
+ 0, 0, 0, 0, 33, 0, 46, 39, 0, 13,
+ 8, 9, 12, 14, 15, 16, 17, 18, 19, 48,
+ 49, 27, 28, 0, 0, 26, 29, 20, 21, 22,
+ 23, 24, 25, 42, 52, 0, 0, 0, 31, 40,
+ 0, 30, 0, 51, 32
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 4, 15, 16, 74, 86, 22, 23, 17, 18,
- 70, 19, 75, 20
+ -1, 4, 15, 16, 75, 87, 23, 24, 17, 18,
+ 71, 19, 76, 20
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -26
+#define YYPACT_NINF -22
static const yytype_int8 yypact[] =
{
- 113, 58, 41, -26, 8, -26, -26, -26, 0, -26,
- 76, 6, 5, 58, 58, 51, -26, -26, 78, -26,
- -26, -26, 41, -26, -26, -26, -26, 76, 17, -26,
- 104, -4, -26, 13, 58, 58, 76, 76, 76, 76,
- 76, 76, 76, 15, 15, -3, 76, 76, 76, 76,
- 76, 76, 76, -26, -10, -26, -26, 41, -26, 23,
- -26, 17, 17, 17, 17, 17, 17, 17, -26, -26,
- -26, -26, 24, 76, -26, -26, 17, 17, 17, 17,
- 17, 17, -26, -26, -6, 76, -25, 17, -26, 29,
- -26, 76, -26, 17
+ 21, 50, 60, -22, 8, -22, -22, -22, 2, -22,
+ 98, 7, 65, 50, 50, 81, -22, -22, 70, -22,
+ -22, -22, -22, 42, -22, -22, -22, -22, 98, 16,
+ -22, 62, -13, -22, -21, 50, 50, 98, 98, 98,
+ 98, 98, 98, 98, 108, 108, 9, 98, 98, 98,
+ 98, 98, 98, 98, -22, 36, -22, -22, 60, -22,
+ 40, -22, 16, 16, 16, 16, 16, 16, 16, -22,
+ -22, -22, -22, 43, 98, -22, -22, 16, 16, 16,
+ 16, 16, 16, -22, -22, -6, 98, 67, 16, -22,
+ 73, -22, 98, -22, 16
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -26, -26, 44, -26, -26, -26, -9, -19, -2, -5,
- 26, -1, -26, -26
+ -22, -22, 26, -22, -22, -22, -9, -20, -2, -5,
+ 41, -1, -22, -22
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 24, 25, 30, 53, 21, 28, 72, 9, 26, 24,
- 25, 53, 12, 88, 31, 56, 21, 90, 91, 9,
- 24, 25, 54, 29, 12, 52, 68, 69, 24, 25,
- 83, 61, 62, 63, 64, 65, 66, 67, 73, 27,
- 57, 76, 77, 78, 79, 80, 81, 82, 84, 34,
- 35, 21, 52, 58, 9, 24, 25, 32, 33, 12,
- 35, 5, 6, 85, 52, 53, 7, 8, 87, 92,
- 71, 9, 10, 0, 11, 0, 12, 0, 59, 60,
- 89, 0, 24, 25, 7, 8, 93, 34, 35, 9,
- 0, 0, 11, 36, 12, 0, 13, 14, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 21, 0, 0, 9, 1, 2,
- 3, 55, 12
+ 25, 26, 31, 54, 22, 29, 57, 9, 27, 25,
+ 26, 54, 12, 89, 21, 35, 36, 22, 73, 59,
+ 9, 25, 26, 55, 30, 12, 1, 2, 3, 25,
+ 26, 58, 62, 63, 64, 65, 66, 67, 68, 33,
+ 34, 28, 77, 78, 79, 80, 81, 82, 83, 85,
+ 74, 53, 22, 5, 6, 9, 25, 26, 7, 8,
+ 12, 60, 61, 9, 10, 54, 11, 21, 12, 88,
+ 22, 53, 22, 9, 32, 9, 84, 36, 12, 56,
+ 12, 90, 86, 25, 26, 37, 72, 94, 13, 14,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 7, 8, 53, 91,
+ 92, 9, 0, 93, 11, 0, 12, 35, 36, 69,
+ 70
};
static const yytype_int8 yycheck[] =
{
- 2, 2, 11, 22, 10, 10, 9, 13, 0, 11,
- 11, 30, 18, 19, 9, 19, 10, 42, 43, 13,
- 22, 22, 27, 17, 18, 35, 11, 12, 30, 30,
- 40, 36, 37, 38, 39, 40, 41, 42, 41, 39,
- 44, 46, 47, 48, 49, 50, 51, 52, 57, 36,
- 37, 10, 35, 40, 13, 57, 57, 13, 14, 18,
- 37, 3, 4, 39, 35, 84, 8, 9, 73, 40,
- 44, 13, 14, -1, 16, -1, 18, -1, 34, 35,
- 85, -1, 84, 84, 8, 9, 91, 36, 37, 13,
- -1, -1, 16, 15, 18, -1, 38, 39, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 10, -1, -1, 13, 5, 6,
- 7, 17, 18
+ 2, 2, 11, 23, 10, 10, 19, 13, 0, 11,
+ 11, 31, 18, 19, 7, 36, 37, 10, 9, 40,
+ 13, 23, 23, 28, 17, 18, 5, 6, 7, 31,
+ 31, 44, 37, 38, 39, 40, 41, 42, 43, 13,
+ 14, 39, 47, 48, 49, 50, 51, 52, 53, 58,
+ 41, 35, 10, 3, 4, 13, 58, 58, 8, 9,
+ 18, 35, 36, 13, 14, 85, 16, 7, 18, 74,
+ 10, 35, 10, 13, 9, 13, 40, 37, 18, 17,
+ 18, 86, 39, 85, 85, 15, 45, 92, 38, 39,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 8, 9, 35, 42,
+ 43, 13, -1, 40, 16, -1, 18, 36, 37, 11,
+ 12
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
{
0, 5, 6, 7, 46, 3, 4, 8, 9, 13,
14, 16, 18, 38, 39, 47, 48, 53, 54, 56,
- 58, 10, 51, 52, 53, 56, 0, 39, 54, 17,
- 51, 9, 47, 47, 36, 37, 15, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 52, 54, 17, 19, 44, 40, 47,
- 47, 54, 54, 54, 54, 54, 54, 54, 11, 12,
- 55, 55, 9, 41, 49, 57, 54, 54, 54, 54,
- 54, 54, 54, 40, 51, 39, 50, 54, 19, 54,
- 42, 43, 40, 54
+ 58, 7, 10, 51, 52, 53, 56, 0, 39, 54,
+ 17, 51, 9, 47, 47, 36, 37, 15, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 52, 54, 17, 19, 44, 40,
+ 47, 47, 54, 54, 54, 54, 54, 54, 54, 11,
+ 12, 55, 55, 9, 41, 49, 57, 54, 54, 54,
+ 54, 54, 54, 54, 40, 51, 39, 50, 54, 19,
+ 54, 42, 43, 40, 54
};
#define yyerrok (yyerrstatus = 0)
case 35:
/* Line 1455 of yacc.c */
-#line 157 "util_expr_parse.y"
- { (yyval.exVal) = ap_expr_make(op_String, (yyvsp[(1) - (1)].cpVal), NULL, ctx); ;}
+#line 155 "util_expr_parse.y"
+ { YYABORT; ;}
break;
case 36:
/* Line 1455 of yacc.c */
#line 158 "util_expr_parse.y"
- { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); ;}
+ { (yyval.exVal) = ap_expr_make(op_String, (yyvsp[(1) - (1)].cpVal), NULL, ctx); ;}
break;
case 37:
case 38:
/* Line 1455 of yacc.c */
-#line 162 "util_expr_parse.y"
- { (yyval.exVal) = ap_expr_var_make((yyvsp[(2) - (3)].cpVal), ctx); ;}
+#line 160 "util_expr_parse.y"
+ { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); ;}
break;
case 39:
/* Line 1455 of yacc.c */
#line 163 "util_expr_parse.y"
- { (yyval.exVal) = ap_expr_str_func_make((yyvsp[(2) - (5)].cpVal), (yyvsp[(4) - (5)].exVal), ctx); ;}
+ { (yyval.exVal) = ap_expr_var_make((yyvsp[(2) - (3)].cpVal), ctx); ;}
break;
case 40:
/* Line 1455 of yacc.c */
-#line 166 "util_expr_parse.y"
- { (yyval.exVal) = ap_expr_make(op_Digit, (yyvsp[(1) - (1)].cpVal), NULL, ctx); ;}
+#line 164 "util_expr_parse.y"
+ { (yyval.exVal) = ap_expr_str_func_make((yyvsp[(2) - (5)].cpVal), (yyvsp[(4) - (5)].exVal), ctx); ;}
break;
case 41:
/* Line 1455 of yacc.c */
#line 167 "util_expr_parse.y"
- { (yyval.exVal) = ap_expr_make(op_Concat, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); ;}
+ { (yyval.exVal) = ap_expr_make(op_Digit, (yyvsp[(1) - (1)].cpVal), NULL, ctx); ;}
break;
case 42:
/* Line 1455 of yacc.c */
#line 168 "util_expr_parse.y"
- { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); ;}
+ { (yyval.exVal) = ap_expr_make(op_Concat, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); ;}
break;
case 43:
/* Line 1455 of yacc.c */
#line 171 "util_expr_parse.y"
- { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); ;}
+ { (yyval.exVal) = (yyvsp[(1) - (1)].exVal); ;}
break;
case 46:
/* Line 1455 of yacc.c */
#line 172 "util_expr_parse.y"
- { (yyval.exVal) = ap_expr_make(op_String, "", NULL, ctx); ;}
+ { (yyval.exVal) = (yyvsp[(2) - (3)].exVal); ;}
break;
case 47:
/* Line 1455 of yacc.c */
-#line 175 "util_expr_parse.y"
+#line 173 "util_expr_parse.y"
+ { (yyval.exVal) = ap_expr_make(op_String, "", NULL, ctx); ;}
+ break;
+
+ case 48:
+
+/* Line 1455 of yacc.c */
+#line 176 "util_expr_parse.y"
{
ap_regex_t *regex;
if ((regex = ap_pregcomp(ctx->pool, (yyvsp[(1) - (1)].cpVal),
;}
break;
- case 48:
+ case 49:
/* Line 1455 of yacc.c */
-#line 184 "util_expr_parse.y"
+#line 185 "util_expr_parse.y"
{
ap_regex_t *regex;
if ((regex = ap_pregcomp(ctx->pool, (yyvsp[(1) - (1)].cpVal),
;}
break;
- case 49:
+ case 50:
/* Line 1455 of yacc.c */
-#line 195 "util_expr_parse.y"
+#line 196 "util_expr_parse.y"
{
int *n = apr_palloc(ctx->pool, sizeof(int));
*n = (yyvsp[(1) - (1)].num);
;}
break;
- case 50:
+ case 51:
/* Line 1455 of yacc.c */
-#line 202 "util_expr_parse.y"
+#line 203 "util_expr_parse.y"
{ (yyval.exVal) = ap_expr_list_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); ;}
break;
- case 51:
+ case 52:
/* Line 1455 of yacc.c */
-#line 205 "util_expr_parse.y"
+#line 206 "util_expr_parse.y"
{ (yyval.exVal) = ap_expr_str_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); ;}
break;
/* Line 1455 of yacc.c */
-#line 1846 "util_expr_parse.c"
+#line 1853 "util_expr_parse.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
/* Line 1675 of yacc.c */
-#line 208 "util_expr_parse.y"
+#line 209 "util_expr_parse.y"
void yyerror(ap_expr_parse_ctx_t *ctx, char *s)
#define YY_EXTRA_TYPE ap_expr_parse_ctx_t*
-#define PERROR(msg) yyextra->error2 = msg ; return T_ERROR;
+#define PERROR(msg) do { yyextra->error2 = msg ; return T_ERROR; } while (0)
#define str_ptr (yyextra->scan_ptr)
#define str_buf (yyextra->scan_buf)
#define str_del (yyextra->scan_del)
-#line 609 "util_expr_scan.c"
+#define STR_APPEND(c) do { \
+ *str_ptr++ = (c); \
+ if (str_ptr >= str_buf + sizeof(str_buf)) \
+ PERROR("String too long"); \
+ } while (0)
+
+#line 615 "util_expr_scan.c"
#define INITIAL 0
#define str 1
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 72 "util_expr_scan.l"
+#line 78 "util_expr_scan.l"
char regex_buf[MAX_STRING_LEN];
/*
* Whitespaces
*/
-#line 880 "util_expr_scan.c"
+#line 886 "util_expr_scan.c"
yylval = yylval_param;
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
-#line 97 "util_expr_scan.l"
+#line 103 "util_expr_scan.l"
{
/* NOP */
}
*/
case 2:
YY_RULE_SETUP
-#line 104 "util_expr_scan.l"
+#line 110 "util_expr_scan.l"
{
str_ptr = str_buf;
str_del = yytext[0];
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 110 "util_expr_scan.l"
+#line 116 "util_expr_scan.l"
{
if (yytext[0] == str_del) {
if (YY_START == var) {
}
}
else {
- *str_ptr++ = yytext[0];
+ STR_APPEND(yytext[0]);
}
}
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 132 "util_expr_scan.l"
+#line 138 "util_expr_scan.l"
{
PERROR("Unterminated string or variable");
}
YY_BREAK
case YY_STATE_EOF(var):
case YY_STATE_EOF(vararg):
-#line 135 "util_expr_scan.l"
+#line 141 "util_expr_scan.l"
{
PERROR("Unterminated string or variable");
}
YY_BREAK
case YY_STATE_EOF(str):
-#line 138 "util_expr_scan.l"
+#line 144 "util_expr_scan.l"
{
if (!(yyextra->flags & AP_EXPR_FLAG_STRING_RESULT)) {
PERROR("Unterminated string or variable");
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 151 "util_expr_scan.l"
+#line 157 "util_expr_scan.l"
{
int result;
PERROR("Escape sequence out of bound");
}
else {
- *str_ptr++ = result;
+ STR_APPEND(result);
}
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 162 "util_expr_scan.l"
+#line 168 "util_expr_scan.l"
{
PERROR("Bad escape sequence");
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 165 "util_expr_scan.l"
-{ *str_ptr++ = '\n'; }
+#line 171 "util_expr_scan.l"
+{ STR_APPEND('\n'); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 166 "util_expr_scan.l"
-{ *str_ptr++ = '\r'; }
+#line 172 "util_expr_scan.l"
+{ STR_APPEND('\r'); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 167 "util_expr_scan.l"
-{ *str_ptr++ = '\t'; }
+#line 173 "util_expr_scan.l"
+{ STR_APPEND('\t'); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 168 "util_expr_scan.l"
-{ *str_ptr++ = '\b'; }
+#line 174 "util_expr_scan.l"
+{ STR_APPEND('\b'); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 169 "util_expr_scan.l"
-{ *str_ptr++ = '\f'; }
+#line 175 "util_expr_scan.l"
+{ STR_APPEND('\f'); }
YY_BREAK
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
-#line 170 "util_expr_scan.l"
-{
- *str_ptr++ = yytext[1];
-}
+#line 176 "util_expr_scan.l"
+{ STR_APPEND(yytext[1]); }
YY_BREAK
/* regexp backref inside string/arg */
case 13:
YY_RULE_SETUP
-#line 175 "util_expr_scan.l"
+#line 179 "util_expr_scan.l"
{
if (str_ptr != str_buf) {
/* return what we have so far and scan '$x' again */
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 190 "util_expr_scan.l"
+#line 194 "util_expr_scan.l"
{
char *cp = yytext;
- while (*cp != '\0')
- *str_ptr++ = *cp++;
+ while (*cp != '\0') {
+ STR_APPEND(*cp);
+ cp++;
+ }
}
YY_BREAK
/* variable inside string/arg */
case 15:
YY_RULE_SETUP
-#line 197 "util_expr_scan.l"
+#line 203 "util_expr_scan.l"
{
if (str_ptr != str_buf) {
/* return what we have so far and scan '%{' again */
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 212 "util_expr_scan.l"
+#line 218 "util_expr_scan.l"
{
- *str_ptr++ = yytext[0];
+ STR_APPEND(yytext[0]);
}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 216 "util_expr_scan.l"
+#line 222 "util_expr_scan.l"
{
- *str_ptr++ = yytext[0];
+ STR_APPEND(yytext[0]);
}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 220 "util_expr_scan.l"
+#line 226 "util_expr_scan.l"
{
yy_push_state(var, yyscanner);
return T_VAR_BEGIN;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 225 "util_expr_scan.l"
+#line 231 "util_expr_scan.l"
{
yylval->num = yytext[1] - '0';
return T_REGEX_BACKREF;
*/
case 20:
YY_RULE_SETUP
-#line 233 "util_expr_scan.l"
+#line 239 "util_expr_scan.l"
{
yylval->cpVal = apr_pstrdup(yyextra->pool, yytext);
return T_ID;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 238 "util_expr_scan.l"
+#line 244 "util_expr_scan.l"
{
yy_pop_state(yyscanner);
return T_VAR_END;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 243 "util_expr_scan.l"
+#line 249 "util_expr_scan.l"
{
BEGIN(vararg);
return yytext[0];
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 248 "util_expr_scan.l"
+#line 254 "util_expr_scan.l"
{
char *msg = apr_psprintf(yyextra->pool,
"Invalid character in variable name '%c'", yytext[0]);
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 254 "util_expr_scan.l"
+#line 260 "util_expr_scan.l"
{
if (str_ptr != str_buf) {
/* return what we have so far and scan '}' again */
*/
case 25:
YY_RULE_SETUP
-#line 272 "util_expr_scan.l"
+#line 278 "util_expr_scan.l"
{
regex_del = yytext[1];
regex_ptr = regex_buf;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 277 "util_expr_scan.l"
+#line 283 "util_expr_scan.l"
{
regex_del = yytext[0];
regex_ptr = regex_buf;
case 27:
/* rule 27 can match eol */
YY_RULE_SETUP
-#line 282 "util_expr_scan.l"
+#line 288 "util_expr_scan.l"
{
if (yytext[0] == regex_del) {
*regex_ptr = '\0';
}
else {
*regex_ptr++ = yytext[0];
+ if (regex_ptr >= regex_buf + sizeof(regex_buf))
+ PERROR("Regexp too long");
}
}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 291 "util_expr_scan.l"
+#line 299 "util_expr_scan.l"
{
yylval->cpVal = apr_pstrdup(yyextra->pool, regex_buf);
BEGIN(INITIAL);
case 29:
/* rule 29 can match eol */
YY_RULE_SETUP
-#line 296 "util_expr_scan.l"
+#line 304 "util_expr_scan.l"
{
yylval->cpVal = apr_pstrdup(yyextra->pool, regex_buf);
yyless(0);
}
YY_BREAK
case YY_STATE_EOF(regex_flags):
-#line 302 "util_expr_scan.l"
+#line 310 "util_expr_scan.l"
{
yylval->cpVal = apr_pstrdup(yyextra->pool, regex_buf);
BEGIN(INITIAL);
*/
case 30:
YY_RULE_SETUP
-#line 311 "util_expr_scan.l"
+#line 319 "util_expr_scan.l"
{ return T_OP_STR_EQ; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 312 "util_expr_scan.l"
+#line 320 "util_expr_scan.l"
{ return T_OP_STR_NE; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 313 "util_expr_scan.l"
+#line 321 "util_expr_scan.l"
{ return T_OP_STR_LT; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 314 "util_expr_scan.l"
+#line 322 "util_expr_scan.l"
{ return T_OP_STR_LE; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 315 "util_expr_scan.l"
+#line 323 "util_expr_scan.l"
{ return T_OP_STR_GT; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 316 "util_expr_scan.l"
+#line 324 "util_expr_scan.l"
{ return T_OP_STR_GE; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 317 "util_expr_scan.l"
+#line 325 "util_expr_scan.l"
{ return T_OP_REG; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 318 "util_expr_scan.l"
+#line 326 "util_expr_scan.l"
{ return T_OP_NRE; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 319 "util_expr_scan.l"
+#line 327 "util_expr_scan.l"
{ return T_OP_AND; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 320 "util_expr_scan.l"
+#line 328 "util_expr_scan.l"
{ return T_OP_AND; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 321 "util_expr_scan.l"
+#line 329 "util_expr_scan.l"
{ return T_OP_OR; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 322 "util_expr_scan.l"
+#line 330 "util_expr_scan.l"
{ return T_OP_OR; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 323 "util_expr_scan.l"
+#line 331 "util_expr_scan.l"
{ return T_OP_NOT; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 324 "util_expr_scan.l"
+#line 332 "util_expr_scan.l"
{ return T_OP_NOT; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 325 "util_expr_scan.l"
+#line 333 "util_expr_scan.l"
{ return T_OP_CONCAT; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 326 "util_expr_scan.l"
+#line 334 "util_expr_scan.l"
{ return T_OP_IN; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 327 "util_expr_scan.l"
+#line 335 "util_expr_scan.l"
{ return T_OP_EQ; }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 328 "util_expr_scan.l"
+#line 336 "util_expr_scan.l"
{ return T_OP_NE; }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 329 "util_expr_scan.l"
+#line 337 "util_expr_scan.l"
{ return T_OP_GE; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 330 "util_expr_scan.l"
+#line 338 "util_expr_scan.l"
{ return T_OP_LE; }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 331 "util_expr_scan.l"
+#line 339 "util_expr_scan.l"
{ return T_OP_GT; }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 332 "util_expr_scan.l"
+#line 340 "util_expr_scan.l"
{ return T_OP_LT; }
YY_BREAK
/* for compatibility with ssl_expr */
case 52:
YY_RULE_SETUP
-#line 335 "util_expr_scan.l"
+#line 343 "util_expr_scan.l"
{ return T_OP_LT; }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 336 "util_expr_scan.l"
+#line 344 "util_expr_scan.l"
{ return T_OP_LE; }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 337 "util_expr_scan.l"
+#line 345 "util_expr_scan.l"
{ return T_OP_GT; }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 338 "util_expr_scan.l"
+#line 346 "util_expr_scan.l"
{ return T_OP_GE; }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 339 "util_expr_scan.l"
+#line 347 "util_expr_scan.l"
{ return T_OP_NE; }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 340 "util_expr_scan.l"
+#line 348 "util_expr_scan.l"
{ return T_OP_EQ; }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 341 "util_expr_scan.l"
+#line 349 "util_expr_scan.l"
{ return T_OP_IN; }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 343 "util_expr_scan.l"
+#line 351 "util_expr_scan.l"
{
yylval->cpVal = apr_pstrdup(yyextra->pool, yytext + 1);
return T_OP_UNARY;
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 348 "util_expr_scan.l"
+#line 356 "util_expr_scan.l"
{
yylval->cpVal = apr_pstrdup(yyextra->pool, yytext + 1);
return T_OP_BINARY;
*/
case 61:
YY_RULE_SETUP
-#line 356 "util_expr_scan.l"
+#line 364 "util_expr_scan.l"
{ return T_TRUE; }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 357 "util_expr_scan.l"
+#line 365 "util_expr_scan.l"
{ return T_FALSE; }
YY_BREAK
/*
*/
case 63:
YY_RULE_SETUP
-#line 362 "util_expr_scan.l"
+#line 370 "util_expr_scan.l"
{
yylval->cpVal = apr_pstrdup(yyextra->pool, yytext);
return T_DIGIT;
*/
case 64:
YY_RULE_SETUP
-#line 370 "util_expr_scan.l"
+#line 378 "util_expr_scan.l"
{
yylval->cpVal = apr_pstrdup(yyextra->pool, yytext);
return T_ID;
*/
case 65:
YY_RULE_SETUP
-#line 378 "util_expr_scan.l"
+#line 386 "util_expr_scan.l"
{
return yytext[0];
}
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
-#line 385 "util_expr_scan.l"
+#line 393 "util_expr_scan.l"
{
char *msg = apr_psprintf(yyextra->pool, "Parse error near '%c'", yytext[0]);
PERROR(msg);
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 390 "util_expr_scan.l"
+#line 398 "util_expr_scan.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 1515 "util_expr_scan.c"
+#line 1523 "util_expr_scan.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(regex):
yyterminate();
#define YYTABLES_NAME "yytables"
-#line 390 "util_expr_scan.l"
+#line 398 "util_expr_scan.l"