aboutsummaryrefslogtreecommitdiff
path: root/arabluatex_fullvoc.lua
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-02-24 20:27:29 +0100
committerRobert Alessi <alessi@robertalessi.net>2016-02-24 20:27:29 +0100
commitefb07927d995efbc33822ba447b2beed2b31ef5a (patch)
tree09034a7ee8f77160474e7f3d234078e8a4bf3afe /arabluatex_fullvoc.lua
parent7ee8fb4914d081905c7a927ea3caf45f1ead9060 (diff)
downloadarabluatex-efb07927d995efbc33822ba447b2beed2b31ef5a.tar.gz
first implementation of fullvoc tables
Diffstat (limited to 'arabluatex_fullvoc.lua')
-rw-r--r--arabluatex_fullvoc.lua267
1 files changed, 267 insertions, 0 deletions
diff --git a/arabluatex_fullvoc.lua b/arabluatex_fullvoc.lua
new file mode 100644
index 0000000..9a6f35a
--- /dev/null
+++ b/arabluatex_fullvoc.lua
@@ -0,0 +1,267 @@
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
67-- this will eventually be new
68hamzafv = {
69 -- initial long u
70 {a="%'%_U", b="أU"},
71 -- madda (historic writing below)
72 {a="'A", b="آ"},
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="(A)(')(i)", b="aآئ%3"}, -- historic madda
85 {a="(A)(')", b="aآء"}, -- historic madda
86 {a="([UI])(')", b="%1ء"},
87 {a="([^uai])(')([uU])", b="%1ؤ%3"},
88 {a="([^uai])(')([aA])", b="%1أ%3"},
89 {a="([^uai])(')([iI])", b="%1ئ%3"},
90 {a="(u)(')([uU])", b="%1ؤ%3"},
91 {a="(u)(')([aA])", b="%1ؤ%3"},
92 {a="(u)(')([iI])", b="%1ئ%3"},
93 {a="(a)(')([aA])", b="%1أ%3"},
94 {a="(a)(')([uU])", b="%1ؤ%3"},
95 {a="(a)(')([iI])", b="%1ئ%3"},
96 {a="(i)(')([aA])", b="%1ئ%3"},
97 {a="(i)(')([uU])", b="%1ئ%3"},
98 {a="(i)(')([iI])", b="%1ئ%3"},
99 {a="(a)(')([^uaiUAI])", b="%1أ%3"},
100 {a="(u)(')([^uaiUAI])", b="%1ؤ%3"},
101 {a="(i)(')([^uaiUAI])", b="%1ئ%3"}
102}
103
104trigraphs = { -- trigraphs or more
105 -- 'llatI / 'llad_I
106 {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"},
107 {a="(%s)'ll(a)([%_]?[dt])", b="%1الّ%2%3"},
108 -- al- + lām
109 {a="^(a)l%-(l)", b="ا%1ل%2%2"},
110 {a="(%s)(a)l%-(l)", b="%1ا%2ل%3%3"},
111 -- al- + solar consonant
112 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"},
113 {a="(%s)(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"},
114 -- assim. art. + solar consonant
115 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"},
116 {a="(%s)(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"},
117 -- al- + initial unstable hamza
118 {a="^(a)l%-([uai])", b="ا%1لا%2"},
119 {a="(%s)(a)l%-([uai])", b="%1ا%2لا%3"},
120 -- li- + art. + initial unstable hamza is a special orthography
121 {a="l(i)%-l%-([uai])", b="ل%1لا%2"},
122 -- al- + lunar consonant (i.e. what remains)
123 {a="^(a)l%-", b="ا%1ل"},
124 {a="(%s)(a)l%-", b="%1ا%2ل"},
125 -- art. with waṣla + lām
126 {a="'l%-(l)", b="ال%1%1"},
127 -- art. with waṣla + solar consonant
128 {a="'l%-([%_%^%.]?[tdrzsn])", b="ال%1%1"},
129 -- li- + art. + lām
130 {a="l(i)%-l%-(l)", b="ل%1ل%2%2"},
131 -- assim. art. with waṣla + solar consonant
132 {a="'([%_%^%.]?[tdrzsn])%-", b="ال%1"},
133 -- li- + art. + solar consonant is a special orthography
134 {a="l(i)%-l%-([%_%^%.]?[tdrzsn])", b="ل%1ل%2%2"},
135 -- li- + assim. art. + solar consonant is a special orthography
136 {a="l(i)%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3%3"},
137 -- art. with waṣla + initial unstable hamza
138 {a="'l%-([uai])", b="الا%1"},
139 -- art. with waṣla + lunar consonant (i.e. what remains)
140 {a="'l%-", b="ال"}
141}
142
143tanwin = {
144 {a="uN", b="ٌ"},
145 {a="(aN)(_A)", b="ًى"},
146 {a="(aN)(Y)", b="ًى"},
147 {a="(T)(aN)", b="%1ً"},
148 {a="([^TA])(aN)", b="%1ًا"},
149 {a="iN", b="ٍ"}
150}
151
152-- this is new
153digraphsfv = {
154 {a="^([uai])", b="ا%1"}, -- initial alif without hamza
155 {a="(%s)([uai])", b="%1ا%2"}, -- initial alif without hamza
156 {a="%-%-", b="ـ"},
157 {a="bb", b="بّ"},
158 {a="BB", b="ـّ"},
159 {a="tt", b="تّ"},
160 {a="%_t%_t", b="ثّ"},
161 {a="jj", b="جّ"},
162 {a="%^g%^g", b="جّ"},
163 {a="xx", b="خّ"},
164 {a="%_h%_h", b="خّ"},
165 {a="dd", b="دّ"},
166 {a="%_d%_d", b="ذّ"},
167 {a="rr", b="رّ"},
168 {a="zz", b="زّ"},
169 {a="ss", b="سّ"},
170 {a="%^s%^s", b="شّ"},
171 {a="%.s%.s", b="صّ"},
172 {a="%.d%.d", b="ضّ"},
173 {a="%.t%.t", b="طّ"},
174 {a="%.z%.z", b="ظّ"},
175 {a="%`%`", b="عّ"},
176 {a="%.g%.g", b="غّ"},
177 {a="ff", b="فّ"},
178 {a="qq", b="قّ"},
179 {a="kk", b="كّ"},
180 {a="ll", b="لّ"},
181 {a="mm", b="مّ"},
182 {a="nn", b="نّ"},
183 {a="hh", b="هّ"},
184 {a="ww", b="وّ"},
185 {a="yy", b="يّ"},
186 -- sukūn end
187 {a="([%_%^%.]?[btjghxdzs%`fqklmnwy])([%s])", b="%1ْ%2"},
188 {a="([%_%^%.]?[btjghxdzs%`fqklmnwy])([^%_uaiUAIًٌٍ])", b="%1ْ%2"},
189 -- sukūn end
190 {a="_t", b="ث"},
191 {a="%^g", b="ج"},
192 {a="%.h", b="ح"},
193 {a="_h", b="خ"},
194 {a="_d", b="ذ"},
195 {a="%^s", b="ش"},
196 {a="%.s", b="ص"},
197 {a="%.d", b="ض"},
198 {a="%.t", b="ط"},
199 {a="%.z", b="ظ"},
200 {a="%.g", b="غ"},
201 {a="(U)(A)", b="%1ا"},
202 {a="WA", b="وا"},
203 {a="(a)W", b="%1وا"},
204 {a="_A", b="aى"},
205 {a="_u", b="ٗ"},
206 {a="_a", b="ٰ"},
207 {a="_i", b="ٖ"},
208 {a="%.b", b="ٮ"},
209 {a="%.f", b="ڡ"},
210 {a="%.k", b="ک"},
211 {a="%.n", b="ں"}
212}
213
214single = {
215 {a="b", b="ب"},
216 {a="t", b="ت"},
217 {a="j", b="ج"},
218 {a="x", b="خ"},
219 {a="d", b="د"},
220 {a="r", b="ر"},
221 {a="z", b="ز"},
222 {a="s", b="س"},
223 {a="f", b="ف"},
224 {a="`", b="ع"},
225 {a="f", b="ف"},
226 {a="q", b="ق"},
227 {a="k", b="ك"},
228 {a="l", b="ل"},
229 {a="m", b="م"},
230 {a="n", b="ن"},
231 {a="h", b="ه"},
232 {a="w", b="و"},
233 {a="y", b="ي"},
234 {a="T", b="ة"},
235 {a="Y", b="aى"},
236 {a='"', b='ْ'},
237 {a="([^0-9])%-([^0-9])", b="%1%2"},
238 {a="B", b="ـ"}
239}
240
241longv = {
242 {a="A", b="َا"},
243 {a="U", b="ُو"},
244 {a="I", b="ِي"}
245}
246
247shortv = {
248 {a="u", b="ُ"},
249 {a="a", b="َ"},
250 {a="i", b="ِ"}
251}
252
253null = {
254 {a="%|", b=""}
255}
256
257-- return {
258-- raw = raw,
259-- hamza = hamza,
260-- trigraphs = trigraphs,
261-- tanwin = tanwin,
262-- digraphs = digraphs,
263-- single = single,
264-- longv = longv,
265-- shortv = shortv,
266-- null =null
267-- }