hb-ot-shaper-myanmar-machine.hh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. #line 1 "hb-ot-shaper-myanmar-machine.rl"
  2. /*
  3. * Copyright © 2011,2012 Google, Inc.
  4. *
  5. * This is part of HarfBuzz, a text shaping library.
  6. *
  7. * Permission is hereby granted, without written agreement and without
  8. * license or royalty fees, to use, copy, modify, and distribute this
  9. * software and its documentation for any purpose, provided that the
  10. * above copyright notice and the following two paragraphs appear in
  11. * all copies of this software.
  12. *
  13. * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
  14. * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  15. * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
  16. * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  17. * DAMAGE.
  18. *
  19. * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
  20. * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  21. * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
  22. * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
  23. * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  24. *
  25. * Google Author(s): Behdad Esfahbod
  26. */
  27. #ifndef HB_OT_SHAPER_MYANMAR_MACHINE_HH
  28. #define HB_OT_SHAPER_MYANMAR_MACHINE_HH
  29. #include "hb.hh"
  30. #include "hb-ot-layout.hh"
  31. #include "hb-ot-shaper-indic.hh"
  32. /* buffer var allocations */
  33. #define myanmar_category() ot_shaper_var_u8_category() /* myanmar_category_t */
  34. #define myanmar_position() ot_shaper_var_u8_auxiliary() /* myanmar_position_t */
  35. using myanmar_category_t = unsigned;
  36. using myanmar_position_t = ot_position_t;
  37. #define M_Cat(Cat) myanmar_syllable_machine_ex_##Cat
  38. enum myanmar_syllable_type_t {
  39. myanmar_consonant_syllable,
  40. myanmar_broken_cluster,
  41. myanmar_non_myanmar_cluster,
  42. };
  43. #line 51 "hb-ot-shaper-myanmar-machine.hh"
  44. #define myanmar_syllable_machine_ex_A 9u
  45. #define myanmar_syllable_machine_ex_As 32u
  46. #define myanmar_syllable_machine_ex_C 1u
  47. #define myanmar_syllable_machine_ex_CS 18u
  48. #define myanmar_syllable_machine_ex_DB 3u
  49. #define myanmar_syllable_machine_ex_DOTTEDCIRCLE 11u
  50. #define myanmar_syllable_machine_ex_GB 10u
  51. #define myanmar_syllable_machine_ex_H 4u
  52. #define myanmar_syllable_machine_ex_IV 2u
  53. #define myanmar_syllable_machine_ex_MH 35u
  54. #define myanmar_syllable_machine_ex_ML 41u
  55. #define myanmar_syllable_machine_ex_MR 36u
  56. #define myanmar_syllable_machine_ex_MW 37u
  57. #define myanmar_syllable_machine_ex_MY 38u
  58. #define myanmar_syllable_machine_ex_PT 39u
  59. #define myanmar_syllable_machine_ex_Ra 15u
  60. #define myanmar_syllable_machine_ex_SM 8u
  61. #define myanmar_syllable_machine_ex_VAbv 20u
  62. #define myanmar_syllable_machine_ex_VBlw 21u
  63. #define myanmar_syllable_machine_ex_VPre 22u
  64. #define myanmar_syllable_machine_ex_VPst 23u
  65. #define myanmar_syllable_machine_ex_VS 40u
  66. #define myanmar_syllable_machine_ex_ZWJ 6u
  67. #define myanmar_syllable_machine_ex_ZWNJ 5u
  68. #line 76 "hb-ot-shaper-myanmar-machine.hh"
  69. static const unsigned char _myanmar_syllable_machine_trans_keys[] = {
  70. 1u, 41u, 3u, 41u, 5u, 39u, 5u, 8u, 3u, 41u, 3u, 39u, 3u, 39u, 5u, 39u,
  71. 5u, 39u, 3u, 39u, 3u, 39u, 3u, 41u, 5u, 39u, 1u, 15u, 3u, 39u, 3u, 39u,
  72. 3u, 40u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 41u,
  73. 3u, 41u, 3u, 41u, 5u, 39u, 5u, 8u, 3u, 41u, 3u, 39u, 3u, 39u, 5u, 39u,
  74. 5u, 39u, 3u, 39u, 3u, 39u, 3u, 41u, 5u, 39u, 1u, 15u, 3u, 41u, 3u, 39u,
  75. 3u, 39u, 3u, 40u, 3u, 39u, 3u, 41u, 3u, 41u, 3u, 39u, 3u, 41u, 3u, 41u,
  76. 3u, 41u, 3u, 41u, 3u, 41u, 3u, 41u, 3u, 41u, 1u, 41u, 1u, 15u, 0
  77. };
  78. static const char _myanmar_syllable_machine_key_spans[] = {
  79. 41, 39, 35, 4, 39, 37, 37, 35,
  80. 35, 37, 37, 39, 35, 15, 37, 37,
  81. 38, 37, 39, 39, 37, 39, 39, 39,
  82. 39, 39, 35, 4, 39, 37, 37, 35,
  83. 35, 37, 37, 39, 35, 15, 39, 37,
  84. 37, 38, 37, 39, 39, 37, 39, 39,
  85. 39, 39, 39, 39, 39, 41, 15
  86. };
  87. static const short _myanmar_syllable_machine_index_offsets[] = {
  88. 0, 42, 82, 118, 123, 163, 201, 239,
  89. 275, 311, 349, 387, 427, 463, 479, 517,
  90. 555, 594, 632, 672, 712, 750, 790, 830,
  91. 870, 910, 950, 986, 991, 1031, 1069, 1107,
  92. 1143, 1179, 1217, 1255, 1295, 1331, 1347, 1387,
  93. 1425, 1463, 1502, 1540, 1580, 1620, 1658, 1698,
  94. 1738, 1778, 1818, 1858, 1898, 1938, 1980
  95. };
  96. static const char _myanmar_syllable_machine_indicies[] = {
  97. 1, 1, 2, 3, 4, 4, 0, 5,
  98. 6, 1, 1, 0, 0, 0, 7, 0,
  99. 0, 8, 0, 9, 10, 11, 12, 0,
  100. 0, 0, 0, 0, 0, 0, 0, 13,
  101. 0, 0, 14, 15, 16, 17, 18, 19,
  102. 20, 0, 22, 23, 24, 24, 21, 25,
  103. 26, 21, 21, 21, 21, 21, 21, 21,
  104. 21, 21, 21, 27, 28, 29, 30, 21,
  105. 21, 21, 21, 21, 21, 21, 21, 31,
  106. 21, 21, 32, 33, 34, 35, 36, 37,
  107. 38, 21, 24, 24, 21, 25, 21, 21,
  108. 21, 21, 21, 21, 21, 21, 21, 21,
  109. 21, 21, 21, 21, 30, 21, 21, 21,
  110. 21, 21, 21, 21, 21, 39, 21, 21,
  111. 21, 21, 21, 21, 36, 21, 24, 24,
  112. 21, 25, 21, 22, 21, 24, 24, 21,
  113. 25, 26, 21, 21, 21, 21, 21, 21,
  114. 21, 21, 21, 21, 40, 21, 21, 30,
  115. 21, 21, 21, 21, 21, 21, 21, 21,
  116. 41, 21, 21, 42, 21, 21, 21, 36,
  117. 21, 41, 21, 22, 21, 24, 24, 21,
  118. 25, 26, 21, 21, 21, 21, 21, 21,
  119. 21, 21, 21, 21, 21, 21, 21, 30,
  120. 21, 21, 21, 21, 21, 21, 21, 21,
  121. 21, 21, 21, 21, 21, 21, 21, 36,
  122. 21, 43, 21, 24, 24, 21, 25, 36,
  123. 21, 21, 21, 21, 21, 21, 21, 21,
  124. 21, 21, 21, 21, 21, 21, 21, 21,
  125. 21, 21, 21, 21, 21, 21, 44, 21,
  126. 21, 21, 21, 21, 21, 36, 21, 24,
  127. 24, 21, 25, 21, 21, 21, 21, 21,
  128. 21, 21, 21, 21, 21, 21, 21, 21,
  129. 21, 21, 21, 21, 21, 21, 21, 21,
  130. 21, 21, 44, 21, 21, 21, 21, 21,
  131. 21, 36, 21, 24, 24, 21, 25, 21,
  132. 21, 21, 21, 21, 21, 21, 21, 21,
  133. 21, 21, 21, 21, 21, 21, 21, 21,
  134. 21, 21, 21, 21, 21, 21, 21, 21,
  135. 21, 21, 21, 21, 21, 36, 21, 22,
  136. 21, 24, 24, 21, 25, 26, 21, 21,
  137. 21, 21, 21, 21, 21, 21, 21, 21,
  138. 40, 21, 21, 30, 21, 21, 21, 21,
  139. 21, 21, 21, 21, 21, 21, 21, 21,
  140. 21, 21, 21, 36, 21, 22, 21, 24,
  141. 24, 21, 25, 26, 21, 21, 21, 21,
  142. 21, 21, 21, 21, 21, 21, 40, 21,
  143. 21, 30, 21, 21, 21, 21, 21, 21,
  144. 21, 21, 41, 21, 21, 21, 21, 21,
  145. 21, 36, 21, 22, 21, 24, 24, 21,
  146. 25, 26, 21, 21, 21, 21, 21, 21,
  147. 21, 21, 21, 21, 40, 21, 21, 30,
  148. 21, 21, 21, 21, 21, 21, 21, 21,
  149. 41, 21, 21, 21, 21, 21, 21, 36,
  150. 21, 41, 21, 24, 24, 21, 25, 21,
  151. 21, 21, 21, 21, 21, 21, 21, 21,
  152. 21, 21, 21, 21, 21, 30, 21, 21,
  153. 21, 21, 21, 21, 21, 21, 21, 21,
  154. 21, 21, 21, 21, 21, 36, 21, 1,
  155. 1, 21, 21, 21, 21, 21, 21, 21,
  156. 21, 21, 21, 21, 21, 1, 21, 22,
  157. 21, 24, 24, 21, 25, 26, 21, 21,
  158. 21, 21, 21, 21, 21, 21, 21, 21,
  159. 27, 28, 21, 30, 21, 21, 21, 21,
  160. 21, 21, 21, 21, 21, 21, 21, 21,
  161. 21, 21, 21, 36, 21, 22, 21, 24,
  162. 24, 21, 25, 26, 21, 21, 21, 21,
  163. 21, 21, 21, 21, 21, 21, 21, 28,
  164. 21, 30, 21, 21, 21, 21, 21, 21,
  165. 21, 21, 21, 21, 21, 21, 21, 21,
  166. 21, 36, 21, 22, 21, 24, 24, 21,
  167. 25, 26, 21, 21, 21, 21, 21, 21,
  168. 21, 21, 21, 21, 27, 28, 29, 30,
  169. 21, 21, 21, 21, 21, 21, 21, 21,
  170. 21, 21, 21, 21, 21, 21, 21, 36,
  171. 45, 21, 22, 21, 24, 24, 21, 25,
  172. 26, 21, 21, 21, 21, 21, 21, 21,
  173. 21, 21, 21, 27, 28, 29, 30, 21,
  174. 21, 21, 21, 21, 21, 21, 21, 21,
  175. 21, 21, 21, 21, 21, 21, 36, 21,
  176. 22, 21, 24, 24, 21, 25, 26, 21,
  177. 21, 21, 21, 21, 21, 21, 21, 21,
  178. 21, 27, 28, 29, 30, 21, 21, 21,
  179. 21, 21, 21, 21, 21, 31, 21, 21,
  180. 32, 33, 34, 35, 36, 21, 38, 21,
  181. 22, 21, 24, 24, 21, 25, 26, 21,
  182. 21, 21, 21, 21, 21, 21, 21, 21,
  183. 21, 27, 28, 29, 30, 21, 21, 21,
  184. 21, 21, 21, 21, 21, 45, 21, 21,
  185. 21, 21, 21, 21, 36, 21, 38, 21,
  186. 22, 21, 24, 24, 21, 25, 26, 21,
  187. 21, 21, 21, 21, 21, 21, 21, 21,
  188. 21, 27, 28, 29, 30, 21, 21, 21,
  189. 21, 21, 21, 21, 21, 45, 21, 21,
  190. 21, 21, 21, 21, 36, 21, 22, 21,
  191. 24, 24, 21, 25, 26, 21, 21, 21,
  192. 21, 21, 21, 21, 21, 21, 21, 27,
  193. 28, 29, 30, 21, 21, 21, 21, 21,
  194. 21, 21, 21, 21, 21, 21, 32, 21,
  195. 34, 21, 36, 21, 38, 21, 22, 21,
  196. 24, 24, 21, 25, 26, 21, 21, 21,
  197. 21, 21, 21, 21, 21, 21, 21, 27,
  198. 28, 29, 30, 21, 21, 21, 21, 21,
  199. 21, 21, 21, 45, 21, 21, 32, 21,
  200. 21, 21, 36, 21, 38, 21, 22, 21,
  201. 24, 24, 21, 25, 26, 21, 21, 21,
  202. 21, 21, 21, 21, 21, 21, 21, 27,
  203. 28, 29, 30, 21, 21, 21, 21, 21,
  204. 21, 21, 21, 46, 21, 21, 32, 33,
  205. 34, 21, 36, 21, 38, 21, 22, 21,
  206. 24, 24, 21, 25, 26, 21, 21, 21,
  207. 21, 21, 21, 21, 21, 21, 21, 27,
  208. 28, 29, 30, 21, 21, 21, 21, 21,
  209. 21, 21, 21, 21, 21, 21, 32, 33,
  210. 34, 21, 36, 21, 38, 21, 22, 23,
  211. 24, 24, 21, 25, 26, 21, 21, 21,
  212. 21, 21, 21, 21, 21, 21, 21, 27,
  213. 28, 29, 30, 21, 21, 21, 21, 21,
  214. 21, 21, 21, 31, 21, 21, 32, 33,
  215. 34, 35, 36, 21, 38, 21, 48, 48,
  216. 47, 5, 47, 47, 47, 47, 47, 47,
  217. 47, 47, 47, 47, 47, 47, 47, 47,
  218. 12, 47, 47, 47, 47, 47, 47, 47,
  219. 47, 49, 47, 47, 47, 47, 47, 47,
  220. 18, 47, 48, 48, 47, 5, 47, 2,
  221. 47, 48, 48, 47, 5, 6, 47, 47,
  222. 47, 47, 47, 47, 47, 47, 47, 47,
  223. 50, 47, 47, 12, 47, 47, 47, 47,
  224. 47, 47, 47, 47, 51, 47, 47, 52,
  225. 47, 47, 47, 18, 47, 51, 47, 2,
  226. 47, 48, 48, 47, 5, 6, 47, 47,
  227. 47, 47, 47, 47, 47, 47, 47, 47,
  228. 47, 47, 47, 12, 47, 47, 47, 47,
  229. 47, 47, 47, 47, 47, 47, 47, 47,
  230. 47, 47, 47, 18, 47, 53, 47, 48,
  231. 48, 47, 5, 18, 47, 47, 47, 47,
  232. 47, 47, 47, 47, 47, 47, 47, 47,
  233. 47, 47, 47, 47, 47, 47, 47, 47,
  234. 47, 47, 54, 47, 47, 47, 47, 47,
  235. 47, 18, 47, 48, 48, 47, 5, 47,
  236. 47, 47, 47, 47, 47, 47, 47, 47,
  237. 47, 47, 47, 47, 47, 47, 47, 47,
  238. 47, 47, 47, 47, 47, 47, 54, 47,
  239. 47, 47, 47, 47, 47, 18, 47, 48,
  240. 48, 47, 5, 47, 47, 47, 47, 47,
  241. 47, 47, 47, 47, 47, 47, 47, 47,
  242. 47, 47, 47, 47, 47, 47, 47, 47,
  243. 47, 47, 47, 47, 47, 47, 47, 47,
  244. 47, 18, 47, 2, 47, 48, 48, 47,
  245. 5, 6, 47, 47, 47, 47, 47, 47,
  246. 47, 47, 47, 47, 50, 47, 47, 12,
  247. 47, 47, 47, 47, 47, 47, 47, 47,
  248. 47, 47, 47, 47, 47, 47, 47, 18,
  249. 47, 2, 47, 48, 48, 47, 5, 6,
  250. 47, 47, 47, 47, 47, 47, 47, 47,
  251. 47, 47, 50, 47, 47, 12, 47, 47,
  252. 47, 47, 47, 47, 47, 47, 51, 47,
  253. 47, 47, 47, 47, 47, 18, 47, 2,
  254. 47, 48, 48, 47, 5, 6, 47, 47,
  255. 47, 47, 47, 47, 47, 47, 47, 47,
  256. 50, 47, 47, 12, 47, 47, 47, 47,
  257. 47, 47, 47, 47, 51, 47, 47, 47,
  258. 47, 47, 47, 18, 47, 51, 47, 48,
  259. 48, 47, 5, 47, 47, 47, 47, 47,
  260. 47, 47, 47, 47, 47, 47, 47, 47,
  261. 47, 12, 47, 47, 47, 47, 47, 47,
  262. 47, 47, 47, 47, 47, 47, 47, 47,
  263. 47, 18, 47, 55, 55, 47, 47, 47,
  264. 47, 47, 47, 47, 47, 47, 47, 47,
  265. 47, 55, 47, 2, 3, 48, 48, 47,
  266. 5, 6, 47, 47, 47, 47, 47, 47,
  267. 47, 47, 47, 47, 9, 10, 11, 12,
  268. 47, 47, 47, 47, 47, 47, 47, 47,
  269. 13, 47, 47, 14, 15, 16, 17, 18,
  270. 19, 20, 47, 2, 47, 48, 48, 47,
  271. 5, 6, 47, 47, 47, 47, 47, 47,
  272. 47, 47, 47, 47, 9, 10, 47, 12,
  273. 47, 47, 47, 47, 47, 47, 47, 47,
  274. 47, 47, 47, 47, 47, 47, 47, 18,
  275. 47, 2, 47, 48, 48, 47, 5, 6,
  276. 47, 47, 47, 47, 47, 47, 47, 47,
  277. 47, 47, 47, 10, 47, 12, 47, 47,
  278. 47, 47, 47, 47, 47, 47, 47, 47,
  279. 47, 47, 47, 47, 47, 18, 47, 2,
  280. 47, 48, 48, 47, 5, 6, 47, 47,
  281. 47, 47, 47, 47, 47, 47, 47, 47,
  282. 9, 10, 11, 12, 47, 47, 47, 47,
  283. 47, 47, 47, 47, 47, 47, 47, 47,
  284. 47, 47, 47, 18, 56, 47, 2, 47,
  285. 48, 48, 47, 5, 6, 47, 47, 47,
  286. 47, 47, 47, 47, 47, 47, 47, 9,
  287. 10, 11, 12, 47, 47, 47, 47, 47,
  288. 47, 47, 47, 47, 47, 47, 47, 47,
  289. 47, 47, 18, 47, 2, 47, 48, 48,
  290. 47, 5, 6, 47, 47, 47, 47, 47,
  291. 47, 47, 47, 47, 47, 9, 10, 11,
  292. 12, 47, 47, 47, 47, 47, 47, 47,
  293. 47, 13, 47, 47, 14, 15, 16, 17,
  294. 18, 47, 20, 47, 2, 47, 48, 48,
  295. 47, 5, 6, 47, 47, 47, 47, 47,
  296. 47, 47, 47, 47, 47, 9, 10, 11,
  297. 12, 47, 47, 47, 47, 47, 47, 47,
  298. 47, 56, 47, 47, 47, 47, 47, 47,
  299. 18, 47, 20, 47, 2, 47, 48, 48,
  300. 47, 5, 6, 47, 47, 47, 47, 47,
  301. 47, 47, 47, 47, 47, 9, 10, 11,
  302. 12, 47, 47, 47, 47, 47, 47, 47,
  303. 47, 56, 47, 47, 47, 47, 47, 47,
  304. 18, 47, 2, 47, 48, 48, 47, 5,
  305. 6, 47, 47, 47, 47, 47, 47, 47,
  306. 47, 47, 47, 9, 10, 11, 12, 47,
  307. 47, 47, 47, 47, 47, 47, 47, 47,
  308. 47, 47, 14, 47, 16, 47, 18, 47,
  309. 20, 47, 2, 47, 48, 48, 47, 5,
  310. 6, 47, 47, 47, 47, 47, 47, 47,
  311. 47, 47, 47, 9, 10, 11, 12, 47,
  312. 47, 47, 47, 47, 47, 47, 47, 56,
  313. 47, 47, 14, 47, 47, 47, 18, 47,
  314. 20, 47, 2, 47, 48, 48, 47, 5,
  315. 6, 47, 47, 47, 47, 47, 47, 47,
  316. 47, 47, 47, 9, 10, 11, 12, 47,
  317. 47, 47, 47, 47, 47, 47, 47, 57,
  318. 47, 47, 14, 15, 16, 47, 18, 47,
  319. 20, 47, 2, 47, 48, 48, 47, 5,
  320. 6, 47, 47, 47, 47, 47, 47, 47,
  321. 47, 47, 47, 9, 10, 11, 12, 47,
  322. 47, 47, 47, 47, 47, 47, 47, 47,
  323. 47, 47, 14, 15, 16, 47, 18, 47,
  324. 20, 47, 2, 3, 48, 48, 47, 5,
  325. 6, 47, 47, 47, 47, 47, 47, 47,
  326. 47, 47, 47, 9, 10, 11, 12, 47,
  327. 47, 47, 47, 47, 47, 47, 47, 13,
  328. 47, 47, 14, 15, 16, 17, 18, 47,
  329. 20, 47, 22, 23, 24, 24, 21, 25,
  330. 26, 21, 21, 21, 21, 21, 21, 21,
  331. 21, 21, 21, 27, 28, 29, 30, 21,
  332. 21, 21, 21, 21, 21, 21, 21, 58,
  333. 21, 21, 32, 33, 34, 35, 36, 37,
  334. 38, 21, 22, 59, 24, 24, 21, 25,
  335. 26, 21, 21, 21, 21, 21, 21, 21,
  336. 21, 21, 21, 27, 28, 29, 30, 21,
  337. 21, 21, 21, 21, 21, 21, 21, 31,
  338. 21, 21, 32, 33, 34, 35, 36, 21,
  339. 38, 21, 1, 1, 2, 3, 48, 48,
  340. 47, 5, 6, 1, 1, 47, 47, 47,
  341. 1, 47, 47, 47, 47, 9, 10, 11,
  342. 12, 47, 47, 47, 47, 47, 47, 47,
  343. 47, 13, 47, 47, 14, 15, 16, 17,
  344. 18, 19, 20, 47, 1, 1, 60, 60,
  345. 60, 60, 60, 60, 60, 1, 1, 60,
  346. 60, 60, 1, 60, 0
  347. };
  348. static const char _myanmar_syllable_machine_trans_targs[] = {
  349. 0, 1, 26, 37, 0, 27, 29, 51,
  350. 54, 39, 40, 41, 28, 43, 44, 46,
  351. 47, 48, 30, 50, 45, 0, 2, 13,
  352. 0, 3, 5, 14, 15, 16, 4, 18,
  353. 19, 21, 22, 23, 6, 25, 20, 12,
  354. 9, 10, 11, 7, 8, 17, 24, 0,
  355. 0, 36, 33, 34, 35, 31, 32, 38,
  356. 42, 49, 52, 53, 0
  357. };
  358. static const char _myanmar_syllable_machine_trans_actions[] = {
  359. 3, 0, 0, 0, 4, 0, 0, 0,
  360. 0, 0, 0, 0, 0, 0, 0, 0,
  361. 0, 0, 0, 0, 0, 5, 0, 0,
  362. 6, 0, 0, 0, 0, 0, 0, 0,
  363. 0, 0, 0, 0, 0, 0, 0, 0,
  364. 0, 0, 0, 0, 0, 0, 0, 7,
  365. 8, 0, 0, 0, 0, 0, 0, 0,
  366. 0, 0, 0, 0, 9
  367. };
  368. static const char _myanmar_syllable_machine_to_state_actions[] = {
  369. 1, 0, 0, 0, 0, 0, 0, 0,
  370. 0, 0, 0, 0, 0, 0, 0, 0,
  371. 0, 0, 0, 0, 0, 0, 0, 0,
  372. 0, 0, 0, 0, 0, 0, 0, 0,
  373. 0, 0, 0, 0, 0, 0, 0, 0,
  374. 0, 0, 0, 0, 0, 0, 0, 0,
  375. 0, 0, 0, 0, 0, 0, 0
  376. };
  377. static const char _myanmar_syllable_machine_from_state_actions[] = {
  378. 2, 0, 0, 0, 0, 0, 0, 0,
  379. 0, 0, 0, 0, 0, 0, 0, 0,
  380. 0, 0, 0, 0, 0, 0, 0, 0,
  381. 0, 0, 0, 0, 0, 0, 0, 0,
  382. 0, 0, 0, 0, 0, 0, 0, 0,
  383. 0, 0, 0, 0, 0, 0, 0, 0,
  384. 0, 0, 0, 0, 0, 0, 0
  385. };
  386. static const short _myanmar_syllable_machine_eof_trans[] = {
  387. 0, 22, 22, 22, 22, 22, 22, 22,
  388. 22, 22, 22, 22, 22, 22, 22, 22,
  389. 22, 22, 22, 22, 22, 22, 22, 22,
  390. 22, 22, 48, 48, 48, 48, 48, 48,
  391. 48, 48, 48, 48, 48, 48, 48, 48,
  392. 48, 48, 48, 48, 48, 48, 48, 48,
  393. 48, 48, 48, 22, 22, 48, 61
  394. };
  395. static const int myanmar_syllable_machine_start = 0;
  396. static const int myanmar_syllable_machine_first_final = 0;
  397. static const int myanmar_syllable_machine_error = -1;
  398. static const int myanmar_syllable_machine_en_main = 0;
  399. #line 55 "hb-ot-shaper-myanmar-machine.rl"
  400. #line 117 "hb-ot-shaper-myanmar-machine.rl"
  401. #define found_syllable(syllable_type) \
  402. HB_STMT_START { \
  403. if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
  404. for (unsigned int i = ts; i < te; i++) \
  405. info[i].syllable() = (syllable_serial << 4) | syllable_type; \
  406. syllable_serial++; \
  407. if (syllable_serial == 16) syllable_serial = 1; \
  408. } HB_STMT_END
  409. inline void
  410. find_syllables_myanmar (hb_buffer_t *buffer)
  411. {
  412. unsigned int p, pe, eof, ts, te, act HB_UNUSED;
  413. int cs;
  414. hb_glyph_info_t *info = buffer->info;
  415. #line 436 "hb-ot-shaper-myanmar-machine.hh"
  416. {
  417. cs = myanmar_syllable_machine_start;
  418. ts = 0;
  419. te = 0;
  420. act = 0;
  421. }
  422. #line 137 "hb-ot-shaper-myanmar-machine.rl"
  423. p = 0;
  424. pe = eof = buffer->len;
  425. unsigned int syllable_serial = 1;
  426. #line 448 "hb-ot-shaper-myanmar-machine.hh"
  427. {
  428. int _slen;
  429. int _trans;
  430. const unsigned char *_keys;
  431. const char *_inds;
  432. if ( p == pe )
  433. goto _test_eof;
  434. _resume:
  435. switch ( _myanmar_syllable_machine_from_state_actions[cs] ) {
  436. case 2:
  437. #line 1 "NONE"
  438. {ts = p;}
  439. break;
  440. #line 460 "hb-ot-shaper-myanmar-machine.hh"
  441. }
  442. _keys = _myanmar_syllable_machine_trans_keys + (cs<<1);
  443. _inds = _myanmar_syllable_machine_indicies + _myanmar_syllable_machine_index_offsets[cs];
  444. _slen = _myanmar_syllable_machine_key_spans[cs];
  445. _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].myanmar_category()) &&
  446. ( info[p].myanmar_category()) <= _keys[1] ?
  447. ( info[p].myanmar_category()) - _keys[0] : _slen ];
  448. _eof_trans:
  449. cs = _myanmar_syllable_machine_trans_targs[_trans];
  450. if ( _myanmar_syllable_machine_trans_actions[_trans] == 0 )
  451. goto _again;
  452. switch ( _myanmar_syllable_machine_trans_actions[_trans] ) {
  453. case 6:
  454. #line 110 "hb-ot-shaper-myanmar-machine.rl"
  455. {te = p+1;{ found_syllable (myanmar_consonant_syllable); }}
  456. break;
  457. case 4:
  458. #line 111 "hb-ot-shaper-myanmar-machine.rl"
  459. {te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
  460. break;
  461. case 8:
  462. #line 112 "hb-ot-shaper-myanmar-machine.rl"
  463. {te = p+1;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
  464. break;
  465. case 3:
  466. #line 113 "hb-ot-shaper-myanmar-machine.rl"
  467. {te = p+1;{ found_syllable (myanmar_non_myanmar_cluster); }}
  468. break;
  469. case 5:
  470. #line 110 "hb-ot-shaper-myanmar-machine.rl"
  471. {te = p;p--;{ found_syllable (myanmar_consonant_syllable); }}
  472. break;
  473. case 7:
  474. #line 112 "hb-ot-shaper-myanmar-machine.rl"
  475. {te = p;p--;{ found_syllable (myanmar_broken_cluster); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE; }}
  476. break;
  477. case 9:
  478. #line 113 "hb-ot-shaper-myanmar-machine.rl"
  479. {te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }}
  480. break;
  481. #line 498 "hb-ot-shaper-myanmar-machine.hh"
  482. }
  483. _again:
  484. switch ( _myanmar_syllable_machine_to_state_actions[cs] ) {
  485. case 1:
  486. #line 1 "NONE"
  487. {ts = 0;}
  488. break;
  489. #line 505 "hb-ot-shaper-myanmar-machine.hh"
  490. }
  491. if ( ++p != pe )
  492. goto _resume;
  493. _test_eof: {}
  494. if ( p == eof )
  495. {
  496. if ( _myanmar_syllable_machine_eof_trans[cs] > 0 ) {
  497. _trans = _myanmar_syllable_machine_eof_trans[cs] - 1;
  498. goto _eof_trans;
  499. }
  500. }
  501. }
  502. #line 145 "hb-ot-shaper-myanmar-machine.rl"
  503. }
  504. #undef found_syllable
  505. #endif /* HB_OT_SHAPER_MYANMAR_MACHINE_HH */