本文整理汇总了C++中slice_del函数的典型用法代码示例。如果您正苦于以下问题:C++ slice_del函数的具体用法?C++ slice_del怎么用?C++ slice_del使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了slice_del函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: r_particle_etc
static int r_particle_etc(struct SN_env * z) { /* backwardmode */
int among_var;
{ int mlimit1; /* setlimit, line 56 */
if (z->c < z->I[0]) return 0;
mlimit1 = z->lb; z->lb = z->I[0];
z->ket = z->c; /* [, line 56 */
among_var = find_among_b(z, a_0, 10); /* substring, line 56 */
if (!(among_var)) { z->lb = mlimit1; return 0; }
z->bra = z->c; /* ], line 56 */
z->lb = mlimit1;
}
switch (among_var) { /* among, line 57 */
case 1:
if (in_grouping_b_U(z, g_particle_end, 97, 246, 0)) return 0; /* grouping particle_end, line 63 */
break;
case 2:
{ int ret = r_R2(z); /* call R2, line 65 */
if (ret <= 0) return ret;
}
break;
}
{ int ret = slice_del(z); /* delete, line 67 */
if (ret < 0) return ret;
}
return 1;
}
示例2: r_other_endings
static int r_other_endings(struct SN_env * z) { /* backwardmode */
int among_var;
{ int mlimit1; /* setlimit, line 143 */
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
z->ket = z->c; /* [, line 143 */
among_var = find_among_b(z, a_7, 14); /* substring, line 143 */
if (!(among_var)) { z->lb = mlimit1; return 0; }
z->bra = z->c; /* ], line 143 */
z->lb = mlimit1;
}
switch (among_var) { /* among, line 144 */
case 1:
{ int m2 = z->l - z->c; (void)m2; /* not, line 147 */
if (!(eq_s_b(z, 2, s_5))) goto lab0; /* literal, line 147 */
return 0;
lab0:
z->c = z->l - m2;
}
break;
}
{ int ret = slice_del(z); /* delete, line 152 */
if (ret < 0) return ret;
}
return 1;
}
示例3: r_consonant_pair
static int r_consonant_pair(struct SN_env * z) {
{ int m_test = z->l - z->c; /* test, line 55 */
{ int m3; /* setlimit, line 56 */
int m = z->l - z->c; (void) m;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 56 */
m3 = z->lb; z->lb = z->c;
z->c = z->l - m;
z->ket = z->c; /* [, line 56 */
if (!(find_among_b(z, a_1, 4))) { z->lb = m3; return 0; } /* substring, line 56 */
z->bra = z->c; /* ], line 56 */
z->lb = m3;
}
z->c = z->l - m_test;
}
{ int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
if (c < 0) return 0;
z->c = c; /* next, line 62 */
}
z->bra = z->c; /* ], line 62 */
{ int ret;
ret = slice_del(z); /* delete, line 62 */
if (ret < 0) return ret;
}
return 1;
}
示例4: r_consonant_pair
static int r_consonant_pair(struct SN_env * z) {
{ int m3; /* setlimit, line 50 */
int m = z->l - z->c;
(void) m;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 50 */
m3 = z->lb;
z->lb = z->c;
z->c = z->l - m;
{ int m = z->l - z->c;
(void) m; /* and, line 52 */
if (!(find_among_b(z, a_1, 7))) {
z->lb = m3; /* among, line 51 */
return 0;
}
z->c = z->l - m;
z->ket = z->c; /* [, line 52 */
if (z->c <= z->lb) {
z->lb = m3;
return 0;
}
z->c--; /* next, line 52 */
z->bra = z->c; /* ], line 52 */
{ int ret;
ret = slice_del(z); /* delete, line 52 */
if (ret < 0) return ret;
}
}
z->lb = m3;
}
return 1;
}
示例5: r_factive
static int r_factive(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 133 */
among_var = find_among_b(z, a_7, 2); /* substring, line 133 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 133 */
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 133 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = r_double(z);
if (ret == 0) return 0; /* call double, line 134 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = r_double(z);
if (ret == 0) return 0; /* call double, line 135 */
if (ret < 0) return ret;
}
break;
}
{ int ret;
ret = slice_del(z); /* delete, line 137 */
if (ret < 0) return ret;
}
{ int ret = r_undouble(z);
if (ret == 0) return 0; /* call undouble, line 138 */
if (ret < 0) return ret;
}
return 1;
}
示例6: r_verb_suffix
static int r_verb_suffix(struct SN_env * z) {
int among_var;
{ int m3; /* setlimit, line 159 */
int m = z->l - z->c; (void) m;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 159 */
m3 = z->lb; z->lb = z->c;
z->c = z->l - m;
z->ket = z->c; /* [, line 160 */
among_var = find_among_b(z, a_6, 120); /* substring, line 160 */
if (!(among_var)) { z->lb = m3; return 0; }
z->bra = z->c; /* ], line 160 */
switch(among_var) {
case 0: { z->lb = m3; return 0; }
case 1:
{ int ret;
ret = slice_del(z); /* delete, line 179 */
if (ret < 0) return ret;
}
break;
}
z->lb = m3;
}
return 1;
}
示例7: r_attached_pronoun
static int r_attached_pronoun(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 87 */
if (!(find_among_b(z, a_2, 37))) return 0; /* substring, line 87 */
z->bra = z->c; /* ], line 87 */
among_var = find_among_b(z, a_3, 5); /* among, line 97 */
if (!(among_var)) return 0;
{ int ret = r_RV(z);
if (ret == 0) return 0; /* call RV, line 97 */
if (ret < 0) return ret;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret;
ret = slice_del(z); /* delete, line 98 */
if (ret < 0) return ret;
}
break;
case 2:
{ int ret;
ret = slice_from_s(z, 1, s_12); /* <-, line 99 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
示例8: r_en_ending
static int r_en_ending(struct SN_env * z) {
{ int ret = r_R1(z);
if (ret == 0) return 0; /* call R1, line 102 */
if (ret < 0) return ret;
}
{ int m = z->l - z->c; (void) m; /* and, line 102 */
if (!(out_grouping_b_U(z, g_v, 97, 232))) return 0;
z->c = z->l - m;
{ int m = z->l - z->c; (void) m; /* not, line 102 */
if (!(eq_s_b(z, 3, s_14))) goto lab0;
return 0;
lab0:
z->c = z->l - m;
}
}
{ int ret;
ret = slice_del(z); /* delete, line 102 */
if (ret < 0) return ret;
}
{ int ret = r_undouble(z);
if (ret == 0) return 0; /* call undouble, line 103 */
if (ret < 0) return ret;
}
return 1;
}
示例9: r_other_endings
static int r_other_endings(struct SN_env * z) {
int among_var;
{ int m3; /* setlimit, line 142 */
int m = z->l - z->c; (void) m;
if (z->c < z->I[1]) return 0;
z->c = z->I[1]; /* tomark, line 142 */
m3 = z->lb; z->lb = z->c;
z->c = z->l - m;
z->ket = z->c; /* [, line 142 */
among_var = find_among_b(z, a_7, 14); /* substring, line 142 */
if (!(among_var)) { z->lb = m3; return 0; }
z->bra = z->c; /* ], line 142 */
z->lb = m3;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int m = z->l - z->c; (void) m; /* not, line 146 */
if (!(eq_s_b(z, 2, s_12))) goto lab0;
return 0;
lab0:
z->c = z->l - m;
}
break;
}
{ int ret;
ret = slice_del(z); /* delete, line 151 */
if (ret < 0) return ret;
}
return 1;
}
示例10: r_particle_etc
static int r_particle_etc(struct SN_env * z) {
int among_var;
{ int m3; /* setlimit, line 55 */
int m = z->l - z->c; (void) m;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 55 */
m3 = z->lb; z->lb = z->c;
z->c = z->l - m;
z->ket = z->c; /* [, line 55 */
among_var = find_among_b(z, a_0, 10); /* substring, line 55 */
if (!(among_var)) { z->lb = m3; return 0; }
z->bra = z->c; /* ], line 55 */
z->lb = m3;
}
switch(among_var) {
case 0: return 0;
case 1:
if (!(in_grouping_b(z, g_particle_end, 97, 246))) return 0;
break;
case 2:
{ int ret = r_R2(z);
if (ret == 0) return 0; /* call R2, line 64 */
if (ret < 0) return ret;
}
break;
}
{ int ret;
ret = slice_del(z); /* delete, line 66 */
if (ret < 0) return ret;
}
return 1;
}
示例11: r_i_verb_suffix
static int r_i_verb_suffix(struct SN_env * z) {
int among_var;
{ int m3; /* setlimit, line 154 */
int m = z->l - z->c; (void) m;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 154 */
m3 = z->lb; z->lb = z->c;
z->c = z->l - m;
z->ket = z->c; /* [, line 155 */
among_var = find_among_b(z, a_4, 35); /* substring, line 155 */
if (!(among_var)) { z->lb = m3; return 0; }
z->bra = z->c; /* ], line 155 */
switch(among_var) {
case 0: { z->lb = m3; return 0; }
case 1:
if (!(out_grouping_b_U(z, g_v, 97, 251))) { z->lb = m3; return 0; }
{ int ret;
ret = slice_del(z); /* delete, line 161 */
if (ret < 0) return ret;
}
break;
}
z->lb = m3;
}
return 1;
}
示例12: r_i_plural
static int r_i_plural(struct SN_env * z) {
{ int mlimit; /* setlimit, line 154 */
int m1 = z->l - z->c;
(void)m1;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 154 */
mlimit = z->lb;
z->lb = z->c;
z->c = z->l - m1;
z->ket = z->c; /* [, line 154 */
if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106)) {
z->lb = mlimit;
return 0;
}
if (!(find_among_b(z, a_8, 2))) {
z->lb = mlimit; /* substring, line 154 */
return 0;
}
z->bra = z->c; /* ], line 154 */
z->lb = mlimit;
}
{ int ret = slice_del(z); /* delete, line 158 */
if (ret < 0) return ret;
}
return 1;
}
示例13: r_main_suffix
static int r_main_suffix(struct SN_env * z) {
int among_var;
{ int m3; /* setlimit, line 38 */
int m = z->l - z->c; (void) m;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 38 */
m3 = z->lb; z->lb = z->c;
z->c = z->l - m;
z->ket = z->c; /* [, line 38 */
among_var = find_among_b(z, a_0, 29); /* substring, line 38 */
if (!(among_var)) { z->lb = m3; return 0; }
z->bra = z->c; /* ], line 38 */
z->lb = m3;
}
switch(among_var) {
case 0: return 0;
case 1:
{ int ret;
ret = slice_del(z); /* delete, line 44 */
if (ret < 0) return ret;
}
break;
case 2:
{ int m = z->l - z->c; (void) m; /* or, line 46 */
if (!(in_grouping_b_U(z, g_s_ending, 98, 122))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m;
if (!(eq_s_b(z, 1, s_0))) return 0;
if (!(out_grouping_b_U(z, g_v, 97, 248))) return 0;
}
lab0:
{ int ret;
ret = slice_del(z); /* delete, line 46 */
if (ret < 0) return ret;
}
break;
case 3:
{ int ret;
ret = slice_from_s(z, 2, s_1); /* <-, line 48 */
if (ret < 0) return ret;
}
break;
}
return 1;
}
示例14: portuguese_stem
extern int portuguese_stem(struct SN_env * z) {
{ int c = z->c; /* do, line 200 */
if (!r_prelude(z)) goto lab0; /* call prelude, line 200 */
lab0:
z->c = c;
}
{ int c = z->c; /* do, line 201 */
if (!r_mark_regions(z)) goto lab1; /* call mark_regions, line 201 */
lab1:
z->c = c;
}
z->lb = z->c; z->c = z->l; /* backwards, line 202 */
{ int m = z->l - z->c; /* do, line 203 */
{ int m = z->l - z->c; /* or, line 207 */
{ int m = z->l - z->c; /* or, line 204 */
if (!r_standard_suffix(z)) goto lab6; /* call standard_suffix, line 204 */
goto lab5;
lab6:
z->c = z->l - m;
if (!r_verb_suffix(z)) goto lab4; /* call verb_suffix, line 204 */
}
lab5:
{ int m = z->l - z->c; /* do, line 205 */
z->ket = z->c; /* [, line 205 */
if (!(eq_s_b(z, 1, s_16))) goto lab7;
z->bra = z->c; /* ], line 205 */
{ int m_test = z->l - z->c; /* test, line 205 */
if (!(eq_s_b(z, 1, s_17))) goto lab7;
z->c = z->l - m_test;
}
if (!r_RV(z)) goto lab7; /* call RV, line 205 */
slice_del(z); /* delete, line 205 */
lab7:
z->c = z->l - m;
}
goto lab3;
lab4:
z->c = z->l - m;
if (!r_residual_suffix(z)) goto lab2; /* call residual_suffix, line 207 */
}
lab3:
lab2:
z->c = z->l - m;
}
{ int m = z->l - z->c; /* do, line 209 */
if (!r_residual_form(z)) goto lab8; /* call residual_form, line 209 */
lab8:
z->c = z->l - m;
}
z->c = z->lb;
{ int c = z->c; /* do, line 211 */
if (!r_postlude(z)) goto lab9; /* call postlude, line 211 */
lab9:
z->c = c;
}
return 1;
}
示例15: r_vowel_suffix
static int r_vowel_suffix(struct SN_env * z) {
{ int m = z->l - z->c; (void) m; /* try, line 171 */
z->ket = z->c; /* [, line 172 */
if (!(in_grouping_b(z, g_AEIO, 97, 242))) { z->c = z->l - m; goto lab0; }
z->bra = z->c; /* ], line 172 */
{ int ret = r_RV(z);
if (ret == 0) { z->c = z->l - m; goto lab0; } /* call RV, line 172 */
if (ret < 0) return ret;
}
{ int ret;
ret = slice_del(z); /* delete, line 172 */
if (ret < 0) return ret;
}
z->ket = z->c; /* [, line 173 */
if (!(eq_s_b(z, 1, s_20))) { z->c = z->l - m; goto lab0; }
z->bra = z->c; /* ], line 173 */
{ int ret = r_RV(z);
if (ret == 0) { z->c = z->l - m; goto lab0; } /* call RV, line 173 */
if (ret < 0) return ret;
}
{ int ret;
ret = slice_del(z); /* delete, line 173 */
if (ret < 0) return ret;
}
lab0:
;
}
{ int m = z->l - z->c; (void) m; /* try, line 175 */
z->ket = z->c; /* [, line 176 */
if (!(eq_s_b(z, 1, s_21))) { z->c = z->l - m; goto lab1; }
z->bra = z->c; /* ], line 176 */
if (!(in_grouping_b(z, g_CG, 99, 103))) { z->c = z->l - m; goto lab1; }
{ int ret = r_RV(z);
if (ret == 0) { z->c = z->l - m; goto lab1; } /* call RV, line 176 */
if (ret < 0) return ret;
}
{ int ret;
ret = slice_del(z); /* delete, line 176 */
if (ret < 0) return ret;
}
lab1:
;
}
return 1;
}