cvs: php4 /ext/standard url_scanner_ex.c url_scanner_ex.re
| From: | Sascha Schumann | Date: | Sun, 09 Sep 2001 14:38:13 +0000 |
| Subject: | cvs: php4 /ext/standard url_scanner_ex.c url_scanner_ex.re | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7341@lists.php.net to get a copy of this message | ||
sas Sun Sep 9 10:38:13 2001 EDT
Modified files:
/php4/ext/standard url_scanner_ex.re url_scanner_ex.c
Log:
Fix mark-handling
Index: php4/ext/standard/url_scanner_ex.re
diff -u php4/ext/standard/url_scanner_ex.re:1.38 php4/ext/standard/url_scanner_ex.re:1.39
--- php4/ext/standard/url_scanner_ex.re:1.38 Sun Aug 26 20:23:55 2001
+++ php4/ext/standard/url_scanner_ex.re Sun Sep 9 10:38:11 2001
@@ -112,7 +112,10 @@
(any\[:?#])+ { goto scan; }
*/
done:
-
+
+ if (bash)
+ bash--;
+
/* Don't modify URLs of the format "#mark" */
if (bash && bash - url->c == 0) {
smart_str_append(dest, url);
@@ -132,6 +135,7 @@
if (bash)
smart_str_appendl(dest, bash, q - bash);
}
+
#undef YYFILL
#undef YYCTYPE
Index: php4/ext/standard/url_scanner_ex.c
diff -u php4/ext/standard/url_scanner_ex.c:1.41 php4/ext/standard/url_scanner_ex.c:1.42
--- php4/ext/standard/url_scanner_ex.c:1.41 Sun Aug 26 20:23:55 2001
+++ php4/ext/standard/url_scanner_ex.c Sun Sep 9 10:38:12 2001
@@ -1,5 +1,5 @@
-/* Generated by re2c 0.5 on Mon Aug 27 01:07:32 2001 */
-#line 1 "url_scanner_ex.re"
+/* Generated by re2c 0.5 on Sun Sep 9 16:36:08 2001 */
+#line 1 "/home/sas/src/php4/ext/standard/url_scanner_ex.re"
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
@@ -172,7 +172,10 @@
#line 113
done:
-
+
+ if (bash)
+ bash--;
+
/* Don't modify URLs of the format "#mark" */
if (bash && bash - url->c == 0) {
smart_str_append(dest, url);
@@ -193,6 +196,7 @@
smart_str_appendl(dest, bash, q - bash);
}
+
#undef YYFILL
#undef YYCTYPE
#undef YYCURSOR
@@ -361,17 +365,17 @@
if(yybm[0+yych] & 128) goto yy15;
yy13: yych = *++YYCURSOR;
yy14:
-#line 260
+#line 264
{ 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 261
+#line 265
{ passthru(STD_ARGS); goto state_plain; }
}
-#line 262
+#line 266
state_tag:
@@ -425,11 +429,11 @@
yy20: yych = *++YYCURSOR;
goto yy25;
yy21:
-#line 267
+#line 271
{ 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 268
+#line 272
{ passthru(STD_ARGS); goto state_plain_begin; }
yy24: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -437,7 +441,7 @@
yy25: if(yybm[0+yych] & 128) goto yy24;
goto yy21;
}
-#line 269
+#line 273
state_next_arg_begin:
@@ -508,20 +512,20 @@
}
yy28: yych = *++YYCURSOR;
yy29:
-#line 277
+#line 281
{ passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; }
yy30: yych = *++YYCURSOR;
goto yy37;
yy31:
-#line 278
+#line 282
{ passthru(STD_ARGS); goto state_next_arg; }
yy32: yych = *++YYCURSOR;
yy33:
-#line 279
+#line 283
{ --YYCURSOR; STATE = STATE_ARG; goto state_arg; }
yy34: yych = *++YYCURSOR;
yy35:
-#line 280
+#line 284
{ passthru(STD_ARGS); goto state_plain_begin; }
yy36: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -529,7 +533,7 @@
yy37: if(yybm[0+yych] & 128) goto yy36;
goto yy31;
}
-#line 281
+#line 285
state_arg:
@@ -583,11 +587,11 @@
yy40: yych = *++YYCURSOR;
goto yy45;
yy41:
-#line 286
+#line 290
{ passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; }
yy42: yych = *++YYCURSOR;
yy43:
-#line 287
+#line 291
{ passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; }
yy44: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -595,7 +599,7 @@
yy45: if(yybm[0+yych] & 128) goto yy44;
goto yy41;
}
-#line 288
+#line 292
state_before_val:
@@ -650,12 +654,12 @@
if(yych == ' ') goto yy55;
if(yych == '=') goto yy53;
yy49:
-#line 294
+#line 298
{ --YYCURSOR; goto state_next_arg_begin; }
yy50: yych = *++YYCURSOR;
goto yy54;
yy51:
-#line 293
+#line 297
{ passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; }
yy52: yych = *++YYCURSOR;
goto yy49;
@@ -674,7 +678,7 @@
case 0: goto yy49;
}
}
-#line 295
+#line 299
@@ -744,7 +748,7 @@
yych = *(YYMARKER = ++YYCURSOR);
if(yych != '>') goto yy74;
yy61:
-#line 304
+#line 308
{ passthru(STD_ARGS); goto state_next_arg_begin; }
yy62: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -753,7 +757,7 @@
yy63: yych = *++YYCURSOR;
goto yy67;
yy64:
-#line 303
+#line 307
{ handle_val(STD_ARGS, 0, '"'); goto state_next_arg_begin; }
yy65: yych = *++YYCURSOR;
goto yy61;
@@ -773,7 +777,7 @@
}
yy71: yych = *++YYCURSOR;
yy72:
-#line 302
+#line 306
{ handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
yy73: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -782,10 +786,10 @@
if(yych >= '>') goto yy70;
yy75: yych = *++YYCURSOR;
yy76:
-#line 301
+#line 305
{ handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
}
-#line 305
+#line 309
stop: