[indic/khmer/myanmar/use] Minor shuffling of found_syllable() macros
This commit is contained in:
parent
59721c2f37
commit
769c2b19a3
@ -424,7 +424,7 @@ static const int indic_syllable_machine_en_main = 39;
|
||||
HB_STMT_START { \
|
||||
if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
|
||||
for (unsigned int i = ts; i < te; i++) \
|
||||
info[i].syllable() = (syllable_serial << 4) | indic_##syllable_type; \
|
||||
info[i].syllable() = (syllable_serial << 4) | syllable_type; \
|
||||
syllable_serial++; \
|
||||
if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
|
||||
} HB_STMT_END
|
||||
@ -490,63 +490,63 @@ _eof_trans:
|
||||
break;
|
||||
case 11:
|
||||
#line 98 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{te = p+1;{ found_syllable (non_indic_cluster); }}
|
||||
{te = p+1;{ found_syllable (indic_non_indic_cluster); }}
|
||||
break;
|
||||
case 13:
|
||||
#line 93 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{te = p;p--;{ found_syllable (consonant_syllable); }}
|
||||
{te = p;p--;{ found_syllable (indic_consonant_syllable); }}
|
||||
break;
|
||||
case 14:
|
||||
#line 94 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{te = p;p--;{ found_syllable (vowel_syllable); }}
|
||||
{te = p;p--;{ found_syllable (indic_vowel_syllable); }}
|
||||
break;
|
||||
case 17:
|
||||
#line 95 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{te = p;p--;{ found_syllable (standalone_cluster); }}
|
||||
{te = p;p--;{ found_syllable (indic_standalone_cluster); }}
|
||||
break;
|
||||
case 19:
|
||||
#line 96 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{te = p;p--;{ found_syllable (symbol_cluster); }}
|
||||
{te = p;p--;{ found_syllable (indic_symbol_cluster); }}
|
||||
break;
|
||||
case 15:
|
||||
#line 97 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{te = p;p--;{ found_syllable (broken_cluster); }}
|
||||
{te = p;p--;{ found_syllable (indic_broken_cluster); }}
|
||||
break;
|
||||
case 16:
|
||||
#line 98 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{te = p;p--;{ found_syllable (non_indic_cluster); }}
|
||||
{te = p;p--;{ found_syllable (indic_non_indic_cluster); }}
|
||||
break;
|
||||
case 1:
|
||||
#line 93 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{{p = ((te))-1;}{ found_syllable (consonant_syllable); }}
|
||||
{{p = ((te))-1;}{ found_syllable (indic_consonant_syllable); }}
|
||||
break;
|
||||
case 3:
|
||||
#line 94 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{{p = ((te))-1;}{ found_syllable (vowel_syllable); }}
|
||||
{{p = ((te))-1;}{ found_syllable (indic_vowel_syllable); }}
|
||||
break;
|
||||
case 7:
|
||||
#line 95 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{{p = ((te))-1;}{ found_syllable (standalone_cluster); }}
|
||||
{{p = ((te))-1;}{ found_syllable (indic_standalone_cluster); }}
|
||||
break;
|
||||
case 8:
|
||||
#line 96 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{{p = ((te))-1;}{ found_syllable (symbol_cluster); }}
|
||||
{{p = ((te))-1;}{ found_syllable (indic_symbol_cluster); }}
|
||||
break;
|
||||
case 4:
|
||||
#line 97 "hb-ot-shape-complex-indic-machine.rl"
|
||||
{{p = ((te))-1;}{ found_syllable (broken_cluster); }}
|
||||
{{p = ((te))-1;}{ found_syllable (indic_broken_cluster); }}
|
||||
break;
|
||||
case 6:
|
||||
#line 1 "NONE"
|
||||
{ switch( act ) {
|
||||
case 1:
|
||||
{{p = ((te))-1;} found_syllable (consonant_syllable); }
|
||||
{{p = ((te))-1;} found_syllable (indic_consonant_syllable); }
|
||||
break;
|
||||
case 5:
|
||||
{{p = ((te))-1;} found_syllable (broken_cluster); }
|
||||
{{p = ((te))-1;} found_syllable (indic_broken_cluster); }
|
||||
break;
|
||||
case 6:
|
||||
{{p = ((te))-1;} found_syllable (non_indic_cluster); }
|
||||
{{p = ((te))-1;} found_syllable (indic_non_indic_cluster); }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -90,12 +90,12 @@ broken_cluster = reph? n? complex_syllable_tail;
|
||||
other = any;
|
||||
|
||||
main := |*
|
||||
consonant_syllable => { found_syllable (consonant_syllable); };
|
||||
vowel_syllable => { found_syllable (vowel_syllable); };
|
||||
standalone_cluster => { found_syllable (standalone_cluster); };
|
||||
symbol_cluster => { found_syllable (symbol_cluster); };
|
||||
broken_cluster => { found_syllable (broken_cluster); };
|
||||
other => { found_syllable (non_indic_cluster); };
|
||||
consonant_syllable => { found_syllable (indic_consonant_syllable); };
|
||||
vowel_syllable => { found_syllable (indic_vowel_syllable); };
|
||||
standalone_cluster => { found_syllable (indic_standalone_cluster); };
|
||||
symbol_cluster => { found_syllable (indic_symbol_cluster); };
|
||||
broken_cluster => { found_syllable (indic_broken_cluster); };
|
||||
other => { found_syllable (indic_non_indic_cluster); };
|
||||
*|;
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ main := |*
|
||||
HB_STMT_START { \
|
||||
if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
|
||||
for (unsigned int i = ts; i < te; i++) \
|
||||
info[i].syllable() = (syllable_serial << 4) | indic_##syllable_type; \
|
||||
info[i].syllable() = (syllable_serial << 4) | syllable_type; \
|
||||
syllable_serial++; \
|
||||
if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
|
||||
} HB_STMT_END
|
||||
|
@ -250,7 +250,7 @@ static const int khmer_syllable_machine_en_main = 20;
|
||||
HB_STMT_START { \
|
||||
if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
|
||||
for (unsigned int i = ts; i < te; i++) \
|
||||
info[i].syllable() = (syllable_serial << 4) | khmer_##syllable_type; \
|
||||
info[i].syllable() = (syllable_serial << 4) | syllable_type; \
|
||||
syllable_serial++; \
|
||||
if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
|
||||
} HB_STMT_END
|
||||
@ -316,36 +316,36 @@ _eof_trans:
|
||||
break;
|
||||
case 8:
|
||||
#line 82 "hb-ot-shape-complex-khmer-machine.rl"
|
||||
{te = p+1;{ found_syllable (non_khmer_cluster); }}
|
||||
{te = p+1;{ found_syllable (khmer_non_khmer_cluster); }}
|
||||
break;
|
||||
case 10:
|
||||
#line 80 "hb-ot-shape-complex-khmer-machine.rl"
|
||||
{te = p;p--;{ found_syllable (consonant_syllable); }}
|
||||
{te = p;p--;{ found_syllable (khmer_consonant_syllable); }}
|
||||
break;
|
||||
case 12:
|
||||
#line 81 "hb-ot-shape-complex-khmer-machine.rl"
|
||||
{te = p;p--;{ found_syllable (broken_cluster); }}
|
||||
{te = p;p--;{ found_syllable (khmer_broken_cluster); }}
|
||||
break;
|
||||
case 11:
|
||||
#line 82 "hb-ot-shape-complex-khmer-machine.rl"
|
||||
{te = p;p--;{ found_syllable (non_khmer_cluster); }}
|
||||
{te = p;p--;{ found_syllable (khmer_non_khmer_cluster); }}
|
||||
break;
|
||||
case 1:
|
||||
#line 80 "hb-ot-shape-complex-khmer-machine.rl"
|
||||
{{p = ((te))-1;}{ found_syllable (consonant_syllable); }}
|
||||
{{p = ((te))-1;}{ found_syllable (khmer_consonant_syllable); }}
|
||||
break;
|
||||
case 5:
|
||||
#line 81 "hb-ot-shape-complex-khmer-machine.rl"
|
||||
{{p = ((te))-1;}{ found_syllable (broken_cluster); }}
|
||||
{{p = ((te))-1;}{ found_syllable (khmer_broken_cluster); }}
|
||||
break;
|
||||
case 3:
|
||||
#line 1 "NONE"
|
||||
{ switch( act ) {
|
||||
case 2:
|
||||
{{p = ((te))-1;} found_syllable (broken_cluster); }
|
||||
{{p = ((te))-1;} found_syllable (khmer_broken_cluster); }
|
||||
break;
|
||||
case 3:
|
||||
{{p = ((te))-1;} found_syllable (non_khmer_cluster); }
|
||||
{{p = ((te))-1;} found_syllable (khmer_non_khmer_cluster); }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -77,9 +77,9 @@ consonant_syllable = (cn|PLACEHOLDER|DOTTEDCIRCLE) broken_cluster;
|
||||
other = any;
|
||||
|
||||
main := |*
|
||||
consonant_syllable => { found_syllable (consonant_syllable); };
|
||||
broken_cluster => { found_syllable (broken_cluster); };
|
||||
other => { found_syllable (non_khmer_cluster); };
|
||||
consonant_syllable => { found_syllable (khmer_consonant_syllable); };
|
||||
broken_cluster => { found_syllable (khmer_broken_cluster); };
|
||||
other => { found_syllable (khmer_non_khmer_cluster); };
|
||||
*|;
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ main := |*
|
||||
HB_STMT_START { \
|
||||
if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
|
||||
for (unsigned int i = ts; i < te; i++) \
|
||||
info[i].syllable() = (syllable_serial << 4) | khmer_##syllable_type; \
|
||||
info[i].syllable() = (syllable_serial << 4) | syllable_type; \
|
||||
syllable_serial++; \
|
||||
if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
|
||||
} HB_STMT_END
|
||||
|
@ -339,7 +339,7 @@ static const int myanmar_syllable_machine_en_main = 0;
|
||||
HB_STMT_START { \
|
||||
if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
|
||||
for (unsigned int i = ts; i < te; i++) \
|
||||
info[i].syllable() = (syllable_serial << 4) | myanmar_##syllable_type; \
|
||||
info[i].syllable() = (syllable_serial << 4) | syllable_type; \
|
||||
syllable_serial++; \
|
||||
if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
|
||||
} HB_STMT_END
|
||||
@ -401,35 +401,35 @@ _eof_trans:
|
||||
switch ( _myanmar_syllable_machine_trans_actions[_trans] ) {
|
||||
case 6:
|
||||
#line 93 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||
{te = p+1;{ found_syllable (consonant_syllable); }}
|
||||
{te = p+1;{ found_syllable (myanmar_consonant_syllable); }}
|
||||
break;
|
||||
case 4:
|
||||
#line 94 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||
{te = p+1;{ found_syllable (non_myanmar_cluster); }}
|
||||
{te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
|
||||
break;
|
||||
case 10:
|
||||
#line 95 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||
{te = p+1;{ found_syllable (punctuation_cluster); }}
|
||||
{te = p+1;{ found_syllable (myanmar_punctuation_cluster); }}
|
||||
break;
|
||||
case 8:
|
||||
#line 96 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||
{te = p+1;{ found_syllable (broken_cluster); }}
|
||||
{te = p+1;{ found_syllable (myanmar_broken_cluster); }}
|
||||
break;
|
||||
case 3:
|
||||
#line 97 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||
{te = p+1;{ found_syllable (non_myanmar_cluster); }}
|
||||
{te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
|
||||
break;
|
||||
case 5:
|
||||
#line 93 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||
{te = p;p--;{ found_syllable (consonant_syllable); }}
|
||||
{te = p;p--;{ found_syllable (myanmar_consonant_syllable); }}
|
||||
break;
|
||||
case 7:
|
||||
#line 96 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||
{te = p;p--;{ found_syllable (broken_cluster); }}
|
||||
{te = p;p--;{ found_syllable (myanmar_broken_cluster); }}
|
||||
break;
|
||||
case 9:
|
||||
#line 97 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||
{te = p;p--;{ found_syllable (non_myanmar_cluster); }}
|
||||
{te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }}
|
||||
break;
|
||||
#line 435 "hb-ot-shape-complex-myanmar-machine.hh"
|
||||
}
|
||||
|
@ -90,11 +90,11 @@ broken_cluster = k? VS? syllable_tail;
|
||||
other = any;
|
||||
|
||||
main := |*
|
||||
consonant_syllable => { found_syllable (consonant_syllable); };
|
||||
j => { found_syllable (non_myanmar_cluster); };
|
||||
punctuation_cluster => { found_syllable (punctuation_cluster); };
|
||||
broken_cluster => { found_syllable (broken_cluster); };
|
||||
other => { found_syllable (non_myanmar_cluster); };
|
||||
consonant_syllable => { found_syllable (myanmar_consonant_syllable); };
|
||||
j => { found_syllable (myanmar_non_myanmar_cluster); };
|
||||
punctuation_cluster => { found_syllable (myanmar_punctuation_cluster); };
|
||||
broken_cluster => { found_syllable (myanmar_broken_cluster); };
|
||||
other => { found_syllable (myanmar_non_myanmar_cluster); };
|
||||
*|;
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ main := |*
|
||||
HB_STMT_START { \
|
||||
if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
|
||||
for (unsigned int i = ts; i < te; i++) \
|
||||
info[i].syllable() = (syllable_serial << 4) | myanmar_##syllable_type; \
|
||||
info[i].syllable() = (syllable_serial << 4) | syllable_type; \
|
||||
syllable_serial++; \
|
||||
if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
|
||||
} HB_STMT_END
|
||||
|
@ -376,7 +376,7 @@ static const int use_syllable_machine_en_main = 2;
|
||||
HB_STMT_START { \
|
||||
if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \
|
||||
for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \
|
||||
info[i].syllable() = (syllable_serial << 4) | use_##syllable_type; \
|
||||
info[i].syllable() = (syllable_serial << 4) | syllable_type; \
|
||||
syllable_serial++; \
|
||||
if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
|
||||
} HB_STMT_END
|
||||
@ -503,59 +503,59 @@ _eof_trans:
|
||||
break;
|
||||
case 5:
|
||||
#line 163 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p+1;{ found_syllable (independent_cluster); }}
|
||||
{te = p+1;{ found_syllable (use_independent_cluster); }}
|
||||
break;
|
||||
case 9:
|
||||
#line 166 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p+1;{ found_syllable (standard_cluster); }}
|
||||
{te = p+1;{ found_syllable (use_standard_cluster); }}
|
||||
break;
|
||||
case 7:
|
||||
#line 171 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p+1;{ found_syllable (broken_cluster); }}
|
||||
{te = p+1;{ found_syllable (use_broken_cluster); }}
|
||||
break;
|
||||
case 6:
|
||||
#line 172 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p+1;{ found_syllable (non_cluster); }}
|
||||
{te = p+1;{ found_syllable (use_non_cluster); }}
|
||||
break;
|
||||
case 10:
|
||||
#line 164 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (virama_terminated_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_virama_terminated_cluster); }}
|
||||
break;
|
||||
case 11:
|
||||
#line 165 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (sakot_terminated_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_sakot_terminated_cluster); }}
|
||||
break;
|
||||
case 8:
|
||||
#line 166 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (standard_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_standard_cluster); }}
|
||||
break;
|
||||
case 13:
|
||||
#line 167 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (number_joiner_terminated_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_number_joiner_terminated_cluster); }}
|
||||
break;
|
||||
case 12:
|
||||
#line 168 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (numeral_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_numeral_cluster); }}
|
||||
break;
|
||||
case 14:
|
||||
#line 169 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (symbol_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_symbol_cluster); }}
|
||||
break;
|
||||
case 17:
|
||||
#line 170 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (hieroglyph_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_hieroglyph_cluster); }}
|
||||
break;
|
||||
case 15:
|
||||
#line 171 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (broken_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_broken_cluster); }}
|
||||
break;
|
||||
case 16:
|
||||
#line 172 "hb-ot-shape-complex-use-machine.rl"
|
||||
{te = p;p--;{ found_syllable (non_cluster); }}
|
||||
{te = p;p--;{ found_syllable (use_non_cluster); }}
|
||||
break;
|
||||
case 1:
|
||||
#line 171 "hb-ot-shape-complex-use-machine.rl"
|
||||
{{p = ((te))-1;}{ found_syllable (broken_cluster); }}
|
||||
{{p = ((te))-1;}{ found_syllable (use_broken_cluster); }}
|
||||
break;
|
||||
#line 561 "hb-ot-shape-complex-use-machine.hh"
|
||||
}
|
||||
|
@ -160,16 +160,16 @@ independent_cluster = O;
|
||||
other = any;
|
||||
|
||||
main := |*
|
||||
independent_cluster => { found_syllable (independent_cluster); };
|
||||
virama_terminated_cluster => { found_syllable (virama_terminated_cluster); };
|
||||
sakot_terminated_cluster => { found_syllable (sakot_terminated_cluster); };
|
||||
standard_cluster => { found_syllable (standard_cluster); };
|
||||
number_joiner_terminated_cluster => { found_syllable (number_joiner_terminated_cluster); };
|
||||
numeral_cluster => { found_syllable (numeral_cluster); };
|
||||
symbol_cluster => { found_syllable (symbol_cluster); };
|
||||
hieroglyph_cluster => { found_syllable (hieroglyph_cluster); };
|
||||
broken_cluster => { found_syllable (broken_cluster); };
|
||||
other => { found_syllable (non_cluster); };
|
||||
independent_cluster => { found_syllable (use_independent_cluster); };
|
||||
virama_terminated_cluster => { found_syllable (use_virama_terminated_cluster); };
|
||||
sakot_terminated_cluster => { found_syllable (use_sakot_terminated_cluster); };
|
||||
standard_cluster => { found_syllable (use_standard_cluster); };
|
||||
number_joiner_terminated_cluster => { found_syllable (use_number_joiner_terminated_cluster); };
|
||||
numeral_cluster => { found_syllable (use_numeral_cluster); };
|
||||
symbol_cluster => { found_syllable (use_symbol_cluster); };
|
||||
hieroglyph_cluster => { found_syllable (use_hieroglyph_cluster); };
|
||||
broken_cluster => { found_syllable (use_broken_cluster); };
|
||||
other => { found_syllable (use_non_cluster); };
|
||||
*|;
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ main := |*
|
||||
HB_STMT_START { \
|
||||
if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \
|
||||
for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \
|
||||
info[i].syllable() = (syllable_serial << 4) | use_##syllable_type; \
|
||||
info[i].syllable() = (syllable_serial << 4) | syllable_type; \
|
||||
syllable_serial++; \
|
||||
if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
|
||||
} HB_STMT_END
|
||||
|
Loading…
Reference in New Issue
Block a user