Changeset 1950
- Timestamp:
- 10/23/07 23:08:09 (10 months ago)
- Files:
-
- swish-e/branches/2.6/pod/CHANGES.pod (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/Makefile.am (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/Makefile.in (modified) (4 diffs)
- swish-e/branches/2.6/src/snowball/api.c (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/api.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/header.h (modified) (3 diffs)
- swish-e/branches/2.6/src/snowball/stem_de.c (modified) (15 diffs)
- swish-e/branches/2.6/src/snowball/stem_de.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_dk.c (modified) (10 diffs)
- swish-e/branches/2.6/src/snowball/stem_dk.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_en1.c (modified) (20 diffs)
- swish-e/branches/2.6/src/snowball/stem_en1.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_en2.c (modified) (17 diffs)
- swish-e/branches/2.6/src/snowball/stem_en2.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_es.c (modified) (29 diffs)
- swish-e/branches/2.6/src/snowball/stem_es.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_fi.c (modified) (22 diffs)
- swish-e/branches/2.6/src/snowball/stem_fi.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_fr.c (modified) (17 diffs)
- swish-e/branches/2.6/src/snowball/stem_fr.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_hu.c (copied) (copied from swish-e/trunk/src/snowball/stem_hu.c)
- swish-e/branches/2.6/src/snowball/stem_hu.h (copied) (copied from swish-e/trunk/src/snowball/stem_hu.h)
- swish-e/branches/2.6/src/snowball/stem_it.c (modified) (29 diffs)
- swish-e/branches/2.6/src/snowball/stem_it.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_nl.c (modified) (22 diffs)
- swish-e/branches/2.6/src/snowball/stem_nl.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_no.c (modified) (8 diffs)
- swish-e/branches/2.6/src/snowball/stem_no.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_pt.c (modified) (29 diffs)
- swish-e/branches/2.6/src/snowball/stem_pt.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_ro.c (copied) (copied from swish-e/trunk/src/snowball/stem_ro.c)
- swish-e/branches/2.6/src/snowball/stem_ro.h (copied) (copied from swish-e/trunk/src/snowball/stem_ro.h)
- swish-e/branches/2.6/src/snowball/stem_ru.c (modified) (20 diffs)
- swish-e/branches/2.6/src/snowball/stem_ru.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/stem_se.c (modified) (8 diffs)
- swish-e/branches/2.6/src/snowball/stem_se.h (modified) (1 diff)
- swish-e/branches/2.6/src/snowball/utilities.c (modified) (15 diffs)
- swish-e/branches/2.6/src/stemmer.c (modified) (3 diffs)
- swish-e/branches/2.6/src/stemmer.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
swish-e/branches/2.6/pod/CHANGES.pod
r1907 r1950 7 7 This document contains list of bug fixes and feature additions to Swish-e. 8 8 9 =head2 Version 2.6.x - ? 10 11 =over 4 12 13 =item New Berkeley DB backend 14 15 Jose Ruiz contributed a new BDB index format. The old native 16 and experimental incremental index formats have been removed. 17 18 =back 19 9 20 =head2 Version 2.4.x - ? 10 21 11 22 =over 4 23 24 =item New Snowball stemmers 25 26 Trygve Falch contributed patches to update 27 the Snowball stemmers, including new Hungarian and Romanian stemmers. 12 28 13 29 =item Patched leaks swish-e/branches/2.6/src/snowball/Makefile.am
r1277 r1950 32 32 stem_ru.h \ 33 33 stem_fi.c \ 34 stem_fi.h 34 stem_fi.h \ 35 stem_ro.c \ 36 stem_ro.h \ 37 stem_hu.c \ 38 stem_hu.h 35 39 36 40 swish-e/branches/2.6/src/snowball/Makefile.in
r1939 r1950 140 140 stem_ru.h \ 141 141 stem_fi.c \ 142 stem_fi.h 142 stem_fi.h \ 143 stem_ro.c \ 144 stem_ro.h \ 145 stem_hu.c \ 146 stem_hu.h 143 147 144 148 subdir = src/snowball … … 153 157 stem_es.lo stem_fr.lo stem_it.lo stem_pt.lo stem_de.lo \ 154 158 stem_nl.lo stem_no.lo stem_se.lo stem_dk.lo stem_ru.lo \ 155 stem_fi.lo 159 stem_fi.lo stem_ro.lo stem_hu.lo 156 160 libsnowball_la_OBJECTS = $(am_libsnowball_la_OBJECTS) 157 161 … … 167 171 @AMDEP_TRUE@ ./$(DEPDIR)/stem_en2.Plo ./$(DEPDIR)/stem_es.Plo \ 168 172 @AMDEP_TRUE@ ./$(DEPDIR)/stem_fi.Plo ./$(DEPDIR)/stem_fr.Plo \ 169 @AMDEP_TRUE@ ./$(DEPDIR)/stem_it.Plo ./$(DEPDIR)/stem_nl.Plo \ 170 @AMDEP_TRUE@ ./$(DEPDIR)/stem_no.Plo ./$(DEPDIR)/stem_pt.Plo \ 173 @AMDEP_TRUE@ ./$(DEPDIR)/stem_hu.Plo ./$(DEPDIR)/stem_it.Plo \ 174 @AMDEP_TRUE@ ./$(DEPDIR)/stem_nl.Plo ./$(DEPDIR)/stem_no.Plo \ 175 @AMDEP_TRUE@ ./$(DEPDIR)/stem_pt.Plo ./$(DEPDIR)/stem_ro.Plo \ 171 176 @AMDEP_TRUE@ ./$(DEPDIR)/stem_ru.Plo ./$(DEPDIR)/stem_se.Plo \ 172 177 @AMDEP_TRUE@ ./$(DEPDIR)/utilities.Plo … … 218 223 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_fi.Plo@am__quote@ 219 224 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_fr.Plo@am__quote@ 225 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_hu.Plo@am__quote@ 220 226 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_it.Plo@am__quote@ 221 227 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_nl.Plo@am__quote@ 222 228 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_no.Plo@am__quote@ 223 229 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_pt.Plo@am__quote@ 230 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_ro.Plo@am__quote@ 224 231 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_ru.Plo@am__quote@ 225 232 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stem_se.Plo@am__quote@ swish-e/branches/2.6/src/snowball/api.c
r1296 r1950 1 1 2 #include <stdlib.h> /* for calloc, free */ 2 3 #include "header.h" 3 #include <stdlib.h>4 4 5 5 extern struct SN_env * SN_create_env(int S_size, int I_size, int B_size) 6 { struct SN_env * z = (struct SN_env *) calloc(1, sizeof(struct SN_env)); 6 { 7 struct SN_env * z = (struct SN_env *) calloc(1, sizeof(struct SN_env)); 8 if (z == NULL) return NULL; 7 9 z->p = create_s(); 10 if (z->p == NULL) goto error; 8 11 if (S_size) 9 { z->S = (symbol * *) calloc(S_size, sizeof(symbol *)); 10 { int i; 11 for (i = 0; i < S_size; i++) z->S[i] = create_s(); 12 { 13 int i; 14 z->S = (symbol * *) calloc(S_size, sizeof(symbol *)); 15 if (z->S == NULL) goto error; 16 17 for (i = 0; i < S_size; i++) 18 { 19 z->S[i] = create_s(); 20 if (z->S[i] == NULL) goto error; 12 21 } 13 z->S_size = S_size;14 22 } 15 23 16 24 if (I_size) 17 { z->I = (int *) calloc(I_size, sizeof(int)); 18 z->I_size = I_size; 25 { 26 z->I = (int *) calloc(I_size, sizeof(int)); 27 if (z->I == NULL) goto error; 19 28 } 20 29 21 30 if (B_size) 22 { z->B = (symbol *) calloc(B_size, sizeof(symbol)); 23 z->B_size = B_size; 31 { 32 z->B = (unsigned char *) calloc(B_size, sizeof(unsigned char)); 33 if (z->B == NULL) goto error; 24 34 } 25 35 26 36 return z; 37 error: 38 SN_close_env(z, S_size); 39 return NULL; 27 40 } 28 41 29 extern void SN_close_env(struct SN_env * z )42 extern void SN_close_env(struct SN_env * z, int S_size) 30 43 { 31 if (z->S_size) 44 if (z == NULL) return; 45 if (S_size) 32 46 { 33 { int i; 34 for (i = 0; i < z->S_size; i++) lose_s(z->S[i]); 47 int i; 48 for (i = 0; i < S_size; i++) 49 { 50 lose_s(z->S[i]); 35 51 } 36 52 free(z->S); 37 53 } 38 if (z->I_size)free(z->I);39 if (z->B_size)free(z->B);54 free(z->I); 55 free(z->B); 40 56 if (z->p) lose_s(z->p); 41 57 free(z); 42 58 } 43 59 44 extern voidSN_set_current(struct SN_env * z, int size, const symbol * s)60 extern int SN_set_current(struct SN_env * z, int size, const symbol * s) 45 61 { 46 replace_s(z, 0, z->l, size, s);62 int err = replace_s(z, 0, z->l, size, s, NULL); 47 63 z->c = 0; 64 return err; 48 65 } 49 66 swish-e/branches/2.6/src/snowball/api.h
r1440 r1950 16 16 struct SN_env { 17 17 symbol * p; 18 int c; int a; int l; int lb; int bra; int ket; 19 int S_size; int I_size; int B_size; 18 int c; int l; int lb; int bra; int ket; 20 19 symbol * * S; 21 20 int * I; 22 symbol* B;21 unsigned char * B; 23 22 }; 24 23 25 24 extern struct SN_env * SN_create_env(int S_size, int I_size, int B_size); 26 extern void SN_close_env(struct SN_env * z );25 extern void SN_close_env(struct SN_env * z, int S_size); 27 26 28 extern voidSN_set_current(struct SN_env * z, int size, const symbol * s);27 extern int SN_set_current(struct SN_env * z, int size, const symbol * s); 29 28 30 29 #endif swish-e/branches/2.6/src/snowball/header.h
r1296 r1950 2 2 #include <limits.h> 3 3 4 5 4 #include "api.h" 6 7 /* use SWISHE emalloc/efree schema */8 // #define calloc(n,s) ecalloc((n),(s))9 // #define malloc(s) emalloc((s))10 // #define free(p) efree((p))11 5 12 6 #define MAXINT INT_MAX … … 21 15 struct among 22 16 { int s_size; /* number of chars in string */ 23 symbol * s; /* search string */17 const symbol * s; /* search string */ 24 18 int substring_i;/* index to longest matching substring */ 25 19 int result; /* result of the lookup */ … … 30 24 extern void lose_s(symbol * p); 31 25 32 extern int in_grouping(struct SN_env * z, unsigned char * s, int min, int max); 33 extern int in_grouping_b(struct SN_env * z, unsigned char * s, int min, int max); 34 extern int out_grouping(struct SN_env * z, unsigned char * s, int min, int max); 35 extern int out_grouping_b(struct SN_env * z, unsigned char * s, int min, int max); 26 extern int skip_utf8(const symbol * p, int c, int lb, int l, int n); 36 27 37 extern int in_ range(struct SN_env * z, int min, int max);38 extern int in_ range_b(struct SN_env * z, int min, int max);39 extern int out_ range(struct SN_env * z, int min, int max);40 extern int out_ range_b(struct SN_env * z, int min, int max);28 extern int in_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat); 29 extern int in_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat); 30 extern int out_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat); 31 extern int out_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat); 41 32 42 extern int eq_s(struct SN_env * z, int s_size, symbol * s);43 extern int eq_s_b(struct SN_env * z, int s_size, symbol * s);44 extern int eq_v(struct SN_env * z, symbol * p);45 extern int eq_v_b(struct SN_env * z, symbol * p);33 extern int in_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat); 34 extern int in_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat); 35 extern int out_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat); 36 extern int out_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat); 46 37 47 extern int find_among(struct SN_env * z, struct among * v, int v_size); 48 extern int find_among_b(struct SN_env * z, struct among * v, int v_size); 38 extern int eq_s(struct SN_env * z, int s_size, const symbol * s); 39 extern int eq_s_b(struct SN_env * z, int s_size, const symbol * s); 40 extern int eq_v(struct SN_env * z, const symbol * p); 41 extern int eq_v_b(struct SN_env * z, const symbol * p); 49 42 50 extern symbol * increase_size(symbol * p, int n); 51 extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s); 52 extern void slice_from_s(struct SN_env * z, int s_size, symbol * s); 53 extern void slice_from_v(struct SN_env * z, symbol * p); 54 extern void slice_del(struct SN_env * z); 43 extern int find_among(struct SN_env * z, const struct among * v, int v_size); 44 extern int find_among_b(struct SN_env * z, const struct among * v, int v_size); 55 45 56 extern void insert_s(struct SN_env * z, int bra, int ket, int s_size, symbol * s); 57 extern void insert_v(struct SN_env * z, int bra, int ket, symbol * p); 46 extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s, int * adjustment); 47 extern int slice_from_s(struct SN_env * z, int s_size, const symbol * s); 48 extern int slice_from_v(struct SN_env * z, const symbol * p); 49 extern int slice_del(struct SN_env * z); 50 51 extern int insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s); 52 extern int insert_v(struct SN_env * z, int bra, int ket, const symbol * p); 58 53 59 54 extern symbol * slice_to(struct SN_env * z, symbol * p); swish-e/branches/2.6/src/snowball/stem_de.c
r1267 r1950 4 4 #include "header.h" 5 5 6 extern int german_stem(struct SN_env * z); 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 extern int german_ISO_8859_1_stem(struct SN_env * z); 10 #ifdef __cplusplus 11 } 12 #endif 7 13 static int r_standard_suffix(struct SN_env * z); 8 14 static int r_R2(struct SN_env * z); … … 11 17 static int r_postlude(struct SN_env * z); 12 18 static int r_prelude(struct SN_env * z); 13 14 extern struct SN_env * german_create_env(void); 15 extern void german_close_env(struct SN_env * z); 16 17 static symbol s_0_1[1] = { 'U' }; 18 static symbol s_0_2[1] = { 'Y' }; 19 static symbol s_0_3[1] = { 228 }; 20 static symbol s_0_4[1] = { 246 }; 21 static symbol s_0_5[1] = { 252 }; 22 23 static struct among a_0[6] = 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 24 extern struct SN_env * german_ISO_8859_1_create_env(void); 25 extern void german_ISO_8859_1_close_env(struct SN_env * z); 26 27 28 #ifdef __cplusplus 29 } 30 #endif 31 static const symbol s_0_1[1] = { 'U' }; 32 static const symbol s_0_2[1] = { 'Y' }; 33 static const symbol s_0_3[1] = { 0xE4 }; 34 static const symbol s_0_4[1] = { 0xF6 }; 35 static const symbol s_0_5[1] = { 0xFC }; 36 37 static const struct among a_0[6] = 24 38 { 25 39 /* 0 */ { 0, 0, -1, 6, 0}, … … 31 45 }; 32 46 33 static symbol s_1_0[1] = { 'e' };34 static symbol s_1_1[2] = { 'e', 'm' };35 static symbol s_1_2[2] = { 'e', 'n' };36 static symbol s_1_3[3] = { 'e', 'r', 'n' };37 static symbol s_1_4[2] = { 'e', 'r' };38 static symbol s_1_5[1] = { 's' };39 static symbol s_1_6[2] = { 'e', 's' };40 41 static struct among a_1[7] =47 static const symbol s_1_0[1] = { 'e' }; 48 static const symbol s_1_1[2] = { 'e', 'm' }; 49 static const symbol s_1_2[2] = { 'e', 'n' }; 50 static const symbol s_1_3[3] = { 'e', 'r', 'n' }; 51 static const symbol s_1_4[2] = { 'e', 'r' }; 52 static const symbol s_1_5[1] = { 's' }; 53 static const symbol s_1_6[2] = { 'e', 's' }; 54 55 static const struct among a_1[7] = 42 56 { 43 57 /* 0 */ { 1, s_1_0, -1, 1, 0}, … … 50 64 }; 51 65 52 static symbol s_2_0[2] = { 'e', 'n' };53 static symbol s_2_1[2] = { 'e', 'r' };54 static symbol s_2_2[2] = { 's', 't' };55 static symbol s_2_3[3] = { 'e', 's', 't' };56 57 static struct among a_2[4] =66 static const symbol s_2_0[2] = { 'e', 'n' }; 67 static const symbol s_2_1[2] = { 'e', 'r' }; 68 static const symbol s_2_2[2] = { 's', 't' }; 69 static const symbol s_2_3[3] = { 'e', 's', 't' }; 70 71 static const struct among a_2[4] = 58 72 { 59 73 /* 0 */ { 2, s_2_0, -1, 1, 0}, … … 63 77 }; 64 78 65 static symbol s_3_0[2] = { 'i', 'g' };66 static symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };67 68 static struct among a_3[2] =79 static const symbol s_3_0[2] = { 'i', 'g' }; 80 static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' }; 81 82 static const struct among a_3[2] = 69 83 { 70 84 /* 0 */ { 2, s_3_0, -1, 1, 0}, … … 72 86 }; 73 87 74 static symbol s_4_0[3] = { 'e', 'n', 'd' };75 static symbol s_4_1[2] = { 'i', 'g' };76 static symbol s_4_2[3] = { 'u', 'n', 'g' };77 static symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };78 static symbol s_4_4[4] = { 'i', 's', 'c', 'h' };79 static symbol s_4_5[2] = { 'i', 'k' };80 static symbol s_4_6[4] = { 'h', 'e', 'i', 't' };81 static symbol s_4_7[4] = { 'k', 'e', 'i', 't' };82 83 static struct among a_4[8] =88 static const symbol s_4_0[3] = { 'e', 'n', 'd' }; 89 static const symbol s_4_1[2] = { 'i', 'g' }; 90 static const symbol s_4_2[3] = { 'u', 'n', 'g' }; 91 static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' }; 92 static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' }; 93 static const symbol s_4_5[2] = { 'i', 'k' }; 94 static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' }; 95 static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' }; 96 97 static const struct among a_4[8] = 84 98 { 85 99 /* 0 */ { 3, s_4_0, -1, 1, 0}, … … 93 107 }; 94 108 95 static unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };96 97 static unsigned char g_s_ending[] = { 117, 30, 5 };98 99 static unsigned char g_st_ending[] = { 117, 30, 4 };100 101 static symbol s_0[] = { 223};102 static symbol s_1[] = { 's', 's' };103 static symbol s_2[] = { 'u' };104 static symbol s_3[] = { 'U' };105 static symbol s_4[] = { 'y' };106 static symbol s_5[] = { 'Y' };107 static symbol s_6[] = { 'y' };108 static symbol s_7[] = { 'u' };109 static symbol s_8[] = { 'a' };110 static symbol s_9[] = { 'o' };111 static symbol s_10[] = { 'u' };112 static symbol s_11[] = { 'i', 'g' };113 static symbol s_12[] = { 'e' };114 static symbol s_13[] = { 'e' };115 static symbol s_14[] = { 'e', 'r' };116 static symbol s_15[] = { 'e', 'n' };109 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 }; 110 111 static const unsigned char g_s_ending[] = { 117, 30, 5 }; 112 113 static const unsigned char g_st_ending[] = { 117, 30, 4 }; 114 115 static const symbol s_0[] = { 0xDF }; 116 static const symbol s_1[] = { 's', 's' }; 117 static const symbol s_2[] = { 'u' }; 118 static const symbol s_3[] = { 'U' }; 119 static const symbol s_4[] = { 'y' }; 120 static const symbol s_5[] = { 'Y' }; 121 static const symbol s_6[] = { 'y' }; 122 static const symbol s_7[] = { 'u' }; 123 static const symbol s_8[] = { 'a' }; 124 static const symbol s_9[] = { 'o' }; 125 static const symbol s_10[] = { 'u' }; 126 static const symbol s_11[] = { 'i', 'g' }; 127 static const symbol s_12[] = { 'e' }; 128 static const symbol s_13[] = { 'e' }; 129 static const symbol s_14[] = { 'e', 'r' }; 130 static const symbol s_15[] = { 'e', 'n' }; 117 131 118 132 static int r_prelude(struct SN_env * z) { 119 133 { int c_test = z->c; /* test, line 30 */ 120 134 while(1) { /* repeat, line 30 */ 121 int c = z->c;122 { int c = z->c; /* or, line 33 */135 int c1 = z->c; 136 { int c2 = z->c; /* or, line 33 */ 123 137 z->bra = z->c; /* [, line 32 */ 124 138 if (!(eq_s(z, 1, s_0))) goto lab2; 125 139 z->ket = z->c; /* ], line 32 */ 126 slice_from_s(z, 2, s_1); /* <-, line 32 */ 140 { int ret = slice_from_s(z, 2, s_1); /* <-, line 32 */ 141 if (ret < 0) return ret; 142 } 127 143 goto lab1; 128 144 lab2: 129 z->c = c ;145 z->c = c2; 130 146 if (z->c >= z->l) goto lab0; 131 147 z->c++; /* next, line 33 */ … … 134 150 continue; 135 151 lab0: 136 z->c = c ;152 z->c = c1; 137 153 break; 138 154 } … … 140 156 } 141 157 while(1) { /* repeat, line 36 */ 142 int c = z->c;158 int c3 = z->c; 143 159 while(1) { /* goto, line 36 */ 144 int c = z->c;145 if ( !(in_grouping(z, g_v, 97, 252))) goto lab4;160 int c4 = z->c; 161 if (in_grouping(z, g_v, 97, 252, 0)) goto lab4; 146 162 z->bra = z->c; /* [, line 37 */ 147 { int c = z->c; /* or, line 37 */163 { int c5 = z->c; /* or, line 37 */ 148 164 if (!(eq_s(z, 1, s_2))) goto lab6; 149 165 z->ket = z->c; /* ], line 37 */ 150 if (!(in_grouping(z, g_v, 97, 252))) goto lab6; 151 slice_from_s(z, 1, s_3); /* <-, line 37 */ 166 if (in_grouping(z, g_v, 97, 252, 0)) goto lab6; 167 { int ret = slice_from_s(z, 1, s_3); /* <-, line 37 */ 168 if (ret < 0) return ret; 169 } 152 170 goto lab5; 153 171 lab6: 154 z->c = c ;172 z->c = c5; 155 173 if (!(eq_s(z, 1, s_4))) goto lab4; 156 174 z->ket = z->c; /* ], line 38 */ 157 if (!(in_grouping(z, g_v, 97, 252))) goto lab4; 158 slice_from_s(z, 1, s_5); /* <-, line 38 */ 175 if (in_grouping(z, g_v, 97, 252, 0)) goto lab4; 176 { int ret = slice_from_s(z, 1, s_5); /* <-, line 38 */ 177 if (ret < 0) return ret; 178 } 159 179 } 160 180 lab5: 161 z->c = c ;181 z->c = c4; 162 182 break; 163 183 lab4: 164 z->c = c ;184 z->c = c4; 165 185 if (z->c >= z->l) goto lab3; 166 z->c++; 186 z->c++; /* goto, line 36 */ 167 187 } 168 188 continue; 169 189 lab3: 170 z->c = c ;190 z->c = c3; 171 191 break; 172 192 } … … 177 197 z->I[0] = z->l; 178 198 z->I[1] = z->l; 179 while(1) { /* gopast, line 47 */180 if (!(in_grouping(z, g_v, 97, 252))) goto lab0;181 break;182 lab0:183 if (z->c >= z->l) return 0;184 z-> c++;185 }186 while(1) { /* gopast, line 47 */187 if (!(out_grouping(z, g_v, 97, 252))) goto lab1;188 break;189 lab1:190 if (z->c >= z->l) return 0;191 z->c++;192 }193 z->I[0] = z->c; /* setmark p1, line 47 */194 /* try, line 48 */195 if (!(z->I[0] < 3)) goto lab2;196 z->I[0] = 3;197 lab2: 198 while(1) { /* gopast, line 49*/199 if (!(in_grouping(z, g_v, 97, 252))) goto lab3;200 break;201 lab3:202 if (z->c >= z->l) return 0;203 z->c++;204 }205 while(1) { /* gopast, line 49 */206 if (!(out_grouping(z, g_v, 97, 252))) goto lab4;207 break;208 lab4:209 if ( z->c >= z->l) return 0;210 z->c ++;211 } 212 z->I[1] = z->c; /* setmark p2, line 49*/199 { int c_test = z->c; /* test, line 47 */ 200 { int ret = z->c + 3; 201 if (0 > ret || ret > z->l) return 0; 202 z->c = ret; /* hop, line 47 */ 203 } 204 z->I[2] = z->c; /* setmark x, line 47 */ 205 z->c = c_test; 206 } 207 { /* gopast */ /* grouping v, line 49 */ 208 int ret = out_grouping(z, g_v, 97, 252, 1); 209 if (ret < 0) return 0; 210 z->c += ret; 211 } 212 { /* gopast */ /* non v, line 49 */ 213 int ret = in_grouping(z, g_v, 97, 252, 1); 214 if (ret < 0) return 0; 215 z->c += ret; 216 } 217 z->I[0] = z->c; /* setmark p1, line 49 */ 218 /* try, line 50 */ 219 if (!(z->I[0] < z->I[2])) goto lab0; 220 z->I[0] = z->I[2]; 221 lab0: 222 { /* gopast */ /* grouping v, line 51 */ 223 int ret = out_grouping(z, g_v, 97, 252, 1); 224 if (ret < 0) return 0; 225 z->c += ret; 226 } 227 { /* gopast */ /* non v, line 51 */ 228 int ret = in_grouping(z, g_v, 97, 252, 1); 229 if (ret < 0) return 0; 230 z->c += ret; 231 } 232 z->I[1] = z->c; /* setmark p2, line 51 */ 213 233 return 1; 214 234 } … … 216 236 static int r_postlude(struct SN_env * z) { 217 237 int among_var; 218 while(1) { /* repeat, line 5 3*/219 int c = z->c;220 z->bra = z->c; /* [, line 5 5*/221 among_var = find_among(z, a_0, 6); /* substring, line 5 5*/238 while(1) { /* repeat, line 55 */ 239 int c1 = z->c; 240 z->bra = z->c; /* [, line 57 */ 241 among_var = find_among(z, a_0, 6); /* substring, line 57 */ 222 242 if (!(among_var)) goto lab0; 223 z->ket = z->c; /* ], line 5 5*/243 z->ket = z->c; /* ], line 57 */ 224 244 switch(among_var) { 225 245 case 0: goto lab0; 226 246 case 1: 227 slice_from_s(z, 1, s_6); /* <-, line 56 */ 247 { int ret = slice_from_s(z, 1, s_6); /* <-, line 58 */ 248 if (ret < 0) return ret; 249 } 228 250 break; 229 251 case 2: 230 slice_from_s(z, 1, s_7); /* <-, line 57 */ 252 { int ret = slice_from_s(z, 1, s_7); /* <-, line 59 */ 253 if (ret < 0) return ret; 254 } 231 255 break; 232 256 case 3: 233 slice_from_s(z, 1, s_8); /* <-, line 58 */ 257 { int ret = slice_from_s(z, 1, s_8); /* <-, line 60 */ 258 if (ret < 0) return ret; 259 } 234 260 break; 235 261 case 4: 236 slice_from_s(z, 1, s_9); /* <-, line 59 */ 262 { int ret = slice_from_s(z, 1, s_9); /* <-, line 61 */ 263 if (ret < 0) return ret; 264 } 237 265 break; 238 266 case 5: 239 slice_from_s(z, 1, s_10); /* <-, line 60 */ 267 { int ret = slice_from_s(z, 1, s_10); /* <-, line 62 */ 268 if (ret < 0) return ret; 269 } 240 270 break; 241 271 case 6: 242 272 if (z->c >= z->l) goto lab0; 243 z->c++; /* next, line 6 1*/273 z->c++; /* next, line 63 */ 244 274 break; 245 275 } 246 276 continue; 247 277 lab0: 248 z->c = c ;278 z->c = c1; 249 279 break; 250 280 } … … 264 294 static int r_standard_suffix(struct SN_env * z) { 265 295 int among_var; 266 { int m = z->l - z->c; /* do, line 72 */ 267 z->ket = z->c; /* [, line 73 */ 268 among_var = find_among_b(z, a_1, 7); /* substring, line 73 */ 296 { int m1 = z->l - z->c; (void)m1; /* do, line 74 */ 297 z->ket = z->c; /* [, line 75 */ 298 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0; 299 among_var = find_among_b(z, a_1, 7); /* substring, line 75 */ 269 300 if (!(among_var)) goto lab0; 270 z->bra = z->c; /* ], line 73 */ 271 if (!r_R1(z)) goto lab0; /* call R1, line 73 */ 301 z->bra = z->c; /* ], line 75 */ 302 { int ret = r_R1(z); 303 if (ret == 0) goto lab0; /* call R1, line 75 */ 304 if (ret < 0) return ret; 305 } 272 306 switch(among_var) { 273 307 case 0: goto lab0; 274 308 case 1: 275 slice_del(z); /* delete, line 75 */ 309 { int ret = slice_del(z); /* delete, line 77 */ 310 if (ret < 0) return ret; 311 } 276 312 break; 277 313 case 2: 278 if (!(in_grouping_b(z, g_s_ending, 98, 116))) goto lab0; 279 slice_del(z); /* delete, line 78 */ 314 if (in_grouping_b(z, g_s_ending, 98, 116, 0)) goto lab0; 315 { int ret = slice_del(z); /* delete, line 80 */ 316 if (ret < 0) return ret; 317 } 280 318 break; 281 319 } 282 320 lab0: 283 z->c = z->l - m; 284 } 285 { int m = z->l - z->c; /* do, line 82 */ 286 z->ket = z->c; /* [, line 83 */ 287 among_var = find_among_b(z, a_2, 4); /* substring, line 83 */ 321 z->c = z->l - m1; 322 } 323 { int m2 = z->l - z->c; (void)m2; /* do, line 84 */ 324 z->ket = z->c; /* [, line 85 */ 325 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1; 326 among_var = find_among_b(z, a_2, 4); /* substring, line 85 */ 288 327 if (!(among_var)) goto lab1; 289 z->bra = z->c; /* ], line 83 */ 290 if (!r_R1(z)) goto lab1; /* call R1, line 83 */ 328 z->bra = z->c; /* ], line 85 */ 329 { int ret = r_R1(z); 330 if (ret == 0) goto lab1; /* call R1, line 85 */ 331 if (ret < 0) return ret; 332 } 291 333 switch(among_var) { 292 334 case 0: goto lab1; 293 335 case 1: 294 slice_del(z); /* delete, line 85 */ 336 { int ret = slice_del(z); /* delete, line 87 */ 337 if (ret < 0) return ret; 338 } 295 339 break; 296 340 case 2: 297 if (!(in_grouping_b(z, g_st_ending, 98, 116))) goto lab1; 298 { int c = z->c - 3; 299 if (z->lb > c || c > z->l) goto lab1; 300 z->c = c; /* hop, line 88 */ 301 } 302 slice_del(z); /* delete, line 88 */ 341 if (in_grouping_b(z, g_st_ending, 98, 116, 0)) goto lab1; 342 { int ret = z->c - 3; 343 if (z->lb > ret || ret > z->l) goto lab1; 344 z->c = ret; /* hop, line 90 */ 345 } 346 { int ret = slice_del(z); /* delete, line 90 */ 347 if (ret < 0) return ret; 348 } 303 349 break; 304 350 } 305 351 lab1: 306 z->c = z->l - m; 307 } 308 { int m = z->l - z->c; /* do, line 92 */ 309 z->ket = z->c; /* [, line 93 */ 310 among_var = find_among_b(z, a_4, 8); /* substring, line 93 */ 352 z->c = z->l - m2; 353 } 354 { int m3 = z->l - z->c; (void)m3; /* do, line 94 */ 355 z->ket = z->c; /* [, line 95 */ 356 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2; 357 among_var = find_among_b(z, a_4, 8); /* substring, line 95 */ 311 358 if (!(among_var)) goto lab2; 312 z->bra = z->c; /* ], line 93 */ 313 if (!r_R2(z)) goto lab2; /* call R2, line 93 */ 359 z->bra = z->c; /* ], line 95 */ 360 { int ret = r_R2(z); 361 if (ret == 0) goto lab2; /* call R2, line 95 */ 362 if (ret < 0) return ret; 363 } 314 364 switch(among_var) { 315 365 case 0: goto lab2; 316 366 case 1: 317 slice_del(z); /* delete, line 95 */ 318 { int m = z->l - z->c; /* try, line 96 */ 319 z->ket = z->c; /* [, line 96 */ 320 if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m; goto lab3; } 321 z->bra = z->c; /* ], line 96 */ 322 { int m = z->l - z->c; /* not, line 96 */ 367 { int ret = slice_del(z); /* delete, line 97 */ 368 if (ret < 0) return ret; 369 } 370 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 98 */ 371 z->ket = z->c; /* [, line 98 */ 372 if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; } 373 z->bra = z->c; /* ], line 98 */ 374 { int m4 = z->l - z->c; (void)m4; /* not, line 98 */ 323 375 if (!(eq_s_b(z, 1, s_12))) goto lab4; 324 { z->c = z->l - m ; goto lab3; }376 { z->c = z->l - m_keep; goto lab3; } 325 377 lab4: 326 z->c = z->l - m; 327 } 328 if (!r_R2(z)) { z->c = z->l - m; goto lab3; } /* call R2, line 96 */ 329 slice_del(z); /* delete, line 96 */ 378 z->c = z->l - m4; 379 } 380 { int ret = r_R2(z); 381 if (ret == 0) { z->c = z->l - m_keep; goto lab3; } /* call R2, line 98 */ 382 if (ret < 0) return ret; 383 } 384 { int ret = slice_del(z); /* delete, line 98 */ 385 if (ret < 0) return ret; 386 } 330 387 lab3: 331 388 ; … … 333 390 break; 334 391 case 2: 335 { int m = z->l - z->c; /* not, line 99*/392 { int m5 = z->l - z->c; (void)m5; /* not, line 101 */ 336 393 if (!(eq_s_b(z, 1, s_13))) goto lab5; 337 394 goto lab2; 338 395 lab5: 339 z->c = z->l - m; 340 } 341 slice_del(z); /* delete, line 99 */ 396 z->c = z->l - m5; 397 } 398 { int ret = slice_del(z); /* delete, line 101 */ 399 if (ret < 0) return ret; 400 } 342 401 break; 343 402 case 3: 344 slice_del(z); /* delete, line 102 */ 345 { int m = z->l - z->c; /* try, line 103 */ 346 z->ket = z->c; /* [, line 104 */ 347 { int m = z->l - z->c; /* or, line 104 */ 403 { int ret = slice_del(z); /* delete, line 104 */ 404 if (ret < 0) return ret; 405 } 406 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 105 */ 407 z->ket = z->c; /* [, line 106 */ 408 { int m6 = z->l - z->c; (void)m6; /* or, line 106 */ 348 409 if (!(eq_s_b(z, 2, s_14))) goto lab8; 349 410 goto lab7; 350 411 lab8: 351 z->c = z->l - m ;352 if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m ; goto lab6; }412 z->c = z->l - m6; 413 if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; } 353 414 } 354 415 lab7: 355 z->bra = z->c; /* ], line 104 */ 356 if (!r_R1(z)) { z->c = z->l - m; goto lab6; } /* call R1, line 104 */ 357 slice_del(z); /* delete, line 104 */ 416 z->bra = z->c; /* ], line 106 */ 417 { int ret = r_R1(z); 418 if (ret == 0) { z->c = z->l - m_keep; goto lab6; } /* call R1, line 106 */ 419 if (ret < 0) return ret; 420 } 421 { int ret = slice_del(z); /* delete, line 106 */ 422 if (ret < 0) return ret; 423 } 358 424 lab6: 359 425 ; … … 361 427 break; 362 428 case 4: 363 slice_del(z); /* delete, line 108 */ 364 { int m = z->l - z->c; /* try, line 109 */ 365 z->ket = z->c; /* [, line 110 */ 366 among_var = find_among_b(z, a_3, 2); /* substring, line 110 */ 367 if (!(among_var)) { z->c = z->l - m; goto lab9; } 368 z->bra = z->c; /* ], line 110 */ 369 if (!r_R2(z)) { z->c = z->l - m; goto lab9; } /* call R2, line 110 */ 429 { int ret = slice_del(z); /* delete, line 110 */ 430 if (ret < 0) return ret; 431 } 432 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */ 433 z->ket = z->c; /* [, line 112 */ 434 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; } 435 among_var = find_among_b(z, a_3, 2); /* substring, line 112 */ 436 if (!(among_var)) { z->c = z->l - m_keep; goto lab9; } 437 z->bra = z->c; /* ], line 112 */ 438
