00001
00002
00003
00004 #include "header.h"
00005
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 extern int german_UTF_8_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_UTF_8_create_env(void);
00025 extern void german_UTF_8_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[2] = { 0xC3, 0xA4 };
00034 static const symbol s_0_4[2] = { 0xC3, 0xB6 };
00035 static const symbol s_0_5[2] = { 0xC3, 0xBC };
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 { 2, s_0_3, 0, 3, 0},
00043 { 2, s_0_4, 0, 4, 0},
00044 { 2, 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[] = { 0xC3, 0x9F };
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, 2, 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 { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
00147 if (ret < 0) goto lab0;
00148 z->c = ret;
00149 }
00150 }
00151 lab1:
00152 continue;
00153 lab0:
00154 z->c = c1;
00155 break;
00156 }
00157 z->c = c_test;
00158 }
00159 while(1) {
00160 int c3 = z->c;
00161 while(1) {
00162 int c4 = z->c;
00163 if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
00164 z->bra = z->c;
00165 { int c5 = z->c;
00166 if (!(eq_s(z, 1, s_2))) goto lab6;
00167 z->ket = z->c;
00168 if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab6;
00169 { int ret = slice_from_s(z, 1, s_3);
00170 if (ret < 0) return ret;
00171 }
00172 goto lab5;
00173 lab6:
00174 z->c = c5;
00175 if (!(eq_s(z, 1, s_4))) goto lab4;
00176 z->ket = z->c;
00177 if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
00178 { int ret = slice_from_s(z, 1, s_5);
00179 if (ret < 0) return ret;
00180 }
00181 }
00182 lab5:
00183 z->c = c4;
00184 break;
00185 lab4:
00186 z->c = c4;
00187 { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
00188 if (ret < 0) goto lab3;
00189 z->c = ret;
00190 }
00191 }
00192 continue;
00193 lab3:
00194 z->c = c3;
00195 break;
00196 }
00197 return 1;
00198 }
00199
00200 static int r_mark_regions(struct SN_env * z) {
00201 z->I[0] = z->l;
00202 z->I[1] = z->l;
00203 { int c_test = z->c;
00204 { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
00205 if (ret < 0) return 0;
00206 z->c = ret;
00207 }
00208 z->I[2] = z->c;
00209 z->c = c_test;
00210 }
00211 {
00212 int ret = out_grouping_U(z, g_v, 97, 252, 1);
00213 if (ret < 0) return 0;
00214 z->c += ret;
00215 }
00216 {
00217 int ret = in_grouping_U(z, g_v, 97, 252, 1);
00218 if (ret < 0) return 0;
00219 z->c += ret;
00220 }
00221 z->I[0] = z->c;
00222
00223 if (!(z->I[0] < z->I[2])) goto lab0;
00224 z->I[0] = z->I[2];
00225 lab0:
00226 {
00227 int ret = out_grouping_U(z, g_v, 97, 252, 1);
00228 if (ret < 0) return 0;
00229 z->c += ret;
00230 }
00231 {
00232 int ret = in_grouping_U(z, g_v, 97, 252, 1);
00233 if (ret < 0) return 0;
00234 z->c += ret;
00235 }
00236 z->I[1] = z->c;
00237 return 1;
00238 }
00239
00240 static int r_postlude(struct SN_env * z) {
00241 int among_var;
00242 while(1) {
00243 int c1 = z->c;
00244 z->bra = z->c;
00245 among_var = find_among(z, a_0, 6);
00246 if (!(among_var)) goto lab0;
00247 z->ket = z->c;
00248 switch(among_var) {
00249 case 0: goto lab0;
00250 case 1:
00251 { int ret = slice_from_s(z, 1, s_6);
00252 if (ret < 0) return ret;
00253 }
00254 break;
00255 case 2:
00256 { int ret = slice_from_s(z, 1, s_7);
00257 if (ret < 0) return ret;
00258 }
00259 break;
00260 case 3:
00261 { int ret = slice_from_s(z, 1, s_8);
00262 if (ret < 0) return ret;
00263 }
00264 break;
00265 case 4:
00266 { int ret = slice_from_s(z, 1, s_9);
00267 if (ret < 0) return ret;
00268 }
00269 break;
00270 case 5:
00271 { int ret = slice_from_s(z, 1, s_10);
00272 if (ret < 0) return ret;
00273 }
00274 break;
00275 case 6:
00276 { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
00277 if (ret < 0) goto lab0;
00278 z->c = ret;
00279 }
00280 break;
00281 }
00282 continue;
00283 lab0:
00284 z->c = c1;
00285 break;
00286 }
00287 return 1;
00288 }
00289
00290 static int r_R1(struct SN_env * z) {
00291 if (!(z->I[0] <= z->c)) return 0;
00292 return 1;
00293 }
00294
00295 static int r_R2(struct SN_env * z) {
00296 if (!(z->I[1] <= z->c)) return 0;
00297 return 1;
00298 }
00299
00300 static int r_standard_suffix(struct SN_env * z) {
00301 int among_var;
00302 { int m1 = z->l - z->c; (void)m1;
00303 z->ket = z->c;
00304 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
00305 among_var = find_among_b(z, a_1, 7);
00306 if (!(among_var)) goto lab0;
00307 z->bra = z->c;
00308 { int ret = r_R1(z);
00309 if (ret == 0) goto lab0;
00310 if (ret < 0) return ret;
00311 }
00312 switch(among_var) {
00313 case 0: goto lab0;
00314 case 1:
00315 { int ret = slice_del(z);
00316 if (ret < 0) return ret;
00317 }
00318 break;
00319 case 2:
00320 if (in_grouping_b_U(z, g_s_ending, 98, 116, 0)) goto lab0;
00321 { int ret = slice_del(z);
00322 if (ret < 0) return ret;
00323 }
00324 break;
00325 }
00326 lab0:
00327 z->c = z->l - m1;
00328 }
00329 { int m2 = z->l - z->c; (void)m2;
00330 z->ket = z->c;
00331 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
00332 among_var = find_among_b(z, a_2, 4);
00333 if (!(among_var)) goto lab1;
00334 z->bra = z->c;
00335 { int ret = r_R1(z);
00336 if (ret == 0) goto lab1;
00337 if (ret < 0) return ret;
00338 }
00339 switch(among_var) {
00340 case 0: goto lab1;
00341 case 1:
00342 { int ret = slice_del(z);
00343 if (ret < 0) return ret;
00344 }
00345 break;
00346 case 2:
00347 if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto lab1;
00348 { int ret = skip_utf8(z->p, z->c, z->lb, z->l, - 3);
00349 if (ret < 0) goto lab1;
00350 z->c = ret;
00351 }
00352 { int ret = slice_del(z);
00353 if (ret < 0) return ret;
00354 }
00355 break;
00356 }
00357 lab1:
00358 z->c = z->l - m2;
00359 }
00360 { int m3 = z->l - z->c; (void)m3;
00361 z->ket = z->c;
00362 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
00363 among_var = find_among_b(z, a_4, 8);
00364 if (!(among_var)) goto lab2;
00365 z->bra = z->c;
00366 { int ret = r_R2(z);
00367 if (ret == 0) goto lab2;
00368 if (ret < 0) return ret;
00369 }
00370 switch(among_var) {
00371 case 0: goto lab2;
00372 case 1:
00373 { int ret = slice_del(z);
00374 if (ret < 0) return ret;
00375 }
00376 { int m_keep = z->l - z->c;
00377 z->ket = z->c;
00378 if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
00379 z->bra = z->c;
00380 { int m4 = z->l - z->c; (void)m4;
00381 if (!(eq_s_b(z, 1, s_12))) goto lab4;
00382 { z->c = z->l - m_keep; goto lab3; }
00383 lab4:
00384 z->c = z->l - m4;
00385 }
00386 { int ret = r_R2(z);
00387 if (ret == 0) { z->c = z->l - m_keep; goto lab3; }
00388 if (ret < 0) return ret;
00389 }
00390 { int ret = slice_del(z);
00391 if (ret < 0) return ret;
00392 }
00393 lab3:
00394 ;
00395 }
00396 break;
00397 case 2:
00398 { int m5 = z->l - z->c; (void)m5;
00399 if (!(eq_s_b(z, 1, s_13))) goto lab5;
00400 goto lab2;
00401 lab5:
00402 z->c = z->l - m5;
00403 }
00404 { int ret = slice_del(z);
00405 if (ret < 0) return ret;
00406 }
00407 break;
00408 case 3:
00409 { int ret = slice_del(z);
00410 if (ret < 0) return ret;
00411 }
00412 { int m_keep = z->l - z->c;
00413 z->ket = z->c;
00414 { int m6 = z->l - z->c; (void)m6;
00415 if (!(eq_s_b(z, 2, s_14))) goto lab8;
00416 goto lab7;
00417 lab8:
00418 z->c = z->l - m6;
00419 if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
00420 }
00421 lab7:
00422 z->bra = z->c;
00423 { int ret = r_R1(z);
00424 if (ret == 0) { z->c = z->l - m_keep; goto lab6; }
00425 if (ret < 0) return ret;
00426 }
00427 { int ret = slice_del(z);
00428 if (ret < 0) return ret;
00429 }
00430 lab6:
00431 ;
00432 }
00433 break;
00434 case 4:
00435 { int ret = slice_del(z);
00436 if (ret < 0) return ret;
00437 }
00438 { int m_keep = z->l - z->c;
00439 z->ket = z->c;
00440 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; }
00441 among_var = find_among_b(z, a_3, 2);
00442 if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
00443 z->bra = z->c;
00444 { int ret = r_R2(z);
00445 if (ret == 0) { z->c = z->l - m_keep; goto lab9; }
00446 if (ret < 0) return ret;
00447 }
00448 switch(among_var) {
00449 case 0: { z->c = z->l - m_keep; goto lab9; }
00450 case 1:
00451 { int ret = slice_del(z);
00452 if (ret < 0) return ret;
00453 }
00454 break;
00455 }
00456 lab9:
00457 ;
00458 }
00459 break;
00460 }
00461 lab2:
00462 z->c = z->l - m3;
00463 }
00464 return 1;
00465 }
00466
00467 extern int german_UTF_8_stem(struct SN_env * z) {
00468 { int c1 = z->c;
00469 { int ret = r_prelude(z);
00470 if (ret == 0) goto lab0;
00471 if (ret < 0) return ret;
00472 }
00473 lab0:
00474 z->c = c1;
00475 }
00476 { int c2 = z->c;
00477 { int ret = r_mark_regions(z);
00478 if (ret == 0) goto lab1;
00479 if (ret < 0) return ret;
00480 }
00481 lab1:
00482 z->c = c2;
00483 }
00484 z->lb = z->c; z->c = z->l;
00485
00486 { int m3 = z->l - z->c; (void)m3;
00487 { int ret = r_standard_suffix(z);
00488 if (ret == 0) goto lab2;
00489 if (ret < 0) return ret;
00490 }
00491 lab2:
00492 z->c = z->l - m3;
00493 }
00494 z->c = z->lb;
00495 { int c4 = z->c;
00496 { int ret = r_postlude(z);
00497 if (ret == 0) goto lab3;
00498 if (ret < 0) return ret;
00499 }
00500 lab3:
00501 z->c = c4;
00502 }
00503 return 1;
00504 }
00505
00506 extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3, 0); }
00507
00508 extern void german_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
00509