From aa160a2fb75d07c7575e7677a8450896044269d3 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Wed, 25 May 2016 18:52:33 +0200 Subject: =?UTF-8?q?implementation=20of=20=CA=BEi=CA=BFr=C4=81b=20=C4=A1ayr?= =?UTF-8?q?=20mun=E1=B9=A3arif=20(dmg=20mode)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arabluatex_voc.lua | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) (limited to 'arabluatex_voc.lua') diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua index 878f351..b7550e5 100644 --- a/arabluatex_voc.lua +++ b/arabluatex_voc.lua @@ -72,6 +72,8 @@ raw = { } hamza = { + -- next line for ʾiʿrāb hyphen + {a="(')(%-)([uaiUAI])", b="%1%3"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -91,7 +93,8 @@ hamza = { {a="'i'([^uaiUAI])", b="إI%1"}, -- madda (historic writing below) {a="'a'([^uaiUAI])", b="آ%1"}, - {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, +--tmp {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="([^UIui])'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, {a="(A)(')(uN?)$", b="aآء%3"}, {a="(A)(')(uN?)(%W)", b="aآء%3%4"}, {a="(A)(')(iN?)$", b="aآء%3"}, @@ -111,7 +114,7 @@ hamza = { {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, -- u - {a="(u)(')([uai]?N)$", b="%1ؤ%3"}, + {a="(u)(')([uai]N?)$", b="%1ؤ%3"}, {a="(u)(')([uai]N?)(%W)", b="%1ؤ%3%4"}, {a="(u)(')$", b="%1ؤ"}, {a="(u)(')(%W)", b="%1ؤ%3"}, @@ -155,6 +158,8 @@ hamza = { } hamzaeasy = { -- differences marked below with 'easy' + -- next line for ʾiʿrāb hyphen + {a="(')(%-)([uaiUAI])", b="%1%3"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -174,14 +179,17 @@ hamzaeasy = { -- differences marked below with 'easy' {a="'i'([^uaiUAI])", b="إI%1"}, -- madda (historic writing below) {a="'a'([^uaiUAI])", b="آ%1"}, - {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, ---easy {a="(A)(')(uN?)$", b="aآء%3"}, ---easy {a="(A)(')(uN?)(%W)", b="aآء%3%4"}, ---easy {a="(A)(')(iN?)$", b="aآء%3"}, ---easy {a="(A)(')(iN?)(%W)", b="aآء%3%4"}, ---easy {a="(A)(')(i)", b="aآئ%3"}, -- historic madda ---easy {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda ---easy {a="(A)(')", b="aآء"}, -- historic madda +--tmp {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="([^UIui])'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, + --easy (begin) + {a="(A)(')(uN?)$", b="aاء%3"}, + {a="(A)(')(uN?)(%W)", b="aاء%3%4"}, + {a="(A)(')(iN?)$", b="aاء%3"}, + {a="(A)(')(iN?)(%W)", b="aاء%3%4"}, + {a="(A)(')(i)", b="aائ%3"}, -- historic madda + {a="(A)(')(u)", b="aاؤ%3"}, -- historic madda + {a="(A)(')", b="aاء"}, -- historic madda + --easy (end) -- initial (needs both ^ and %W patterns) {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, @@ -194,7 +202,7 @@ hamzaeasy = { -- differences marked below with 'easy' {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, -- u - {a="(u)(')([uai]?N)$", b="%1ؤ%3"}, + {a="(u)(')([uai]N?)$", b="%1ؤ%3"}, {a="(u)(')([uai]N?)(%W)", b="%1ؤ%3%4"}, {a="(u)(')$", b="%1ؤ"}, {a="(u)(')(%W)", b="%1ؤ%3"}, @@ -424,11 +432,25 @@ trigraphseasy = { -- differences marked below with 'easy' } digraphs = { + -- ʾiʿrāb: straight double quote must be discarded + {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?)$", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?)$", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?)$", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?)$", b="%2%3"}, + -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, {a="([%s%-])\"[uai]", b="%1ٱ"}, {a="(aW)(%s)([uai])", b="awuا%2%3"}, - {a="(%-)([uai])", b="%1ا%2"}, -- hyphen + initial alif without hamza +--tmp-out {a="(%-)([uai])", b="%1ا%2"}, -- hyphen + initial alif without hamza + --tmp-added hyphen + initial alif without hamza: + {a="(%-)([uai])([%^%_%.%`]?)(%a)", b="%1ا%2%3%4"}, {a="^([uai])", b="ا%1"}, -- initial alif without hamza {a="(%s)([uai])", b="%1ا%2"}, -- initial alif without hamza {a="%-%-", b="ـ"}, -- cgit v1.2.3