[indic/khmer/myanmar/use] Export categories from Ragel source
Not hooked up yet. Part of alternative approach to https://github.com/harfbuzz/harfbuzz/pull/2726
This commit is contained in:
parent
f94bf9f06f
commit
880fdb7460
|
@ -33,6 +33,26 @@
|
||||||
|
|
||||||
|
|
||||||
#line 36 "hb-ot-shape-complex-indic-machine.hh"
|
#line 36 "hb-ot-shape-complex-indic-machine.hh"
|
||||||
|
#define indic_syllable_machine_ex_A 10u
|
||||||
|
#define indic_syllable_machine_ex_C 1u
|
||||||
|
#define indic_syllable_machine_ex_CM 17u
|
||||||
|
#define indic_syllable_machine_ex_CS 19u
|
||||||
|
#define indic_syllable_machine_ex_DOTTEDCIRCLE 12u
|
||||||
|
#define indic_syllable_machine_ex_H 4u
|
||||||
|
#define indic_syllable_machine_ex_M 7u
|
||||||
|
#define indic_syllable_machine_ex_N 3u
|
||||||
|
#define indic_syllable_machine_ex_PLACEHOLDER 11u
|
||||||
|
#define indic_syllable_machine_ex_RS 13u
|
||||||
|
#define indic_syllable_machine_ex_Ra 16u
|
||||||
|
#define indic_syllable_machine_ex_Repha 15u
|
||||||
|
#define indic_syllable_machine_ex_SM 8u
|
||||||
|
#define indic_syllable_machine_ex_Symbol 18u
|
||||||
|
#define indic_syllable_machine_ex_V 2u
|
||||||
|
#define indic_syllable_machine_ex_ZWJ 6u
|
||||||
|
#define indic_syllable_machine_ex_ZWNJ 5u
|
||||||
|
|
||||||
|
|
||||||
|
#line 56 "hb-ot-shape-complex-indic-machine.hh"
|
||||||
static const unsigned char _indic_syllable_machine_trans_keys[] = {
|
static const unsigned char _indic_syllable_machine_trans_keys[] = {
|
||||||
8u, 8u, 4u, 8u, 5u, 7u, 5u, 8u, 4u, 8u, 6u, 6u, 16u, 16u, 4u, 8u,
|
8u, 8u, 4u, 8u, 5u, 7u, 5u, 8u, 4u, 8u, 6u, 6u, 16u, 16u, 4u, 8u,
|
||||||
4u, 13u, 4u, 8u, 8u, 8u, 5u, 7u, 5u, 8u, 4u, 8u, 6u, 6u, 16u, 16u,
|
4u, 13u, 4u, 8u, 8u, 8u, 5u, 7u, 5u, 8u, 4u, 8u, 6u, 6u, 16u, 16u,
|
||||||
|
@ -384,7 +404,7 @@ static const int indic_syllable_machine_error = -1;
|
||||||
static const int indic_syllable_machine_en_main = 39;
|
static const int indic_syllable_machine_en_main = 39;
|
||||||
|
|
||||||
|
|
||||||
#line 36 "hb-ot-shape-complex-indic-machine.rl"
|
#line 37 "hb-ot-shape-complex-indic-machine.rl"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -407,7 +427,7 @@ find_syllables_indic (hb_buffer_t *buffer)
|
||||||
int cs;
|
int cs;
|
||||||
hb_glyph_info_t *info = buffer->info;
|
hb_glyph_info_t *info = buffer->info;
|
||||||
|
|
||||||
#line 411 "hb-ot-shape-complex-indic-machine.hh"
|
#line 431 "hb-ot-shape-complex-indic-machine.hh"
|
||||||
{
|
{
|
||||||
cs = indic_syllable_machine_start;
|
cs = indic_syllable_machine_start;
|
||||||
ts = 0;
|
ts = 0;
|
||||||
|
@ -423,7 +443,7 @@ find_syllables_indic (hb_buffer_t *buffer)
|
||||||
|
|
||||||
unsigned int syllable_serial = 1;
|
unsigned int syllable_serial = 1;
|
||||||
|
|
||||||
#line 427 "hb-ot-shape-complex-indic-machine.hh"
|
#line 447 "hb-ot-shape-complex-indic-machine.hh"
|
||||||
{
|
{
|
||||||
int _slen;
|
int _slen;
|
||||||
int _trans;
|
int _trans;
|
||||||
|
@ -437,7 +457,7 @@ _resume:
|
||||||
#line 1 "NONE"
|
#line 1 "NONE"
|
||||||
{ts = p;}
|
{ts = p;}
|
||||||
break;
|
break;
|
||||||
#line 441 "hb-ot-shape-complex-indic-machine.hh"
|
#line 461 "hb-ot-shape-complex-indic-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
_keys = _indic_syllable_machine_trans_keys + (cs<<1);
|
_keys = _indic_syllable_machine_trans_keys + (cs<<1);
|
||||||
|
@ -540,7 +560,7 @@ _eof_trans:
|
||||||
#line 89 "hb-ot-shape-complex-indic-machine.rl"
|
#line 89 "hb-ot-shape-complex-indic-machine.rl"
|
||||||
{act = 6;}
|
{act = 6;}
|
||||||
break;
|
break;
|
||||||
#line 544 "hb-ot-shape-complex-indic-machine.hh"
|
#line 564 "hb-ot-shape-complex-indic-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
_again:
|
_again:
|
||||||
|
@ -549,7 +569,7 @@ _again:
|
||||||
#line 1 "NONE"
|
#line 1 "NONE"
|
||||||
{ts = 0;}
|
{ts = 0;}
|
||||||
break;
|
break;
|
||||||
#line 553 "hb-ot-shape-complex-indic-machine.hh"
|
#line 573 "hb-ot-shape-complex-indic-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ++p != pe )
|
if ( ++p != pe )
|
||||||
|
|
|
@ -32,29 +32,29 @@
|
||||||
%%{
|
%%{
|
||||||
machine indic_syllable_machine;
|
machine indic_syllable_machine;
|
||||||
alphtype unsigned char;
|
alphtype unsigned char;
|
||||||
|
write exports;
|
||||||
write data;
|
write data;
|
||||||
}%%
|
}%%
|
||||||
|
|
||||||
%%{
|
%%{
|
||||||
|
|
||||||
# Same order as enum indic_category_t. Not sure how to avoid duplication.
|
export C = 1;
|
||||||
C = 1;
|
export V = 2;
|
||||||
V = 2;
|
export N = 3;
|
||||||
N = 3;
|
export H = 4;
|
||||||
H = 4;
|
export ZWNJ = 5;
|
||||||
ZWNJ = 5;
|
export ZWJ = 6;
|
||||||
ZWJ = 6;
|
export M = 7;
|
||||||
M = 7;
|
export SM = 8;
|
||||||
SM = 8;
|
export A = 10;
|
||||||
A = 10;
|
export PLACEHOLDER = 11;
|
||||||
PLACEHOLDER = 11;
|
export DOTTEDCIRCLE = 12;
|
||||||
DOTTEDCIRCLE = 12;
|
export RS = 13;
|
||||||
RS = 13;
|
export Repha = 15;
|
||||||
Repha = 15;
|
export Ra = 16;
|
||||||
Ra = 16;
|
export CM = 17;
|
||||||
CM = 17;
|
export Symbol= 18;
|
||||||
Symbol= 18;
|
export CS = 19;
|
||||||
CS = 19;
|
|
||||||
|
|
||||||
c = (C | Ra); # is_consonant
|
c = (C | Ra); # is_consonant
|
||||||
n = ((ZWNJ?.RS)? (N.N?)?); # is_consonant_modifier
|
n = ((ZWNJ?.RS)? (N.N?)?); # is_consonant_modifier
|
||||||
|
|
|
@ -33,6 +33,24 @@
|
||||||
|
|
||||||
|
|
||||||
#line 36 "hb-ot-shape-complex-khmer-machine.hh"
|
#line 36 "hb-ot-shape-complex-khmer-machine.hh"
|
||||||
|
#define khmer_syllable_machine_ex_C 1u
|
||||||
|
#define khmer_syllable_machine_ex_Coeng 14u
|
||||||
|
#define khmer_syllable_machine_ex_DOTTEDCIRCLE 12u
|
||||||
|
#define khmer_syllable_machine_ex_PLACEHOLDER 11u
|
||||||
|
#define khmer_syllable_machine_ex_Ra 16u
|
||||||
|
#define khmer_syllable_machine_ex_Robatic 20u
|
||||||
|
#define khmer_syllable_machine_ex_V 2u
|
||||||
|
#define khmer_syllable_machine_ex_VAbv 26u
|
||||||
|
#define khmer_syllable_machine_ex_VBlw 27u
|
||||||
|
#define khmer_syllable_machine_ex_VPre 28u
|
||||||
|
#define khmer_syllable_machine_ex_VPst 29u
|
||||||
|
#define khmer_syllable_machine_ex_Xgroup 21u
|
||||||
|
#define khmer_syllable_machine_ex_Ygroup 22u
|
||||||
|
#define khmer_syllable_machine_ex_ZWJ 6u
|
||||||
|
#define khmer_syllable_machine_ex_ZWNJ 5u
|
||||||
|
|
||||||
|
|
||||||
|
#line 54 "hb-ot-shape-complex-khmer-machine.hh"
|
||||||
static const unsigned char _khmer_syllable_machine_trans_keys[] = {
|
static const unsigned char _khmer_syllable_machine_trans_keys[] = {
|
||||||
5u, 26u, 5u, 21u, 5u, 26u, 5u, 21u, 1u, 16u, 5u, 21u, 5u, 26u, 5u, 21u,
|
5u, 26u, 5u, 21u, 5u, 26u, 5u, 21u, 1u, 16u, 5u, 21u, 5u, 26u, 5u, 21u,
|
||||||
5u, 26u, 5u, 21u, 5u, 21u, 5u, 26u, 5u, 21u, 1u, 16u, 5u, 21u, 5u, 26u,
|
5u, 26u, 5u, 21u, 5u, 21u, 5u, 26u, 5u, 21u, 1u, 16u, 5u, 21u, 5u, 26u,
|
||||||
|
@ -215,7 +233,7 @@ static const int khmer_syllable_machine_error = -1;
|
||||||
static const int khmer_syllable_machine_en_main = 20;
|
static const int khmer_syllable_machine_en_main = 20;
|
||||||
|
|
||||||
|
|
||||||
#line 36 "hb-ot-shape-complex-khmer-machine.rl"
|
#line 37 "hb-ot-shape-complex-khmer-machine.rl"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -238,7 +256,7 @@ find_syllables_khmer (hb_buffer_t *buffer)
|
||||||
int cs;
|
int cs;
|
||||||
hb_glyph_info_t *info = buffer->info;
|
hb_glyph_info_t *info = buffer->info;
|
||||||
|
|
||||||
#line 242 "hb-ot-shape-complex-khmer-machine.hh"
|
#line 260 "hb-ot-shape-complex-khmer-machine.hh"
|
||||||
{
|
{
|
||||||
cs = khmer_syllable_machine_start;
|
cs = khmer_syllable_machine_start;
|
||||||
ts = 0;
|
ts = 0;
|
||||||
|
@ -254,7 +272,7 @@ find_syllables_khmer (hb_buffer_t *buffer)
|
||||||
|
|
||||||
unsigned int syllable_serial = 1;
|
unsigned int syllable_serial = 1;
|
||||||
|
|
||||||
#line 258 "hb-ot-shape-complex-khmer-machine.hh"
|
#line 276 "hb-ot-shape-complex-khmer-machine.hh"
|
||||||
{
|
{
|
||||||
int _slen;
|
int _slen;
|
||||||
int _trans;
|
int _trans;
|
||||||
|
@ -268,7 +286,7 @@ _resume:
|
||||||
#line 1 "NONE"
|
#line 1 "NONE"
|
||||||
{ts = p;}
|
{ts = p;}
|
||||||
break;
|
break;
|
||||||
#line 272 "hb-ot-shape-complex-khmer-machine.hh"
|
#line 290 "hb-ot-shape-complex-khmer-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
_keys = _khmer_syllable_machine_trans_keys + (cs<<1);
|
_keys = _khmer_syllable_machine_trans_keys + (cs<<1);
|
||||||
|
@ -338,7 +356,7 @@ _eof_trans:
|
||||||
#line 76 "hb-ot-shape-complex-khmer-machine.rl"
|
#line 76 "hb-ot-shape-complex-khmer-machine.rl"
|
||||||
{act = 3;}
|
{act = 3;}
|
||||||
break;
|
break;
|
||||||
#line 342 "hb-ot-shape-complex-khmer-machine.hh"
|
#line 360 "hb-ot-shape-complex-khmer-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
_again:
|
_again:
|
||||||
|
@ -347,7 +365,7 @@ _again:
|
||||||
#line 1 "NONE"
|
#line 1 "NONE"
|
||||||
{ts = 0;}
|
{ts = 0;}
|
||||||
break;
|
break;
|
||||||
#line 351 "hb-ot-shape-complex-khmer-machine.hh"
|
#line 369 "hb-ot-shape-complex-khmer-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ++p != pe )
|
if ( ++p != pe )
|
||||||
|
|
|
@ -32,27 +32,27 @@
|
||||||
%%{
|
%%{
|
||||||
machine khmer_syllable_machine;
|
machine khmer_syllable_machine;
|
||||||
alphtype unsigned char;
|
alphtype unsigned char;
|
||||||
|
write exports;
|
||||||
write data;
|
write data;
|
||||||
}%%
|
}%%
|
||||||
|
|
||||||
%%{
|
%%{
|
||||||
|
|
||||||
# Same order as enum khmer_category_t. Not sure how to avoid duplication.
|
export C = 1;
|
||||||
C = 1;
|
export V = 2;
|
||||||
V = 2;
|
export ZWNJ = 5;
|
||||||
ZWNJ = 5;
|
export ZWJ = 6;
|
||||||
ZWJ = 6;
|
export PLACEHOLDER = 11;
|
||||||
PLACEHOLDER = 11;
|
export DOTTEDCIRCLE = 12;
|
||||||
DOTTEDCIRCLE = 12;
|
export Coeng= 14;
|
||||||
Coeng= 14;
|
export Ra = 16;
|
||||||
Ra = 16;
|
export Robatic = 20;
|
||||||
Robatic = 20;
|
export Xgroup = 21;
|
||||||
Xgroup = 21;
|
export Ygroup = 22;
|
||||||
Ygroup = 22;
|
export VAbv = 26;
|
||||||
VAbv = 26;
|
export VBlw = 27;
|
||||||
VBlw = 27;
|
export VPre = 28;
|
||||||
VPre = 28;
|
export VPst = 29;
|
||||||
VPst = 29;
|
|
||||||
|
|
||||||
c = (C | Ra | V);
|
c = (C | Ra | V);
|
||||||
cn = c.((ZWJ|ZWNJ)?.Robatic)?;
|
cn = c.((ZWJ|ZWNJ)?.Robatic)?;
|
||||||
|
|
|
@ -33,6 +33,34 @@
|
||||||
|
|
||||||
|
|
||||||
#line 36 "hb-ot-shape-complex-myanmar-machine.hh"
|
#line 36 "hb-ot-shape-complex-myanmar-machine.hh"
|
||||||
|
#define myanmar_syllable_machine_ex_A 10u
|
||||||
|
#define myanmar_syllable_machine_ex_As 18u
|
||||||
|
#define myanmar_syllable_machine_ex_C 1u
|
||||||
|
#define myanmar_syllable_machine_ex_CS 19u
|
||||||
|
#define myanmar_syllable_machine_ex_D 32u
|
||||||
|
#define myanmar_syllable_machine_ex_D0 20u
|
||||||
|
#define myanmar_syllable_machine_ex_DB 3u
|
||||||
|
#define myanmar_syllable_machine_ex_GB 11u
|
||||||
|
#define myanmar_syllable_machine_ex_H 4u
|
||||||
|
#define myanmar_syllable_machine_ex_IV 2u
|
||||||
|
#define myanmar_syllable_machine_ex_MH 21u
|
||||||
|
#define myanmar_syllable_machine_ex_MR 22u
|
||||||
|
#define myanmar_syllable_machine_ex_MW 23u
|
||||||
|
#define myanmar_syllable_machine_ex_MY 24u
|
||||||
|
#define myanmar_syllable_machine_ex_P 31u
|
||||||
|
#define myanmar_syllable_machine_ex_PT 25u
|
||||||
|
#define myanmar_syllable_machine_ex_Ra 16u
|
||||||
|
#define myanmar_syllable_machine_ex_V 8u
|
||||||
|
#define myanmar_syllable_machine_ex_VAbv 26u
|
||||||
|
#define myanmar_syllable_machine_ex_VBlw 27u
|
||||||
|
#define myanmar_syllable_machine_ex_VPre 28u
|
||||||
|
#define myanmar_syllable_machine_ex_VPst 29u
|
||||||
|
#define myanmar_syllable_machine_ex_VS 30u
|
||||||
|
#define myanmar_syllable_machine_ex_ZWJ 6u
|
||||||
|
#define myanmar_syllable_machine_ex_ZWNJ 5u
|
||||||
|
|
||||||
|
|
||||||
|
#line 64 "hb-ot-shape-complex-myanmar-machine.hh"
|
||||||
static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
|
static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
|
||||||
1u, 32u, 3u, 30u, 5u, 29u, 5u, 8u, 5u, 29u, 3u, 25u, 5u, 25u, 5u, 25u,
|
1u, 32u, 3u, 30u, 5u, 29u, 5u, 8u, 5u, 29u, 3u, 25u, 5u, 25u, 5u, 25u,
|
||||||
3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 1u, 16u, 3u, 29u, 3u, 29u, 3u, 29u,
|
3u, 29u, 3u, 29u, 3u, 29u, 3u, 29u, 1u, 16u, 3u, 29u, 3u, 29u, 3u, 29u,
|
||||||
|
@ -293,7 +321,7 @@ static const int myanmar_syllable_machine_error = -1;
|
||||||
static const int myanmar_syllable_machine_en_main = 0;
|
static const int myanmar_syllable_machine_en_main = 0;
|
||||||
|
|
||||||
|
|
||||||
#line 36 "hb-ot-shape-complex-myanmar-machine.rl"
|
#line 37 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -316,7 +344,7 @@ find_syllables_myanmar (hb_buffer_t *buffer)
|
||||||
int cs;
|
int cs;
|
||||||
hb_glyph_info_t *info = buffer->info;
|
hb_glyph_info_t *info = buffer->info;
|
||||||
|
|
||||||
#line 320 "hb-ot-shape-complex-myanmar-machine.hh"
|
#line 348 "hb-ot-shape-complex-myanmar-machine.hh"
|
||||||
{
|
{
|
||||||
cs = myanmar_syllable_machine_start;
|
cs = myanmar_syllable_machine_start;
|
||||||
ts = 0;
|
ts = 0;
|
||||||
|
@ -332,7 +360,7 @@ find_syllables_myanmar (hb_buffer_t *buffer)
|
||||||
|
|
||||||
unsigned int syllable_serial = 1;
|
unsigned int syllable_serial = 1;
|
||||||
|
|
||||||
#line 336 "hb-ot-shape-complex-myanmar-machine.hh"
|
#line 364 "hb-ot-shape-complex-myanmar-machine.hh"
|
||||||
{
|
{
|
||||||
int _slen;
|
int _slen;
|
||||||
int _trans;
|
int _trans;
|
||||||
|
@ -346,7 +374,7 @@ _resume:
|
||||||
#line 1 "NONE"
|
#line 1 "NONE"
|
||||||
{ts = p;}
|
{ts = p;}
|
||||||
break;
|
break;
|
||||||
#line 350 "hb-ot-shape-complex-myanmar-machine.hh"
|
#line 378 "hb-ot-shape-complex-myanmar-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
_keys = _myanmar_syllable_machine_trans_keys + (cs<<1);
|
_keys = _myanmar_syllable_machine_trans_keys + (cs<<1);
|
||||||
|
@ -396,7 +424,7 @@ _eof_trans:
|
||||||
#line 90 "hb-ot-shape-complex-myanmar-machine.rl"
|
#line 90 "hb-ot-shape-complex-myanmar-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (non_myanmar_cluster); }}
|
{te = p;p--;{ found_syllable (non_myanmar_cluster); }}
|
||||||
break;
|
break;
|
||||||
#line 400 "hb-ot-shape-complex-myanmar-machine.hh"
|
#line 428 "hb-ot-shape-complex-myanmar-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
_again:
|
_again:
|
||||||
|
@ -405,7 +433,7 @@ _again:
|
||||||
#line 1 "NONE"
|
#line 1 "NONE"
|
||||||
{ts = 0;}
|
{ts = 0;}
|
||||||
break;
|
break;
|
||||||
#line 409 "hb-ot-shape-complex-myanmar-machine.hh"
|
#line 437 "hb-ot-shape-complex-myanmar-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ++p != pe )
|
if ( ++p != pe )
|
||||||
|
|
|
@ -32,37 +32,37 @@
|
||||||
%%{
|
%%{
|
||||||
machine myanmar_syllable_machine;
|
machine myanmar_syllable_machine;
|
||||||
alphtype unsigned char;
|
alphtype unsigned char;
|
||||||
|
write exports;
|
||||||
write data;
|
write data;
|
||||||
}%%
|
}%%
|
||||||
|
|
||||||
%%{
|
%%{
|
||||||
|
|
||||||
# Same order as enum myanmar_category_t. Not sure how to avoid duplication.
|
export A = 10;
|
||||||
A = 10;
|
export As = 18;
|
||||||
As = 18;
|
export C = 1;
|
||||||
C = 1;
|
export D = 32;
|
||||||
D = 32;
|
export D0 = 20;
|
||||||
D0 = 20;
|
export DB = 3;
|
||||||
DB = 3;
|
export GB = 11;
|
||||||
GB = 11;
|
export H = 4;
|
||||||
H = 4;
|
export IV = 2;
|
||||||
IV = 2;
|
export MH = 21;
|
||||||
MH = 21;
|
export MR = 22;
|
||||||
MR = 22;
|
export MW = 23;
|
||||||
MW = 23;
|
export MY = 24;
|
||||||
MY = 24;
|
export PT = 25;
|
||||||
PT = 25;
|
export V = 8;
|
||||||
V = 8;
|
export VAbv = 26;
|
||||||
VAbv = 26;
|
export VBlw = 27;
|
||||||
VBlw = 27;
|
export VPre = 28;
|
||||||
VPre = 28;
|
export VPst = 29;
|
||||||
VPst = 29;
|
export VS = 30;
|
||||||
VS = 30;
|
export ZWJ = 6;
|
||||||
ZWJ = 6;
|
export ZWNJ = 5;
|
||||||
ZWNJ = 5;
|
export Ra = 16;
|
||||||
Ra = 16;
|
export P = 31;
|
||||||
P = 31;
|
export CS = 19;
|
||||||
CS = 19;
|
|
||||||
|
|
||||||
j = ZWJ|ZWNJ; # Joiners
|
j = ZWJ|ZWNJ; # Joiners
|
||||||
k = (Ra As H); # Kinzi
|
k = (Ra As H); # Kinzi
|
||||||
|
|
|
@ -35,6 +35,48 @@
|
||||||
|
|
||||||
|
|
||||||
#line 38 "hb-ot-shape-complex-use-machine.hh"
|
#line 38 "hb-ot-shape-complex-use-machine.hh"
|
||||||
|
#define use_syllable_machine_ex_B 1u
|
||||||
|
#define use_syllable_machine_ex_CMAbv 31u
|
||||||
|
#define use_syllable_machine_ex_CMBlw 32u
|
||||||
|
#define use_syllable_machine_ex_CS 43u
|
||||||
|
#define use_syllable_machine_ex_FAbv 24u
|
||||||
|
#define use_syllable_machine_ex_FBlw 25u
|
||||||
|
#define use_syllable_machine_ex_FMAbv 45u
|
||||||
|
#define use_syllable_machine_ex_FMBlw 46u
|
||||||
|
#define use_syllable_machine_ex_FMPst 47u
|
||||||
|
#define use_syllable_machine_ex_FPst 26u
|
||||||
|
#define use_syllable_machine_ex_G 49u
|
||||||
|
#define use_syllable_machine_ex_GB 5u
|
||||||
|
#define use_syllable_machine_ex_H 12u
|
||||||
|
#define use_syllable_machine_ex_HN 13u
|
||||||
|
#define use_syllable_machine_ex_HVM 44u
|
||||||
|
#define use_syllable_machine_ex_J 50u
|
||||||
|
#define use_syllable_machine_ex_MAbv 27u
|
||||||
|
#define use_syllable_machine_ex_MBlw 28u
|
||||||
|
#define use_syllable_machine_ex_MPre 30u
|
||||||
|
#define use_syllable_machine_ex_MPst 29u
|
||||||
|
#define use_syllable_machine_ex_N 4u
|
||||||
|
#define use_syllable_machine_ex_O 0u
|
||||||
|
#define use_syllable_machine_ex_R 18u
|
||||||
|
#define use_syllable_machine_ex_S 19u
|
||||||
|
#define use_syllable_machine_ex_SB 51u
|
||||||
|
#define use_syllable_machine_ex_SE 52u
|
||||||
|
#define use_syllable_machine_ex_SMAbv 41u
|
||||||
|
#define use_syllable_machine_ex_SMBlw 42u
|
||||||
|
#define use_syllable_machine_ex_SUB 11u
|
||||||
|
#define use_syllable_machine_ex_Sk 48u
|
||||||
|
#define use_syllable_machine_ex_VAbv 33u
|
||||||
|
#define use_syllable_machine_ex_VBlw 34u
|
||||||
|
#define use_syllable_machine_ex_VMAbv 37u
|
||||||
|
#define use_syllable_machine_ex_VMBlw 38u
|
||||||
|
#define use_syllable_machine_ex_VMPre 23u
|
||||||
|
#define use_syllable_machine_ex_VMPst 39u
|
||||||
|
#define use_syllable_machine_ex_VPre 22u
|
||||||
|
#define use_syllable_machine_ex_VPst 35u
|
||||||
|
#define use_syllable_machine_ex_ZWNJ 14u
|
||||||
|
|
||||||
|
|
||||||
|
#line 80 "hb-ot-shape-complex-use-machine.hh"
|
||||||
static const unsigned char _use_syllable_machine_trans_keys[] = {
|
static const unsigned char _use_syllable_machine_trans_keys[] = {
|
||||||
1u, 1u, 1u, 1u, 0u, 51u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u,
|
1u, 1u, 1u, 1u, 0u, 51u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u,
|
||||||
24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u,
|
24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u,
|
||||||
|
@ -303,11 +345,11 @@ static const int use_syllable_machine_error = -1;
|
||||||
static const int use_syllable_machine_en_main = 2;
|
static const int use_syllable_machine_en_main = 2;
|
||||||
|
|
||||||
|
|
||||||
#line 38 "hb-ot-shape-complex-use-machine.rl"
|
#line 39 "hb-ot-shape-complex-use-machine.rl"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#line 153 "hb-ot-shape-complex-use-machine.rl"
|
#line 152 "hb-ot-shape-complex-use-machine.rl"
|
||||||
|
|
||||||
|
|
||||||
#define found_syllable(syllable_type) \
|
#define found_syllable(syllable_type) \
|
||||||
|
@ -350,7 +392,7 @@ find_syllables_use (hb_buffer_t *buffer)
|
||||||
unsigned int act HB_UNUSED;
|
unsigned int act HB_UNUSED;
|
||||||
int cs;
|
int cs;
|
||||||
|
|
||||||
#line 354 "hb-ot-shape-complex-use-machine.hh"
|
#line 396 "hb-ot-shape-complex-use-machine.hh"
|
||||||
{
|
{
|
||||||
cs = use_syllable_machine_start;
|
cs = use_syllable_machine_start;
|
||||||
ts = 0;
|
ts = 0;
|
||||||
|
@ -358,12 +400,12 @@ find_syllables_use (hb_buffer_t *buffer)
|
||||||
act = 0;
|
act = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#line 197 "hb-ot-shape-complex-use-machine.rl"
|
#line 196 "hb-ot-shape-complex-use-machine.rl"
|
||||||
|
|
||||||
|
|
||||||
unsigned int syllable_serial = 1;
|
unsigned int syllable_serial = 1;
|
||||||
|
|
||||||
#line 367 "hb-ot-shape-complex-use-machine.hh"
|
#line 409 "hb-ot-shape-complex-use-machine.hh"
|
||||||
{
|
{
|
||||||
int _slen;
|
int _slen;
|
||||||
int _trans;
|
int _trans;
|
||||||
|
@ -377,7 +419,7 @@ _resume:
|
||||||
#line 1 "NONE"
|
#line 1 "NONE"
|
||||||
{ts = p;}
|
{ts = p;}
|
||||||
break;
|
break;
|
||||||
#line 381 "hb-ot-shape-complex-use-machine.hh"
|
#line 423 "hb-ot-shape-complex-use-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
_keys = _use_syllable_machine_trans_keys + (cs<<1);
|
_keys = _use_syllable_machine_trans_keys + (cs<<1);
|
||||||
|
@ -400,62 +442,62 @@ _eof_trans:
|
||||||
{te = p+1;}
|
{te = p+1;}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
#line 140 "hb-ot-shape-complex-use-machine.rl"
|
#line 139 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p+1;{ found_syllable (independent_cluster); }}
|
{te = p+1;{ found_syllable (independent_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
#line 143 "hb-ot-shape-complex-use-machine.rl"
|
#line 142 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p+1;{ found_syllable (standard_cluster); }}
|
{te = p+1;{ found_syllable (standard_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
#line 148 "hb-ot-shape-complex-use-machine.rl"
|
#line 147 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p+1;{ found_syllable (broken_cluster); }}
|
{te = p+1;{ found_syllable (broken_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
#line 149 "hb-ot-shape-complex-use-machine.rl"
|
#line 148 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p+1;{ found_syllable (non_cluster); }}
|
{te = p+1;{ found_syllable (non_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
#line 141 "hb-ot-shape-complex-use-machine.rl"
|
#line 140 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (virama_terminated_cluster); }}
|
{te = p;p--;{ found_syllable (virama_terminated_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
#line 142 "hb-ot-shape-complex-use-machine.rl"
|
#line 141 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (sakot_terminated_cluster); }}
|
{te = p;p--;{ found_syllable (sakot_terminated_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
#line 143 "hb-ot-shape-complex-use-machine.rl"
|
#line 142 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (standard_cluster); }}
|
{te = p;p--;{ found_syllable (standard_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
#line 144 "hb-ot-shape-complex-use-machine.rl"
|
#line 143 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (number_joiner_terminated_cluster); }}
|
{te = p;p--;{ found_syllable (number_joiner_terminated_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
#line 145 "hb-ot-shape-complex-use-machine.rl"
|
#line 144 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (numeral_cluster); }}
|
{te = p;p--;{ found_syllable (numeral_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
#line 146 "hb-ot-shape-complex-use-machine.rl"
|
#line 145 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (symbol_cluster); }}
|
{te = p;p--;{ found_syllable (symbol_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 17:
|
||||||
#line 147 "hb-ot-shape-complex-use-machine.rl"
|
#line 146 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (hieroglyph_cluster); }}
|
{te = p;p--;{ found_syllable (hieroglyph_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
#line 148 "hb-ot-shape-complex-use-machine.rl"
|
#line 147 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (broken_cluster); }}
|
{te = p;p--;{ found_syllable (broken_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
#line 149 "hb-ot-shape-complex-use-machine.rl"
|
#line 148 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{te = p;p--;{ found_syllable (non_cluster); }}
|
{te = p;p--;{ found_syllable (non_cluster); }}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
#line 148 "hb-ot-shape-complex-use-machine.rl"
|
#line 147 "hb-ot-shape-complex-use-machine.rl"
|
||||||
{{p = ((te))-1;}{ found_syllable (broken_cluster); }}
|
{{p = ((te))-1;}{ found_syllable (broken_cluster); }}
|
||||||
break;
|
break;
|
||||||
#line 459 "hb-ot-shape-complex-use-machine.hh"
|
#line 501 "hb-ot-shape-complex-use-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
_again:
|
_again:
|
||||||
|
@ -464,7 +506,7 @@ _again:
|
||||||
#line 1 "NONE"
|
#line 1 "NONE"
|
||||||
{ts = 0;}
|
{ts = 0;}
|
||||||
break;
|
break;
|
||||||
#line 468 "hb-ot-shape-complex-use-machine.hh"
|
#line 510 "hb-ot-shape-complex-use-machine.hh"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ++p != pe )
|
if ( ++p != pe )
|
||||||
|
@ -480,7 +522,7 @@ _again:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#line 202 "hb-ot-shape-complex-use-machine.rl"
|
#line 201 "hb-ot-shape-complex-use-machine.rl"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,55 +34,54 @@
|
||||||
%%{
|
%%{
|
||||||
machine use_syllable_machine;
|
machine use_syllable_machine;
|
||||||
alphtype unsigned char;
|
alphtype unsigned char;
|
||||||
|
write exports;
|
||||||
write data;
|
write data;
|
||||||
}%%
|
}%%
|
||||||
|
|
||||||
%%{
|
%%{
|
||||||
|
|
||||||
# Same order as enum use_category_t. Not sure how to avoid duplication.
|
export O = 0; # OTHER
|
||||||
|
|
||||||
O = 0; # OTHER
|
export B = 1; # BASE
|
||||||
|
export N = 4; # BASE_NUM
|
||||||
|
export GB = 5; # BASE_OTHER
|
||||||
|
export SUB = 11; # CONS_SUB
|
||||||
|
export H = 12; # HALANT
|
||||||
|
|
||||||
B = 1; # BASE
|
export HN = 13; # HALANT_NUM
|
||||||
N = 4; # BASE_NUM
|
export ZWNJ = 14; # Zero width non-joiner
|
||||||
GB = 5; # BASE_OTHER
|
export R = 18; # REPHA
|
||||||
SUB = 11; # CONS_SUB
|
export S = 19; # SYM
|
||||||
H = 12; # HALANT
|
export CS = 43; # CONS_WITH_STACKER
|
||||||
|
export HVM = 44; # HALANT_OR_VOWEL_MODIFIER
|
||||||
|
export Sk = 48; # SAKOT
|
||||||
|
export G = 49; # HIEROGLYPH
|
||||||
|
export J = 50; # HIEROGLYPH_JOINER
|
||||||
|
export SB = 51; # HIEROGLYPH_SEGMENT_BEGIN
|
||||||
|
export SE = 52; # HIEROGLYPH_SEGMENT_END
|
||||||
|
|
||||||
HN = 13; # HALANT_NUM
|
export FAbv = 24; # CONS_FINAL_ABOVE
|
||||||
ZWNJ = 14; # Zero width non-joiner
|
export FBlw = 25; # CONS_FINAL_BELOW
|
||||||
R = 18; # REPHA
|
export FPst = 26; # CONS_FINAL_POST
|
||||||
S = 19; # SYM
|
export MAbv = 27; # CONS_MED_ABOVE
|
||||||
CS = 43; # CONS_WITH_STACKER
|
export MBlw = 28; # CONS_MED_BELOW
|
||||||
HVM = 44; # HALANT_OR_VOWEL_MODIFIER
|
export MPst = 29; # CONS_MED_POST
|
||||||
Sk = 48; # SAKOT
|
export MPre = 30; # CONS_MED_PRE
|
||||||
G = 49; # HIEROGLYPH
|
export CMAbv = 31; # CONS_MOD_ABOVE
|
||||||
J = 50; # HIEROGLYPH_JOINER
|
export CMBlw = 32; # CONS_MOD_BELOW
|
||||||
SB = 51; # HIEROGLYPH_SEGMENT_BEGIN
|
export VAbv = 33; # VOWEL_ABOVE / VOWEL_ABOVE_BELOW / VOWEL_ABOVE_BELOW_POST / VOWEL_ABOVE_POST
|
||||||
SE = 52; # HIEROGLYPH_SEGMENT_END
|
export VBlw = 34; # VOWEL_BELOW / VOWEL_BELOW_POST
|
||||||
|
export VPst = 35; # VOWEL_POST UIPC = Right
|
||||||
FAbv = 24; # CONS_FINAL_ABOVE
|
export VPre = 22; # VOWEL_PRE / VOWEL_PRE_ABOVE / VOWEL_PRE_ABOVE_POST / VOWEL_PRE_POST
|
||||||
FBlw = 25; # CONS_FINAL_BELOW
|
export VMAbv = 37; # VOWEL_MOD_ABOVE
|
||||||
FPst = 26; # CONS_FINAL_POST
|
export VMBlw = 38; # VOWEL_MOD_BELOW
|
||||||
MAbv = 27; # CONS_MED_ABOVE
|
export VMPst = 39; # VOWEL_MOD_POST
|
||||||
MBlw = 28; # CONS_MED_BELOW
|
export VMPre = 23; # VOWEL_MOD_PRE
|
||||||
MPst = 29; # CONS_MED_POST
|
export SMAbv = 41; # SYM_MOD_ABOVE
|
||||||
MPre = 30; # CONS_MED_PRE
|
export SMBlw = 42; # SYM_MOD_BELOW
|
||||||
CMAbv = 31; # CONS_MOD_ABOVE
|
export FMAbv = 45; # CONS_FINAL_MOD UIPC = Top
|
||||||
CMBlw = 32; # CONS_MOD_BELOW
|
export FMBlw = 46; # CONS_FINAL_MOD UIPC = Bottom
|
||||||
VAbv = 33; # VOWEL_ABOVE / VOWEL_ABOVE_BELOW / VOWEL_ABOVE_BELOW_POST / VOWEL_ABOVE_POST
|
export FMPst = 47; # CONS_FINAL_MOD UIPC = Not_Applicable
|
||||||
VBlw = 34; # VOWEL_BELOW / VOWEL_BELOW_POST
|
|
||||||
VPst = 35; # VOWEL_POST UIPC = Right
|
|
||||||
VPre = 22; # VOWEL_PRE / VOWEL_PRE_ABOVE / VOWEL_PRE_ABOVE_POST / VOWEL_PRE_POST
|
|
||||||
VMAbv = 37; # VOWEL_MOD_ABOVE
|
|
||||||
VMBlw = 38; # VOWEL_MOD_BELOW
|
|
||||||
VMPst = 39; # VOWEL_MOD_POST
|
|
||||||
VMPre = 23; # VOWEL_MOD_PRE
|
|
||||||
SMAbv = 41; # SYM_MOD_ABOVE
|
|
||||||
SMBlw = 42; # SYM_MOD_BELOW
|
|
||||||
FMAbv = 45; # CONS_FINAL_MOD UIPC = Top
|
|
||||||
FMBlw = 46; # CONS_FINAL_MOD UIPC = Bottom
|
|
||||||
FMPst = 47; # CONS_FINAL_MOD UIPC = Not_Applicable
|
|
||||||
|
|
||||||
h = H | HVM | Sk;
|
h = H | HVM | Sk;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue