arabluatex_fullvoc.lua 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057
  1. --[[
  2. This file is part of the `arabluatex' package
  3. ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
  4. Copyright (C) 2016--2020 Robert Alessi
  5. Please send error reports and suggestions for improvements to Robert
  6. Alessi <alessi@robertalessi.net>
  7. This program is free software: you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation, either version 3 of the License, or
  10. (at your option) any later version.
  11. This program is distributed in the hope that it will be useful, but
  12. WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program. If not, see
  17. <http://www.gnu.org/licenses/>.
  18. --]]
  19. hamzafv = {
  20. -- next line for ʾiʿrāb hyphen
  21. {a="(')(%-)([uaiUAI])", b="%1%3"},
  22. -- next lines for ʾalif alone
  23. {a="(%.A)([uai]?)l%-(%^n)", b="ا%2ل%3"}, --additional (^n is lunar)
  24. {a="([%(%[%|%<%s%-O])(%.A)([uai]?)l%-(%^n)", b="%1ا%3%4"}, --additional (^n is lunar) --p
  25. {a="(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="ا%2ل%3%3"},
  26. {a="([%(%[%|%<%s%-O])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4%4"}, --p
  27. {a="%.A", b="ا"},
  28. -- hard coded hamza
  29. {a="|\"'", b="ء"},
  30. {a="A\"'", b="آ"},
  31. {a="[au]\"'", b="أ"},
  32. {a="w\"'", b="ؤ"},
  33. {a="i\"'", b="إ"},
  34. {a="y\"'", b="ئ"},
  35. -- moved below (end of 'final' section)
  36. {a="ؤ([^uaiUAI])", b="ؤْ%1"},
  37. {a="ؤ(%p*)$", b="ؤْ%1"},
  38. {a="ؤ(%p*%s)", b="ؤْ%1"},
  39. {a="أ([^uaiUAI])", b="أْ%1"},
  40. {a="أ(%p*)$", b="أْ%1"},
  41. {a="أ(%p*%s)", b="أْ%1"},
  42. {a="ئ([^uaiUAI])", b="ئْ%1"},
  43. {a="ئ(%p*)$", b="ئْ%1"},
  44. {a="ئ(%p*%s)", b="ئْ%1"},
  45. {a="ء([^uaiUAI])", b="ءْ%1"},
  46. {a="ء(%p*)$", b="ءْ%1"},
  47. {a="ء(%p*%s)", b="ءْ%1"},
  48. -- hamza takes tašdīd too
  49. {a="''([Uu])", b="ؤؤ%1"},
  50. {a="''([Aa])", b="أأ%1"},
  51. {a="''([Ii])", b="ئئ%1"},
  52. -- inseparable adverbial particle 'a- + 'a
  53. {a="\'(a)%-\'(a)", b="أ%1اأ%2"},
  54. -- initial long u and i (for a, see below)
  55. {a="%'%_U", b="أU"},
  56. {a="%'%_I", b="إI"},
  57. -- taḫfīfu 'l-hamza
  58. {a="'u'([^uaiUAI])", b="أU%1"},
  59. {a="'i'([^uaiUAI])", b="إI%1"},
  60. {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أْ%2"},
  61. {a="^u'([^uaiUAI])", b="اU%1"},
  62. {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1اU%2"},
  63. {a="^i'([^uaiUAI])", b="اI%1"},
  64. {a="([^uaiUAIYN][%s%(%[%<])i'([^uaiUAI])", b="%1اI%2"},
  65. -- madda (historic writing below)
  66. {a="'a'([^uaiUAI])", b="آ%1"},
  67. {a="([^uiyUI])\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"},
  68. {a="^\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="آ%1"},
  69. {a="\'a?A(O[%_%^%.]?[%`%'btjghxdrzsfqklmnywAY]-O)", b="آ"},
  70. {a="(%W)\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"},
  71. {a="(A)(O%'[%S]-O)", b="آ"},
  72. {a="(A)(')(uN?%p*)$", b="aآء%3"},
  73. {a="(A)(')(uN?)(%p*%s)", b="aآء%3%4"},
  74. {a="(A)(')(iN?%p*)$", b="aآء%3"},
  75. {a="(A)(')(iN?)(%p*%s)", b="aآء%3%4"},
  76. {a="(A)(')([iI])", b="aآئ%3"}, -- historic madda
  77. {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda
  78. {a="(A)(')", b="aآء"}, -- historic madda
  79. -- initial (needs both ^ and %W patterns)
  80. -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines)
  81. {a="^('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"},
  82. {a="(%W)('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"},
  83. {a="^('aw)(O)([%(%[%|%<]?\"?[uai])([%S]-O)", b="%1i"},
  84. {a="(%W)('aw)(O)([%(%[%|%<]?\"?[uai])([%S]-O)", b="%1%2i"},
  85. {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
  86. {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
  87. {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
  88. {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
  89. -- then the 'initial' rules for the remaining cases
  90. {a="^(')([ua])", b="أ%2"},
  91. {a="^(')(i)", b="إ%2"},
  92. -- consider replacing initial %W with [%s%(%[%<%-]:
  93. -- {a="(%W)(')([ua])", b="%1أ%3"},
  94. -- {a="(%W)(')(i)", b="%1إ%3"},
  95. {a="([%s%(%[%<%-])(')([ua])", b="%1أ%3"},
  96. {a="([%s%(%[%<%-])(')(i)", b="%1إ%3"},
  97. -- final
  98. -- mi'aT is special orthography (unlike ^say'aN and .zim'aN):
  99. -- {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, --new
  100. -- {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, --new
  101. {a="(mi)(%')(a[Tt])", b="%1ائ%3"},
  102. {a="(mi)(%')(aN%_?[AY])", b="%1أ%3"},
  103. -- final hamzah is on the line after a letter of prolongation or a
  104. -- consonant with sukūn
  105. {a="([^Auai])(')(\"?[uai]N?)(%p*)$", b="%1ء%3%4"}, --new
  106. {a="([^Auai])(')(\"?[uai]N?)(%p*%s)", b="%1ء%3%4"},
  107. -- u
  108. {a="(u)(')([uai]N?%p*)$", b="%1ؤ%3"},
  109. {a="(u)(')([uai]N?)(%p*%s)", b="%1ؤ%3%4"},
  110. {a="(u)(')(%p*)$", b="%1ؤْ%3"},
  111. {a="(u)(')(%p*%s)", b="%1ؤْ%3"},
  112. -- a
  113. {a="(a)(')(A%p*)$", b="%1آ"},
  114. {a="(a)(')(A)(%p*%s)", b="%1آ%4"},
  115. {a="(a)(')([u]N?%p*)$", b="%1أ%3"},
  116. {a="(a)(')([u]N?)(%p*%s)", b="%1أ%3%4"},
  117. {a="(a)(')(a%p*)$", b="%1أ%3"},
  118. {a="(a)(')(a)(%p*%s)", b="%1أ%3%4"},
  119. {a="(a)(')(aN%p*)$", b="%1أً"},
  120. {a="(a)(')(aN)(%p*%s)", b="%1أً%4"},
  121. {a="(a)(')([i]N?%p*)$", b="%1إ%3"},
  122. {a="(a)(')([i]N?)(%p*%s)", b="%1إ%3%4"},
  123. {a="(a)(')(%p*)$", b="%1أْ%3"},
  124. {a="(a)(')(%p*%s)", b="%1أْ%3"},
  125. -- i
  126. {a="(i)(')([uai]N?%p*)$", b="%1ئ%3"},
  127. {a="(i)(')([uai]N?)(%p*%s)", b="%1ئ%3%4"},
  128. {a="(i)(')(%p*)$", b="%1ئْ%3"},
  129. {a="(i)(')(%p*%s)", b="%1ئْ%3"},
  130. -- the following was wrong for it broke the taḫfīfu 'l-hamzati
  131. -- (look into this later):
  132. -- moved here from above:
  133. -- {a="ؤ([^uaiUAI])", b="ؤْ%1"},
  134. -- {a="ؤ(%p*)$", b="ؤْ%1"},
  135. -- {a="ؤ(%p*%s)", b="ؤْ%1"},
  136. -- {a="أ([^uaiUAI])", b="أْ%1"},
  137. -- {a="أ(%p*)$", b="أْ%1"},
  138. -- {a="أ(%p*%s)", b="أْ%1"},
  139. -- {a="ئ([^uaiUAI])", b="ئْ%1"},
  140. -- {a="ئ(%p*)$", b="ئْ%1"},
  141. -- {a="ئ(%p*%s)", b="ئْ%1"},
  142. -- {a="ء([^uaiUAI])", b="ءْ%1"},
  143. -- {a="ء(%p*)$", b="ءْ%1"},
  144. -- {a="ء(%p*%s)", b="ءْ%1"},
  145. -- middle
  146. {a="([UIwy])(')", b="%1ء"}, --new
  147. -- {a="([Iy])(')", b="%1ئ"}, --included in the above line
  148. -- hamza is alone after letters of prolongation or sukūn
  149. -- {a="([^uai])(')([uU])", b="%1ؤ%3"},
  150. -- {a="([^uai])(')(%_?[aAY])", b="%1أ%3"},
  151. -- {a="([^uai])(')([iI])", b="%1ئ%3"},
  152. {a="([^uai])(')(%_?[uaiUAYI])", b="%1ء%3"},
  153. {a="(u)(')([UI])", b="%1ء%3"},
  154. {a="(u)(')([u])", b="%1ؤ%3"},
  155. {a="(u)(')(%_?[aAY])", b="%1ؤ%3"},
  156. {a="(u)(')([i])", b="%1ئ%3"},
  157. {a="(a)(')(%_?[aAY])", b="%1أ%3"},
  158. {a="(a)(')([uU])", b="%1ؤ%3"},
  159. {a="(a)(')([iI])", b="%1ئ%3"},
  160. {a="(i)(')([UI])", b="%1ء%3"},
  161. {a="(i)(')(%_?[aAY])", b="%1ئ%3"},
  162. {a="(i)(')([u])", b="%1ئ%3"},
  163. {a="(i)(')([i])", b="%1ئ%3"},
  164. {a="(a)(')([^uaiUAI])", b="%1أْ%3"},
  165. {a="(u)(')([^uaiUAI])", b="%1ؤْ%3"},
  166. {a="(i)(')([^uaiUAI])", b="%1ئْ%3"}
  167. }
  168. hamzafveasy = { -- differences marked below with 'easy'
  169. -- next line for ʾiʿrāb hyphen
  170. {a="(')(%-)([uaiUAI])", b="%1%3"},
  171. -- next lines for ʾalif alone
  172. {a="(%.A)([uai]?)l%-(%^n)", b="ا%2ل%3"}, --additional (^n is lunar)
  173. {a="([%(%[%|%<%s%-O])(%.A)([uai]?)l%-(%^n)", b="%1ا%3%4"}, --additional (^n is lunar) --p
  174. {a="(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="ا%2ل%3%3"},
  175. {a="([%(%[%|%<%s%-O])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4%4"}, --p
  176. {a="%.A", b="ا"},
  177. -- hard coded hamza
  178. {a="|\"'", b="ء"},
  179. {a="A\"'", b="آ"},
  180. {a="[au]\"'", b="أ"},
  181. {a="w\"'", b="ؤ"},
  182. {a="i\"'", b="إ"},
  183. {a="y\"'", b="ئ"},
  184. -- moved below (end of 'final' section)
  185. {a="ؤ([^uaiUAI])", b="ؤْ%1"},
  186. {a="ؤ(%p*)$", b="ؤْ%1"},
  187. {a="ؤ(%p*%s)", b="ؤْ%1"},
  188. {a="أ([^uaiUAI])", b="أْ%1"},
  189. {a="أ(%p*)$", b="أْ%1"},
  190. {a="أ(%p*%s)", b="أْ%1"},
  191. {a="ئ([^uaiUAI])", b="ئْ%1"},
  192. {a="ئ(%p*)$", b="ئْ%1"},
  193. {a="ئ(%p*%s)", b="ئْ%1"},
  194. {a="ء([^uaiUAI])", b="ءْ%1"},
  195. {a="ء(%p*)$", b="ءْ%1"},
  196. {a="ء(%p*%s)", b="ءْ%1"},
  197. -- hamza takes tašdīd too
  198. {a="''([Uu])", b="ؤؤ%1"},
  199. {a="''([Aa])", b="أأ%1"},
  200. {a="''([Ii])", b="ئئ%1"},
  201. -- inseparable adverbial particle 'a- + 'a
  202. {a="\'(a)%-\'(a)", b="أ%1اأ%2"},
  203. -- initial long u and i (for a, see below)
  204. {a="%'%_U", b="أU"},
  205. {a="%'%_I", b="إI"},
  206. -- taḫfīfu 'l-hamza
  207. {a="'u'([^uaiUAI])", b="أU%1"},
  208. {a="'i'([^uaiUAI])", b="إI%1"},
  209. {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أْ%2"},
  210. {a="^u'([^uaiUAI])", b="اU%1"},
  211. {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1اU%2"},
  212. {a="^i'([^uaiUAI])", b="اI%1"},
  213. {a="([^uaiUAIYN][%s%(%[%<])i'([^uaiUAI])", b="%1اI%2"},
  214. -- madda (historic writing below)
  215. {a="'a'([^uaiUAI])", b="آ%1"},
  216. {a="([^uiyUI])\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"},
  217. {a="^\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="آ%1"},
  218. {a="\'a?A(O[%_%^%.]?[%`%'btjghxdrzsfqklmnywAY]-O)", b="آ"},
  219. {a="(%W)\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"},
  220. --easy (begin)
  221. {a="(A)(O%'[%S]-O)", b="ا"},
  222. {a="(A)(')(uN?%p*)$", b="aاء%3"},
  223. {a="(A)(')(uN?)(%p*%s)", b="aاء%3%4"},
  224. {a="(A)(')(iN?%p*)$", b="aاء%3"},
  225. {a="(A)(')(iN?)(%p*%s)", b="aاء%3%4"},
  226. {a="(A)(')([iI])", b="aائ%3"}, -- historic madda
  227. {a="(A)(')(u)", b="aاؤ%3"}, -- historic madda
  228. {a="(A)(')", b="aاء"}, -- historic madda
  229. --easy (end)
  230. -- initial (needs both ^ and %W patterns)
  231. -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines)
  232. {a="^('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"},
  233. {a="(%W)('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"},
  234. {a="^('aw)(O)([%(%[%|%<]?\"?[uai])([%S]-O)", b="%1i"},
  235. {a="(%W)('aw)(O)([%(%[%|%<]?\"?[uai])([%S]-O)", b="%1%2i"},
  236. {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
  237. {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
  238. {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
  239. {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
  240. -- then the 'initial' rules for the remaining cases
  241. {a="^(')([ua])", b="أ%2"},
  242. {a="^(')(i)", b="إ%2"},
  243. -- consider replacing initial %W with [%s%(%[%<%-]:
  244. -- {a="(%W)(')([ua])", b="%1أ%3"},
  245. -- {a="(%W)(')(i)", b="%1إ%3"},
  246. {a="([%s%(%[%<%-])(')([ua])", b="%1أ%3"},
  247. {a="([%s%(%[%<%-])(')(i)", b="%1إ%3"},
  248. -- final
  249. -- mi'aT is special orthography (unlike ^say'aN and .zim'aN)
  250. -- {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, --new
  251. -- {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, --new
  252. {a="(mi)(%')(a[Tt])", b="%1ائ%3"},
  253. {a="(mi)(%')(aN%_?[AY])", b="%1أ%3"},
  254. -- easy (begin)
  255. -- The Munjid says that such words as radI'aN do not have the
  256. -- hamzah alone on the line, so take out the following two lines
  257. -- (final hamzah is on the line after a letter of prolongation or a
  258. -- consonant with sukūn)
  259. -- {a="([^Auai])(')(\"?[uai]N?)(%p*)$", b="%1ء%3%4"}, --new
  260. -- {a="([^Auai])(')(\"?[uai]N?)(%p*%s)", b="%1ء%3%4"},
  261. {a="([^Auai])(')(\"?aN)(%p*)$", b="%1ئ%3%4"}, --new
  262. {a="([^Auai])(')(\"?aN)(%p*%s)", b="%1ئ%3%4"}, --new
  263. {a="([^uai])(')(\"?a)(%p*)$", b="%1ء%3%4"}, --new
  264. {a="([^uai])(')(\"?a)(%p*%s)", b="%1ء%3%4"}, --new
  265. {a="([^uai])(')(\"?[ui]N?)(%p*)$", b="%1ء%3%4"}, --new
  266. {a="([^uai])(')(\"?[ui]N?)(%p*%s)", b="%1ء%3%4"}, --new
  267. --easy (end)
  268. -- u
  269. {a="(u)(')([uai]N?%p*)$", b="%1ؤ%3"},
  270. {a="(u)(')([uai]N?)(%p*%s)", b="%1ؤ%3%4"},
  271. {a="(u)(')(%p*)$", b="%1ؤْ%3"},
  272. {a="(u)(')(%p*%s)", b="%1ؤْ%3"},
  273. -- a
  274. {a="(a)(')(A%p*)$", b="%1آ"},
  275. {a="(a)(')(A)(%p*%s)", b="%1آ%4"},
  276. {a="(a)(')([u]N?%p*)$", b="%1أ%3"},
  277. {a="(a)(')([u]N?)(%p*%s)", b="%1أ%3%4"},
  278. {a="(a)(')(a%p*)$", b="%1أ%3"},
  279. {a="(a)(')(a)(%p*%s)", b="%1أ%3%4"},
  280. {a="(a)(')(aN%p*)$", b="%1أً"},
  281. {a="(a)(')(aN)(%p*%s)", b="%1أً%4"},
  282. {a="(a)(')([i]N?%p*)$", b="%1إ%3"},
  283. {a="(a)(')([i]N?)(%p*%s)", b="%1إ%3%4"},
  284. {a="(a)(')(%p*)$", b="%1أْ%3"},
  285. {a="(a)(')(%p*%s)", b="%1أْ%3"},
  286. -- i
  287. {a="(i)(')([uai]N?%p*)$", b="%1ئ%3"},
  288. {a="(i)(')([uai]N?)(%p*%s)", b="%1ئ%3%4"},
  289. {a="(i)(')(%p*)$", b="%1ئْ%3"},
  290. {a="(i)(')(%p*%s)", b="%1ئْ%3"},
  291. -- the following was wrong for it broke the taḫfīfu 'l-hamzati
  292. -- (look into this later):
  293. -- moved here from above:
  294. -- {a="ؤ([^uaiUAI])", b="ؤْ%1"},
  295. -- {a="ؤ(%p*)$", b="ؤْ%1"},
  296. -- {a="ؤ(%p*%s)", b="ؤْ%1"},
  297. -- {a="أ([^uaiUAI])", b="أْ%1"},
  298. -- {a="أ(%p*)$", b="أْ%1"},
  299. -- {a="أ(%p*%s)", b="أْ%1"},
  300. -- {a="ئ([^uaiUAI])", b="ئْ%1"},
  301. -- {a="ئ(%p*)$", b="ئْ%1"},
  302. -- {a="ئ(%p*%s)", b="ئْ%1"},
  303. -- {a="ء([^uaiUAI])", b="ءْ%1"},
  304. -- {a="ء(%p*)$", b="ءْ%1"},
  305. -- {a="ء(%p*%s)", b="ءْ%1"},
  306. --
  307. -- middle
  308. {a="([Uw])(')", b="%1ء"}, --new
  309. {a="([Iy])(')", b="%1ئ"}, --easy
  310. {a="([^uai])(')([uU])", b="%1ؤ%3"},
  311. {a="([^uai])(')(%_?[aAY])", b="%1أ%3"},
  312. {a="([^uai])(')([iI])", b="%1ئ%3"},
  313. {a="(u)(')([uU])", b="%1ؤ%3"},
  314. {a="(u)(')(%_?[aAY])", b="%1ؤ%3"},
  315. {a="(u)(')([iI])", b="%1ئ%3"},
  316. {a="(a)(')(%_?[aAY])", b="%1أ%3"},
  317. {a="(a)(')([uU])", b="%1ؤ%3"},
  318. {a="(a)(')([iI])", b="%1ئ%3"},
  319. {a="(i)(')(%_?[aAY])", b="%1ئ%3"},
  320. {a="(i)(')([uU])", b="%1ئ%3"},
  321. {a="(i)(')([iI])", b="%1ئ%3"},
  322. {a="(a)(')([^uaiUAI])", b="%1أْ%3"},
  323. {a="(u)(')([^uaiUAI])", b="%1ؤْ%3"},
  324. {a="(i)(')([^uaiUAI])", b="%1ئْ%3"}
  325. }
  326. tanwinfv = { -- with assimilations (\SetArbDflt*)
  327. -- assimilations (begin)
  328. {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([rlmnwy])", b="%4%4"},
  329. {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"},
  330. -- assimilations (end)
  331. {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([uai])", b="ٱ"},
  332. {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"},
  333. {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"},
  334. {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"},
  335. {a="%-?uNU", b="ٌو"},
  336. {a="%-?aNU", b="ًوا"},
  337. {a="%-?iNU", b="ٍو"},
  338. {a="%-?([uai]N)(%s)([uai])", b="%1%2ٱ"},
  339. {a="%-?(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"},
  340. -- assimilations (begin)
  341. {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"},
  342. {a="(O[%S]-)(%-?aN)(_A)(O)([rlmnwy])", b="%5%5"},
  343. {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"},
  344. {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"},
  345. {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"},
  346. {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
  347. -- {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1%2%3%4%4"}, --new
  348. {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"},
  349. {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"},
  350. -- assimilations (end)
  351. {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="ٱ"},
  352. {a="(O[%S]-)(%-?aN)(Y)(O)([uai])", b="ٱ"},
  353. -- quoted tanwīn (begin)
  354. {a="%-?(\"uN)", b=""},
  355. {a="(B)%-?(\"aN)", b="%1"},
  356. {a="%-?(\"aN)(_A)", b="ى"},
  357. {a="%-?(\"aN)(Y)", b="ى"},
  358. {a="(T)%-?(\"aN)", b="%1"},
  359. {a="([اآ])(ء)%-?(\"aN)", b="%1%2"}, --new
  360. {a="([^TA])%-?(\"aN)", b="%1ا"},
  361. {a="%-?(\"iNI?)", b=""},
  362. -- quoted tanwīn (end)
  363. {a="%-?(uN)", b="ٌ"},
  364. {a="(B)%-?(aN)", b="%1ً"},
  365. -- needed by \arbcolor:
  366. {a="%-?(aN)(O[%S]-%_AO)", b="ً"},
  367. {a="%-?(aN)(O[%S]-YO)", b="ً"},
  368. {a="(O[%S]-TO)%-?(aN)", b="ً"},
  369. {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new
  370. {a="(O[%S]-[^TA]O)%-?(aN)", b="ًا"},
  371. --
  372. {a="%-?(aN)(_A)", b="ًى"},
  373. {a="%-?(aN)(Y)", b="ًى"},
  374. {a="(T)%-?(aN)", b="%1ً"},
  375. {a="([اآ])(ء)%-?(aN)", b="%1%2ً"}, --new
  376. {a="([^TA])%-?(aN)", b="%1ًا"},
  377. {a="%-?(iNI?)", b="ٍ"}
  378. }
  379. tanwinfveasy = { -- no assimilations (see below)
  380. -- assimilations (begin)
  381. --easy {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([rlmnwy])", b="%4%4"},
  382. --easy {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"},
  383. -- assimilations (end)
  384. {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([uai])", b="ٱ"},
  385. {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"},
  386. {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"},
  387. {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"},
  388. {a="%-?uNU", b="ٌو"},
  389. {a="%-?aNU", b="ًوا"},
  390. {a="%-?iNU", b="ٍو"},
  391. {a="%-?([uai]N)(%s)([uai])", b="%1%2ٱ"},
  392. {a="%-?(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"},
  393. -- assimilations (begin)
  394. --easy {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"},
  395. --easy {a="(O[%S]-)(%-?aN)(_A)(O)([rlmnwy])", b="%5%5"},
  396. --easy {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"},
  397. --easy {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"},
  398. --easy {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"},
  399. --easy {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
  400. --easy {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1%2%3%4%4"}, --new
  401. --easy {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"},
  402. --easy {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"},
  403. -- assimilations (end)
  404. {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="ٱ"},
  405. {a="(O[%S]-)(%-?aN)(Y)(O)([uai])", b="ٱ"},
  406. -- quoted tanwīn (begin)
  407. {a="%-?(\"uN)", b=""},
  408. {a="(B)%-?(\"aN)", b="%1"},
  409. {a="%-?(\"aN)(_A)", b="ى"},
  410. {a="%-?(\"aN)(Y)", b="ى"},
  411. {a="(T)%-?(\"aN)", b="%1"},
  412. {a="([اآ])(ء)%-?(\"aN)", b="%1%2"}, --new
  413. {a="([^TA])%-?(\"aN)", b="%1ا"},
  414. {a="%-?(\"iNI?)", b=""},
  415. -- quoted tanwīn (end)
  416. {a="%-?(uN)", b="ٌ"},
  417. {a="(B)%-?(aN)", b="%1ً"},
  418. -- needed by \arbcolor:
  419. {a="%-?(aN)(O[%S]-%_AO)", b="ً"},
  420. {a="%-?(aN)(O[%S]-YO)", b="ً"},
  421. {a="(O[%S]-TO)%-?(aN)", b="ً"},
  422. {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new
  423. {a="(O[%S]-[^TA]O)%-?(aN)", b="ًا"},
  424. --
  425. {a="%-?(aN)(_A)", b="ًى"},
  426. {a="%-?(aN)(Y)", b="ًى"},
  427. {a="(T)%-?(aN)", b="%1ً"},
  428. {a="([اآ])(ء)%-?(aN)", b="%1%2ً"}, --new
  429. {a="([^TA])%-?(aN)", b="%1ًا"},
  430. {a="%-?(iNI?)", b="ٍ"}
  431. }
  432. trigraphsfv = { -- trigraphs or more
  433. -- ʾalif al-waṣl: put it back on with \arbnull
  434. {a="(O[%S]-)([%'a]l%-)(O)(\"?[uai])", b="ٱ"},
  435. -- 'llatI / 'llad_I
  436. {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"},
  437. {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p
  438. -- law: the diphthong is to be resolved into 'awi' (next 8 lines)
  439. {a="^(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"},
  440. {a="(%W)(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"},
  441. {a="^(law)(O)(\"?[uai])([%S]-O)", b="%1i"},
  442. {a="(%W)(law)(O)(\"?[uai])([%S]-O)", b="%1%2i"},
  443. {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
  444. {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
  445. {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
  446. {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
  447. -- al- + lām
  448. {a="^(a)l%-(l)", b="ا%1ل%2%2"},
  449. {a="([%(%[%|%<%s%-O])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p
  450. -- al- + solar consonant ('c' and '^n' are additional characters)
  451. {a="^(a)l%-(%^n)", b="ا%1ل%2"}, -- ^n is lunar
  452. {a="([%(%[%|%<%s%-O])(a)l%-(%^n)", b="%1ا%2ل%3"}, -- ^n is lunar --p
  453. {a="^(a)l%-([%_%^%.]?[tdrzsnc])", b="ا%1ل%2%2"},
  454. {a="([%(%[%|%<%s%-O])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3%3"}, --p
  455. -- assim. art. + solar consonant ('c' and '^n' are additional characters)
  456. {a="^(a)(%^n)%-", b="ا%1ل"}, -- ^n is lunar
  457. {a="([%(%[%|%<%s%-O])(a)(%^n)%-", b="%1ا%2ل"}, -- ^n is lunar --p
  458. {a="^(a)([%_%^%.]?[tdrzsnc])%-", b="ا%1ل%2"},
  459. {a="([%(%[%|%<%s%-O])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل%3"}, --p
  460. -- al- + initial unstable hamza
  461. {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"},
  462. {a="([%(%[%|%<%s%-O])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p
  463. -- li-/la + art. + initial unstable hamza is a special orthography
  464. {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"},
  465. -- al- + lunar consonant (i.e. what remains)
  466. {a="^(a)l%-", b="ا%1لْ"},
  467. {a="([%(%[%|%<%s%-O])(a)l%-", b="%1ا%2لْ"}, --p
  468. -- diphthongs to be resolved before ʾalif conjunctionis
  469. {a="(aW)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="awuا"},
  470. {a="(aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1u"},
  471. {a="(ay)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"},
  472. {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"},
  473. {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"},
  474. {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
  475. -- art. with waṣla + lām
  476. {a="'l%-(l)", b="ٱل%1%1"},
  477. -- art. with waṣla + solar consonant
  478. -- ('c' and '^n' are additional characters)
  479. {a="'l%-(%^n)", b="ٱل%1"}, -- ^n is lunar
  480. {a="'l%-([%_%^%.]?[tdrzsnc])", b="ٱل%1%1"},
  481. -- li-/la- + art. + lām
  482. {a="l([ai])%-l%-(l)", b="ل%1%2%2"},
  483. -- assim. art. with waṣla + solar consonant
  484. -- ('c' and '^n' are additional characters)
  485. {a="'(%^n)%-", b="ٱل"}, -- ^n is lunar
  486. {a="'([%_%^%.]?[tdrzsnc])%-", b="ٱل%1"},
  487. -- li-/la- + art. + solar consonant is a special orthography
  488. -- ('c' and '^n' are additional characters)
  489. {a="l([ai])%-l%-(%^n)", b="ل%1ل%2"}, -- ^n is lunar
  490. {a="l([ai])%-l%-([%_%^%.]?[tdrzsnc])", b="ل%1ل%2%2"},
  491. -- li-/la- + assim. art. + solar consonant is a special orthography
  492. -- ('c' and '^n' are additional characters)
  493. {a="l([ai])%-(%^n)%-(%^n)", b="ل%1ل%3"}, -- ^n is lunar
  494. {a="l([ai])%-([%_%^%.]?[tdrzsnc])%-([%_%^%.]?[tdrzsnc])", b="ل%1ل%3%3"},
  495. -- art. with waṣla + initial unstable hamza
  496. {a="'l%-(\"?[uai])", b="ٱل%1ٱ"},
  497. -- art. with waṣla + lunar consonant (i.e. what remains)
  498. {a="'l%-", b="ٱلْ"},
  499. -- the silent wāw
  500. {a="uU(%p*)$", b="uو%1"},
  501. {a="uU(%p*%s)", b="uو%1"},
  502. {a="aU(%p*)$", b="aو%1"},
  503. {a="aU(%p*%s)", b="aو%1"},
  504. {a="iU(%p*)$", b="iو%1"},
  505. {a="iU(%p*%s)", b="iو%1"},
  506. -- words ending in -āT with silent wāw/yāʾ
  507. {a="(_a)UA", b="%1وا"},
  508. {a="(_a)U", b="%1و"},
  509. {a="(_a)I", b="%1ي"}
  510. }
  511. -- idgham/assimilation rules for trigraphs apply here : see voc lua
  512. -- file.
  513. trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs)
  514. -- ʾalif al-waṣl: put it back on with \arbnull
  515. {a="(O[%S]-)([%'a]l%-)(O)(\"?[uai])", b="ٱ"},
  516. -- 'llatI / 'llad_I
  517. {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"},
  518. {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p
  519. -- law: the diphthong is to be resolved into 'awi' (next 8 lines)
  520. {a="^(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"},
  521. {a="(%W)(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"},
  522. {a="^(law)(O)(\"?[uai])([%S]-O)", b="%1i"},
  523. {a="(%W)(law)(O)(\"?[uai])([%S]-O)", b="%1%2i"},
  524. {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
  525. {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
  526. {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
  527. {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
  528. -- al- + lām
  529. {a="^(a)l%-(l)", b="ا%1ل%2%2"},
  530. {a="([%(%[%|%<%s%-O])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p
  531. -- al- + solar consonant ('c' and '^n' are additional characters)
  532. {a="^(a)l%-(%^n)", b="ا%1ل%2"}, -- ^n is lunar
  533. {a="([%(%[%|%<%s%-O])(a)l%-(%^n)", b="%1ا%2ل%3"}, -- ^n is lunar --p
  534. {a="^(a)l%-([%_%^%.]?[tdrzsnc])", b="ا%1ل%2%2"},
  535. {a="([%(%[%|%<%s%-O])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3%3"}, --p
  536. -- assim. art. + solar consonant ('c' and '^n' are additional characters)
  537. {a="^(a)(%^n)%-", b="ا%1ل"}, -- ^n is lunar
  538. {a="([%(%[%|%<%s%-O])(a)(%^n)%-", b="%1ا%2ل"}, -- ^n is lunar --p
  539. {a="^(a)([%_%^%.]?[tdrzsnc])%-", b="ا%1ل%2"},
  540. {a="([%(%[%|%<%s%-O])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل%3"}, --p
  541. -- al- + initial unstable hamza
  542. {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"},
  543. {a="([%(%[%|%<%s%-O])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p
  544. -- li-/la + art. + initial unstable hamza is a special orthography
  545. {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"},
  546. -- al- + lunar consonant (i.e. what remains)
  547. {a="^(a)l%-", b="ا%1لْ"},
  548. {a="([%(%[%|%<%s%-O])(a)l%-", b="%1ا%2لْ"}, --p
  549. -- diphthongs to be resolved before ʾalif conjunctionis
  550. {a="(aW)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="awuا"},
  551. {a="(aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1u"},
  552. {a="(ay)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"},
  553. {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"},
  554. {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"},
  555. {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
  556. -- art. with waṣla + lām
  557. {a="'l%-(l)", b="ٱل%1%1"},
  558. -- art. with waṣla + solar consonant
  559. -- ('c' and '^n' are additional characters)
  560. {a="'l%-(%^n)", b="ٱل%1"}, -- ^n is lunar
  561. {a="'l%-([%_%^%.]?[tdrzsnc])", b="ٱل%1%1"},
  562. -- li-/la- + art. + lām
  563. {a="l([ai])%-l%-(l)", b="ل%1%2%2"},
  564. -- assim. art. with waṣla + solar consonant
  565. -- ('c' and '^n' are is an additional characters)
  566. {a="'(%^n)%-", b="ٱل"}, -- ^n is lunar
  567. {a="'([%_%^%.]?[tdrzsnc])%-", b="ٱل%1"},
  568. -- li-/la- + art. + solar consonant is a special orthography
  569. -- ('c' and '^n' are additional characters)
  570. {a="l([ai])%-l%-(%^n)", b="ل%1ل%2"}, -- ^n is lunar
  571. {a="l([ai])%-l%-([%_%^%.]?[tdrzsnc])", b="ل%1ل%2%2"},
  572. -- li-/la- + assim. art. + solar consonant is a special orthography
  573. -- ('c and '^n' are additional characters)
  574. {a="l([ai])%-(%^n)%-(%^n)", b="ل%1ل%3"}, -- ^n is lunar
  575. {a="l([ai])%-([%_%^%.]?[tdrzsnc])%-([%_%^%.]?[tdrzsnc])", b="ل%1ل%3%3"},
  576. -- art. with waṣla + initial unstable hamza
  577. {a="'l%-(\"?[uai])", b="ٱل%1ٱ"},
  578. -- art. with waṣla + lunar consonant (i.e. what remains)
  579. {a="'l%-", b="ٱلْ"},
  580. -- the silent wāw
  581. {a="uU(%p*)$", b="uو%1"},
  582. {a="uU(%p*%s)", b="uو%1"},
  583. {a="aU(%p*)$", b="aو%1"},
  584. {a="aU(%p*%s)", b="aو%1"},
  585. {a="iU(%p*)$", b="iو%1"},
  586. {a="iU(%p*%s)", b="iو%1"},
  587. -- words ending in -āT with silent wāw/yāʾ
  588. {a="(_a)UA", b="%1وا"},
  589. {a="(_a)U", b="%1و"},
  590. {a="(_a)I", b="%1ي"}
  591. }
  592. digraphsfvidgham = {
  593. -- ʾiʿrāb: straight double quote must be discarded
  594. {a="(%-)(\"?[UI]na)(%p*%s)", b="%2%3"},
  595. {a="(%-)(\"?[UI]na)(%p*)$", b="%2%3"},
  596. {a="(%-)(\"?At[ui])(%p*%s)", b="%2%3"},
  597. {a="(%-)(\"?At[ui])(%p*)$", b="%2%3"},
  598. {a="(%-)(\"?Ani)(%p*%s)", b="%2%3"},
  599. {a="(%-)(\"?Ani)(%p*)$", b="%2%3"},
  600. {a="(%-)(\"?ayni)(%p*%s)", b="%2%3"},
  601. {a="(%-)(\"?ayni)(%p*)$", b="%2%3"},
  602. {a="(%-)(\"?[uai])(%p*%s)", b="%2%3"},
  603. {a="(%-)(\"?[uai])(%p*)$", b="%2%3"},
  604. -- ʾiʿrāb (end)
  605. -- initial straight double quote gives a connective ʾalif
  606. {a="^\"[uai]", b="ٱ"},
  607. {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p
  608. -- diphthongs to be resolved before ʾalif conjunctionis
  609. {a="(aW)(O)(\"?[uai])([%S]-O)", b="awuا"},
  610. {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p
  611. {a="(aw)(O)(\"?[uai])([%S]-O)", b="%1u"},
  612. {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p
  613. {a="(ay)(O)(\"?[uai])([%S]-O)", b="%1i"},
  614. {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p
  615. -- hyphen + initial alif without hamza
  616. -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"},
  617. {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)([%aأإؤئ])", b="%1ٱ%3%4"},
  618. -- initial alif without hamza (next 4 lines)
  619. {a="(O[%S]-)([uaiUAIY])(O)(\"?[uai])", b="ٱ"},
  620. {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p
  621. {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p
  622. {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p
  623. {a="%-%-", b="ـ"},
  624. {a="ؤؤ", b="ؤّ"},
  625. {a="أأ", b="أّ"},
  626. {a="ئئ", b="ئّ"},
  627. {a="bb", b="بّ"},
  628. {a="BB", b="ـّ"},
  629. {a="([%_%^%.])([tghdsz])([tghdsz])", b="%1%2|%3"},
  630. -- same as above for additional characters:
  631. {a="([%_%^%.])([cn])([cn])", b="%1%2|%3"},
  632. {a="tt", b="تّ"},
  633. {a="%_t%_t", b="ثّ"},
  634. {a="jj", b="جّ"},
  635. {a="%^g%^g", b="جّ"},
  636. {a="%.h%.h", b="حّ"},
  637. {a="xx", b="خّ"},
  638. {a="%_h%_h", b="خّ"},
  639. {a="dd", b="دّ"},
  640. {a="%_d%_d", b="ذّ"},
  641. {a="rr", b="رّ"},
  642. {a="zz", b="زّ"},
  643. {a="ss", b="سّ"},
  644. {a="%^s%^s", b="شّ"},
  645. {a="%.s%.s", b="صّ"},
  646. {a="%.d%.d", b="ضّ"},
  647. {a="%.t%.t", b="طّ"},
  648. {a="%.z%.z", b="ظّ"},
  649. {a="%`%`", b="عّ"},
  650. {a="%.g%.g", b="غّ"},
  651. {a="ff", b="فّ"},
  652. {a="qq", b="قّ"},
  653. {a="kk", b="كّ"},
  654. {a="ll", b="لّ"},
  655. {a="mm", b="مّ"},
  656. {a="nn", b="نّ"},
  657. {a="hh", b="هّ"},
  658. {a="ww", b="وّ"},
  659. {a="yy", b="يّ"},
  660. {a="%.y%.y", b="ىّ"},
  661. -- additional characters + šaddah (begin)
  662. {a="pp", b="پّ"},
  663. {a="vv", b="ڤّ"},
  664. {a="gg", b="گّ"},
  665. {a="%^c%^c", b="چّ"},
  666. {a="%^z%^z", b="ژّ"},
  667. {a="%^n%^n", b="ڭّ"},
  668. -- additional characters + šaddah (end)
  669. -- sukūn begin
  670. -- first, take out hyphen if any (next two lines):
  671. {a="([ai]Y)%-([uaiUAI])", b="%1%2"},
  672. {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-([uaiUAI])", b="%1%2"},
  673. {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p*)$", b="%1ْ%2"},
  674. {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p*%s)", b="%1ْ%2"},
  675. {a="([ai]Y)([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"},
  676. {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"},
  677. -- take out sukūn in cases of assimilation
  678. {a="(n)(ْ)(%s)(ر)", b="%1%3%4"},
  679. {a="(n)(ْ)(%s)(و)", b="%1%3%4"},
  680. {a="(n)(ْ)(%s)(ي)", b="%1%3%4"},
  681. {a="(n)(ْ)(%s)(ل)", b="%1%3%4"},
  682. {a="(n)(ْ)(%s)(م)", b="%1%3%4"},
  683. {a="(n)(ْ)(%s)(ن)", b="%1%3%4"},
  684. {a="ْ\"", b="\""},
  685. -- sukūn end
  686. {a="_t", b="ث"},
  687. {a="%^g", b="ج"},
  688. {a="%.h", b="ح"},
  689. {a="_h", b="خ"},
  690. {a="_d", b="ذ"},
  691. {a="%^s", b="ش"},
  692. {a="%.s", b="ص"},
  693. {a="%.d", b="ض"},
  694. {a="%.t", b="ط"},
  695. {a="%.z", b="ظ"},
  696. {a="%.g", b="غ"},
  697. {a="%.y", b="ى"},
  698. -- additional characters (begin)
  699. {a="%^c", b="چ"},
  700. {a="%^z", b="ژ"},
  701. {a="%^n", b="ڭ"},
  702. -- additional characters (end)
  703. {a="(U)(A)", b="%1ا"},
  704. {a="WA", b="وْا"},
  705. {a="(a)W\"", b="%1وا"},
  706. {a="(a)W", b="%1وْا"},
  707. {a="_A", b="aى"},
  708. {a="_u", b="ٗ"},
  709. {a="_a", b="ٰ"},
  710. {a="_i", b="ٖ"},
  711. {a="%.b", b="ٮ"},
  712. {a="%.f", b="ڡ"},
  713. {a="%.q", b="ٯ"},
  714. {a="%.k", b="ک"},
  715. {a="%.n", b="ں"},
  716. {a="%^d", b="ڊ"}
  717. }
  718. digraphsfv = {
  719. -- iʿrāb: straight double quote must be discarded
  720. {a="(%-)(\"?[UI]na)(%p*%s)", b="%2%3"},
  721. {a="(%-)(\"?[UI]na)(%p*)$", b="%2%3"},
  722. {a="(%-)(\"?At[ui])(%p*%s)", b="%2%3"},
  723. {a="(%-)(\"?At[ui])(%p*)$", b="%2%3"},
  724. {a="(%-)(\"?Ani)(%p*%s)", b="%2%3"},
  725. {a="(%-)(\"?Ani)(%p*)$", b="%2%3"},
  726. {a="(%-)(\"?ayni)(%p*%s)", b="%2%3"},
  727. {a="(%-)(\"?ayni)(%p*)$", b="%2%3"},
  728. {a="(%-)(\"?[uai])(%p*%s)", b="%2%3"},
  729. {a="(%-)(\"?[uai])(%p*)$", b="%2%3"},
  730. -- ʾiʿrāb (end)
  731. -- initial straight double quote gives a connective ʾalif
  732. {a="^\"[uai]", b="ٱ"},
  733. {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p
  734. -- diphthongs to be resolved before ʾalif conjunctionis
  735. {a="(aW)(O)(\"?[uai])([%S]-O)", b="awuا"},
  736. {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p
  737. {a="(aw)(O)(\"?[uai])([%S]-O)", b="%1u"},
  738. {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p
  739. {a="(ay)(O)(\"?[uai])([%S]-O)", b="%1i"},
  740. {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p
  741. -- hyphen + initial alif without hamza
  742. -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"},
  743. {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)([%aأإؤئ])", b="%1ٱ%3%4"},
  744. -- initial alif without hamza (next 4 lines)
  745. {a="(O[%S]-)([uaiUAIY])(O)(\"?[uai])", b="ٱ"},
  746. {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p
  747. {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p
  748. {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p
  749. {a="%-%-", b="ـ"},
  750. {a="ؤؤ", b="ؤّ"},
  751. {a="أأ", b="أّ"},
  752. {a="ئئ", b="ئّ"},
  753. {a="bb", b="بّ"},
  754. {a="BB", b="ـّ"},
  755. {a="([%_%^%.])([tghdsz])([tghdsz])", b="%1%2|%3"},
  756. -- same as above for additional characters:
  757. {a="([%_%^%.])([cn])([cn])", b="%1%2|%3"},
  758. {a="tt", b="تّ"},
  759. {a="%_t%_t", b="ثّ"},
  760. {a="jj", b="جّ"},
  761. {a="%^g%^g", b="جّ"},
  762. {a="%.h%.h", b="حّ"},
  763. {a="xx", b="خّ"},
  764. {a="%_h%_h", b="خّ"},
  765. {a="dd", b="دّ"},
  766. {a="%_d%_d", b="ذّ"},
  767. {a="rr", b="رّ"},
  768. {a="zz", b="زّ"},
  769. {a="ss", b="سّ"},
  770. {a="%^s%^s", b="شّ"},
  771. {a="%.s%.s", b="صّ"},
  772. {a="%.d%.d", b="ضّ"},
  773. {a="%.t%.t", b="طّ"},
  774. {a="%.z%.z", b="ظّ"},
  775. {a="%`%`", b="عّ"},
  776. {a="%.g%.g", b="غّ"},
  777. {a="ff", b="فّ"},
  778. {a="qq", b="قّ"},
  779. {a="kk", b="كّ"},
  780. {a="ll", b="لّ"},
  781. {a="mm", b="مّ"},
  782. {a="nn", b="نّ"},
  783. {a="hh", b="هّ"},
  784. {a="ww", b="وّ"},
  785. {a="yy", b="يّ"},
  786. {a="%.y%.y", b="ىّ"},
  787. -- additional characters + šaddah (begin)
  788. {a="pp", b="پّ"},
  789. {a="vv", b="ڤّ"},
  790. {a="gg", b="گّ"},
  791. {a="%^c%^c", b="چّ"},
  792. {a="%^z%^z", b="ژّ"},
  793. {a="%^n%^n", b="ڭّ"},
  794. -- additional characters + šaddah (end)
  795. -- sukūn begin
  796. -- first, take out hyphen if any (next two lines):
  797. {a="([ai]Y)%-([uaiUAI])", b="%1%2"},
  798. {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-([uaiUAI])", b="%1%2"},
  799. {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p*)$", b="%1ْ%2"},
  800. {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p*%s)", b="%1ْ%2"},
  801. {a="([ai]Y)([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"},
  802. {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"},
  803. -- take out sukūn in cases of assimilation
  804. -- {a="(n)(ْ)(%s)(ر)", b="%1%3%4"},
  805. -- {a="(n)(ْ)(%s)(و)", b="%1%3%4"},
  806. -- {a="(n)(ْ)(%s)(ي)", b="%1%3%4"},
  807. -- {a="(n)(ْ)(%s)(ل)", b="%1%3%4"},
  808. -- {a="(n)(ْ)(%s)(م)", b="%1%3%4"},
  809. -- {a="(n)(ْ)(%s)(ن)", b="%1%3%4"},
  810. {a="ْ\"", b="\""},
  811. -- sukūn end
  812. {a="_t", b="ث"},
  813. {a="%^g", b="ج"},
  814. {a="%.h", b="ح"},
  815. {a="_h", b="خ"},
  816. {a="_d", b="ذ"},
  817. {a="%^s", b="ش"},
  818. {a="%.s", b="ص"},
  819. {a="%.d", b="ض"},
  820. {a="%.t", b="ط"},
  821. {a="%.z", b="ظ"},
  822. {a="%.g", b="غ"},
  823. {a="%.y", b="ى"},
  824. -- additional characters (begin)
  825. {a="%^c", b="چ"},
  826. {a="%^z", b="ژ"},
  827. {a="%^n", b="ڭ"},
  828. -- additional characters (end)
  829. {a="(U)(A)", b="%1ا"},
  830. {a="WA", b="وْا"},
  831. {a="(a)W\"", b="%1وا"},
  832. {a="(a)W", b="%1وْا"},
  833. {a="_A", b="aى"},
  834. {a="_u", b="ٗ"},
  835. {a="_a", b="ٰ"},
  836. {a="_i", b="ٖ"},
  837. {a="%.b", b="ٮ"},
  838. {a="%.f", b="ڡ"},
  839. {a="%.q", b="ٯ"},
  840. {a="%.k", b="ک"},
  841. {a="%.n", b="ں"},
  842. {a="%^d", b="ڊ"}
  843. }
  844. digraphsfveasy = { -- see the differences under 'easy' marker below
  845. -- ʾiʿrāb: straight double quote must be discarded
  846. {a="(%-)(\"?[UI]na)(%p*%s)", b="%2%3"},
  847. {a="(%-)(\"?[UI]na)(%p*)$", b="%2%3"},
  848. {a="(%-)(\"?At[ui])(%p*%s)", b="%2%3"},
  849. {a="(%-)(\"?At[ui])(%p*)$", b="%2%3"},
  850. {a="(%-)(\"?Ani)(%p*%s)", b="%2%3"},
  851. {a="(%-)(\"?Ani)(%p*)$", b="%2%3"},
  852. {a="(%-)(\"?ayni)(%p*%s)", b="%2%3"},
  853. {a="(%-)(\"?ayni)(%p*)$", b="%2%3"},
  854. {a="(%-)(\"?[uai])(%p*%s)", b="%2%3"},
  855. {a="(%-)(\"?[uai])(%p*)$", b="%2%3"},
  856. -- ʾiʿrāb (end)
  857. -- initial straight double quote gives a connective ʾalif
  858. {a="^\"[uai]", b="ٱ"},
  859. {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p
  860. -- diphthongs to be resolved before ʾalif conjunctionis
  861. {a="(aW)(O)(\"?[uai])([%S]-O)", b="awuا"},
  862. {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p
  863. {a="(aw)(O)(\"?[uai])([%S]-O)", b="%1u"},
  864. {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p
  865. {a="(ay)(O)(\"?[uai])([%S]-O)", b="%1i"},
  866. {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p
  867. -- hyphen + initial alif without hamza
  868. -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"},
  869. {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)([%aأإؤئ])", b="%1ٱ%3%4"},
  870. -- initial alif without hamza (next 4 lines)
  871. {a="(O[%S]-)([uaiUAIY])(O)(\"?[uai])", b="ٱ"},
  872. {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p
  873. {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p
  874. {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p
  875. {a="%-%-", b="ـ"},
  876. {a="ؤؤ", b="ؤّ"},
  877. {a="أأ", b="أّ"},
  878. {a="ئئ", b="ئّ"},
  879. {a="bb", b="بّ"},
  880. {a="BB", b="ـّ"},
  881. {a="([%_%^%.])([tghdsz])([tghdsz])", b="%1%2|%3"},
  882. -- same as above for additional characters:
  883. {a="([%_%^%.])([cn])([cn])", b="%1%2|%3"},
  884. {a="tt", b="تّ"},
  885. {a="%_t%_t", b="ثّ"},
  886. {a="jj", b="جّ"},
  887. {a="%^g%^g", b="جّ"},
  888. {a="%.h%.h", b="حّ"},
  889. {a="xx", b="خّ"},
  890. {a="%_h%_h", b="خّ"},
  891. {a="dd", b="دّ"},
  892. {a="%_d%_d", b="ذّ"},
  893. {a="rr", b="رّ"},
  894. {a="zz", b="زّ"},
  895. {a="ss", b="سّ"},
  896. {a="%^s%^s", b="شّ"},
  897. {a="%.s%.s", b="صّ"},
  898. {a="%.d%.d", b="ضّ"},
  899. {a="%.t%.t", b="طّ"},
  900. {a="%.z%.z", b="ظّ"},
  901. {a="%`%`", b="عّ"},
  902. {a="%.g%.g", b="غّ"},
  903. {a="ff", b="فّ"},
  904. {a="qq", b="قّ"},
  905. {a="kk", b="كّ"},
  906. {a="ll", b="لّ"},
  907. {a="mm", b="مّ"},
  908. {a="nn", b="نّ"},
  909. {a="hh", b="هّ"},
  910. {a="ww", b="وّ"},
  911. {a="yy", b="يّ"},
  912. {a="%.y%.y", b="ىّ"},
  913. -- additional characters + šaddah (begin)
  914. {a="pp", b="پّ"},
  915. {a="vv", b="ڤّ"},
  916. {a="gg", b="گّ"},
  917. {a="%^c%^c", b="چّ"},
  918. {a="%^z%^z", b="ژّ"},
  919. {a="%^n%^n", b="ڭّ"},
  920. -- additional characters + šaddah (end)
  921. -- sukūn begin ('easy' needs these rules to be taken out); but
  922. -- first take out every previously generated sukūn by hamza rules,
  923. -- so there be no need to edit them:
  924. {a="ْ", b=""},
  925. -- first, take out hyphen if any (next two lines):
  926. -- {a="([ai]Y)%-([uaiUAI])", b="%1%2"},
  927. -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-([uaiUAI])", b="%1%2"},
  928. -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p*)$", b="%1ْ%2"},
  929. -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p*%s)", b="%1ْ%2"},
  930. -- {a="([ai]Y)([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"},
  931. -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"},
  932. -- take out sukūn in cases of assimilation
  933. -- {a="(n)(ْ)(%s)(ر)", b="%1%3%4"},
  934. -- {a="(n)(ْ)(%s)(و)", b="%1%3%4"},
  935. -- {a="(n)(ْ)(%s)(ي)", b="%1%3%4"},
  936. -- {a="(n)(ْ)(%s)([ل])", b="%1%3%4"},
  937. -- {a="(n)(ْ)(%s)([م])", b="%1%3%4"},
  938. -- {a="(n)(ْ)(%s)([ن])", b="%1%3%4"},
  939. -- {a="ْ\"", b="\""},
  940. -- sukūn end
  941. {a="_t", b="ث"},
  942. {a="%^g", b="ج"},
  943. {a="%.h", b="ح"},
  944. {a="_h", b="خ"},
  945. {a="_d", b="ذ"},
  946. {a="%^s", b="ش"},
  947. {a="%.s", b="ص"},
  948. {a="%.d", b="ض"},
  949. {a="%.t", b="ط"},
  950. {a="%.z", b="ظ"},
  951. {a="%.g", b="غ"},
  952. {a="%.y", b="ى"},
  953. -- additional characters (begin)
  954. {a="%^c", b="چ"},
  955. {a="%^z", b="ژ"},
  956. {a="%^n", b="ڭ"},
  957. -- additional characters (end)
  958. {a="(U)(A)", b="%1ا"},
  959. {a="WA", b="وْا"},
  960. {a="(a)W\"", b="%1وا"},
  961. {a="(a)W", b="%1وْا"},
  962. {a="_A", b="aى"},
  963. {a="_u", b="ٗ"},
  964. {a="_a", b="ٰ"},
  965. {a="_i", b="ٖ"},
  966. {a="%.b", b="ٮ"},
  967. {a="%.f", b="ڡ"},
  968. {a="%.q", b="ٯ"},
  969. {a="%.k", b="ک"},
  970. {a="%.n", b="ں"},
  971. {a="%^d", b="ڊ"}
  972. }
  973. singlefv = {
  974. {a="b", b="ب"},
  975. {a="t", b="ت"},
  976. {a="j", b="ج"},
  977. {a="x", b="خ"},
  978. {a="d", b="د"},
  979. {a="r", b="ر"},
  980. {a="z", b="ز"},
  981. {a="s", b="س"},
  982. {a="f", b="ف"},
  983. {a="`", b="ع"},
  984. {a="f", b="ف"},
  985. {a="q", b="ق"},
  986. {a="k", b="ك"},
  987. {a="l", b="ل"},
  988. {a="m", b="م"},
  989. {a="n", b="ن"},
  990. {a="h", b="ه"},
  991. {a="w", b="و"},
  992. {a="y", b="ي"},
  993. {a="T", b="ة"},
  994. -- additional characters (begin)
  995. {a="p", b="پ"},
  996. {a="v", b="ڤ"},
  997. {a="g", b="گ"},
  998. -- additional characters (end)
  999. {a="\"$", b=""},
  1000. {a="\"(%W)", b="%1"},
  1001. {a="\"([^uaiUAI])", b="%1"},
  1002. {a="o", b="ْ"}, -- hard-coded sukūn
  1003. {a="([^0-9])%-([^0-9])", b="%1%2"},
  1004. {a="B", b="ـ"},
  1005. }
  1006. singlefveasy = { -- see the differences under 'easy' tag below
  1007. {a="b", b="ب"},
  1008. {a="t", b="ت"},
  1009. {a="j", b="ج"},
  1010. {a="x", b="خ"},
  1011. {a="d", b="د"},
  1012. {a="r", b="ر"},
  1013. {a="z", b="ز"},
  1014. {a="s", b="س"},
  1015. {a="f", b="ف"},
  1016. {a="`", b="ع"},
  1017. {a="f", b="ف"},
  1018. {a="q", b="ق"},
  1019. {a="k", b="ك"},
  1020. {a="l", b="ل"},
  1021. {a="m", b="م"},
  1022. {a="n", b="ن"},
  1023. {a="h", b="ه"},
  1024. {a="w", b="و"},
  1025. {a="y", b="ي"},
  1026. {a="T", b="ة"},
  1027. -- additional characters (begin)
  1028. {a="p", b="پ"},
  1029. {a="v", b="ڤ"},
  1030. {a="g", b="گ"},
  1031. -- additional characters (end)
  1032. -- easy (begin): \" needs to put back the sukūn
  1033. {a="\"$", b="ْ"},
  1034. {a="\"(%W)", b="ْ%1"},
  1035. {a="\"([^uaiUAI])", b="ْ%1"},
  1036. -- easy (end)
  1037. {a="([^0-9])%-([^0-9])", b="%1%2"},
  1038. {a="B", b="ـ"},
  1039. }