00001
00002
00003
00004 #include "header.h"
00005
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 extern int dutch_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_undouble(struct SN_env * z);
00015 static int r_R2(struct SN_env * z);
00016 static int r_R1(struct SN_env * z);
00017 static int r_mark_regions(struct SN_env * z);
00018 static int r_en_ending(struct SN_env * z);
00019 static int r_e_ending(struct SN_env * z);
00020 static int r_postlude(struct SN_env * z);
00021 static int r_prelude(struct SN_env * z);
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025
00026
00027 extern struct SN_env * dutch_ISO_8859_1_create_env(void);
00028 extern void dutch_ISO_8859_1_close_env(struct SN_env * z);
00029
00030
00031 #ifdef __cplusplus
00032 }
00033 #endif
00034 static const symbol s_0_1[1] = { 0xE1 };
00035 static const symbol s_0_2[1] = { 0xE4 };
00036 static const symbol s_0_3[1] = { 0xE9 };
00037 static const symbol s_0_4[1] = { 0xEB };
00038 static const symbol s_0_5[1] = { 0xED };
00039 static const symbol s_0_6[1] = { 0xEF };
00040 static const symbol s_0_7[1] = { 0xF3 };
00041 static const symbol s_0_8[1] = { 0xF6 };
00042 static const symbol s_0_9[1] = { 0xFA };
00043 static const symbol s_0_10[1] = { 0xFC };
00044
00045 static const struct among a_0[11] =
00046 {
00047 { 0, 0, -1, 6, 0},
00048 { 1, s_0_1, 0, 1, 0},
00049 { 1, s_0_2, 0, 1, 0},
00050 { 1, s_0_3, 0, 2, 0},
00051 { 1, s_0_4, 0, 2, 0},
00052 { 1, s_0_5, 0, 3, 0},
00053 { 1, s_0_6, 0, 3, 0},
00054 { 1, s_0_7, 0, 4, 0},
00055 { 1, s_0_8, 0, 4, 0},
00056 { 1, s_0_9, 0, 5, 0},
00057 { 1, s_0_10, 0, 5, 0}
00058 };
00059
00060 static const symbol s_1_1[1] = { 'I' };
00061 static const symbol s_1_2[1] = { 'Y' };
00062
00063 static const struct among a_1[3] =
00064 {
00065 { 0, 0, -1, 3, 0},
00066 { 1, s_1_1, 0, 2, 0},
00067 { 1, s_1_2, 0, 1, 0}
00068 };
00069
00070 static const symbol s_2_0[2] = { 'd', 'd' };
00071 static const symbol s_2_1[2] = { 'k', 'k' };
00072 static const symbol s_2_2[2] = { 't', 't' };
00073
00074 static const struct among a_2[3] =
00075 {
00076 { 2, s_2_0, -1, -1, 0},
00077 { 2, s_2_1, -1, -1, 0},
00078 { 2, s_2_2, -1, -1, 0}
00079 };
00080
00081 static const symbol s_3_0[3] = { 'e', 'n', 'e' };
00082 static const symbol s_3_1[2] = { 's', 'e' };
00083 static const symbol s_3_2[2] = { 'e', 'n' };
00084 static const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' };
00085 static const symbol s_3_4[1] = { 's' };
00086
00087 static const struct among a_3[5] =
00088 {
00089 { 3, s_3_0, -1, 2, 0},
00090 { 2, s_3_1, -1, 3, 0},
00091 { 2, s_3_2, -1, 2, 0},
00092 { 5, s_3_3, 2, 1, 0},
00093 { 1, s_3_4, -1, 3, 0}
00094 };
00095
00096 static const symbol s_4_0[3] = { 'e', 'n', 'd' };
00097 static const symbol s_4_1[2] = { 'i', 'g' };
00098 static const symbol s_4_2[3] = { 'i', 'n', 'g' };
00099 static const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' };
00100 static const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' };
00101 static const symbol s_4_5[3] = { 'b', 'a', 'r' };
00102
00103 static const struct among a_4[6] =
00104 {
00105 { 3, s_4_0, -1, 1, 0},
00106 { 2, s_4_1, -1, 2, 0},
00107 { 3, s_4_2, -1, 1, 0},
00108 { 4, s_4_3, -1, 3, 0},
00109 { 4, s_4_4, -1, 4, 0},
00110 { 3, s_4_5, -1, 5, 0}
00111 };
00112
00113 static const symbol s_5_0[2] = { 'a', 'a' };
00114 static const symbol s_5_1[2] = { 'e', 'e' };
00115 static const symbol s_5_2[2] = { 'o', 'o' };
00116 static const symbol s_5_3[2] = { 'u', 'u' };
00117
00118 static const struct among a_5[4] =
00119 {
00120 { 2, s_5_0, -1, -1, 0},
00121 { 2, s_5_1, -1, -1, 0},
00122 { 2, s_5_2, -1, -1, 0},
00123 { 2, s_5_3, -1, -1, 0}
00124 };
00125
00126 static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
00127
00128 static const unsigned char g_v_I[] = { 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
00129
00130 static const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
00131
00132 static const symbol s_0[] = { 'a' };
00133 static const symbol s_1[] = { 'e' };
00134 static const symbol s_2[] = { 'i' };
00135 static const symbol s_3[] = { 'o' };
00136 static const symbol s_4[] = { 'u' };
00137 static const symbol s_5[] = { 'y' };
00138 static const symbol s_6[] = { 'Y' };
00139 static const symbol s_7[] = { 'i' };
00140 static const symbol s_8[] = { 'I' };
00141 static const symbol s_9[] = { 'y' };
00142 static const symbol s_10[] = { 'Y' };
00143 static const symbol s_11[] = { 'y' };
00144 static const symbol s_12[] = { 'i' };
00145 static const symbol s_13[] = { 'e' };
00146 static const symbol s_14[] = { 'g', 'e', 'm' };
00147 static const symbol s_15[] = { 'h', 'e', 'i', 'd' };
00148 static const symbol s_16[] = { 'h', 'e', 'i', 'd' };
00149 static const symbol s_17[] = { 'c' };
00150 static const symbol s_18[] = { 'e', 'n' };
00151 static const symbol s_19[] = { 'i', 'g' };
00152 static const symbol s_20[] = { 'e' };
00153 static const symbol s_21[] = { 'e' };
00154
00155 static int r_prelude(struct SN_env * z) {
00156 int among_var;
00157 { int c_test = z->c;
00158 while(1) {
00159 int c1 = z->c;
00160 z->bra = z->c;
00161 if (z->c >= z->l || z->p[z->c + 0] >> 5 != 7 || !((340306450 >> (z->p[z->c + 0] & 0x1f)) & 1)) among_var = 6; else
00162 among_var = find_among(z, a_0, 11);
00163 if (!(among_var)) goto lab0;
00164 z->ket = z->c;
00165 switch(among_var) {
00166 case 0: goto lab0;
00167 case 1:
00168 { int ret = slice_from_s(z, 1, s_0);
00169 if (ret < 0) return ret;
00170 }
00171 break;
00172 case 2:
00173 { int ret = slice_from_s(z, 1, s_1);
00174 if (ret < 0) return ret;
00175 }
00176 break;
00177 case 3:
00178 { int ret = slice_from_s(z, 1, s_2);
00179 if (ret < 0) return ret;
00180 }
00181 break;
00182 case 4:
00183 { int ret = slice_from_s(z, 1, s_3);
00184 if (ret < 0) return ret;
00185 }
00186 break;
00187 case 5:
00188 { int ret = slice_from_s(z, 1, s_4);
00189 if (ret < 0) return ret;
00190 }
00191 break;
00192 case 6:
00193 if (z->c >= z->l) goto lab0;
00194 z->c++;
00195 break;
00196 }
00197 continue;
00198 lab0:
00199 z->c = c1;
00200 break;
00201 }
00202 z->c = c_test;
00203 }
00204 { int c_keep = z->c;
00205 z->bra = z->c;
00206 if (!(eq_s(z, 1, s_5))) { z->c = c_keep; goto lab1; }
00207 z->ket = z->c;
00208 { int ret = slice_from_s(z, 1, s_6);
00209 if (ret < 0) return ret;
00210 }
00211 lab1:
00212 ;
00213 }
00214 while(1) {
00215 int c2 = z->c;
00216 while(1) {
00217 int c3 = z->c;
00218 if (in_grouping(z, g_v, 97, 232, 0)) goto lab3;
00219 z->bra = z->c;
00220 { int c4 = z->c;
00221 if (!(eq_s(z, 1, s_7))) goto lab5;
00222 z->ket = z->c;
00223 if (in_grouping(z, g_v, 97, 232, 0)) goto lab5;
00224 { int ret = slice_from_s(z, 1, s_8);
00225 if (ret < 0) return ret;
00226 }
00227 goto lab4;
00228 lab5:
00229 z->c = c4;
00230 if (!(eq_s(z, 1, s_9))) goto lab3;
00231 z->ket = z->c;
00232 { int ret = slice_from_s(z, 1, s_10);
00233 if (ret < 0) return ret;
00234 }
00235 }
00236 lab4:
00237 z->c = c3;
00238 break;
00239 lab3:
00240 z->c = c3;
00241 if (z->c >= z->l) goto lab2;
00242 z->c++;
00243 }
00244 continue;
00245 lab2:
00246 z->c = c2;
00247 break;
00248 }
00249 return 1;
00250 }
00251
00252 static int r_mark_regions(struct SN_env * z) {
00253 z->I[0] = z->l;
00254 z->I[1] = z->l;
00255 {
00256 int ret = out_grouping(z, g_v, 97, 232, 1);
00257 if (ret < 0) return 0;
00258 z->c += ret;
00259 }
00260 {
00261 int ret = in_grouping(z, g_v, 97, 232, 1);
00262 if (ret < 0) return 0;
00263 z->c += ret;
00264 }
00265 z->I[0] = z->c;
00266
00267 if (!(z->I[0] < 3)) goto lab0;
00268 z->I[0] = 3;
00269 lab0:
00270 {
00271 int ret = out_grouping(z, g_v, 97, 232, 1);
00272 if (ret < 0) return 0;
00273 z->c += ret;
00274 }
00275 {
00276 int ret = in_grouping(z, g_v, 97, 232, 1);
00277 if (ret < 0) return 0;
00278 z->c += ret;
00279 }
00280 z->I[1] = z->c;
00281 return 1;
00282 }
00283
00284 static int r_postlude(struct SN_env * z) {
00285 int among_var;
00286 while(1) {
00287 int c1 = z->c;
00288 z->bra = z->c;
00289 if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
00290 among_var = find_among(z, a_1, 3);
00291 if (!(among_var)) goto lab0;
00292 z->ket = z->c;
00293 switch(among_var) {
00294 case 0: goto lab0;
00295 case 1:
00296 { int ret = slice_from_s(z, 1, s_11);
00297 if (ret < 0) return ret;
00298 }
00299 break;
00300 case 2:
00301 { int ret = slice_from_s(z, 1, s_12);
00302 if (ret < 0) return ret;
00303 }
00304 break;
00305 case 3:
00306 if (z->c >= z->l) goto lab0;
00307 z->c++;
00308 break;
00309 }
00310 continue;
00311 lab0:
00312 z->c = c1;
00313 break;
00314 }
00315 return 1;
00316 }
00317
00318 static int r_R1(struct SN_env * z) {
00319 if (!(z->I[0] <= z->c)) return 0;
00320 return 1;
00321 }
00322
00323 static int r_R2(struct SN_env * z) {
00324 if (!(z->I[1] <= z->c)) return 0;
00325 return 1;
00326 }
00327
00328 static int r_undouble(struct SN_env * z) {
00329 { int m_test = z->l - z->c;
00330 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
00331 if (!(find_among_b(z, a_2, 3))) return 0;
00332 z->c = z->l - m_test;
00333 }
00334 z->ket = z->c;
00335 if (z->c <= z->lb) return 0;
00336 z->c--;
00337 z->bra = z->c;
00338 { int ret = slice_del(z);
00339 if (ret < 0) return ret;
00340 }
00341 return 1;
00342 }
00343
00344 static int r_e_ending(struct SN_env * z) {
00345 z->B[0] = 0;
00346 z->ket = z->c;
00347 if (!(eq_s_b(z, 1, s_13))) return 0;
00348 z->bra = z->c;
00349 { int ret = r_R1(z);
00350 if (ret == 0) return 0;
00351 if (ret < 0) return ret;
00352 }
00353 { int m_test = z->l - z->c;
00354 if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
00355 z->c = z->l - m_test;
00356 }
00357 { int ret = slice_del(z);
00358 if (ret < 0) return ret;
00359 }
00360 z->B[0] = 1;
00361 { int ret = r_undouble(z);
00362 if (ret == 0) return 0;
00363 if (ret < 0) return ret;
00364 }
00365 return 1;
00366 }
00367
00368 static int r_en_ending(struct SN_env * z) {
00369 { int ret = r_R1(z);
00370 if (ret == 0) return 0;
00371 if (ret < 0) return ret;
00372 }
00373 { int m1 = z->l - z->c; (void)m1;
00374 if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
00375 z->c = z->l - m1;
00376 { int m2 = z->l - z->c; (void)m2;
00377 if (!(eq_s_b(z, 3, s_14))) goto lab0;
00378 return 0;
00379 lab0:
00380 z->c = z->l - m2;
00381 }
00382 }
00383 { int ret = slice_del(z);
00384 if (ret < 0) return ret;
00385 }
00386 { int ret = r_undouble(z);
00387 if (ret == 0) return 0;
00388 if (ret < 0) return ret;
00389 }
00390 return 1;
00391 }
00392
00393 static int r_standard_suffix(struct SN_env * z) {
00394 int among_var;
00395 { int m1 = z->l - z->c; (void)m1;
00396 z->ket = z->c;
00397 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
00398 among_var = find_among_b(z, a_3, 5);
00399 if (!(among_var)) goto lab0;
00400 z->bra = z->c;
00401 switch(among_var) {
00402 case 0: goto lab0;
00403 case 1:
00404 { int ret = r_R1(z);
00405 if (ret == 0) goto lab0;
00406 if (ret < 0) return ret;
00407 }
00408 { int ret = slice_from_s(z, 4, s_15);
00409 if (ret < 0) return ret;
00410 }
00411 break;
00412 case 2:
00413 { int ret = r_en_ending(z);
00414 if (ret == 0) goto lab0;
00415 if (ret < 0) return ret;
00416 }
00417 break;
00418 case 3:
00419 { int ret = r_R1(z);
00420 if (ret == 0) goto lab0;
00421 if (ret < 0) return ret;
00422 }
00423 if (out_grouping_b(z, g_v_j, 97, 232, 0)) goto lab0;
00424 { int ret = slice_del(z);
00425 if (ret < 0) return ret;
00426 }
00427 break;
00428 }
00429 lab0:
00430 z->c = z->l - m1;
00431 }
00432 { int m2 = z->l - z->c; (void)m2;
00433 { int ret = r_e_ending(z);
00434 if (ret == 0) goto lab1;
00435 if (ret < 0) return ret;
00436 }
00437 lab1:
00438 z->c = z->l - m2;
00439 }
00440 { int m3 = z->l - z->c; (void)m3;
00441 z->ket = z->c;
00442 if (!(eq_s_b(z, 4, s_16))) goto lab2;
00443 z->bra = z->c;
00444 { int ret = r_R2(z);
00445 if (ret == 0) goto lab2;
00446 if (ret < 0) return ret;
00447 }
00448 { int m4 = z->l - z->c; (void)m4;
00449 if (!(eq_s_b(z, 1, s_17))) goto lab3;
00450 goto lab2;
00451 lab3:
00452 z->c = z->l - m4;
00453 }
00454 { int ret = slice_del(z);
00455 if (ret < 0) return ret;
00456 }
00457 z->ket = z->c;
00458 if (!(eq_s_b(z, 2, s_18))) goto lab2;
00459 z->bra = z->c;
00460 { int ret = r_en_ending(z);
00461 if (ret == 0) goto lab2;
00462 if (ret < 0) return ret;
00463 }
00464 lab2:
00465 z->c = z->l - m3;
00466 }
00467 { int m5 = z->l - z->c; (void)m5;
00468 z->ket = z->c;
00469 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
00470 among_var = find_among_b(z, a_4, 6);
00471 if (!(among_var)) goto lab4;
00472 z->bra = z->c;
00473 switch(among_var) {
00474 case 0: goto lab4;
00475 case 1:
00476 { int ret = r_R2(z);
00477 if (ret == 0) goto lab4;
00478 if (ret < 0) return ret;
00479 }
00480 { int ret = slice_del(z);
00481 if (ret < 0) return ret;
00482 }
00483 { int m6 = z->l - z->c; (void)m6;
00484 z->ket = z->c;
00485 if (!(eq_s_b(z, 2, s_19))) goto lab6;
00486 z->bra = z->c;
00487 { int ret = r_R2(z);
00488 if (ret == 0) goto lab6;
00489 if (ret < 0) return ret;
00490 }
00491 { int m7 = z->l - z->c; (void)m7;
00492 if (!(eq_s_b(z, 1, s_20))) goto lab7;
00493 goto lab6;
00494 lab7:
00495 z->c = z->l - m7;
00496 }
00497 { int ret = slice_del(z);
00498 if (ret < 0) return ret;
00499 }
00500 goto lab5;
00501 lab6:
00502 z->c = z->l - m6;
00503 { int ret = r_undouble(z);
00504 if (ret == 0) goto lab4;
00505 if (ret < 0) return ret;
00506 }
00507 }
00508 lab5:
00509 break;
00510 case 2:
00511 { int ret = r_R2(z);
00512 if (ret == 0) goto lab4;
00513 if (ret < 0) return ret;
00514 }
00515 { int m8 = z->l - z->c; (void)m8;
00516 if (!(eq_s_b(z, 1, s_21))) goto lab8;
00517 goto lab4;
00518 lab8:
00519 z->c = z->l - m8;
00520 }
00521 { int ret = slice_del(z);
00522 if (ret < 0) return ret;
00523 }
00524 break;
00525 case 3:
00526 { int ret = r_R2(z);
00527 if (ret == 0) goto lab4;
00528 if (ret < 0) return ret;
00529 }
00530 { int ret = slice_del(z);
00531 if (ret < 0) return ret;
00532 }
00533 { int ret = r_e_ending(z);
00534 if (ret == 0) goto lab4;
00535 if (ret < 0) return ret;
00536 }
00537 break;
00538 case 4:
00539 { int ret = r_R2(z);
00540 if (ret == 0) goto lab4;
00541 if (ret < 0) return ret;
00542 }
00543 { int ret = slice_del(z);
00544 if (ret < 0) return ret;
00545 }
00546 break;
00547 case 5:
00548 { int ret = r_R2(z);
00549 if (ret == 0) goto lab4;
00550 if (ret < 0) return ret;
00551 }
00552 if (!(z->B[0])) goto lab4;
00553 { int ret = slice_del(z);
00554 if (ret < 0) return ret;
00555 }
00556 break;
00557 }
00558 lab4:
00559 z->c = z->l - m5;
00560 }
00561 { int m9 = z->l - z->c; (void)m9;
00562 if (out_grouping_b(z, g_v_I, 73, 232, 0)) goto lab9;
00563 { int m_test = z->l - z->c;
00564 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab9;
00565 if (!(find_among_b(z, a_5, 4))) goto lab9;
00566 if (out_grouping_b(z, g_v, 97, 232, 0)) goto lab9;
00567 z->c = z->l - m_test;
00568 }
00569 z->ket = z->c;
00570 if (z->c <= z->lb) goto lab9;
00571 z->c--;
00572 z->bra = z->c;
00573 { int ret = slice_del(z);
00574 if (ret < 0) return ret;
00575 }
00576 lab9:
00577 z->c = z->l - m9;
00578 }
00579 return 1;
00580 }
00581
00582 extern int dutch_ISO_8859_1_stem(struct SN_env * z) {
00583 { int c1 = z->c;
00584 { int ret = r_prelude(z);
00585 if (ret == 0) goto lab0;
00586 if (ret < 0) return ret;
00587 }
00588 lab0:
00589 z->c = c1;
00590 }
00591 { int c2 = z->c;
00592 { int ret = r_mark_regions(z);
00593 if (ret == 0) goto lab1;
00594 if (ret < 0) return ret;
00595 }
00596 lab1:
00597 z->c = c2;
00598 }
00599 z->lb = z->c; z->c = z->l;
00600
00601 { int m3 = z->l - z->c; (void)m3;
00602 { int ret = r_standard_suffix(z);
00603 if (ret == 0) goto lab2;
00604 if (ret < 0) return ret;
00605 }
00606 lab2:
00607 z->c = z->l - m3;
00608 }
00609 z->c = z->lb;
00610 { int c4 = z->c;
00611 { int ret = r_postlude(z);
00612 if (ret == 0) goto lab3;
00613 if (ret < 0) return ret;
00614 }
00615 lab3:
00616 z->c = c4;
00617 }
00618 return 1;
00619 }
00620
00621 extern struct SN_env * dutch_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 1); }
00622
00623 extern void dutch_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
00624