PostgreSQL Source Code  git master
stem_UTF_8_dutch.c File Reference
#include "header.h"
Include dependency graph for stem_UTF_8_dutch.c:

Go to the source code of this file.

Functions

int dutch_UTF_8_stem (struct SN_env *z)
 
static int r_standard_suffix (struct SN_env *z)
 
static int r_undouble (struct SN_env *z)
 
static int r_R2 (struct SN_env *z)
 
static int r_R1 (struct SN_env *z)
 
static int r_mark_regions (struct SN_env *z)
 
static int r_en_ending (struct SN_env *z)
 
static int r_e_ending (struct SN_env *z)
 
static int r_postlude (struct SN_env *z)
 
static int r_prelude (struct SN_env *z)
 
struct SN_envdutch_UTF_8_create_env (void)
 
void dutch_UTF_8_close_env (struct SN_env *z)
 

Variables

static const symbol s_0_1 [2] = { 0xC3, 0xA1 }
 
static const symbol s_0_2 [2] = { 0xC3, 0xA4 }
 
static const symbol s_0_3 [2] = { 0xC3, 0xA9 }
 
static const symbol s_0_4 [2] = { 0xC3, 0xAB }
 
static const symbol s_0_5 [2] = { 0xC3, 0xAD }
 
static const symbol s_0_6 [2] = { 0xC3, 0xAF }
 
static const symbol s_0_7 [2] = { 0xC3, 0xB3 }
 
static const symbol s_0_8 [2] = { 0xC3, 0xB6 }
 
static const symbol s_0_9 [2] = { 0xC3, 0xBA }
 
static const symbol s_0_10 [2] = { 0xC3, 0xBC }
 
static const struct among a_0 [11]
 
static const symbol s_1_1 [1] = { 'I' }
 
static const symbol s_1_2 [1] = { 'Y' }
 
static const struct among a_1 [3]
 
static const symbol s_2_0 [2] = { 'd', 'd' }
 
static const symbol s_2_1 [2] = { 'k', 'k' }
 
static const symbol s_2_2 [2] = { 't', 't' }
 
static const struct among a_2 [3]
 
static const symbol s_3_0 [3] = { 'e', 'n', 'e' }
 
static const symbol s_3_1 [2] = { 's', 'e' }
 
static const symbol s_3_2 [2] = { 'e', 'n' }
 
static const symbol s_3_3 [5] = { 'h', 'e', 'd', 'e', 'n' }
 
static const symbol s_3_4 [1] = { 's' }
 
static const struct among a_3 [5]
 
static const symbol s_4_0 [3] = { 'e', 'n', 'd' }
 
static const symbol s_4_1 [2] = { 'i', 'g' }
 
static const symbol s_4_2 [3] = { 'i', 'n', 'g' }
 
static const symbol s_4_3 [4] = { 'l', 'i', 'j', 'k' }
 
static const symbol s_4_4 [4] = { 'b', 'a', 'a', 'r' }
 
static const symbol s_4_5 [3] = { 'b', 'a', 'r' }
 
static const struct among a_4 [6]
 
static const symbol s_5_0 [2] = { 'a', 'a' }
 
static const symbol s_5_1 [2] = { 'e', 'e' }
 
static const symbol s_5_2 [2] = { 'o', 'o' }
 
static const symbol s_5_3 [2] = { 'u', 'u' }
 
static const struct among a_5 [4]
 
static const unsigned char g_v [] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
 
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 }
 
static const unsigned char g_v_j [] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
 
static const symbol s_0 [] = { 'a' }
 
static const symbol s_1 [] = { 'e' }
 
static const symbol s_2 [] = { 'i' }
 
static const symbol s_3 [] = { 'o' }
 
static const symbol s_4 [] = { 'u' }
 
static const symbol s_5 [] = { 'y' }
 
static const symbol s_6 [] = { 'Y' }
 
static const symbol s_7 [] = { 'i' }
 
static const symbol s_8 [] = { 'I' }
 
static const symbol s_9 [] = { 'y' }
 
static const symbol s_10 [] = { 'Y' }
 
static const symbol s_11 [] = { 'y' }
 
static const symbol s_12 [] = { 'i' }
 
static const symbol s_13 [] = { 'e' }
 
static const symbol s_14 [] = { 'g', 'e', 'm' }
 
static const symbol s_15 [] = { 'h', 'e', 'i', 'd' }
 
static const symbol s_16 [] = { 'h', 'e', 'i', 'd' }
 
static const symbol s_17 [] = { 'c' }
 
static const symbol s_18 [] = { 'e', 'n' }
 
static const symbol s_19 [] = { 'i', 'g' }
 
static const symbol s_20 [] = { 'e' }
 
static const symbol s_21 [] = { 'e' }
 

Function Documentation

◆ dutch_UTF_8_close_env()

void dutch_UTF_8_close_env ( struct SN_env z)

Definition at line 633 of file stem_UTF_8_dutch.c.

References SN_close_env().

633 { SN_close_env(z, 0); }
void SN_close_env(struct SN_env *z, int S_size)
Definition: api.c:40

◆ dutch_UTF_8_create_env()

struct SN_env * dutch_UTF_8_create_env ( void  )

Definition at line 631 of file stem_UTF_8_dutch.c.

References SN_create_env().

631 { return SN_create_env(0, 2, 1); }
struct SN_env * SN_create_env(int S_size, int I_size, int B_size)
Definition: api.c:3

◆ dutch_UTF_8_stem()

int dutch_UTF_8_stem ( struct SN_env z)

Definition at line 592 of file stem_UTF_8_dutch.c.

References SN_env::c, SN_env::l, SN_env::lb, r_mark_regions(), r_postlude(), r_prelude(), and r_standard_suffix().

592  {
593  { int c1 = z->c; /* do, line 159 */
594  { int ret = r_prelude(z);
595  if (ret == 0) goto lab0; /* call prelude, line 159 */
596  if (ret < 0) return ret;
597  }
598  lab0:
599  z->c = c1;
600  }
601  { int c2 = z->c; /* do, line 160 */
602  { int ret = r_mark_regions(z);
603  if (ret == 0) goto lab1; /* call mark_regions, line 160 */
604  if (ret < 0) return ret;
605  }
606  lab1:
607  z->c = c2;
608  }
609  z->lb = z->c; z->c = z->l; /* backwards, line 161 */
610 
611  { int m3 = z->l - z->c; (void)m3; /* do, line 162 */
612  { int ret = r_standard_suffix(z);
613  if (ret == 0) goto lab2; /* call standard_suffix, line 162 */
614  if (ret < 0) return ret;
615  }
616  lab2:
617  z->c = z->l - m3;
618  }
619  z->c = z->lb;
620  { int c4 = z->c; /* do, line 163 */
621  { int ret = r_postlude(z);
622  if (ret == 0) goto lab3; /* call postlude, line 163 */
623  if (ret < 0) return ret;
624  }
625  lab3:
626  z->c = c4;
627  }
628  return 1;
629 }
static int r_postlude(struct SN_env *z)
int c
Definition: api.h:16
int lb
Definition: api.h:16
static int r_prelude(struct SN_env *z)
static int r_standard_suffix(struct SN_env *z)
int l
Definition: api.h:16
static int r_mark_regions(struct SN_env *z)

◆ r_e_ending()

static int r_e_ending ( struct SN_env z)
static

Definition at line 352 of file stem_UTF_8_dutch.c.

References SN_env::B, SN_env::bra, SN_env::c, eq_s_b(), g_v, SN_env::ket, SN_env::l, out_grouping_b_U(), r_R1(), r_undouble(), s_13, and slice_del().

Referenced by r_standard_suffix().

352  {
353  z->B[0] = 0; /* unset e_found, line 95 */
354  z->ket = z->c; /* [, line 96 */
355  if (!(eq_s_b(z, 1, s_13))) return 0;
356  z->bra = z->c; /* ], line 96 */
357  { int ret = r_R1(z);
358  if (ret == 0) return 0; /* call R1, line 96 */
359  if (ret < 0) return ret;
360  }
361  { int m_test = z->l - z->c; /* test, line 96 */
362  if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
363  z->c = z->l - m_test;
364  }
365  { int ret = slice_del(z); /* delete, line 96 */
366  if (ret < 0) return ret;
367  }
368  z->B[0] = 1; /* set e_found, line 97 */
369  { int ret = r_undouble(z);
370  if (ret == 0) return 0; /* call undouble, line 98 */
371  if (ret < 0) return ret;
372  }
373  return 1;
374 }
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:194
int ket
Definition: api.h:16
int slice_del(struct SN_env *z)
Definition: utilities.c:401
int bra
Definition: api.h:16
int c
Definition: api.h:16
static int r_undouble(struct SN_env *z)
int out_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:127
static const unsigned char g_v[]
static const symbol s_13[]
unsigned char * B
Definition: api.h:19
static int r_R1(struct SN_env *z)
int l
Definition: api.h:16

◆ r_en_ending()

static int r_en_ending ( struct SN_env z)
static

Definition at line 376 of file stem_UTF_8_dutch.c.

References SN_env::c, eq_s_b(), g_v, SN_env::l, out_grouping_b_U(), r_R1(), r_undouble(), s_14, and slice_del().

Referenced by r_standard_suffix().

376  {
377  { int ret = r_R1(z);
378  if (ret == 0) return 0; /* call R1, line 102 */
379  if (ret < 0) return ret;
380  }
381  { int m1 = z->l - z->c; (void)m1; /* and, line 102 */
382  if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
383  z->c = z->l - m1;
384  { int m2 = z->l - z->c; (void)m2; /* not, line 102 */
385  if (!(eq_s_b(z, 3, s_14))) goto lab0;
386  return 0;
387  lab0:
388  z->c = z->l - m2;
389  }
390  }
391  { int ret = slice_del(z); /* delete, line 102 */
392  if (ret < 0) return ret;
393  }
394  { int ret = r_undouble(z);
395  if (ret == 0) return 0; /* call undouble, line 103 */
396  if (ret < 0) return ret;
397  }
398  return 1;
399 }
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:194
int slice_del(struct SN_env *z)
Definition: utilities.c:401
int c
Definition: api.h:16
static int r_undouble(struct SN_env *z)
static const symbol s_14[]
int out_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:127
static const unsigned char g_v[]
static int r_R1(struct SN_env *z)
int l
Definition: api.h:16

◆ r_mark_regions()

static int r_mark_regions ( struct SN_env z)
static

Definition at line 256 of file stem_UTF_8_dutch.c.

References SN_env::c, g_v, SN_env::I, in_grouping_U(), SN_env::l, and out_grouping_U().

Referenced by dutch_UTF_8_stem().

256  {
257  z->I[0] = z->l;
258  z->I[1] = z->l;
259  { /* gopast */ /* grouping v, line 69 */
260  int ret = out_grouping_U(z, g_v, 97, 232, 1);
261  if (ret < 0) return 0;
262  z->c += ret;
263  }
264  { /* gopast */ /* non v, line 69 */
265  int ret = in_grouping_U(z, g_v, 97, 232, 1);
266  if (ret < 0) return 0;
267  z->c += ret;
268  }
269  z->I[0] = z->c; /* setmark p1, line 69 */
270  /* try, line 70 */
271  if (!(z->I[0] < 3)) goto lab0;
272  z->I[0] = 3;
273 lab0:
274  { /* gopast */ /* grouping v, line 71 */
275  int ret = out_grouping_U(z, g_v, 97, 232, 1);
276  if (ret < 0) return 0;
277  z->c += ret;
278  }
279  { /* gopast */ /* non v, line 71 */
280  int ret = in_grouping_U(z, g_v, 97, 232, 1);
281  if (ret < 0) return 0;
282  z->c += ret;
283  }
284  z->I[1] = z->c; /* setmark p2, line 71 */
285  return 1;
286 }
int * I
Definition: api.h:18
int c
Definition: api.h:16
int in_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:91
static const unsigned char g_v[]
int out_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:115
int l
Definition: api.h:16

◆ r_postlude()

static int r_postlude ( struct SN_env z)
static

Definition at line 288 of file stem_UTF_8_dutch.c.

References SN_env::bra, SN_env::c, find_among(), SN_env::ket, SN_env::l, SN_env::p, s_11, s_12, skip_utf8(), and slice_from_s().

Referenced by dutch_UTF_8_stem().

288  {
289  int among_var;
290  while(1) { /* repeat, line 75 */
291  int c1 = z->c;
292  z->bra = z->c; /* [, line 77 */
293  if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
294  among_var = find_among(z, a_1, 3); /* substring, line 77 */
295  if (!(among_var)) goto lab0;
296  z->ket = z->c; /* ], line 77 */
297  switch(among_var) {
298  case 0: goto lab0;
299  case 1:
300  { int ret = slice_from_s(z, 1, s_11); /* <-, line 78 */
301  if (ret < 0) return ret;
302  }
303  break;
304  case 2:
305  { int ret = slice_from_s(z, 1, s_12); /* <-, line 79 */
306  if (ret < 0) return ret;
307  }
308  break;
309  case 3:
310  { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
311  if (ret < 0) goto lab0;
312  z->c = ret; /* next, line 80 */
313  }
314  break;
315  }
316  continue;
317  lab0:
318  z->c = c1;
319  break;
320  }
321  return 1;
322 }
int skip_utf8(const symbol *p, int c, int lb, int l, int n)
Definition: utilities.c:30
symbol * p
Definition: api.h:15
static const struct among a_1[3]
static const symbol s_12[]
int ket
Definition: api.h:16
int bra
Definition: api.h:16
int c
Definition: api.h:16
int slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:392
int find_among(struct SN_env *z, const struct among *v, int v_size)
Definition: utilities.c:207
static const symbol s_11[]
int l
Definition: api.h:16

◆ r_prelude()

static int r_prelude ( struct SN_env z)
static

Definition at line 155 of file stem_UTF_8_dutch.c.

References SN_env::bra, SN_env::c, eq_s(), find_among(), g_v, in_grouping_U(), SN_env::ket, SN_env::l, SN_env::p, s_0, s_1, s_10, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, skip_utf8(), and slice_from_s().

Referenced by dutch_UTF_8_stem().

155  {
156  int among_var;
157  { int c_test = z->c; /* test, line 42 */
158  while(1) { /* repeat, line 42 */
159  int c1 = z->c;
160  z->bra = z->c; /* [, line 43 */
161  if (z->c + 1 >= z->l || z->p[z->c + 1] >> 5 != 5 || !((340306450 >> (z->p[z->c + 1] & 0x1f)) & 1)) among_var = 6; else
162  among_var = find_among(z, a_0, 11); /* substring, line 43 */
163  if (!(among_var)) goto lab0;
164  z->ket = z->c; /* ], line 43 */
165  switch(among_var) {
166  case 0: goto lab0;
167  case 1:
168  { int ret = slice_from_s(z, 1, s_0); /* <-, line 45 */
169  if (ret < 0) return ret;
170  }
171  break;
172  case 2:
173  { int ret = slice_from_s(z, 1, s_1); /* <-, line 47 */
174  if (ret < 0) return ret;
175  }
176  break;
177  case 3:
178  { int ret = slice_from_s(z, 1, s_2); /* <-, line 49 */
179  if (ret < 0) return ret;
180  }
181  break;
182  case 4:
183  { int ret = slice_from_s(z, 1, s_3); /* <-, line 51 */
184  if (ret < 0) return ret;
185  }
186  break;
187  case 5:
188  { int ret = slice_from_s(z, 1, s_4); /* <-, line 53 */
189  if (ret < 0) return ret;
190  }
191  break;
192  case 6:
193  { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
194  if (ret < 0) goto lab0;
195  z->c = ret; /* next, line 54 */
196  }
197  break;
198  }
199  continue;
200  lab0:
201  z->c = c1;
202  break;
203  }
204  z->c = c_test;
205  }
206  { int c_keep = z->c; /* try, line 57 */
207  z->bra = z->c; /* [, line 57 */
208  if (!(eq_s(z, 1, s_5))) { z->c = c_keep; goto lab1; }
209  z->ket = z->c; /* ], line 57 */
210  { int ret = slice_from_s(z, 1, s_6); /* <-, line 57 */
211  if (ret < 0) return ret;
212  }
213  lab1:
214  ;
215  }
216  while(1) { /* repeat, line 58 */
217  int c2 = z->c;
218  while(1) { /* goto, line 58 */
219  int c3 = z->c;
220  if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab3;
221  z->bra = z->c; /* [, line 59 */
222  { int c4 = z->c; /* or, line 59 */
223  if (!(eq_s(z, 1, s_7))) goto lab5;
224  z->ket = z->c; /* ], line 59 */
225  if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab5;
226  { int ret = slice_from_s(z, 1, s_8); /* <-, line 59 */
227  if (ret < 0) return ret;
228  }
229  goto lab4;
230  lab5:
231  z->c = c4;
232  if (!(eq_s(z, 1, s_9))) goto lab3;
233  z->ket = z->c; /* ], line 60 */
234  { int ret = slice_from_s(z, 1, s_10); /* <-, line 60 */
235  if (ret < 0) return ret;
236  }
237  }
238  lab4:
239  z->c = c3;
240  break;
241  lab3:
242  z->c = c3;
243  { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
244  if (ret < 0) goto lab2;
245  z->c = ret; /* goto, line 58 */
246  }
247  }
248  continue;
249  lab2:
250  z->c = c2;
251  break;
252  }
253  return 1;
254 }
int skip_utf8(const symbol *p, int c, int lb, int l, int n)
Definition: utilities.c:30
symbol * p
Definition: api.h:15
static const symbol s_0[]
static const symbol s_3[]
int ket
Definition: api.h:16
int bra
Definition: api.h:16
static const symbol s_10[]
int c
Definition: api.h:16
int eq_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:189
int slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:392
static const symbol s_7[]
static const symbol s_9[]
int in_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:91
static const symbol s_6[]
int find_among(struct SN_env *z, const struct among *v, int v_size)
Definition: utilities.c:207
static const symbol s_5[]
static const unsigned char g_v[]
static const struct among a_0[11]
static const symbol s_2[]
static const symbol s_1[]
static const symbol s_4[]
static const symbol s_8[]
int l
Definition: api.h:16

◆ r_R1()

static int r_R1 ( struct SN_env z)
static

Definition at line 324 of file stem_UTF_8_dutch.c.

References SN_env::c, and SN_env::I.

Referenced by r_e_ending(), r_en_ending(), and r_standard_suffix().

324  {
325  if (!(z->I[0] <= z->c)) return 0;
326  return 1;
327 }
int * I
Definition: api.h:18
int c
Definition: api.h:16

◆ r_R2()

static int r_R2 ( struct SN_env z)
static

Definition at line 329 of file stem_UTF_8_dutch.c.

References SN_env::c, and SN_env::I.

Referenced by r_standard_suffix().

329  {
330  if (!(z->I[1] <= z->c)) return 0;
331  return 1;
332 }
int * I
Definition: api.h:18
int c
Definition: api.h:16

◆ r_standard_suffix()

static int r_standard_suffix ( struct SN_env z)
static

Definition at line 401 of file stem_UTF_8_dutch.c.

References SN_env::B, SN_env::bra, SN_env::c, eq_s_b(), find_among_b(), g_v, g_v_I, g_v_j, SN_env::ket, SN_env::l, SN_env::lb, out_grouping_b_U(), SN_env::p, r_e_ending(), r_en_ending(), r_R1(), r_R2(), r_undouble(), s_15, s_16, s_17, s_18, s_19, s_20, s_21, skip_utf8(), slice_del(), and slice_from_s().

Referenced by dutch_UTF_8_stem().

401  {
402  int among_var;
403  { int m1 = z->l - z->c; (void)m1; /* do, line 107 */
404  z->ket = z->c; /* [, line 108 */
405  if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
406  among_var = find_among_b(z, a_3, 5); /* substring, line 108 */
407  if (!(among_var)) goto lab0;
408  z->bra = z->c; /* ], line 108 */
409  switch(among_var) {
410  case 0: goto lab0;
411  case 1:
412  { int ret = r_R1(z);
413  if (ret == 0) goto lab0; /* call R1, line 110 */
414  if (ret < 0) return ret;
415  }
416  { int ret = slice_from_s(z, 4, s_15); /* <-, line 110 */
417  if (ret < 0) return ret;
418  }
419  break;
420  case 2:
421  { int ret = r_en_ending(z);
422  if (ret == 0) goto lab0; /* call en_ending, line 113 */
423  if (ret < 0) return ret;
424  }
425  break;
426  case 3:
427  { int ret = r_R1(z);
428  if (ret == 0) goto lab0; /* call R1, line 116 */
429  if (ret < 0) return ret;
430  }
431  if (out_grouping_b_U(z, g_v_j, 97, 232, 0)) goto lab0;
432  { int ret = slice_del(z); /* delete, line 116 */
433  if (ret < 0) return ret;
434  }
435  break;
436  }
437  lab0:
438  z->c = z->l - m1;
439  }
440  { int m2 = z->l - z->c; (void)m2; /* do, line 120 */
441  { int ret = r_e_ending(z);
442  if (ret == 0) goto lab1; /* call e_ending, line 120 */
443  if (ret < 0) return ret;
444  }
445  lab1:
446  z->c = z->l - m2;
447  }
448  { int m3 = z->l - z->c; (void)m3; /* do, line 122 */
449  z->ket = z->c; /* [, line 122 */
450  if (!(eq_s_b(z, 4, s_16))) goto lab2;
451  z->bra = z->c; /* ], line 122 */
452  { int ret = r_R2(z);
453  if (ret == 0) goto lab2; /* call R2, line 122 */
454  if (ret < 0) return ret;
455  }
456  { int m4 = z->l - z->c; (void)m4; /* not, line 122 */
457  if (!(eq_s_b(z, 1, s_17))) goto lab3;
458  goto lab2;
459  lab3:
460  z->c = z->l - m4;
461  }
462  { int ret = slice_del(z); /* delete, line 122 */
463  if (ret < 0) return ret;
464  }
465  z->ket = z->c; /* [, line 123 */
466  if (!(eq_s_b(z, 2, s_18))) goto lab2;
467  z->bra = z->c; /* ], line 123 */
468  { int ret = r_en_ending(z);
469  if (ret == 0) goto lab2; /* call en_ending, line 123 */
470  if (ret < 0) return ret;
471  }
472  lab2:
473  z->c = z->l - m3;
474  }
475  { int m5 = z->l - z->c; (void)m5; /* do, line 126 */
476  z->ket = z->c; /* [, line 127 */
477  if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
478  among_var = find_among_b(z, a_4, 6); /* substring, line 127 */
479  if (!(among_var)) goto lab4;
480  z->bra = z->c; /* ], line 127 */
481  switch(among_var) {
482  case 0: goto lab4;
483  case 1:
484  { int ret = r_R2(z);
485  if (ret == 0) goto lab4; /* call R2, line 129 */
486  if (ret < 0) return ret;
487  }
488  { int ret = slice_del(z); /* delete, line 129 */
489  if (ret < 0) return ret;
490  }
491  { int m6 = z->l - z->c; (void)m6; /* or, line 130 */
492  z->ket = z->c; /* [, line 130 */
493  if (!(eq_s_b(z, 2, s_19))) goto lab6;
494  z->bra = z->c; /* ], line 130 */
495  { int ret = r_R2(z);
496  if (ret == 0) goto lab6; /* call R2, line 130 */
497  if (ret < 0) return ret;
498  }
499  { int m7 = z->l - z->c; (void)m7; /* not, line 130 */
500  if (!(eq_s_b(z, 1, s_20))) goto lab7;
501  goto lab6;
502  lab7:
503  z->c = z->l - m7;
504  }
505  { int ret = slice_del(z); /* delete, line 130 */
506  if (ret < 0) return ret;
507  }
508  goto lab5;
509  lab6:
510  z->c = z->l - m6;
511  { int ret = r_undouble(z);
512  if (ret == 0) goto lab4; /* call undouble, line 130 */
513  if (ret < 0) return ret;
514  }
515  }
516  lab5:
517  break;
518  case 2:
519  { int ret = r_R2(z);
520  if (ret == 0) goto lab4; /* call R2, line 133 */
521  if (ret < 0) return ret;
522  }
523  { int m8 = z->l - z->c; (void)m8; /* not, line 133 */
524  if (!(eq_s_b(z, 1, s_21))) goto lab8;
525  goto lab4;
526  lab8:
527  z->c = z->l - m8;
528  }
529  { int ret = slice_del(z); /* delete, line 133 */
530  if (ret < 0) return ret;
531  }
532  break;
533  case 3:
534  { int ret = r_R2(z);
535  if (ret == 0) goto lab4; /* call R2, line 136 */
536  if (ret < 0) return ret;
537  }
538  { int ret = slice_del(z); /* delete, line 136 */
539  if (ret < 0) return ret;
540  }
541  { int ret = r_e_ending(z);
542  if (ret == 0) goto lab4; /* call e_ending, line 136 */
543  if (ret < 0) return ret;
544  }
545  break;
546  case 4:
547  { int ret = r_R2(z);
548  if (ret == 0) goto lab4; /* call R2, line 139 */
549  if (ret < 0) return ret;
550  }
551  { int ret = slice_del(z); /* delete, line 139 */
552  if (ret < 0) return ret;
553  }
554  break;
555  case 5:
556  { int ret = r_R2(z);
557  if (ret == 0) goto lab4; /* call R2, line 142 */
558  if (ret < 0) return ret;
559  }
560  if (!(z->B[0])) goto lab4; /* Boolean test e_found, line 142 */
561  { int ret = slice_del(z); /* delete, line 142 */
562  if (ret < 0) return ret;
563  }
564  break;
565  }
566  lab4:
567  z->c = z->l - m5;
568  }
569  { int m9 = z->l - z->c; (void)m9; /* do, line 146 */
570  if (out_grouping_b_U(z, g_v_I, 73, 232, 0)) goto lab9;
571  { int m_test = z->l - z->c; /* test, line 148 */
572  if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab9;
573  if (!(find_among_b(z, a_5, 4))) goto lab9; /* among, line 149 */
574  if (out_grouping_b_U(z, g_v, 97, 232, 0)) goto lab9;
575  z->c = z->l - m_test;
576  }
577  z->ket = z->c; /* [, line 152 */
578  { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
579  if (ret < 0) goto lab9;
580  z->c = ret; /* next, line 152 */
581  }
582  z->bra = z->c; /* ], line 152 */
583  { int ret = slice_del(z); /* delete, line 152 */
584  if (ret < 0) return ret;
585  }
586  lab9:
587  z->c = z->l - m9;
588  }
589  return 1;
590 }
int skip_utf8(const symbol *p, int c, int lb, int l, int n)
Definition: utilities.c:30
symbol * p
Definition: api.h:15
static const unsigned char g_v_I[]
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:194
int ket
Definition: api.h:16
int slice_del(struct SN_env *z)
Definition: utilities.c:401
int bra
Definition: api.h:16
static const symbol s_20[]
int find_among_b(struct SN_env *z, const struct among *v, int v_size)
Definition: utilities.c:267
int c
Definition: api.h:16
int slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:392
static int r_undouble(struct SN_env *z)
static const struct among a_3[5]
int lb
Definition: api.h:16
static int r_en_ending(struct SN_env *z)
int out_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:127
static const symbol s_16[]
static const symbol s_21[]
static const unsigned char g_v_j[]
static const unsigned char g_v[]
static int r_e_ending(struct SN_env *z)
static const struct among a_4[6]
unsigned char * B
Definition: api.h:19
static int r_R1(struct SN_env *z)
static int r_R2(struct SN_env *z)
static const symbol s_15[]
static const symbol s_17[]
int l
Definition: api.h:16
static const struct among a_5[4]
static const symbol s_18[]
static const symbol s_19[]

◆ r_undouble()

static int r_undouble ( struct SN_env z)
static

Definition at line 334 of file stem_UTF_8_dutch.c.

References SN_env::bra, SN_env::c, find_among_b(), SN_env::ket, SN_env::l, SN_env::lb, SN_env::p, skip_utf8(), and slice_del().

Referenced by r_e_ending(), r_en_ending(), and r_standard_suffix().

334  {
335  { int m_test = z->l - z->c; /* test, line 91 */
336  if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
337  if (!(find_among_b(z, a_2, 3))) return 0; /* among, line 91 */
338  z->c = z->l - m_test;
339  }
340  z->ket = z->c; /* [, line 91 */
341  { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
342  if (ret < 0) return 0;
343  z->c = ret; /* next, line 91 */
344  }
345  z->bra = z->c; /* ], line 91 */
346  { int ret = slice_del(z); /* delete, line 91 */
347  if (ret < 0) return ret;
348  }
349  return 1;
350 }
int skip_utf8(const symbol *p, int c, int lb, int l, int n)
Definition: utilities.c:30
symbol * p
Definition: api.h:15
int ket
Definition: api.h:16
int slice_del(struct SN_env *z)
Definition: utilities.c:401
int bra
Definition: api.h:16
int find_among_b(struct SN_env *z, const struct among *v, int v_size)
Definition: utilities.c:267
static const struct among a_2[3]
int c
Definition: api.h:16
int lb
Definition: api.h:16
int l
Definition: api.h:16

Variable Documentation

◆ a_0

const struct among a_0[11]
static
Initial value:
=
{
{ 0, 0, -1, 6, 0},
{ 2, s_0_1, 0, 1, 0},
{ 2, s_0_2, 0, 1, 0},
{ 2, s_0_3, 0, 2, 0},
{ 2, s_0_4, 0, 2, 0},
{ 2, s_0_5, 0, 3, 0},
{ 2, s_0_6, 0, 3, 0},
{ 2, s_0_7, 0, 4, 0},
{ 2, s_0_8, 0, 4, 0},
{ 2, s_0_9, 0, 5, 0},
{ 2, s_0_10, 0, 5, 0}
}
static const symbol s_0_3[2]
static const symbol s_0_2[2]
static const symbol s_0_8[2]
static const symbol s_0_5[2]
static const symbol s_0_4[2]
static const symbol s_0_9[2]
static const symbol s_0_6[2]
static const symbol s_0_10[2]
static const symbol s_0_7[2]
static const symbol s_0_1[2]

Definition at line 45 of file stem_UTF_8_dutch.c.

◆ a_1

const struct among a_1[3]
static
Initial value:
=
{
{ 0, 0, -1, 3, 0},
{ 1, s_1_1, 0, 2, 0},
{ 1, s_1_2, 0, 1, 0}
}
static const symbol s_1_2[1]
static const symbol s_1_1[1]

Definition at line 63 of file stem_UTF_8_dutch.c.

◆ a_2

const struct among a_2[3]
static
Initial value:
=
{
{ 2, s_2_0, -1, -1, 0},
{ 2, s_2_1, -1, -1, 0},
{ 2, s_2_2, -1, -1, 0}
}
static const symbol s_2_1[2]
static const symbol s_2_0[2]
static const symbol s_2_2[2]

Definition at line 74 of file stem_UTF_8_dutch.c.

◆ a_3

const struct among a_3[5]
static
Initial value:
=
{
{ 3, s_3_0, -1, 2, 0},
{ 2, s_3_1, -1, 3, 0},
{ 2, s_3_2, -1, 2, 0},
{ 5, s_3_3, 2, 1, 0},
{ 1, s_3_4, -1, 3, 0}
}
static const symbol s_3_1[2]
static const symbol s_3_2[2]
static const symbol s_3_4[1]
static const symbol s_3_0[3]
static const symbol s_3_3[5]

Definition at line 87 of file stem_UTF_8_dutch.c.

◆ a_4

const struct among a_4[6]
static
Initial value:
=
{
{ 3, s_4_0, -1, 1, 0},
{ 2, s_4_1, -1, 2, 0},
{ 3, s_4_2, -1, 1, 0},
{ 4, s_4_3, -1, 3, 0},
{ 4, s_4_4, -1, 4, 0},
{ 3, s_4_5, -1, 5, 0}
}
static const symbol s_4_1[2]
static const symbol s_4_3[4]
static const symbol s_4_4[4]
static const symbol s_4_2[3]
static const symbol s_4_0[3]
static const symbol s_4_5[3]

Definition at line 103 of file stem_UTF_8_dutch.c.

◆ a_5

const struct among a_5[4]
static
Initial value:
=
{
{ 2, s_5_0, -1, -1, 0},
{ 2, s_5_1, -1, -1, 0},
{ 2, s_5_2, -1, -1, 0},
{ 2, s_5_3, -1, -1, 0}
}
static const symbol s_5_2[2]
static const symbol s_5_1[2]
static const symbol s_5_3[2]
static const symbol s_5_0[2]

Definition at line 118 of file stem_UTF_8_dutch.c.

◆ g_v

const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
static

◆ g_v_I

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 }
static

Definition at line 128 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ g_v_j

const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
static

Definition at line 130 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ s_0

const symbol s_0[] = { 'a' }
static

Definition at line 132 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_0_1

const symbol s_0_1[2] = { 0xC3, 0xA1 }
static

Definition at line 34 of file stem_UTF_8_dutch.c.

◆ s_0_10

const symbol s_0_10[2] = { 0xC3, 0xBC }
static

Definition at line 43 of file stem_UTF_8_dutch.c.

◆ s_0_2

const symbol s_0_2[2] = { 0xC3, 0xA4 }
static

Definition at line 35 of file stem_UTF_8_dutch.c.

◆ s_0_3

const symbol s_0_3[2] = { 0xC3, 0xA9 }
static

Definition at line 36 of file stem_UTF_8_dutch.c.

◆ s_0_4

const symbol s_0_4[2] = { 0xC3, 0xAB }
static

Definition at line 37 of file stem_UTF_8_dutch.c.

◆ s_0_5

const symbol s_0_5[2] = { 0xC3, 0xAD }
static

Definition at line 38 of file stem_UTF_8_dutch.c.

◆ s_0_6

const symbol s_0_6[2] = { 0xC3, 0xAF }
static

Definition at line 39 of file stem_UTF_8_dutch.c.

◆ s_0_7

const symbol s_0_7[2] = { 0xC3, 0xB3 }
static

Definition at line 40 of file stem_UTF_8_dutch.c.

◆ s_0_8

const symbol s_0_8[2] = { 0xC3, 0xB6 }
static

Definition at line 41 of file stem_UTF_8_dutch.c.

◆ s_0_9

const symbol s_0_9[2] = { 0xC3, 0xBA }
static

Definition at line 42 of file stem_UTF_8_dutch.c.

◆ s_1

const symbol s_1[] = { 'e' }
static

Definition at line 133 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_10

const symbol s_10[] = { 'Y' }
static

Definition at line 142 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_11

const symbol s_11[] = { 'y' }
static

Definition at line 143 of file stem_UTF_8_dutch.c.

Referenced by r_postlude().

◆ s_12

const symbol s_12[] = { 'i' }
static

Definition at line 144 of file stem_UTF_8_dutch.c.

Referenced by r_postlude().

◆ s_13

const symbol s_13[] = { 'e' }
static

Definition at line 145 of file stem_UTF_8_dutch.c.

Referenced by r_e_ending().

◆ s_14

const symbol s_14[] = { 'g', 'e', 'm' }
static

Definition at line 146 of file stem_UTF_8_dutch.c.

Referenced by r_en_ending().

◆ s_15

const symbol s_15[] = { 'h', 'e', 'i', 'd' }
static

Definition at line 147 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ s_16

const symbol s_16[] = { 'h', 'e', 'i', 'd' }
static

Definition at line 148 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ s_17

const symbol s_17[] = { 'c' }
static

Definition at line 149 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ s_18

const symbol s_18[] = { 'e', 'n' }
static

Definition at line 150 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ s_19

const symbol s_19[] = { 'i', 'g' }
static

Definition at line 151 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ s_1_1

const symbol s_1_1[1] = { 'I' }
static

Definition at line 60 of file stem_UTF_8_dutch.c.

◆ s_1_2

const symbol s_1_2[1] = { 'Y' }
static

Definition at line 61 of file stem_UTF_8_dutch.c.

◆ s_2

const symbol s_2[] = { 'i' }
static

Definition at line 134 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_20

const symbol s_20[] = { 'e' }
static

Definition at line 152 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ s_21

const symbol s_21[] = { 'e' }
static

Definition at line 153 of file stem_UTF_8_dutch.c.

Referenced by r_standard_suffix().

◆ s_2_0

const symbol s_2_0[2] = { 'd', 'd' }
static

Definition at line 70 of file stem_UTF_8_dutch.c.

◆ s_2_1

const symbol s_2_1[2] = { 'k', 'k' }
static

Definition at line 71 of file stem_UTF_8_dutch.c.

◆ s_2_2

const symbol s_2_2[2] = { 't', 't' }
static

Definition at line 72 of file stem_UTF_8_dutch.c.

◆ s_3

const symbol s_3[] = { 'o' }
static

Definition at line 135 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_3_0

const symbol s_3_0[3] = { 'e', 'n', 'e' }
static

Definition at line 81 of file stem_UTF_8_dutch.c.

◆ s_3_1

const symbol s_3_1[2] = { 's', 'e' }
static

Definition at line 82 of file stem_UTF_8_dutch.c.

◆ s_3_2

const symbol s_3_2[2] = { 'e', 'n' }
static

Definition at line 83 of file stem_UTF_8_dutch.c.

◆ s_3_3

const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' }
static

Definition at line 84 of file stem_UTF_8_dutch.c.

◆ s_3_4

const symbol s_3_4[1] = { 's' }
static

Definition at line 85 of file stem_UTF_8_dutch.c.

◆ s_4

const symbol s_4[] = { 'u' }
static

Definition at line 136 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_4_0

const symbol s_4_0[3] = { 'e', 'n', 'd' }
static

Definition at line 96 of file stem_UTF_8_dutch.c.

◆ s_4_1

const symbol s_4_1[2] = { 'i', 'g' }
static

Definition at line 97 of file stem_UTF_8_dutch.c.

◆ s_4_2

const symbol s_4_2[3] = { 'i', 'n', 'g' }
static

Definition at line 98 of file stem_UTF_8_dutch.c.

◆ s_4_3

const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' }
static

Definition at line 99 of file stem_UTF_8_dutch.c.

◆ s_4_4

const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' }
static

Definition at line 100 of file stem_UTF_8_dutch.c.

◆ s_4_5

const symbol s_4_5[3] = { 'b', 'a', 'r' }
static

Definition at line 101 of file stem_UTF_8_dutch.c.

◆ s_5

const symbol s_5[] = { 'y' }
static

Definition at line 137 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_5_0

const symbol s_5_0[2] = { 'a', 'a' }
static

Definition at line 113 of file stem_UTF_8_dutch.c.

◆ s_5_1

const symbol s_5_1[2] = { 'e', 'e' }
static

Definition at line 114 of file stem_UTF_8_dutch.c.

◆ s_5_2

const symbol s_5_2[2] = { 'o', 'o' }
static

Definition at line 115 of file stem_UTF_8_dutch.c.

◆ s_5_3

const symbol s_5_3[2] = { 'u', 'u' }
static

Definition at line 116 of file stem_UTF_8_dutch.c.

◆ s_6

const symbol s_6[] = { 'Y' }
static

Definition at line 138 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_7

const symbol s_7[] = { 'i' }
static

Definition at line 139 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_8

const symbol s_8[] = { 'I' }
static

Definition at line 140 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().

◆ s_9

const symbol s_9[] = { 'y' }
static

Definition at line 141 of file stem_UTF_8_dutch.c.

Referenced by r_prelude().