any = [\000-\377];
N = (any\[<]);
alpha = [a-zA-Z];
+alphadash = ([a-zA-Z] | "-");
*/
#define YYFILL(n) goto done
#define STD_PARA url_adapt_state_ex_t *ctx, char *start, char *YYCURSOR TSRMLS_DC
#define STD_ARGS ctx, start, xp TSRMLS_CC
+#if SCANNER_DEBUG
+#define scdebug(x) printf x
+#else
+#define scdebug(x)
+#endif
+
static inline void passthru(STD_PARA)
{
+ scdebug(("appending %d chars, starting with %c\n", YYCURSOR-start, *start));
smart_str_appendl(&ctx->result, start, YYCURSOR - start);
}
tag_arg(ctx, quotes, type TSRMLS_CC);
}
-#ifdef SCANNER_DEBUG
-#define scdebug(x) printf x
-#else
-#define scdebug(x)
-#endif
-
static inline void xx_mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen TSRMLS_DC)
{
char *end, *q;
state_arg:
start = YYCURSOR;
/*!re2c
- alpha+ { passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; }
+ alpha alphadash* { passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; }
any { passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; }
*/