00001
00002
00003
00004 #include "header.h"
00005
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 extern int german_ISO_8859_1_stem(struct SN_env * z);
00010 #ifdef __cplusplus
00011 }
00012 #endif
00013 static int r_standard_suffix(struct SN_env * z);
00014 static int r_R2(struct SN_env * z);
00015 static int r_R1(struct SN_env * z);
00016 static int r_mark_regions(struct SN_env * z);
00017 static int r_postlude(struct SN_env * z);
00018 static int r_prelude(struct SN_env * z);
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023
00024 extern struct SN_env * german_ISO_8859_1_create_env(void);
00025 extern void german_ISO_8859_1_close_env(struct SN_env * z);
00026
00027
00028 #ifdef __cplusplus
00029 }
00030 #endif
00031 static const symbol s_0_1[1] = { 'U' };
00032 static const symbol s_0_2[1] = { 'Y' };
00033 static const symbol s_0_3[1] = { 0xE4 };
00034 static const symbol s_0_4[1] = { 0xF6 };
00035 static const symbol s_0_5[1] = { 0xFC };
00036
00037 static const struct among a_0[6] =
00038 {
00039 { 0, 0, -1, 6, 0},
00040 { 1, s_0_1, 0, 2, 0},
00041 { 1, s_0_2, 0, 1, 0},
00042 { 1, s_0_3, 0, 3, 0},
00043 { 1, s_0_4, 0, 4, 0},
00044 { 1, s_0_5, 0, 5, 0}
00045 };
00046
00047 static const symbol s_1_0[1] = { 'e' };
00048 static const symbol s_1_1[2] = { 'e', 'm' };
00049 static const symbol s_1_2[2] = { 'e', 'n' };
00050 static const symbol s_1_3[3] = { 'e', 'r', 'n' };
00051 static const symbol s_1_4[2] = { 'e', 'r' };
00052 static const symbol s_1_5[1] = { 's' };
00053 static const symbol s_1_6[2] = { 'e', 's' };
00054
00055 static const struct among a_1[7] =
00056 {
00057 { 1, s_1_0, -1, 1, 0},
00058 { 2, s_1_1, -1, 1, 0},
00059 { 2, s_1_2, -1, 1, 0},
00060 { 3, s_1_3, -1, 1, 0},
00061 { 2, s_1_4, -1, 1, 0},
00062 { 1, s_1_5, -1, 2, 0},
00063 { 2, s_1_6, 5, 1, 0}
00064 };
00065
00066 static const symbol s_2_0[2] = { 'e', 'n' };
00067 static const symbol s_2_1[2] = { 'e', 'r' };
00068 static const symbol s_2_2[2] = { 's', 't' };
00069 static const symbol s_2_3[3] = { 'e', 's', 't' };
00070
00071 static const struct among a_2[4] =
00072 {
00073 { 2, s_2_0, -1, 1, 0},
00074 { 2, s_2_1, -1, 1, 0},
00075 { 2, s_2_2, -1, 2, 0},
00076 { 3, s_2_3, 2, 1, 0}
00077 };
00078
00079 static const symbol s_3_0[2] = { 'i', 'g' };
00080 static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
00081
00082 static const struct among a_3[2] =
00083 {
00084 { 2, s_3_0, -1, 1, 0},
00085 { 4, s_3_1, -1, 1, 0}
00086 };
00087
00088 static const symbol s_4_0[3] = { 'e', 'n', 'd' };
00089 static const symbol s_4_1[2] = { 'i', 'g' };
00090 static const symbol s_4_2[3] = { 'u', 'n', 'g' };
00091 static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
00092 static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
00093 static const symbol s_4_5[2] = { 'i', 'k' };
00094 static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
00095 static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
00096
00097 static const struct among a_4[8] =
00098 {
00099 { 3, s_4_0, -1, 1, 0},
00100 { 2, s_4_1, -1, 2, 0},
00101 { 3, s_4_2, -1, 1, 0},
00102 { 4, s_4_3, -1, 3, 0},
00103 { 4, s_4_4, -1, 2, 0},
00104 { 2, s_4_5, -1, 2, 0},
00105 { 4, s_4_6, -1, 3, 0},
00106 { 4, s_4_7, -1, 4, 0}
00107 };
00108
00109 static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
00110
00111 static const unsigned char g_s_ending[] = { 117, 30, 5 };
00112
00113 static const unsigned char g_st_ending[] = { 117, 30, 4 };
00114
00115 static const symbol s_0[] = { 0xDF };
00116 static const symbol s_1[] = { 's', 's' };
00117 static const symbol s_2[] = { 'u' };
00118 static const symbol s_3[] = { 'U' };
00119 static const symbol s_4[] = { 'y' };
00120 static const symbol s_5[] = { 'Y' };
00121 static const symbol s_6[] = { 'y' };
00122 static const symbol s_7[] = { 'u' };
00123 static const symbol s_8[] = { 'a' };
00124 static const symbol s_9[] = { 'o' };
00125 static const symbol s_10[] = { 'u' };
00126 static const symbol s_11[] = { 'i', 'g' };
00127 static const symbol s_12[] = { 'e' };
00128 static const symbol s_13[] = { 'e' };
00129 static const symbol s_14[] = { 'e', 'r' };
00130 static const symbol s_15[] = { 'e', 'n' };
00131
00132 static int r_prelude(struct SN_env * z) {
00133 { int c_test = z->c;
00134 while(1) {
00135 int c1 = z->c;
00136 { int c2 = z->c;
00137 z->bra = z->c;
00138 if (!(eq_s(z, 1, s_0))) goto lab2;
00139 z->ket = z->c;
00140 { int ret = slice_from_s(z, 2, s_1);
00141 if (ret < 0) return ret;
00142 }
00143 goto lab1;
00144 lab2:
00145 z->c = c2;
00146 if (z->c >= z->l) goto lab0;
00147 z->c++;
00148 }
00149 lab1:
00150 continue;
00151 lab0:
00152 z->c = c1;
00153 break;
00154 }
00155 z->c = c_test;
00156 }
00157 while(1) {
00158 int c3 = z->c;
00159 while(1) {
00160 int c4 = z->c;
00161 if (in_grouping(z, g_v, 97, 252, 0)) goto lab4;
00162 z->bra = z->c;
00163 { int c5 = z->c;
00164 if (!(eq_s(z, 1, s_2))) goto lab6;
00165 z->ket = z->c;
00166 if (in_grouping(z, g_v, 97, 252, 0)) goto lab6;
00167 { int ret = slice_from_s(z, 1, s_3);
00168 if (ret < 0) return ret;
00169 }
00170 goto lab5;
00171 lab6:
00172 z->c = c5;
00173 if (!(eq_s(z, 1, s_4))) goto lab4;
00174 z->ket = z->c;
00175 if (in_grouping(z, g_v, 97, 252, 0)) goto lab4;
00176 { int ret = slice_from_s(z, 1, s_5);
00177 if (ret < 0) return ret;
00178 }
00179 }
00180 lab5:
00181 z->c = c4;
00182 break;
00183 lab4:
00184 z->c = c4;
00185 if (z->c >= z->l) goto lab3;
00186 z->c++;
00187 }
00188 continue;
00189 lab3:
00190 z->c = c3;
00191 break;
00192 }
00193 return 1;
00194 }
00195
00196 static int r_mark_regions(struct SN_env * z) {
00197 z->I[0] = z->l;
00198 z->I[1] = z->l;
00199 { int c_test = z->c;
00200 { int ret = z->c + 3;
00201 if (0 > ret || ret > z->l) return 0;
00202 z->c = ret;
00203 }
00204 z->I[2] = z->c;
00205 z->c = c_test;
00206 }
00207 {
00208 int ret = out_grouping(z, g_v, 97, 252, 1);
00209 if (ret < 0) return 0;
00210 z->c += ret;
00211 }
00212 {
00213 int ret = in_grouping(z, g_v, 97, 252, 1);
00214 if (ret < 0) return 0;
00215 z->c += ret;
00216 }
00217 z->I[0] = z->c;
00218
00219 if (!(z->I[0] < z->I[2])) goto lab0;
00220 z->I[0] = z->I[2];
00221 lab0:
00222 {
00223 int ret = out_grouping(z, g_v, 97, 252, 1);
00224 if (ret < 0) return 0;
00225 z->c += ret;
00226 }
00227 {
00228 int ret = in_grouping(z, g_v, 97, 252, 1);
00229 if (ret < 0) return 0;
00230 z->c += ret;
00231 }
00232 z->I[1] = z->c;
00233 return 1;
00234 }
00235
00236 static int r_postlude(struct SN_env * z) {
00237 int among_var;
00238 while(1) {
00239 int c1 = z->c;
00240 z->bra = z->c;
00241 among_var = find_among(z, a_0, 6);
00242 if (!(among_var)) goto lab0;
00243 z->ket = z->c;
00244 switch(among_var) {
00245 case 0: goto lab0;
00246 case 1:
00247 { int ret = slice_from_s(z, 1, s_6);
00248 if (ret < 0) return ret;
00249 }
00250 break;
00251 case 2:
00252 { int ret = slice_from_s(z, 1, s_7);
00253 if (ret < 0) return ret;
00254 }
00255 break;
00256 case 3:
00257 { int ret = slice_from_s(z, 1, s_8);
00258 if (ret < 0) return ret;
00259 }
00260 break;
00261 case 4:
00262 { int ret = slice_from_s(z, 1, s_9);
00263 if (ret < 0) return ret;
00264 }
00265 break;
00266 case 5:
00267 { int ret = slice_from_s(z, 1, s_10);
00268 if (ret < 0) return ret;
00269 }
00270 break;
00271 case 6:
00272 if (z->c >= z->l) goto lab0;
00273 z->c++;
00274 break;
00275 }
00276 continue;
00277 lab0:
00278 z->c = c1;
00279 break;
00280 }
00281 return 1;
00282 }
00283
00284 static int r_R1(struct SN_env * z) {
00285 if (!(z->I[0] <= z->c)) return 0;
00286 return 1;
00287 }
00288
00289 static int r_R2(struct SN_env * z) {
00290 if (!(z->I[1] <= z->c)) return 0;
00291 return 1;
00292 }
00293
00294 static int r_standard_suffix(struct SN_env * z) {
00295 int among_var;
00296 { int m1 = z->l - z->c; (void)m1;
00297 z->ket = z->c;
00298 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
00299 among_var = find_among_b(z, a_1, 7);
00300 if (!(among_var)) goto lab0;
00301 z->bra = z->c;
00302 { int ret = r_R1(z);
00303 if (ret == 0) goto lab0;
00304 if (ret < 0) return ret;
00305 }
00306 switch(among_var) {
00307 case 0: goto lab0;
00308 case 1:
00309 { int ret = slice_del(z);
00310 if (ret < 0) return ret;
00311 }
00312 break;
00313 case 2:
00314 if (in_grouping_b(z, g_s_ending, 98, 116, 0)) goto lab0;
00315 { int ret = slice_del(z);
00316 if (ret < 0) return ret;
00317 }
00318 break;
00319 }
00320 lab0:
00321 z->c = z->l - m1;
00322 }
00323 { int m2 = z->l - z->c; (void)m2;
00324 z->ket = z->c;
00325 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
00326 among_var = find_among_b(z, a_2, 4);
00327 if (!(among_var)) goto lab1;
00328 z->bra = z->c;
00329 { int ret = r_R1(z);
00330 if (ret == 0) goto lab1;
00331 if (ret < 0) return ret;
00332 }
00333 switch(among_var) {
00334 case 0: goto lab1;
00335 case 1:
00336 { int ret = slice_del(z);
00337 if (ret < 0) return ret;
00338 }
00339 break;
00340 case 2:
00341 if (in_grouping_b(z, g_st_ending, 98, 116, 0)) goto lab1;
00342 { int ret = z->c - 3;
00343 if (z->lb > ret || ret > z->l) goto lab1;
00344 z->c = ret;
00345 }
00346 { int ret = slice_del(z);
00347 if (ret < 0) return ret;
00348 }
00349 break;
00350 }
00351 lab1:
00352 z->c = z->l - m2;
00353 }
00354 { int m3 = z->l - z->c; (void)m3;
00355 z->ket = z->c;
00356 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
00357 among_var = find_among_b(z, a_4, 8);
00358 if (!(among_var)) goto lab2;
00359 z->bra = z->c;
00360 { int ret = r_R2(z);
00361 if (ret == 0) goto lab2;
00362 if (ret < 0) return ret;
00363 }
00364 switch(among_var) {
00365 case 0: goto lab2;
00366 case 1:
00367 { int ret = slice_del(z);
00368 if (ret < 0) return ret;
00369 }
00370 { int m_keep = z->l - z->c;
00371 z->ket = z->c;
00372 if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
00373 z->bra = z->c;
00374 { int m4 = z->l - z->c; (void)m4;
00375 if (!(eq_s_b(z, 1, s_12))) goto lab4;
00376 { z->c = z->l - m_keep; goto lab3; }
00377 lab4:
00378 z->c = z->l - m4;
00379 }
00380 { int ret = r_R2(z);
00381 if (ret == 0) { z->c = z->l - m_keep; goto lab3; }
00382 if (ret < 0) return ret;
00383 }
00384 { int ret = slice_del(z);
00385 if (ret < 0) return ret;
00386 }
00387 lab3:
00388 ;
00389 }
00390 break;
00391 case 2:
00392 { int m5 = z->l - z->c; (void)m5;
00393 if (!(eq_s_b(z, 1, s_13))) goto lab5;
00394 goto lab2;
00395 lab5:
00396 z->c = z->l - m5;
00397 }
00398 { int ret = slice_del(z);
00399 if (ret < 0) return ret;
00400 }
00401 break;
00402 case 3:
00403 { int ret = slice_del(z);
00404 if (ret < 0) return ret;
00405 }
00406 { int m_keep = z->l - z->c;
00407 z->ket = z->c;
00408 { int m6 = z->l - z->c; (void)m6;
00409 if (!(eq_s_b(z, 2, s_14))) goto lab8;
00410 goto lab7;
00411 lab8:
00412 z->c = z->l - m6;
00413 if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
00414 }
00415 lab7:
00416 z->bra = z->c;
00417 { int ret = r_R1(z);
00418 if (ret == 0) { z->c = z->l - m_keep; goto lab6; }
00419 if (ret < 0) return ret;
00420 }
00421 { int ret = slice_del(z);
00422 if (ret < 0) return ret;
00423 }
00424 lab6:
00425 ;
00426 }
00427 break;
00428 case 4:
00429 { int ret = slice_del(z);
00430 if (ret < 0) return ret;
00431 }
00432 { int m_keep = z->l - z->c;
00433 z->ket = z->c;
00434 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m_keep; goto lab9; }
00435 among_var = find_among_b(z, a_3, 2);
00436 if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
00437 z->bra = z->c;
00438 { int ret = r_R2(z);
00439 if (ret == 0) { z->c = z->l - m_keep; goto lab9; }
00440 if (ret < 0) return ret;
00441 }
00442 switch(among_var) {
00443 case 0: { z->c = z->l - m_keep; goto lab9; }
00444 case 1:
00445 { int ret = slice_del(z);
00446 if (ret < 0) return ret;
00447 }
00448 break;
00449 }
00450 lab9:
00451 ;
00452 }
00453 break;
00454 }
00455 lab2:
00456 z->c = z->l - m3;
00457 }
00458 return 1;
00459 }
00460
00461 extern int german_ISO_8859_1_stem(struct SN_env * z) {
00462 { int c1 = z->c;
00463 { int ret = r_prelude(z);
00464 if (ret == 0) goto lab0;
00465 if (ret < 0) return ret;
00466 }
00467 lab0:
00468 z->c = c1;
00469 }
00470 { int c2 = z->c;
00471 { int ret = r_mark_regions(z);
00472 if (ret == 0) goto lab1;
00473 if (ret < 0) return ret;
00474 }
00475 lab1:
00476 z->c = c2;
00477 }
00478 z->lb = z->c; z->c = z->l;
00479
00480 { int m3 = z->l - z->c; (void)m3;
00481 { int ret = r_standard_suffix(z);
00482 if (ret == 0) goto lab2;
00483 if (ret < 0) return ret;
00484 }
00485 lab2:
00486 z->c = z->l - m3;
00487 }
00488 z->c = z->lb;
00489 { int c4 = z->c;
00490 { int ret = r_postlude(z);
00491 if (ret == 0) goto lab3;
00492 if (ret < 0) return ret;
00493 }
00494 lab3:
00495 z->c = c4;
00496 }
00497 return 1;
00498 }
00499
00500 extern struct SN_env * german_ISO_8859_1_create_env(void) { return SN_create_env(0, 3, 0); }
00501
00502 extern void german_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
00503