-/* Generated by re2c 0.5 on Fri Mar 1 17:51:19 2002 */
+/* Generated by re2c 0.5 on Tue Mar 26 11:22:58 2002 */
#line 1 "url_scanner_ex.re"
/*
+----------------------------------------------------------------------+
#undef YYLIMIT
#undef YYMARKER
-static inline void tag_arg(url_adapt_state_ex_t *ctx, char quote TSRMLS_DC)
+static inline void tag_arg(url_adapt_state_ex_t *ctx, char quotes, char type TSRMLS_DC)
{
char f = 0;
if (strncasecmp(ctx->arg.c, ctx->lookup_data, ctx->arg.len) == 0)
f = 1;
- smart_str_appendc(&ctx->result, quote);
+ if (quotes)
+ smart_str_appendc(&ctx->result, type);
if (f) {
append_modified_url(&ctx->val, &ctx->result, &ctx->q_name, &ctx->q_value, PG(arg_separator).output);
} else {
smart_str_append(&ctx->result, &ctx->val);
}
- smart_str_appendc(&ctx->result, quote);
+ if (quotes)
+ smart_str_appendc(&ctx->result, type);
}
enum {
static inline void handle_val(STD_PARA, char quotes, char type)
{
smart_str_setl(&ctx->val, start + quotes, YYCURSOR - start - quotes * 2);
- tag_arg(ctx, type TSRMLS_CC);
+ tag_arg(ctx, quotes, type TSRMLS_CC);
}
#ifdef SCANNER_DEBUG
if(yybm[0+yych] & 128) goto yy15;
yy13: yych = *++YYCURSOR;
yy14:
-#line 261
+#line 263
{ passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; }
yy15: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy16: if(yybm[0+yych] & 128) goto yy15;
yy17:
-#line 262
+#line 264
{ passthru(STD_ARGS); goto state_plain; }
}
-#line 263
+#line 265
state_tag:
yy20: yych = *++YYCURSOR;
goto yy25;
yy21:
-#line 268
+#line 270
{ handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); if (STATE == STATE_PLAIN) goto state_plain; else goto state_next_arg; }
yy22: yych = *++YYCURSOR;
yy23:
-#line 269
+#line 271
{ passthru(STD_ARGS); goto state_plain_begin; }
yy24: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yy25: if(yybm[0+yych] & 128) goto yy24;
goto yy21;
}
-#line 270
+#line 272
state_next_arg_begin:
}
yy28: yych = *++YYCURSOR;
yy29:
-#line 278
+#line 280
{ passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; }
yy30: yych = *++YYCURSOR;
goto yy37;
yy31:
-#line 279
+#line 281
{ passthru(STD_ARGS); goto state_next_arg; }
yy32: yych = *++YYCURSOR;
yy33:
-#line 280
+#line 282
{ --YYCURSOR; STATE = STATE_ARG; goto state_arg; }
yy34: yych = *++YYCURSOR;
yy35:
-#line 281
+#line 283
{ passthru(STD_ARGS); goto state_plain_begin; }
yy36: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yy37: if(yybm[0+yych] & 128) goto yy36;
goto yy31;
}
-#line 282
+#line 284
state_arg:
yy40: yych = *++YYCURSOR;
goto yy45;
yy41:
-#line 287
+#line 289
{ passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; }
yy42: yych = *++YYCURSOR;
yy43:
-#line 288
+#line 290
{ passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; }
yy44: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yy45: if(yybm[0+yych] & 128) goto yy44;
goto yy41;
}
-#line 289
+#line 291
state_before_val:
if(yych == ' ') goto yy55;
if(yych == '=') goto yy53;
yy49:
-#line 295
+#line 297
{ --YYCURSOR; goto state_next_arg_begin; }
yy50: yych = *++YYCURSOR;
goto yy54;
yy51:
-#line 294
+#line 296
{ passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; }
yy52: yych = *++YYCURSOR;
goto yy49;
case 0: goto yy49;
}
}
-#line 296
+#line 298
yych = *(YYMARKER = ++YYCURSOR);
if(yych != '>') goto yy74;
yy61:
-#line 305
+#line 307
{ passthru(STD_ARGS); goto state_next_arg_begin; }
yy62: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
yy63: yych = *++YYCURSOR;
goto yy67;
yy64:
-#line 304
+#line 306
{ handle_val(STD_ARGS, 0, '"'); goto state_next_arg_begin; }
yy65: yych = *++YYCURSOR;
goto yy61;
}
yy71: yych = *++YYCURSOR;
yy72:
-#line 303
+#line 305
{ handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
yy73: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
if(yych >= '>') goto yy70;
yy75: yych = *++YYCURSOR;
yy76:
-#line 302
+#line 304
{ handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
}
-#line 306
+#line 308
stop:
#undef YYLIMIT
#undef YYMARKER
-static inline void tag_arg(url_adapt_state_ex_t *ctx, char quote TSRMLS_DC)
+static inline void tag_arg(url_adapt_state_ex_t *ctx, char quotes, char type TSRMLS_DC)
{
char f = 0;
if (strncasecmp(ctx->arg.c, ctx->lookup_data, ctx->arg.len) == 0)
f = 1;
- smart_str_appendc(&ctx->result, quote);
+ if (quotes)
+ smart_str_appendc(&ctx->result, type);
if (f) {
append_modified_url(&ctx->val, &ctx->result, &ctx->q_name, &ctx->q_value, PG(arg_separator).output);
} else {
smart_str_append(&ctx->result, &ctx->val);
}
- smart_str_appendc(&ctx->result, quote);
+ if (quotes)
+ smart_str_appendc(&ctx->result, type);
}
enum {
static inline void handle_val(STD_PARA, char quotes, char type)
{
smart_str_setl(&ctx->val, start + quotes, YYCURSOR - start - quotes * 2);
- tag_arg(ctx, type TSRMLS_CC);
+ tag_arg(ctx, quotes, type TSRMLS_CC);
}
#ifdef SCANNER_DEBUG