Mercurial > hg > mpdl-group
comparison software/mpdl-services/mpiwg-mpdl-lt/src/de/mpg/mpiwg/berlin/mpdl/lt/text/transcode/Unicode2BuckwalterLex.java @ 19:4a3641ae14d2
Erstellung
author | Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 09 Nov 2011 15:32:05 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
18:dc5e9fcb3fdc | 19:4a3641ae14d2 |
---|---|
1 /* The following code was generated by JFlex 1.4.3 on 14.12.10 17:12 */ | |
2 | |
3 package de.mpg.mpiwg.berlin.mpdl.lt.text.transcode; | |
4 | |
5 | |
6 /** | |
7 * This class is a scanner generated by | |
8 * <a href="http://www.jflex.de/">JFlex</a> 1.4.3 | |
9 * on 14.12.10 17:12 from the specification file | |
10 * <tt>/Users/jwillenborg/test/jflex/Unicode2Buckwalter.lex</tt> | |
11 */ | |
12 public class Unicode2BuckwalterLex { | |
13 | |
14 /** This character denotes the end of file */ | |
15 public static final int YYEOF = -1; | |
16 | |
17 /** initial size of the lookahead buffer */ | |
18 private static final int ZZ_BUFFERSIZE = 16384; | |
19 | |
20 /** lexical states */ | |
21 public static final int YYINITIAL = 0; | |
22 | |
23 /** | |
24 * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l | |
25 * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l | |
26 * at the beginning of a line | |
27 * l is of the form l = 2*k, k a non negative integer | |
28 */ | |
29 private static final int ZZ_LEXSTATE[] = { | |
30 0, 0 | |
31 }; | |
32 | |
33 /** | |
34 * Translates characters to character classes | |
35 */ | |
36 private static final String ZZ_CMAP_PACKED = | |
37 "\12\0\1\0\30\0\1\120\2\0\1\117\11\0\1\121\2\0\1\122"+ | |
38 "\5\0\1\123\1\0\1\112\1\1\1\0\1\2\2\0\32\124\4\0"+ | |
39 "\1\105\1\0\1\115\3\124\1\107\1\124\1\116\4\124\1\113\3\124"+ | |
40 "\1\114\1\124\1\110\1\124\1\111\1\124\1\106\4\124\u05a4\0\1\71"+ | |
41 "\1\0\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\12\1\13"+ | |
42 "\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\23\1\24\1\25"+ | |
43 "\1\26\1\27\1\30\1\31\1\32\1\33\1\34\5\0\1\35\1\36"+ | |
44 "\1\37\1\40\1\41\1\42\1\43\1\44\1\45\1\46\1\47\1\50"+ | |
45 "\1\51\1\52\1\53\1\54\1\55\1\56\1\57\1\60\1\61\33\0"+ | |
46 "\1\62\1\63\14\0\1\64\7\0\1\65\21\0\1\70\13\0\1\66"+ | |
47 "\12\0\1\67\54\0\1\72\2\0\1\73\2\0\1\74\1\75\1\0"+ | |
48 "\1\76\1\77\1\0\1\100\1\0\1\101\1\102\1\103\1\104\uf912\0"; | |
49 | |
50 /** | |
51 * Translates characters to character classes | |
52 */ | |
53 private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); | |
54 | |
55 /** | |
56 * Translates DFA states to action switch labels. | |
57 */ | |
58 private static final int [] ZZ_ACTION = zzUnpackAction(); | |
59 | |
60 private static final String ZZ_ACTION_PACKED_0 = | |
61 "\1\0\2\1\1\2\1\3\1\4\1\5\1\6\1\7"+ | |
62 "\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17"+ | |
63 "\1\20\1\21\1\22\1\23\1\24\1\25\1\26\1\27"+ | |
64 "\1\30\1\31\1\32\1\33\1\34\1\35\1\36\1\37"+ | |
65 "\1\40\1\41\1\42\1\43\1\44\1\45\1\46\1\47"+ | |
66 "\1\50\1\51\1\52\1\53\1\54\1\55\1\56\1\57"+ | |
67 "\1\60\1\61\1\62\1\63\1\64\1\65\1\66\1\67"+ | |
68 "\1\70\1\71\1\72\1\73\1\74\1\75\1\76\1\77"+ | |
69 "\1\100\1\101\1\102\1\103\2\1\30\0\1\104\1\0"+ | |
70 "\1\105\13\0\1\106\1\107"; | |
71 | |
72 private static int [] zzUnpackAction() { | |
73 int [] result = new int[111]; | |
74 int offset = 0; | |
75 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); | |
76 return result; | |
77 } | |
78 | |
79 private static int zzUnpackAction(String packed, int offset, int [] result) { | |
80 int i = 0; /* index in packed string */ | |
81 int j = offset; /* index in unpacked array */ | |
82 int l = packed.length(); | |
83 while (i < l) { | |
84 int count = packed.charAt(i++); | |
85 int value = packed.charAt(i++); | |
86 do result[j++] = value; while (--count > 0); | |
87 } | |
88 return j; | |
89 } | |
90 | |
91 | |
92 /** | |
93 * Translates a state to a row index in the transition table | |
94 */ | |
95 private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); | |
96 | |
97 private static final String ZZ_ROWMAP_PACKED_0 = | |
98 "\0\0\0\125\0\252\0\125\0\125\0\125\0\125\0\125"+ | |
99 "\0\125\0\125\0\125\0\125\0\125\0\125\0\125\0\125"+ | |
100 "\0\125\0\125\0\125\0\125\0\125\0\125\0\125\0\125"+ | |
101 "\0\125\0\125\0\125\0\125\0\125\0\125\0\125\0\125"+ | |
102 "\0\125\0\125\0\125\0\125\0\125\0\125\0\125\0\125"+ | |
103 "\0\125\0\125\0\125\0\125\0\125\0\125\0\125\0\125"+ | |
104 "\0\125\0\125\0\125\0\125\0\125\0\125\0\125\0\125"+ | |
105 "\0\125\0\125\0\125\0\125\0\125\0\125\0\125\0\125"+ | |
106 "\0\125\0\125\0\125\0\125\0\125\0\377\0\u0154\0\u01a9"+ | |
107 "\0\u01fe\0\u0253\0\u02a8\0\u02fd\0\u0352\0\u03a7\0\u03fc\0\u0451"+ | |
108 "\0\u04a6\0\u04fb\0\u0550\0\u05a5\0\u05fa\0\u064f\0\u06a4\0\u06f9"+ | |
109 "\0\u074e\0\u07a3\0\u07f8\0\u084d\0\u08a2\0\u08f7\0\u094c\0\125"+ | |
110 "\0\u09a1\0\125\0\u09f6\0\u0a4b\0\u0aa0\0\u0af5\0\u0b4a\0\u0b9f"+ | |
111 "\0\u0bf4\0\u0c49\0\u0c9e\0\u0cf3\0\u0d48\0\125\0\125"; | |
112 | |
113 private static int [] zzUnpackRowMap() { | |
114 int [] result = new int[111]; | |
115 int offset = 0; | |
116 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); | |
117 return result; | |
118 } | |
119 | |
120 private static int zzUnpackRowMap(String packed, int offset, int [] result) { | |
121 int i = 0; /* index in packed string */ | |
122 int j = offset; /* index in unpacked array */ | |
123 int l = packed.length(); | |
124 while (i < l) { | |
125 int high = packed.charAt(i++) << 16; | |
126 result[j++] = high | packed.charAt(i++); | |
127 } | |
128 return j; | |
129 } | |
130 | |
131 /** | |
132 * The transition table of the DFA | |
133 */ | |
134 private static final int [] ZZ_TRANS = zzUnpackTrans(); | |
135 | |
136 private static final String ZZ_TRANS_PACKED_0 = | |
137 "\1\2\1\3\1\2\1\4\1\5\1\6\1\7\1\10"+ | |
138 "\1\11\1\12\1\13\1\14\1\15\1\16\1\17\1\20"+ | |
139 "\1\21\1\22\1\23\1\24\1\25\1\26\1\27\1\30"+ | |
140 "\1\31\1\32\1\33\1\34\1\35\1\36\1\37\1\40"+ | |
141 "\1\41\1\42\1\43\1\44\1\45\1\46\1\47\1\50"+ | |
142 "\1\51\1\52\1\53\1\54\1\55\1\56\1\57\1\60"+ | |
143 "\1\61\1\62\1\63\1\64\1\65\1\66\1\67\1\70"+ | |
144 "\1\71\1\72\1\73\1\74\1\75\1\76\1\77\1\100"+ | |
145 "\1\101\1\102\1\103\1\104\1\105\1\106\11\2\1\107"+ | |
146 "\5\2\125\0\2\110\1\0\122\110\106\0\1\111\1\0"+ | |
147 "\1\112\2\0\1\113\2\0\1\114\114\0\1\115\1\116"+ | |
148 "\1\117\1\116\1\0\1\120\2\116\1\121\1\0\1\122"+ | |
149 "\3\0\1\116\2\110\1\2\122\110\107\0\1\123\131\0"+ | |
150 "\1\124\121\0\1\125\2\0\1\126\121\0\1\127\121\0"+ | |
151 "\1\116\1\130\2\116\1\2\4\116\5\0\1\116\106\0"+ | |
152 "\4\116\1\2\4\116\5\0\1\116\106\0\4\116\1\2"+ | |
153 "\1\116\1\131\2\116\5\0\1\116\106\0\3\116\1\132"+ | |
154 "\1\2\1\116\1\133\2\116\5\0\1\116\106\0\3\116"+ | |
155 "\1\134\1\2\4\116\5\0\1\116\121\0\1\135\113\0"+ | |
156 "\1\136\131\0\1\137\121\0\1\140\127\0\1\141\121\0"+ | |
157 "\1\142\120\0\2\116\1\143\1\116\1\2\4\116\5\0"+ | |
158 "\1\116\106\0\4\116\1\2\2\116\1\144\1\116\5\0"+ | |
159 "\1\116\106\0\4\116\1\140\4\116\5\0\1\116\106\0"+ | |
160 "\4\116\1\2\2\116\1\145\1\116\5\0\1\116\106\0"+ | |
161 "\4\116\1\142\4\116\5\0\1\116\122\0\1\146\113\0"+ | |
162 "\1\147\123\0\1\150\124\0\1\151\122\0\3\116\1\152"+ | |
163 "\1\2\4\116\5\0\1\116\106\0\2\116\1\153\1\116"+ | |
164 "\1\2\4\116\5\0\1\116\106\0\2\116\1\154\1\116"+ | |
165 "\1\2\4\116\5\0\1\116\123\0\1\155\113\0\1\5"+ | |
166 "\124\0\1\156\124\0\1\157\120\0\4\116\1\5\4\116"+ | |
167 "\5\0\1\116\106\0\4\116\1\156\4\116\5\0\1\116"+ | |
168 "\106\0\4\116\1\157\4\116\5\0\1\116\112\0\1\4"+ | |
169 "\12\0"; | |
170 | |
171 private static int [] zzUnpackTrans() { | |
172 int [] result = new int[3485]; | |
173 int offset = 0; | |
174 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); | |
175 return result; | |
176 } | |
177 | |
178 private static int zzUnpackTrans(String packed, int offset, int [] result) { | |
179 int i = 0; /* index in packed string */ | |
180 int j = offset; /* index in unpacked array */ | |
181 int l = packed.length(); | |
182 while (i < l) { | |
183 int count = packed.charAt(i++); | |
184 int value = packed.charAt(i++); | |
185 value--; | |
186 do result[j++] = value; while (--count > 0); | |
187 } | |
188 return j; | |
189 } | |
190 | |
191 | |
192 /* error codes */ | |
193 private static final int ZZ_UNKNOWN_ERROR = 0; | |
194 private static final int ZZ_NO_MATCH = 1; | |
195 private static final int ZZ_PUSHBACK_2BIG = 2; | |
196 | |
197 /* error messages for the codes above */ | |
198 private static final String ZZ_ERROR_MSG[] = { | |
199 "Unkown internal scanner error", | |
200 "Error: could not match input", | |
201 "Error: pushback value was too large" | |
202 }; | |
203 | |
204 /** | |
205 * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> | |
206 */ | |
207 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); | |
208 | |
209 private static final String ZZ_ATTRIBUTE_PACKED_0 = | |
210 "\1\0\1\11\1\1\102\11\2\1\30\0\1\11\1\0"+ | |
211 "\1\11\13\0\2\11"; | |
212 | |
213 private static int [] zzUnpackAttribute() { | |
214 int [] result = new int[111]; | |
215 int offset = 0; | |
216 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); | |
217 return result; | |
218 } | |
219 | |
220 private static int zzUnpackAttribute(String packed, int offset, int [] result) { | |
221 int i = 0; /* index in packed string */ | |
222 int j = offset; /* index in unpacked array */ | |
223 int l = packed.length(); | |
224 while (i < l) { | |
225 int count = packed.charAt(i++); | |
226 int value = packed.charAt(i++); | |
227 do result[j++] = value; while (--count > 0); | |
228 } | |
229 return j; | |
230 } | |
231 | |
232 /** the input device */ | |
233 private java.io.Reader zzReader; | |
234 | |
235 /** the current state of the DFA */ | |
236 private int zzState; | |
237 | |
238 /** the current lexical state */ | |
239 private int zzLexicalState = YYINITIAL; | |
240 | |
241 /** this buffer contains the current text to be matched and is | |
242 the source of the yytext() string */ | |
243 private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; | |
244 | |
245 /** the textposition at the last accepting state */ | |
246 private int zzMarkedPos; | |
247 | |
248 /** the current text position in the buffer */ | |
249 private int zzCurrentPos; | |
250 | |
251 /** startRead marks the beginning of the yytext() string in the buffer */ | |
252 private int zzStartRead; | |
253 | |
254 /** endRead marks the last character in the buffer, that has been read | |
255 from input */ | |
256 private int zzEndRead; | |
257 | |
258 /** number of newlines encountered up to the start of the matched text */ | |
259 private int yyline; | |
260 | |
261 /** the number of characters up to the start of the matched text */ | |
262 private int yychar; | |
263 | |
264 /** | |
265 * the number of characters from the last newline up to the start of the | |
266 * matched text | |
267 */ | |
268 private int yycolumn; | |
269 | |
270 /** | |
271 * zzAtBOL == true <=> the scanner is currently at the beginning of a line | |
272 */ | |
273 private boolean zzAtBOL = true; | |
274 | |
275 /** zzAtEOF == true <=> the scanner is at the EOF */ | |
276 private boolean zzAtEOF; | |
277 | |
278 /** denotes if the user-EOF-code has already been executed */ | |
279 private boolean zzEOFDone; | |
280 | |
281 /* user code: */ | |
282 /* | |
283 * Betacode to Unicode conversion | |
284 */ | |
285 | |
286 | |
287 | |
288 /** | |
289 * Creates a new scanner | |
290 * There is also a java.io.InputStream version of this constructor. | |
291 * | |
292 * @param in the java.io.Reader to read input from. | |
293 */ | |
294 public Unicode2BuckwalterLex(java.io.Reader in) { | |
295 this.zzReader = in; | |
296 } | |
297 | |
298 /** | |
299 * Creates a new scanner. | |
300 * There is also java.io.Reader version of this constructor. | |
301 * | |
302 * @param in the java.io.Inputstream to read input from. | |
303 */ | |
304 public Unicode2BuckwalterLex(java.io.InputStream in) { | |
305 this(new java.io.InputStreamReader(in)); | |
306 } | |
307 | |
308 /** | |
309 * Unpacks the compressed character translation table. | |
310 * | |
311 * @param packed the packed character translation table | |
312 * @return the unpacked character translation table | |
313 */ | |
314 private static char [] zzUnpackCMap(String packed) { | |
315 char [] map = new char[0x10000]; | |
316 int i = 0; /* index in packed string */ | |
317 int j = 0; /* index in unpacked array */ | |
318 while (i < 240) { | |
319 int count = packed.charAt(i++); | |
320 char value = packed.charAt(i++); | |
321 do map[j++] = value; while (--count > 0); | |
322 } | |
323 return map; | |
324 } | |
325 | |
326 | |
327 /** | |
328 * Refills the input buffer. | |
329 * | |
330 * @return <code>false</code>, iff there was new input. | |
331 * | |
332 * @exception java.io.IOException if any I/O-Error occurs | |
333 */ | |
334 private boolean zzRefill() throws java.io.IOException { | |
335 | |
336 /* first: make room (if you can) */ | |
337 if (zzStartRead > 0) { | |
338 System.arraycopy(zzBuffer, zzStartRead, | |
339 zzBuffer, 0, | |
340 zzEndRead-zzStartRead); | |
341 | |
342 /* translate stored positions */ | |
343 zzEndRead-= zzStartRead; | |
344 zzCurrentPos-= zzStartRead; | |
345 zzMarkedPos-= zzStartRead; | |
346 zzStartRead = 0; | |
347 } | |
348 | |
349 /* is the buffer big enough? */ | |
350 if (zzCurrentPos >= zzBuffer.length) { | |
351 /* if not: blow it up */ | |
352 char newBuffer[] = new char[zzCurrentPos*2]; | |
353 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); | |
354 zzBuffer = newBuffer; | |
355 } | |
356 | |
357 /* finally: fill the buffer with new input */ | |
358 int numRead = zzReader.read(zzBuffer, zzEndRead, | |
359 zzBuffer.length-zzEndRead); | |
360 | |
361 if (numRead > 0) { | |
362 zzEndRead+= numRead; | |
363 return false; | |
364 } | |
365 // unlikely but not impossible: read 0 characters, but not at end of stream | |
366 if (numRead == 0) { | |
367 int c = zzReader.read(); | |
368 if (c == -1) { | |
369 return true; | |
370 } else { | |
371 zzBuffer[zzEndRead++] = (char) c; | |
372 return false; | |
373 } | |
374 } | |
375 | |
376 // numRead < 0 | |
377 return true; | |
378 } | |
379 | |
380 | |
381 /** | |
382 * Closes the input stream. | |
383 */ | |
384 public final void yyclose() throws java.io.IOException { | |
385 zzAtEOF = true; /* indicate end of file */ | |
386 zzEndRead = zzStartRead; /* invalidate buffer */ | |
387 | |
388 if (zzReader != null) | |
389 zzReader.close(); | |
390 } | |
391 | |
392 | |
393 /** | |
394 * Resets the scanner to read from a new input stream. | |
395 * Does not close the old reader. | |
396 * | |
397 * All internal variables are reset, the old input stream | |
398 * <b>cannot</b> be reused (internal buffer is discarded and lost). | |
399 * Lexical state is set to <tt>ZZ_INITIAL</tt>. | |
400 * | |
401 * @param reader the new input stream | |
402 */ | |
403 public final void yyreset(java.io.Reader reader) { | |
404 zzReader = reader; | |
405 zzAtBOL = true; | |
406 zzAtEOF = false; | |
407 zzEOFDone = false; | |
408 zzEndRead = zzStartRead = 0; | |
409 zzCurrentPos = zzMarkedPos = 0; | |
410 yyline = yychar = yycolumn = 0; | |
411 zzLexicalState = YYINITIAL; | |
412 } | |
413 | |
414 | |
415 /** | |
416 * Returns the current lexical state. | |
417 */ | |
418 public final int yystate() { | |
419 return zzLexicalState; | |
420 } | |
421 | |
422 | |
423 /** | |
424 * Enters a new lexical state | |
425 * | |
426 * @param newState the new lexical state | |
427 */ | |
428 public final void yybegin(int newState) { | |
429 zzLexicalState = newState; | |
430 } | |
431 | |
432 | |
433 /** | |
434 * Returns the text matched by the current regular expression. | |
435 */ | |
436 public final String yytext() { | |
437 return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); | |
438 } | |
439 | |
440 | |
441 /** | |
442 * Returns the character at position <tt>pos</tt> from the | |
443 * matched text. | |
444 * | |
445 * It is equivalent to yytext().charAt(pos), but faster | |
446 * | |
447 * @param pos the position of the character to fetch. | |
448 * A value from 0 to yylength()-1. | |
449 * | |
450 * @return the character at position pos | |
451 */ | |
452 public final char yycharat(int pos) { | |
453 return zzBuffer[zzStartRead+pos]; | |
454 } | |
455 | |
456 | |
457 /** | |
458 * Returns the length of the matched text region. | |
459 */ | |
460 public final int yylength() { | |
461 return zzMarkedPos-zzStartRead; | |
462 } | |
463 | |
464 | |
465 /** | |
466 * Reports an error that occured while scanning. | |
467 * | |
468 * In a wellformed scanner (no or only correct usage of | |
469 * yypushback(int) and a match-all fallback rule) this method | |
470 * will only be called with things that "Can't Possibly Happen". | |
471 * If this method is called, something is seriously wrong | |
472 * (e.g. a JFlex bug producing a faulty scanner etc.). | |
473 * | |
474 * Usual syntax/scanner level error handling should be done | |
475 * in error fallback rules. | |
476 * | |
477 * @param errorCode the code of the errormessage to display | |
478 */ | |
479 private void zzScanError(int errorCode) { | |
480 String message; | |
481 try { | |
482 message = ZZ_ERROR_MSG[errorCode]; | |
483 } | |
484 catch (ArrayIndexOutOfBoundsException e) { | |
485 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; | |
486 } | |
487 | |
488 throw new Error(message); | |
489 } | |
490 | |
491 | |
492 /** | |
493 * Pushes the specified amount of characters back into the input stream. | |
494 * | |
495 * They will be read again by then next call of the scanning method | |
496 * | |
497 * @param number the number of characters to be read again. | |
498 * This number must not be greater than yylength()! | |
499 */ | |
500 public void yypushback(int number) { | |
501 if ( number > yylength() ) | |
502 zzScanError(ZZ_PUSHBACK_2BIG); | |
503 | |
504 zzMarkedPos -= number; | |
505 } | |
506 | |
507 | |
508 /** | |
509 * Resumes scanning until the next regular expression is matched, | |
510 * the end of input is encountered or an I/O-Error occurs. | |
511 * | |
512 * @return the next token | |
513 * @exception java.io.IOException if any I/O-Error occurs | |
514 */ | |
515 public java.lang.String yylex() throws java.io.IOException { | |
516 int zzInput; | |
517 int zzAction; | |
518 | |
519 // cached fields: | |
520 int zzCurrentPosL; | |
521 int zzMarkedPosL; | |
522 int zzEndReadL = zzEndRead; | |
523 char [] zzBufferL = zzBuffer; | |
524 char [] zzCMapL = ZZ_CMAP; | |
525 | |
526 int [] zzTransL = ZZ_TRANS; | |
527 int [] zzRowMapL = ZZ_ROWMAP; | |
528 int [] zzAttrL = ZZ_ATTRIBUTE; | |
529 | |
530 while (true) { | |
531 zzMarkedPosL = zzMarkedPos; | |
532 | |
533 zzAction = -1; | |
534 | |
535 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; | |
536 | |
537 zzState = ZZ_LEXSTATE[zzLexicalState]; | |
538 | |
539 | |
540 zzForAction: { | |
541 while (true) { | |
542 | |
543 if (zzCurrentPosL < zzEndReadL) | |
544 zzInput = zzBufferL[zzCurrentPosL++]; | |
545 else if (zzAtEOF) { | |
546 zzInput = YYEOF; | |
547 break zzForAction; | |
548 } | |
549 else { | |
550 // store back cached positions | |
551 zzCurrentPos = zzCurrentPosL; | |
552 zzMarkedPos = zzMarkedPosL; | |
553 boolean eof = zzRefill(); | |
554 // get translated positions and possibly new buffer | |
555 zzCurrentPosL = zzCurrentPos; | |
556 zzMarkedPosL = zzMarkedPos; | |
557 zzBufferL = zzBuffer; | |
558 zzEndReadL = zzEndRead; | |
559 if (eof) { | |
560 zzInput = YYEOF; | |
561 break zzForAction; | |
562 } | |
563 else { | |
564 zzInput = zzBufferL[zzCurrentPosL++]; | |
565 } | |
566 } | |
567 int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; | |
568 if (zzNext == -1) break zzForAction; | |
569 zzState = zzNext; | |
570 | |
571 int zzAttributes = zzAttrL[zzState]; | |
572 if ( (zzAttributes & 1) == 1 ) { | |
573 zzAction = zzState; | |
574 zzMarkedPosL = zzCurrentPosL; | |
575 if ( (zzAttributes & 8) == 8 ) break zzForAction; | |
576 } | |
577 | |
578 } | |
579 } | |
580 | |
581 // store back cached position | |
582 zzMarkedPos = zzMarkedPosL; | |
583 | |
584 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { | |
585 case 23: | |
586 { return "D"; | |
587 } | |
588 case 72: break; | |
589 case 17: | |
590 { return "*"; | |
591 } | |
592 case 73: break; | |
593 case 46: | |
594 { return "o"; | |
595 } | |
596 case 74: break; | |
597 case 60: | |
598 { return ";"; | |
599 } | |
600 case 75: break; | |
601 case 63: | |
602 { return "!"; | |
603 } | |
604 case 76: break; | |
605 case 29: | |
606 { return "f"; | |
607 } | |
608 case 77: break; | |
609 case 36: | |
610 { return "w"; | |
611 } | |
612 case 78: break; | |
613 case 67: | |
614 { return "]"; | |
615 } | |
616 case 79: break; | |
617 case 70: | |
618 { return ")"; | |
619 } | |
620 case 80: break; | |
621 case 69: | |
622 { return ">"; | |
623 } | |
624 case 81: break; | |
625 case 34: | |
626 { return "n"; | |
627 } | |
628 case 82: break; | |
629 case 24: | |
630 { return "T"; | |
631 } | |
632 case 83: break; | |
633 case 57: | |
634 { return ":"; | |
635 } | |
636 case 84: break; | |
637 case 41: | |
638 { return "K"; | |
639 } | |
640 case 85: break; | |
641 case 12: | |
642 { return "v"; | |
643 } | |
644 case 86: break; | |
645 case 71: | |
646 { return "("; | |
647 } | |
648 case 87: break; | |
649 case 33: | |
650 { return "m"; | |
651 } | |
652 case 88: break; | |
653 case 22: | |
654 { return "S"; | |
655 } | |
656 case 89: break; | |
657 case 45: | |
658 { return "~"; | |
659 } | |
660 case 90: break; | |
661 case 16: | |
662 { return "d"; | |
663 } | |
664 case 91: break; | |
665 case 52: | |
666 { return "J"; | |
667 } | |
668 case 92: break; | |
669 case 43: | |
670 { return "u"; | |
671 } | |
672 case 93: break; | |
673 case 59: | |
674 { return "["; | |
675 } | |
676 case 94: break; | |
677 case 8: | |
678 { return "A"; | |
679 } | |
680 case 95: break; | |
681 case 2: | |
682 { return "'"; | |
683 } | |
684 case 96: break; | |
685 case 32: | |
686 { return "l"; | |
687 } | |
688 case 97: break; | |
689 case 55: | |
690 { return "R"; | |
691 } | |
692 case 98: break; | |
693 case 7: | |
694 { return "}"; | |
695 } | |
696 case 99: break; | |
697 case 11: | |
698 { return "t"; | |
699 } | |
700 case 100: break; | |
701 case 25: | |
702 { return "Z"; | |
703 } | |
704 case 101: break; | |
705 case 58: | |
706 { return "@"; | |
707 } | |
708 case 102: break; | |
709 case 5: | |
710 { return "&"; | |
711 } | |
712 case 103: break; | |
713 case 31: | |
714 { return "k"; | |
715 } | |
716 case 104: break; | |
717 case 3: | |
718 { return "|"; | |
719 } | |
720 case 105: break; | |
721 case 9: | |
722 { return "b"; | |
723 } | |
724 case 106: break; | |
725 case 14: | |
726 { return "H"; | |
727 } | |
728 case 107: break; | |
729 case 62: | |
730 { return "."; | |
731 } | |
732 case 108: break; | |
733 case 20: | |
734 { return "s"; | |
735 } | |
736 case 109: break; | |
737 case 37: | |
738 { return "Y"; | |
739 } | |
740 case 110: break; | |
741 case 56: | |
742 { return "?"; | |
743 } | |
744 case 111: break; | |
745 case 66: | |
746 { return "%"; | |
747 } | |
748 case 112: break; | |
749 case 13: | |
750 { return "j"; | |
751 } | |
752 case 113: break; | |
753 case 51: | |
754 { return "P"; | |
755 } | |
756 case 114: break; | |
757 case 50: | |
758 { return "{"; | |
759 } | |
760 case 115: break; | |
761 case 1: | |
762 { return yytext(); | |
763 } | |
764 case 116: break; | |
765 case 42: | |
766 { return "a"; | |
767 } | |
768 case 117: break; | |
769 case 54: | |
770 { return "G"; | |
771 } | |
772 case 118: break; | |
773 case 64: | |
774 { return "-"; | |
775 } | |
776 case 119: break; | |
777 case 18: | |
778 { return "r"; | |
779 } | |
780 case 120: break; | |
781 case 4: | |
782 { return ">"; | |
783 } | |
784 case 121: break; | |
785 case 21: | |
786 { return "$"; | |
787 } | |
788 case 122: break; | |
789 case 44: | |
790 { return "i"; | |
791 } | |
792 case 123: break; | |
793 case 19: | |
794 { return "z"; | |
795 } | |
796 case 124: break; | |
797 case 68: | |
798 { return "<"; | |
799 } | |
800 case 125: break; | |
801 case 49: | |
802 { return "`"; | |
803 } | |
804 case 126: break; | |
805 case 39: | |
806 { return "F"; | |
807 } | |
808 case 127: break; | |
809 case 61: | |
810 { return ","; | |
811 } | |
812 case 128: break; | |
813 case 30: | |
814 { return "q"; | |
815 } | |
816 case 129: break; | |
817 case 48: | |
818 { return "#"; | |
819 } | |
820 case 130: break; | |
821 case 35: | |
822 { return "h"; | |
823 } | |
824 case 131: break; | |
825 case 40: | |
826 { return "N"; | |
827 } | |
828 case 132: break; | |
829 case 38: | |
830 { return "y"; | |
831 } | |
832 case 133: break; | |
833 case 28: | |
834 { return "_"; | |
835 } | |
836 case 134: break; | |
837 case 26: | |
838 { return "E"; | |
839 } | |
840 case 135: break; | |
841 case 65: | |
842 { return "+"; | |
843 } | |
844 case 136: break; | |
845 case 10: | |
846 { return "p"; | |
847 } | |
848 case 137: break; | |
849 case 53: | |
850 { return "V"; | |
851 } | |
852 case 138: break; | |
853 case 6: | |
854 { return "<"; | |
855 } | |
856 case 139: break; | |
857 case 27: | |
858 { return "g"; | |
859 } | |
860 case 140: break; | |
861 case 15: | |
862 { return "x"; | |
863 } | |
864 case 141: break; | |
865 case 47: | |
866 { return "^"; | |
867 } | |
868 case 142: break; | |
869 default: | |
870 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { | |
871 zzAtEOF = true; | |
872 return null; | |
873 } | |
874 else { | |
875 zzScanError(ZZ_NO_MATCH); | |
876 } | |
877 } | |
878 } | |
879 } | |
880 | |
881 | |
882 } |