diff options
author | Sascha Schumann <sas@php.net> | 1999-09-11 23:53:40 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 1999-09-11 23:53:40 +0000 |
commit | b0f01a477846a7fb34a5518a0998db66a9dd0a14 (patch) | |
tree | ba5089a7047864b8f5f1209b047633999ebabc26 /ext/standard/url_scanner.c | |
parent | f040ce584d1509d61e96fa503b611e14685e71db (diff) | |
download | php-git-b0f01a477846a7fb34a5518a0998db66a9dd0a14.tar.gz |
- add standard disclaimer
- regenerate scanner with re2c -s
Diffstat (limited to 'ext/standard/url_scanner.c')
-rw-r--r-- | ext/standard/url_scanner.c | 364 |
1 files changed, 230 insertions, 134 deletions
diff --git a/ext/standard/url_scanner.c b/ext/standard/url_scanner.c index 4e191b21cc..4e87233535 100644 --- a/ext/standard/url_scanner.c +++ b/ext/standard/url_scanner.c @@ -1,5 +1,23 @@ -/* Generated by re2c 0.5 on Sun Sep 12 00:56:23 1999 */ -#line 1 "xx.re" +/* Generated by re2c 0.5 on Sun Sep 12 01:52:31 1999 */ +#line 1 "url_scanner.re" +/* + +----------------------------------------------------------------------+ + | PHP version 4.0 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997, 1998, 1999 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.0 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_0.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Sascha Schumann <sascha@schumann.cx> | + +----------------------------------------------------------------------+ + */ +/* $Id$ */ #include <sys/types.h> #include <stdio.h> @@ -102,7 +120,7 @@ static void catchup(lexdata *state) ATTACH(state->start, (state->crs - state->start)); } -#line 115 +#line 133 static void url_scanner(lexdata *state) @@ -119,146 +137,162 @@ yy1: ++YYCURSOR; yy0: if((YYLIMIT - YYCURSOR) < 7) YYFILL(7); yych = *YYCURSOR; - switch(yych){ - case '\000': goto yy7; - case '<': goto yy2; - default: goto yy4; - } + if(yych <= '\000') goto yy7; + if(yych != '<') goto yy4; yy2: yych = *++YYCURSOR; - switch(yych){ - case 'A': case 'a': goto yy9; - case 'F': case 'f': goto yy10; - default: goto yy3; + if(yych <= 'F'){ + if(yych == 'A') goto yy9; + if(yych >= 'F') goto yy10; + } else { + if(yych <= 'a'){ + if(yych >= 'a') goto yy9; + } else { + if(yych == 'f') goto yy10; + } } yy3:yy4: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy5: switch(yych){ - case '\000': case '<': goto yy6; - default: goto yy4; - } +yy5: if(yych <= '\000') goto yy6; + if(yych != '<') goto yy4; yy6: -#line 126 +#line 144 { BEGIN(INITIAL); } yy7: yych = *++YYCURSOR; yy8: -#line 127 +#line 145 { FINISH; } yy9: yych = *++YYCURSOR; - switch(yych){ - case 'H': case 'h': goto yy3; - default: goto yy25; - } + if(yych == 'H') goto yy3; + if(yych == 'h') goto yy3; + goto yy25; yy10: yych = *++YYCURSOR; - switch(yych){ - case 'R': case 'r': goto yy11; - default: goto yy3; - } + if(yych == 'R') goto yy11; + if(yych != 'r') goto yy3; yy11: yych = *++YYCURSOR; - switch(yych){ - case 'A': case 'a': goto yy12; - default: goto yy3; - } + if(yych == 'A') goto yy12; + if(yych != 'a') goto yy3; yy12: yych = *++YYCURSOR; - switch(yych){ - case 'M': case 'm': goto yy13; - default: goto yy3; - } + if(yych == 'M') goto yy13; + if(yych != 'm') goto yy3; yy13: yych = *++YYCURSOR; - switch(yych){ - case 'E': case 'e': goto yy14; - default: goto yy3; - } + if(yych == 'E') goto yy14; + if(yych != 'e') goto yy3; yy14: yych = *++YYCURSOR; - switch(yych){ - case 'S': case 's': goto yy3; - default: goto yy16; - } + if(yych == 'S') goto yy3; + if(yych == 's') goto yy3; + goto yy16; yy15: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy16: switch(yych){ - case '\t': case '\v': - case '\f': case ' ': goto yy15; - case 'S': case 's': goto yy17; - default: goto yy3; +yy16: if(yych <= '\037'){ + if(yych <= '\t'){ + if(yych <= '\b') goto yy3; + goto yy15; + } else { + if(yych <= '\n') goto yy3; + if(yych <= '\f') goto yy15; + goto yy3; + } + } else { + if(yych <= 'S'){ + if(yych <= ' ') goto yy15; + if(yych <= 'R') goto yy3; + } else { + if(yych != 's') goto yy3; + } } yy17: yych = *++YYCURSOR; - switch(yych){ - case 'R': case 'r': goto yy18; - default: goto yy3; - } + if(yych == 'R') goto yy18; + if(yych != 'r') goto yy3; yy18: yych = *++YYCURSOR; - switch(yych){ - case 'C': case 'c': goto yy19; - default: goto yy3; - } + if(yych == 'C') goto yy19; + if(yych != 'c') goto yy3; yy19: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy20: switch(yych){ - case '\t': case '\v': - case '\f': case ' ': goto yy19; - case '=': goto yy21; - default: goto yy3; +yy20: if(yych <= '\f'){ + if(yych == '\t') goto yy19; + if(yych <= '\n') goto yy3; + goto yy19; + } else { + if(yych <= ' '){ + if(yych <= '\037') goto yy3; + goto yy19; + } else { + if(yych != '=') goto yy3; + } } yy21: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy22: switch(yych){ - case '\t': case '\v': - case '\f': case ' ': goto yy21; - default: goto yy23; +yy22: if(yych <= '\n'){ + if(yych == '\t') goto yy21; + } else { + if(yych <= '\f') goto yy21; + if(yych == ' ') goto yy21; } yy23: -#line 124 +#line 142 { BEGIN(REF); } yy24: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy25: switch(yych){ - case '\t': case '\v': - case '\f': case ' ': goto yy24; - case 'H': case 'h': goto yy26; - default: goto yy3; +yy25: if(yych <= '\037'){ + if(yych <= '\t'){ + if(yych <= '\b') goto yy3; + goto yy24; + } else { + if(yych <= '\n') goto yy3; + if(yych <= '\f') goto yy24; + goto yy3; + } + } else { + if(yych <= 'H'){ + if(yych <= ' ') goto yy24; + if(yych <= 'G') goto yy3; + } else { + if(yych != 'h') goto yy3; + } } yy26: yych = *++YYCURSOR; - switch(yych){ - case 'R': case 'r': goto yy27; - default: goto yy3; - } + if(yych == 'R') goto yy27; + if(yych != 'r') goto yy3; yy27: yych = *++YYCURSOR; - switch(yych){ - case 'E': case 'e': goto yy28; - default: goto yy3; - } + if(yych == 'E') goto yy28; + if(yych != 'e') goto yy3; yy28: yych = *++YYCURSOR; - switch(yych){ - case 'F': case 'f': goto yy29; - default: goto yy3; - } + if(yych == 'F') goto yy29; + if(yych != 'f') goto yy3; yy29: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy30: switch(yych){ - case '\t': case '\v': - case '\f': case ' ': goto yy29; - case '=': goto yy31; - default: goto yy3; +yy30: if(yych <= '\f'){ + if(yych == '\t') goto yy29; + if(yych <= '\n') goto yy3; + goto yy29; + } else { + if(yych <= ' '){ + if(yych <= '\037') goto yy3; + goto yy29; + } else { + if(yych != '=') goto yy3; + } } yy31: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy32: switch(yych){ - case '\t': case '\v': - case '\f': case ' ': goto yy31; - default: goto yy33; +yy32: if(yych <= '\n'){ + if(yych == '\t') goto yy31; + } else { + if(yych <= '\f') goto yy31; + if(yych == ' ') goto yy31; } yy33: -#line 125 +#line 143 { BEGIN(REF); } } -#line 128 +#line 146 break; case REF: @@ -270,51 +304,101 @@ yy35: ++YYCURSOR; yy34: if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case '\000': case '#': case '>': goto yy36; - case '\t': case '\v': - case '\f': case ' ': case '"': goto yy37; - case ':': goto yy42; - default: goto yy39; + if(yych <= ' '){ + if(yych <= '\t'){ + if(yych <= '\000') goto yy36; + if(yych <= '\b') goto yy39; + goto yy37; + } else { + if(yych <= '\n') goto yy39; + if(yych <= '\f') goto yy37; + if(yych <= '\037') goto yy39; + goto yy37; + } + } else { + if(yych <= '9'){ + if(yych <= '!') goto yy39; + if(yych <= '"') goto yy37; + if(yych >= '$') goto yy39; + } else { + if(yych <= ':') goto yy42; + if(yych != '>') goto yy39; + } } yy36:yy37: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy38: switch(yych){ - case '\000': case '"': - case '#': case '>': goto yy36; - case '\t': case '\v': - case '\f': case ' ': goto yy37; - case ':': goto yy42; - default: goto yy39; +yy38: if(yych <= ' '){ + if(yych <= '\t'){ + if(yych <= '\000') goto yy36; + if(yych >= '\t') goto yy37; + } else { + if(yych <= '\n') goto yy39; + if(yych <= '\f') goto yy37; + if(yych >= ' ') goto yy37; + } + } else { + if(yych <= '9'){ + if(yych <= '!') goto yy39; + if(yych <= '#') goto yy36; + } else { + if(yych <= ':') goto yy42; + if(yych == '>') goto yy36; + } } yy39: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy40: switch(yych){ - case '\000': case '>': goto yy41; - case '\t': case '\v': - case '\f': case ' ': goto yy48; - case '"': goto yy50; - case '#': goto yy51; - case ':': goto yy42; - default: goto yy39; +yy40: if(yych <= ' '){ + if(yych <= '\t'){ + if(yych <= '\000') goto yy41; + if(yych <= '\b') goto yy39; + goto yy48; + } else { + if(yych <= '\n') goto yy39; + if(yych <= '\f') goto yy48; + if(yych <= '\037') goto yy39; + goto yy48; + } + } else { + if(yych <= '9'){ + if(yych <= '!') goto yy39; + if(yych <= '"') goto yy50; + if(yych <= '#') goto yy51; + goto yy39; + } else { + if(yych <= ':') goto yy42; + if(yych != '>') goto yy39; + } } yy41: -#line 132 +#line 150 { BEGIN(INITIAL); } yy42: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy43: switch(yych){ - case '\000': case '#': case '>': goto yy44; - case '\t': case '\v': - case '\f': case ' ': goto yy45; - case '"': goto yy47; - default: goto yy42; +yy43: if(yych <= '\037'){ + if(yych <= '\t'){ + if(yych <= '\000') goto yy44; + if(yych <= '\b') goto yy42; + goto yy45; + } else { + if(yych <= '\n') goto yy42; + if(yych <= '\f') goto yy45; + goto yy42; + } + } else { + if(yych <= '"'){ + if(yych <= ' ') goto yy45; + if(yych <= '!') goto yy42; + goto yy47; + } else { + if(yych <= '#') goto yy44; + if(yych != '>') goto yy42; + } } yy44: -#line 134 +#line 152 { /* don't modify absolute links */ state->state = INITIAL; BEGIN(INITIAL); @@ -322,31 +406,43 @@ yy44: yy45: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy46: switch(yych){ - case '\t': case '\v': - case '\f': case ' ': goto yy45; - case '"': goto yy47; - default: goto yy44; +yy46: if(yych <= '\f'){ + if(yych == '\t') goto yy45; + if(yych <= '\n') goto yy44; + goto yy45; + } else { + if(yych <= ' '){ + if(yych <= '\037') goto yy44; + goto yy45; + } else { + if(yych != '"') goto yy44; + } } yy47: yych = *++YYCURSOR; goto yy44; yy48: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; -yy49: switch(yych){ - case '\t': case '\v': - case '\f': case ' ': goto yy48; - case '"': goto yy50; - default: goto yy41; +yy49: if(yych <= '\f'){ + if(yych == '\t') goto yy48; + if(yych <= '\n') goto yy41; + goto yy48; + } else { + if(yych <= ' '){ + if(yych <= '\037') goto yy41; + goto yy48; + } else { + if(yych != '"') goto yy41; + } } yy50: yych = *++YYCURSOR; goto yy41; yy51: yych = *++YYCURSOR; yy52: YYCURSOR -= 1; -#line 133 +#line 151 { BEGIN(INITIAL); } } -#line 138 +#line 156 break; } |