Browse Source

Aline escape signs in macro definitions.

experimetnal/RETURN_REF_PATCH
Sascha Schumann 27 years ago
parent
commit
39dbe1d41b
  1. 59
      ext/standard/url_scanner.c
  2. 37
      ext/standard/url_scanner.re

59
ext/standard/url_scanner.c

@ -1,4 +1,4 @@
/* 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"
/*
+----------------------------------------------------------------------+
@ -51,26 +51,27 @@ typedef struct {
#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
@ -121,7 +122,7 @@ static void catchup(lexdata *state)
ATTACH(state->start, (state->crs - state->start));
}
#line 134
#line 135
static void url_scanner(lexdata *state)
@ -190,11 +191,11 @@ yy3:yy4: ++YYCURSOR;
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;
@ -253,7 +254,7 @@ yy22: if(yych <= '\n'){
if(yych == ' ') goto yy21;
}
yy23:
#line 143
#line 144
{ BEGIN(REF); }
yy24: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@ -309,10 +310,10 @@ yy32: if(yych <= '\n'){
if(yych == ' ') goto yy31;
}
yy33:
#line 144
#line 145
{ BEGIN(REF); }
}
#line 147
#line 148
break;
case REF:
@ -384,7 +385,7 @@ yy40: if(yybm[0+yych] & 64) goto yy39;
if(yych <= '=') goto yy42;
}
yy41:
#line 151
#line 152
{ BEGIN(INITIAL); }
yy42: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@ -394,7 +395,7 @@ yy43: if(yybm[0+yych] & 128) goto yy42;
if(yych <= '!') goto yy45;
if(yych <= '"') goto yy47;
yy44:
#line 153
#line 154
{
/* don't modify absolute links */
state->state = INITIAL; BEGIN(INITIAL);
@ -435,10 +436,10 @@ yy50: yych = *++YYCURSOR;
goto yy41;
yy51: yych = *++YYCURSOR;
yy52: YYCURSOR -= 1;
#line 152
#line 153
{ BEGIN(INITIAL); }
}
#line 157
#line 158
break;
}

37
ext/standard/url_scanner.re

@ -49,26 +49,27 @@ typedef struct {
#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

Loading…
Cancel
Save