comparison software/mpdl-services/mpiwg-mpdl-lt/bin/de/mpg/mpiwg/berlin/mpdl/lt/text/transcode/Betacode2Unicode.lex @ 23:e845310098ba

diverse Korrekturen
author Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de>
date Tue, 27 Nov 2012 12:35:19 +0100
parents
children
comparison
equal deleted inserted replaced
22:6a45a982c333 23:e845310098ba
1 package de.mpg.mpiwg.berlin.mpdl.lt.general;
2
3 %%
4 %{
5 /*
6 * Betacode to Unicode conversion
7 */
8
9 private String toUnicode(int in) {
10 char c = (char) in;
11 Character ch = new Character(c);
12 String retString = ch.toString();
13 return retString;
14 }
15
16 %}
17
18 %class Betacode2UnicodeLex
19 %public
20 %type java.lang.String
21 %unicode
22 %%
23
24
25 "<"[^>]+">" { return yytext(); }
26
27 "*j" { return "H"; }
28 "j" { return "h"; }
29 "*v" { return "F"; }
30 "v" { return "f"; }
31 "*s" { return toUnicode(0x03a3); }
32
33 "!" { return "."; }
34 ":" { return toUnicode(0x00B7); } /* MPDL update */
35
36 "a)" { return toUnicode(0x1F00); }
37 "a(" { return toUnicode(0x1F01); }
38 "a)\\" { return toUnicode(0x1F02); }
39 "a(\\" { return toUnicode(0x1F03); }
40 "a)/" { return toUnicode(0x1F04); }
41 "a(/" { return toUnicode(0x1F05); }
42 "a)=" { return toUnicode(0x1F06); }
43 "a(=" { return toUnicode(0x1F07); }
44 "*)a" { return toUnicode(0x1F08); }
45 "*(a" { return toUnicode(0x1F09); }
46 "*)\\a" { return toUnicode(0x1F0A); }
47 "*(\\a" { return toUnicode(0x1F0B); }
48 "*)/a" { return toUnicode(0x1F0C); }
49 "*(/a" { return toUnicode(0x1F0D); }
50 "*)=a" { return toUnicode(0x1F0E); }
51 "*(=a" { return toUnicode(0x1F0F); }
52 "e)" { return toUnicode(0x1F10); }
53 "e(" { return toUnicode(0x1F11); }
54 "e)\\" { return toUnicode(0x1F12); }
55 "e(\\" { return toUnicode(0x1F13); }
56 "e)/" { return toUnicode(0x1F14); }
57 "e(/" { return toUnicode(0x1F15); }
58 "*)e" { return toUnicode(0x1F18); }
59 "*(e" { return toUnicode(0x1F19); }
60 "*)\\e" { return toUnicode(0x1F1A); }
61 "*(\\e" { return toUnicode(0x1F1B); }
62 "*)/e" { return toUnicode(0x1F1C); }
63 "*(/e" { return toUnicode(0x1F1D); }
64 "h)" { return toUnicode(0x1F20); }
65 "h(" { return toUnicode(0x1F21); }
66 "h)\\" { return toUnicode(0x1F22); }
67 "h(\\" { return toUnicode(0x1F23); }
68 "h)/" { return toUnicode(0x1F24); }
69 "h(/" { return toUnicode(0x1F25); }
70 "h)=" { return toUnicode(0x1F26); }
71 "h(=" { return toUnicode(0x1F27); }
72 "*)h" { return toUnicode(0x1F28); }
73 "*(h" { return toUnicode(0x1F29); }
74 "*)\\h" { return toUnicode(0x1F2A); }
75 "*(\\h" { return toUnicode(0x1F2B); }
76 "*)/h" { return toUnicode(0x1F2C); }
77 "*(/h" { return toUnicode(0x1F2D); }
78 "*)=h" { return toUnicode(0x1F2E); }
79 "*(=h" { return toUnicode(0x1F2F); }
80 "i)" { return toUnicode(0x1F30); }
81 "i(" { return toUnicode(0x1F31); }
82 "i)\\" { return toUnicode(0x1F32); }
83 "i(\\" { return toUnicode(0x1F33); }
84 "i)/" { return toUnicode(0x1F34); }
85 "i(/" { return toUnicode(0x1F35); }
86 "i)=" { return toUnicode(0x1F36); }
87 "i(=" { return toUnicode(0x1F37); }
88 "*)i" { return toUnicode(0x1F38); }
89 "*(i" { return toUnicode(0x1F39); }
90 "*)\\i" { return toUnicode(0x1F3A); }
91 "*(\\i" { return toUnicode(0x1F3B); }
92 "*)/i" { return toUnicode(0x1F3C); }
93 "*(/i" { return toUnicode(0x1F3D); }
94 "*)=i" { return toUnicode(0x1F3E); }
95 "*(=i" { return toUnicode(0x1F3F); }
96 "o)" { return toUnicode(0x1F40); }
97 "o(" { return toUnicode(0x1F41); }
98 "o)\\" { return toUnicode(0x1F42); }
99 "o(\\" { return toUnicode(0x1F43); }
100 "o)/" { return toUnicode(0x1F44); }
101 "o(/" { return toUnicode(0x1F45); }
102 "*)o" { return toUnicode(0x1F48); }
103 "*(o" { return toUnicode(0x1F49); }
104 "*)\\o" { return toUnicode(0x1F4A); }
105 "*(\\o" { return toUnicode(0x1F4B); }
106 "*)/o" { return toUnicode(0x1F4C); }
107 "*(/o" { return toUnicode(0x1F4D); }
108 "u)" { return toUnicode(0x1F50); }
109 "u(" { return toUnicode(0x1F51); }
110 "u)\\" { return toUnicode(0x1F52); }
111 "u(\\" { return toUnicode(0x1F53); }
112 "u)/" { return toUnicode(0x1F54); }
113 "u(/" { return toUnicode(0x1F55); }
114 "u)=" { return toUnicode(0x1F56); }
115 "u(=" { return toUnicode(0x1F57); }
116 "*(u" { return toUnicode(0x1F59); }
117 "*(\\u" { return toUnicode(0x1F5B); }
118 "*(/u" { return toUnicode(0x1F5D); }
119 "*(=u" { return toUnicode(0x1F5F); }
120 "w)" { return toUnicode(0x1F60); }
121 "w(" { return toUnicode(0x1F61); }
122 "w)\\" { return toUnicode(0x1F62); }
123 "w(\\" { return toUnicode(0x1F63); }
124 "w)/" { return toUnicode(0x1F64); }
125 "w(/" { return toUnicode(0x1F65); }
126 "w)=" { return toUnicode(0x1F66); }
127 "w(=" { return toUnicode(0x1F67); }
128 "*)w" { return toUnicode(0x1F68); }
129 "*(w" { return toUnicode(0x1F69); }
130 "*)\\w" { return toUnicode(0x1F6A); }
131 "*(\\w" { return toUnicode(0x1F6B); }
132 "*)/w" { return toUnicode(0x1F6C); }
133 "*(/w" { return toUnicode(0x1F6D); }
134 "*)=w" { return toUnicode(0x1F6E); }
135 "*(=w" { return toUnicode(0x1F6F); }
136 "a\\" { return toUnicode(0x1F70); }
137 "a/" { return toUnicode(0x1F71); }
138 "e\\" { return toUnicode(0x1F72); }
139 "e/" { return toUnicode(0x1F73); }
140 "h\\" { return toUnicode(0x1F74); }
141 "h/" { return toUnicode(0x1F75); }
142 "i\\" { return toUnicode(0x1F76); }
143 "i/" { return toUnicode(0x1F77); }
144 "o\\" { return toUnicode(0x1F78); }
145 "o/" { return toUnicode(0x1F79); }
146 "u\\" { return toUnicode(0x1F7A); }
147 "u/" { return toUnicode(0x1F7B); }
148 "w\\" { return toUnicode(0x1F7C); }
149 "w/" { return toUnicode(0x1F7D); }
150 "a)|" { return toUnicode(0x1F80); }
151 "a(|" { return toUnicode(0x1F81); }
152 "a)\\|" { return toUnicode(0x1F82); }
153 "a(\\|" { return toUnicode(0x1F83); }
154 "a)/|" { return toUnicode(0x1F84); }
155 "a(/|" { return toUnicode(0x1F85); }
156 "a)=|" { return toUnicode(0x1F86); }
157 "a(=|" { return toUnicode(0x1F87); }
158 "*)|a" { return toUnicode(0x1F88); }
159 "*(|a" { return toUnicode(0x1F89); }
160 "*)\\|a" { return toUnicode(0x1F8A); }
161 "*(\\|a" { return toUnicode(0x1F8B); }
162 "*)/|a" { return toUnicode(0x1F8C); }
163 "*(/|a" { return toUnicode(0x1F8D); }
164 "*)=|a" { return toUnicode(0x1F8E); }
165 "*(=|a" { return toUnicode(0x1F8F); }
166 "h)|" { return toUnicode(0x1F90); }
167 "h(|" { return toUnicode(0x1F91); }
168 "h)\\|" { return toUnicode(0x1F92); }
169 "h(\\|" { return toUnicode(0x1F93); }
170 "h)/|" { return toUnicode(0x1F94); }
171 "h(/|" { return toUnicode(0x1F95); }
172 "h)=|" { return toUnicode(0x1F96); }
173 "h(=|" { return toUnicode(0x1F97); }
174 "*)|h" { return toUnicode(0x1F98); }
175 "*(|h" { return toUnicode(0x1F99); }
176 "*)\\|h" { return toUnicode(0x1F9A); }
177 "*(\\|h" { return toUnicode(0x1F9B); }
178 "*)/|h" { return toUnicode(0x1F9C); }
179 "*(/|h" { return toUnicode(0x1F9D); }
180 "*)=|h" { return toUnicode(0x1F9E); }
181 "*(=|h" { return toUnicode(0x1F9F); }
182 "w)|" { return toUnicode(0x1FA0); }
183 "w(|" { return toUnicode(0x1FA1); }
184 "w)\\|" { return toUnicode(0x1FA2); }
185 "w(\\|" { return toUnicode(0x1FA3); }
186 "w)/|" { return toUnicode(0x1FA4); }
187 "w(/|" { return toUnicode(0x1FA5); }
188 "w)=|" { return toUnicode(0x1FA6); }
189 "w(=|" { return toUnicode(0x1FA7); }
190 "*)|w" { return toUnicode(0x1FA8); }
191 "*(|w" { return toUnicode(0x1FA9); }
192 "*)\\|w" { return toUnicode(0x1FAA); }
193 "*(\\|w" { return toUnicode(0x1FAB); }
194 "*)/|w" { return toUnicode(0x1FAC); }
195 "*(/|w" { return toUnicode(0x1FAD); }
196 "*)=|w" { return toUnicode(0x1FAE); }
197 "*(=|w" { return toUnicode(0x1FAF); }
198 "a^" { return toUnicode(0x1FB0); }
199 "a_" { return toUnicode(0x1FB1); }
200 "a\\|" { return toUnicode(0x1FB2); }
201 "a|" { return toUnicode(0x1FB3); }
202 "a/|" { return toUnicode(0x1FB4); }
203 "a=" { return toUnicode(0x1FB6); }
204 "a=|" { return toUnicode(0x1FB7); }
205 "*a^" { return toUnicode(0x1FB8); }
206 "*a_" { return toUnicode(0x1FB9); }
207 "*a\\" { return toUnicode(0x1FBA); }
208 "*a/" { return toUnicode(0x1FBB); }
209 "*a|" { return toUnicode(0x1FBC); }
210 "h\\|" { return toUnicode(0x1FC2); }
211 "h|" { return toUnicode(0x1FC3); }
212 "h/|" { return toUnicode(0x1FC4); }
213 "h=" { return toUnicode(0x1FC6); }
214 "h=|" { return toUnicode(0x1FC7); }
215 "*e\\" { return toUnicode(0x1FC8); }
216 "*e/" { return toUnicode(0x1FC9); }
217 "*h\\" { return toUnicode(0x1FCA); }
218 "*h/" { return toUnicode(0x1FCB); }
219 "*h|" { return toUnicode(0x1FCC); }
220 "i^" { return toUnicode(0x1FD0); }
221 "i_" { return toUnicode(0x1FD1); }
222 "i+\\" { return toUnicode(0x1FD2); }
223 "i+/" { return toUnicode(0x1FD3); }
224 "i=" { return toUnicode(0x1FD6); }
225 "i+=" { return toUnicode(0x1FD7); }
226 "*i^" { return toUnicode(0x1FD8); }
227 "*i_" { return toUnicode(0x1FD9); }
228 "*i\\" { return toUnicode(0x1FDA); }
229 "*i/" { return toUnicode(0x1FDB); }
230 "u^" { return toUnicode(0x1FE0); }
231 "u_" { return toUnicode(0x1FE1); }
232 "u+\\" { return toUnicode(0x1FE2); }
233 "u+/" { return toUnicode(0x1FE3); }
234 "r)" { return toUnicode(0x1FE4); }
235 "r(" { return toUnicode(0x1FE5); }
236 "u=" { return toUnicode(0x1FE6); }
237 "u+=" { return toUnicode(0x1FE7); }
238 "*u^" { return toUnicode(0x1FE8); }
239 "*u_" { return toUnicode(0x1FE9); }
240 "*u\\" { return toUnicode(0x1FEA); }
241 "*u/" { return toUnicode(0x1FEB); }
242 "*(r" { return toUnicode(0x1FEC); }
243 "w\\|" { return toUnicode(0x1FF2); }
244 "w|" { return toUnicode(0x1FF3); }
245 "w/|" { return toUnicode(0x1FF4); }
246 "*w\\" { return toUnicode(0x1FFA); }
247 "*w/" { return toUnicode(0x1FFB); }
248 "*w|" { return toUnicode(0x1FFC); }
249 "w=" { return toUnicode(0x1FF6); }
250 "w=|" { return toUnicode(0x1FF7); }
251 "*o\\" { return toUnicode(0x1FF8); }
252 "*o/" { return toUnicode(0x1FF9); }
253
254 "\\" { return toUnicode(0x0300); }
255 "/" { return toUnicode(0x0301); }
256 "_" { return toUnicode(0x0304); }
257 "^" { return toUnicode(0x0306); }
258 "+" { return toUnicode(0x0308); }
259 "=" { return toUnicode(0x0302); }
260 ")" { return toUnicode(0x0313); }
261 "(" { return toUnicode(0x0314); }
262 "?" { return toUnicode(0x0323); }
263 "|" { return toUnicode(0x0345); }
264
265 "a" { return toUnicode(0x03b1); } /* MPDL update */
266 "*a" { return toUnicode(0x0391); } /* MPDL update */
267 "b" { return toUnicode(0x03b2); } /* MPDL update */
268 "*b" { return toUnicode(0x0392); } /* MPDL update */
269 "g" { return toUnicode(0x03b3); } /* MPDL update */
270 "*g" { return toUnicode(0x0393); } /* MPDL update */
271 "d" { return toUnicode(0x03b4); } /* MPDL update */
272 "*d" { return toUnicode(0x0394); } /* MPDL update */
273 "e" { return toUnicode(0x03b5); } /* MPDL update */
274 "*e" { return toUnicode(0x0395); } /* MPDL update */
275 "z" { return toUnicode(0x03b6); } /* MPDL update */
276 "*z" { return toUnicode(0x0396); } /* MPDL update */
277 "h" { return toUnicode(0x03b7); } /* MPDL update */
278 "*h" { return toUnicode(0x0397); } /* MPDL update */
279 "q" { return toUnicode(0x03b8); } /* MPDL update */
280 "*q" { return toUnicode(0x0398); } /* MPDL update */
281 "i" { return toUnicode(0x03b9); } /* MPDL update */
282 "*i" { return toUnicode(0x0399); } /* MPDL update */
283 "k" { return toUnicode(0x03ba); } /* MPDL update */
284 "*k" { return toUnicode(0x039a); } /* MPDL update */
285 "l" { return toUnicode(0x03bb); } /* MPDL update */
286 "*l" { return toUnicode(0x039b); } /* MPDL update */
287 "m" { return toUnicode(0x03bc); } /* MPDL update */
288 "*m" { return toUnicode(0x039c); } /* MPDL update */
289 "n" { return toUnicode(0x03bd); } /* MPDL update */
290 "*n" { return toUnicode(0x039d); } /* MPDL update */
291 "c" { return toUnicode(0x03be); } /* MPDL update */
292 "*c" { return toUnicode(0x039e); } /* MPDL update */
293 "o" { return toUnicode(0x03bf); } /* MPDL update */
294 "*o" { return toUnicode(0x039f); } /* MPDL update */
295 "p" { return toUnicode(0x03c0); } /* MPDL update */
296 "*p" { return toUnicode(0x03a0); } /* MPDL update */
297 "r" { return toUnicode(0x03c1); } /* MPDL update */
298 "*r" { return toUnicode(0x03a1); } /* MPDL update */
299
300 "*s" { return toUnicode(0x03a3); } /* MPDL update */
301 "s1" { return toUnicode(0x03c3); } /* mdh 2002-01-07 */
302 "s"/\-\- { return toUnicode(0x03c2); }
303 "s"/\&gt; }[a-z\?\!0-9*=\/()\'\-] { return toUnicode(0x03c3); } /* MPDL update */
304 "s"/\&lt; { return toUnicode(0x03c2); } /* MPDL update */
305 "s"/[\[\]][a-z\?\!0-9*=\/()\'\-] { return toUnicode(0x03c3); } /* MPDL update */
306 "s"/\??[^a-z0-9*=\/()\'\-\[\?] { return toUnicode(0x03c2); }
307 "s" { return toUnicode(0x03c3); } /* MPDL update */
308
309 "t" { return toUnicode(0x03c4); } /* MPDL update */
310 "*t" { return toUnicode(0x03a4); } /* MPDL update */
311 "u" { return toUnicode(0x03c5); } /* MPDL update */
312 "*u" { return toUnicode(0x03a5); } /* MPDL update */
313 "f" { return toUnicode(0x03c6); } /* MPDL update */
314 "*f" { return toUnicode(0x03a6); } /* MPDL update */
315 "x" { return toUnicode(0x03c7); } /* MPDL update */
316 "*x" { return toUnicode(0x03a7); } /* MPDL update */
317 "y" { return toUnicode(0x03c8); } /* MPDL update */
318 "*y" { return toUnicode(0x03a8); } /* MPDL update */
319 "w" { return toUnicode(0x03c9); } /* MPDL update */
320 "*w" { return toUnicode(0x03a9); } /* MPDL update */
321
322 [\&_]"vert;" { return "|"; }
323 [\&_]"lpar;" { return "("; }
324 [\&_]"rpar;" { return ")"; }
325 [\_\&]"lt;" { return "&lt;"; }
326 [\_\&]"gt;" { return "&gt;"; }
327 "&#039;" { return "'"; } /* MPDL update */
328
329 "&"[a-zA-Z]+";" { return yytext(); }
330
331 . { return yytext(); }
332 \n { return yytext(); }