aboutsummaryrefslogtreecommitdiff
path: root/arabluatex_voc.lua
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-02-22 10:06:28 +0100
committerRobert Alessi <alessi@robertalessi.net>2016-02-22 10:06:28 +0100
commit041154d5339e42601ed04b6e2a23d53ffaae1022 (patch)
tree972514791a346666c2d77536646e298d7969a393 /arabluatex_voc.lua
downloadarabluatex-041154d5339e42601ed04b6e2a23d53ffaae1022.tar.gz
initial project version
Diffstat (limited to 'arabluatex_voc.lua')
-rw-r--r--arabluatex_voc.lua257
1 files changed, 257 insertions, 0 deletions
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua
new file mode 100644
index 0000000..6e712db
--- /dev/null
+++ b/arabluatex_voc.lua
@@ -0,0 +1,257 @@
1--[[
2This file is part of the `arabluatex' package
3
4copyright (C) 2016 Robert Alessi
5
6Please send error reports and suggestions for improvements to
7Robert Alessi <alessi@robertalessi.net>
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2202111-1307, USA.
23--]]
24
25numbers = {
26 {a="0", b="٠"},
27 {a="1", b="١"},
28 {a="2", b="٢"},
29 {a="3", b="٣"},
30 {a="4", b="٤"},
31 {a="5", b="٥"},
32 {a="6", b="٦"},
33 {a="7", b="٧"},
34 {a="8", b="٨"},
35 {a="9", b="٩"}
36}
37
38raw = {
39 {a="A", b="َا"},
40 {a="U", b="ُو"},
41 {a="I", b="ِي"},
42 {a="b", b="ب"},
43 {a="t", b="ت"},
44 {a="j", b="ج"},
45 {a="x", b="خ"},
46 {a="d", b="د"},
47 {a="r", b="ر"},
48 {a="z", b="ز"},
49 {a="s", b="س"},
50 {a="f", b="ف"},
51 {a="`", b="ع"},
52 {a="f", b="ف"},
53 {a="q", b="ق"},
54 {a="k", b="ك"},
55 {a="l", b="ل"},
56 {a="m", b="م"},
57 {a="n", b="ن"},
58 {a="h", b="ه"},
59 {a="w", b="و"},
60 {a="y", b="ي"},
61 {a="T", b="ة"},
62 {a="u", b="ُ"},
63 {a="a", b="َ"},
64 {a="i", b="ِ"}
65}
66
67hamza = {
68 -- initial long u
69 {a="%'%_U", b="أU"},
70 -- madda and its historic writing
71 {a="'A", b="آ"},
72 {a="(A)(')", b="aآء"},
73 -- initial (needs both ^ and %W patterns)
74 {a="^(')([ua])", b="أ%2"},
75 {a="^(')(i)", b="إ%2"},
76 {a="(%W)(')([ua])", b="%1أ%3"},
77 {a="(%W)(')(i)", b="%1إ%3"},
78 -- final
79 {a="([^uai])(')([uai]N?)$", b="%1ء%3"},
80 {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"},
81 {a="([UI])(')([uai])$", b="%1ء%3"},
82 {a="([UI])(')([uai])(%W)", b="%1ء%3%4"},
83 -- middle
84 {a="([UI])(')", b="%1ء"},
85 {a="([^uai])(')([uU])", b="%1ؤ%3"},
86 {a="([^uai])(')([aA])", b="%1أ%3"},
87 {a="([^uai])(')([iI])", b="%1ئ%3"},
88 {a="(u)(')([uU])", b="%1ؤ%3"},
89 {a="(u)(')([aA])", b="%1ؤ%3"},
90 {a="(u)(')([iI])", b="%1ئ%3"},
91 {a="(a)(')([aA])", b="%1أ%3"},
92 {a="(a)(')([uU])", b="%1ؤ%3"},
93 {a="(a)(')([iI])", b="%1ئ%3"},
94 {a="(i)(')([aA])", b="%1ئ%3"},
95 {a="(i)(')([uU])", b="%1ئ%3"},
96 {a="(i)(')([iI])", b="%1ئ%3"},
97 {a="(a)(')([^uaiUAI])", b="%1أ%3"},
98 {a="(u)(')([^uaiUAI])", b="%1ؤ%3"},
99 {a="(i)(')([^uaiUAI])", b="%1ئ%3"}
100}
101
102trigraphs = { -- trigraphs or more
103 -- al- + lām
104 {a="^(a)l%-(l)", b="ا%1ل%2%2"},
105 {a="(%s)(a)l%-(l)", b="%1ا%2ل%3%3"},
106 -- al- + solar consonant
107 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"},
108 {a="(%s)(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"},
109 -- assim. art. + solar consonant
110 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"},
111 {a="(%s)(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"},
112 -- al- + initial unstable hamza
113 {a="^(a)l%-([uai])", b="ا%1لا%2"},
114 {a="(%s)(a)l%-([uai])", b="%1ا%2لا%3"},
115 -- li- + art. + initial unstable hamza is a special orthography
116 {a="l(i)%-l%-([uai])", b="ل%1لا%2"},
117 -- al- + lunar consonant (i.e. what remains)
118 {a="^(a)l%-", b="ا%1ل"},
119 {a="(%s)(a)l%-", b="%1ا%2ل"},
120 -- art. with waṣla + lām
121 {a="'l%-(l)", b="ال%1%1"},
122 -- art. with waṣla + solar consonant
123 {a="'l%-([%_%^%.]?[tdrzsn])", b="ال%1%1"},
124 -- li- + art. + lām
125 {a="l(i)%-l%-(l)", b="ل%1ل%2%2"},
126 -- assim. art. with waṣla + solar consonant
127 {a="'([%_%^%.]?[tdrzsn])%-", b="ال%1"},
128 -- li- + art. + solar consonant is a special orthography
129 {a="l(i)%-l%-([%_%^%.]?[tdrzsn])", b="ل%1ل%2%2"},
130 -- li- + assim. art. + solar consonant is a special orthography
131 {a="l(i)%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3%3"},
132 -- art. with waṣla + initial unstable hamza
133 {a="'l%-([uai])", b="الا%1"},
134 -- art. with waṣla + lunar consonant (i.e. what remains)
135 {a="'l%-", b="ال"}
136}
137
138tanwin = {
139 {a="uN", b="ٌ"},
140 {a="(aN)(_A)", b="ًى"},
141 {a="(aN)(Y)", b="ًى"},
142 {a="(T)(aN)", b="%1ً"},
143 {a="([^TA])(aN)", b="%1ًا"},
144 {a="iN", b="ٍ"}
145}
146
147digraphs = {
148 {a="^([uai])", b="ا%1"}, -- initial alif without hamza
149 {a="(%s)([uai])", b="%1ا%2"}, -- initial alif without hamza
150 {a="%-%-", b="ـ"},
151 {a="bb", b="بّ"},
152 {a="BB", b="ـّ"},
153 {a="tt", b="تّ"},
154 {a="%_t%_t", b="ثّ"},
155 {a="jj", b="جّ"},
156 {a="%^g%^g", b="جّ"},
157 {a="xx", b="خّ"},
158 {a="%_h%_h", b="خّ"},
159 {a="dd", b="دّ"},
160 {a="%_d%_d", b="ذّ"},
161 {a="rr", b="رّ"},
162 {a="zz", b="زّ"},
163 {a="ss", b="سّ"},
164 {a="%^s%^s", b="شّ"},
165 {a="%.s%.s", b="صّ"},
166 {a="%.d%.d", b="ضّ"},
167 {a="%.t%.t", b="طّ"},
168 {a="%.z%.z", b="ظّ"},
169 {a="%`%`", b="عّ"},
170 {a="%.g%.g", b="غّ"},
171 {a="ff", b="فّ"},
172 {a="qq", b="قّ"},
173 {a="kk", b="كّ"},
174 {a="ll", b="لّ"},
175 {a="mm", b="مّ"},
176 {a="nn", b="نّ"},
177 {a="hh", b="هّ"},
178 {a="ww", b="وّ"},
179 {a="yy", b="يّ"},
180 {a="_t", b="ث"},
181 {a="%^g", b="ج"},
182 {a="%.h", b="ح"},
183 {a="_h", b="خ"},
184 {a="_d", b="ذ"},
185 {a="%^s", b="ش"},
186 {a="%.s", b="ص"},
187 {a="%.d", b="ض"},
188 {a="%.t", b="ط"},
189 {a="%.z", b="ظ"},
190 {a="%.g", b="غ"},
191 {a="(U)(A)", b="%1ا"},
192 {a="WA", b="وا"},
193 {a="(a)W", b="%1وا"},
194 {a="_A", b="aى"},
195 {a="_u", b="ٗ"},
196 {a="_a", b="ٰ"},
197 {a="_i", b="ٖ"},
198 {a="%.b", b="ٮ"},
199 {a="%.f", b="ڡ"},
200 {a="%.k", b="ک"},
201 {a="%.n", b="ں"}
202}
203
204single = {
205 {a="b", b="ب"},
206 {a="t", b="ت"},
207 {a="j", b="ج"},
208 {a="x", b="خ"},
209 {a="d", b="د"},
210 {a="r", b="ر"},
211 {a="z", b="ز"},
212 {a="s", b="س"},
213 {a="f", b="ف"},
214 {a="`", b="ع"},
215 {a="f", b="ف"},
216 {a="q", b="ق"},
217 {a="k", b="ك"},
218 {a="l", b="ل"},
219 {a="m", b="م"},
220 {a="n", b="ن"},
221 {a="h", b="ه"},
222 {a="w", b="و"},
223 {a="y", b="ي"},
224 {a="T", b="ة"},
225 {a="Y", b="aى"},
226 {a='"', b='ْ'},
227 {a="([^0-9])%-([^0-9])", b="%1%2"},
228 {a="B", b="ـ"}
229}
230
231longv = {
232 {a="A", b="َا"},
233 {a="U", b="ُو"},
234 {a="I", b="ِي"}
235}
236
237shortv = {
238 {a="u", b="ُ"},
239 {a="a", b="َ"},
240 {a="i", b="ِ"}
241}
242
243null = {
244 {a="%|", b=""}
245}
246
247-- return {
248-- raw = raw,
249-- hamza = hamza,
250-- trigraphs = trigraphs,
251-- tanwin = tanwin,
252-- digraphs = digraphs,
253-- single = single,
254-- longv = longv,
255-- shortv = shortv,
256-- null =null
257-- }