-/* Generated by re2c 0.5 on Fri Sep 17 14:31:47 1999 */
+/* Generated by re2c 0.5 on Fri Sep 17 20:08:27 1999 */
#line 1 "../../../php4/ext/standard/url_scanner.re"
/*
+----------------------------------------------------------------------+
#define FINISH { catchup(state); goto finish; }
-#define BEGIN(x) \
- switch(state->state) { \
- case INITIAL: \
- catchup(state); \
- break; \
- case REF: \
- screw_url(state); \
- break; \
- } \
- state->state = x; \
- state->start = state->crs; \
+#define BEGIN(x) \
+ switch(state->state) { \
+ case INITIAL: \
+ catchup(state); \
+ break; \
+ case REF: \
+ screw_url(state); \
+ break; \
+ } \
+ state->state = x; \
+ state->start = state->crs; \
goto nextiter
-#define ATTACH(s, n) { \
- size_t _newlen = state->targetsize + n; \
- state->target = realloc(state->target, _newlen + 1); \
- memcpy(state->target + state->targetsize, s, n); \
- state->targetsize = _newlen; \
- state->target[_newlen] = '\0'; \
- }
+#define ATTACH(s, n) \
+{ \
+ size_t _newlen = state->targetsize + n; \
+ state->target = realloc(state->target, _newlen + 1); \
+ memcpy(state->target + state->targetsize, s, n); \
+ state->targetsize = _newlen; \
+ state->target[_newlen] = '\0'; \
+}
#define URLLEN 512
ATTACH(state->start, (state->crs - state->start));
}
-#line 134
+#line 135
static void url_scanner(lexdata *state)
yych = *YYCURSOR;
yy5: if(yybm[0+yych] & 64) goto yy4;
yy6:
-#line 145
+#line 146
{ BEGIN(INITIAL); }
yy7: yych = *++YYCURSOR;
yy8:
-#line 146
+#line 147
{ FINISH; }
yy9: yych = *++YYCURSOR;
if(yych == 'H') goto yy3;
if(yych == ' ') goto yy21;
}
yy23:
-#line 143
+#line 144
{ BEGIN(REF); }
yy24: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
if(yych == ' ') goto yy31;
}
yy33:
-#line 144
+#line 145
{ BEGIN(REF); }
}
-#line 147
+#line 148
break;
case REF:
if(yych <= '=') goto yy42;
}
yy41:
-#line 151
+#line 152
{ BEGIN(INITIAL); }
yy42: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
if(yych <= '!') goto yy45;
if(yych <= '"') goto yy47;
yy44:
-#line 153
+#line 154
{
/* don't modify absolute links */
state->state = INITIAL; BEGIN(INITIAL);
goto yy41;
yy51: yych = *++YYCURSOR;
yy52: YYCURSOR -= 1;
-#line 152
+#line 153
{ BEGIN(INITIAL); }
}
-#line 157
+#line 158
break;
}
#define FINISH { catchup(state); goto finish; }
-#define BEGIN(x) \
- switch(state->state) { \
- case INITIAL: \
- catchup(state); \
- break; \
- case REF: \
- screw_url(state); \
- break; \
- } \
- state->state = x; \
- state->start = state->crs; \
+#define BEGIN(x) \
+ switch(state->state) { \
+ case INITIAL: \
+ catchup(state); \
+ break; \
+ case REF: \
+ screw_url(state); \
+ break; \
+ } \
+ state->state = x; \
+ state->start = state->crs; \
goto nextiter
-#define ATTACH(s, n) { \
- size_t _newlen = state->targetsize + n; \
- state->target = realloc(state->target, _newlen + 1); \
- memcpy(state->target + state->targetsize, s, n); \
- state->targetsize = _newlen; \
- state->target[_newlen] = '\0'; \
- }
+#define ATTACH(s, n) \
+{ \
+ size_t _newlen = state->targetsize + n; \
+ state->target = realloc(state->target, _newlen + 1); \
+ memcpy(state->target + state->targetsize, s, n); \
+ state->targetsize = _newlen; \
+ state->target[_newlen] = '\0'; \
+}
#define URLLEN 512