001: /* The following code was generated by JFlex 1.3.5 on 13-9-06 0:53 */
002:
003: package vqwiki.lex;
004:
005: /*
006: Very Quick Wiki - WikiWikiWeb clone
007: Copyright (C) 2001-2003 Gareth Cronin
008:
009: This program is free software; you can redistribute it and/or modify
010: it under the terms of the GNU Lesser General Public License as published by
011: the Free Software Foundation; either version 2 of the License, or
012: (at your option) any later version.
013:
014: This program is distributed in the hope that it will be useful,
015: but WITHOUT ANY WARRANTY; without even the implied warranty of
016: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
017: GNU General Public License for more details.
018:
019: You should have received a copy of the GNU Lesser General Public License
020: along with this program (gpl.txt); if not, write to the Free Software
021: Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
022: */
023:
024: import java.io.*;
025: import vqwiki.lex.Lexer;
026:
027: /**
028: * This class is a scanner generated by
029: * <a href="http://www.jflex.de/">JFlex</a> 1.3.5
030: * on 13-9-06 0:53 from the specification file
031: * <tt>file:/C:/SourceForge/VQWiki_2X/vqwiki-classic/jlex/exlayout.jflex</tt>
032: */
033: public class ExLayoutLex implements vqwiki.lex.Lexer {
034:
035: /** This character denotes the end of file */
036: final public static int YYEOF = -1;
037:
038: /** initial size of the lookahead buffer */
039: final private static int YY_BUFFERSIZE = 16384;
040:
041: /** lexical states */
042: final public static int LIST = 8;
043: final public static int MULTITABLE = 12;
044: final public static int YYINITIAL = 0;
045: final public static int EXTERNAL = 14;
046: final public static int PRE = 6;
047: final public static int TABLE = 10;
048: final public static int OFF = 4;
049: final public static int NORMAL = 2;
050:
051: /**
052: * YY_LEXSTATE[l] is the state in the DFA for the lexical state l
053: * YY_LEXSTATE[l+1] is the state in the DFA for the lexical state l
054: * at the beginning of a line
055: * l is of the form l = 2*k, k a non negative integer
056: */
057: private final static int YY_LEXSTATE[] = { 0, 0, 1, 2, 3, 3, 4, 4,
058: 5, 6, 7, 8, 0, 9, 10, 10 };
059:
060: /**
061: * Translates characters to character classes
062: */
063: final private static String yycmap_packed = "\11\0\1\3\1\1\2\0\1\2\22\0\1\3\1\7\1\0\1\17"
064: + "\6\0\1\17\2\0\1\4\1\0\1\15\14\0\1\11\1\0\1\13"
065: + "\1\0\1\20\32\12\1\10\1\16\1\14\1\0\1\5\1\0\32\12"
066: + "\1\0\1\6\55\0\1\12\12\0\1\12\4\0\1\12\5\0\27\12"
067: + "\1\0\37\12\1\0\u0128\12\2\0\22\12\34\0\136\12\2\0\11\12"
068: + "\2\0\7\12\16\0\2\12\16\0\5\12\11\0\1\12\213\0\1\12"
069: + "\13\0\1\12\1\0\3\12\1\0\1\12\1\0\24\12\1\0\54\12"
070: + "\1\0\10\12\2\0\32\12\14\0\202\12\12\0\71\12\2\0\2\12"
071: + "\2\0\2\12\3\0\46\12\2\0\2\12\67\0\46\12\2\0\1\12"
072: + "\7\0\47\12\110\0\33\12\5\0\3\12\56\0\32\12\5\0\13\12"
073: + "\46\0\143\12\1\0\1\12\17\0\2\12\23\0\3\12\23\0\1\12"
074: + "\1\0\33\12\123\0\46\12\u015f\0\65\12\3\0\1\12\22\0\1\12"
075: + "\7\0\12\12\43\0\10\12\2\0\2\12\2\0\26\12\1\0\7\12"
076: + "\1\0\1\12\3\0\4\12\42\0\2\12\1\0\3\12\16\0\2\12"
077: + "\23\0\6\12\4\0\2\12\2\0\26\12\1\0\7\12\1\0\2\12"
078: + "\1\0\2\12\1\0\2\12\37\0\4\12\1\0\1\12\23\0\3\12"
079: + "\20\0\7\12\1\0\1\12\1\0\3\12\1\0\26\12\1\0\7\12"
080: + "\1\0\2\12\1\0\5\12\3\0\1\12\22\0\1\12\17\0\1\12"
081: + "\44\0\10\12\2\0\2\12\2\0\26\12\1\0\7\12\1\0\2\12"
082: + "\2\0\4\12\3\0\1\12\36\0\2\12\1\0\3\12\43\0\6\12"
083: + "\3\0\3\12\1\0\4\12\3\0\2\12\1\0\1\12\1\0\2\12"
084: + "\3\0\2\12\3\0\3\12\3\0\10\12\1\0\3\12\113\0\10\12"
085: + "\1\0\3\12\1\0\27\12\1\0\12\12\1\0\5\12\46\0\2\12"
086: + "\43\0\10\12\1\0\3\12\1\0\27\12\1\0\12\12\1\0\5\12"
087: + "\44\0\1\12\1\0\2\12\43\0\10\12\1\0\3\12\1\0\27\12"
088: + "\1\0\20\12\46\0\2\12\43\0\22\12\3\0\30\12\1\0\11\12"
089: + "\1\0\1\12\2\0\7\12\72\0\60\12\1\0\2\12\14\0\7\12"
090: + "\72\0\2\12\1\0\1\12\2\0\2\12\1\0\1\12\2\0\1\12"
091: + "\6\0\4\12\1\0\7\12\1\0\3\12\1\0\1\12\1\0\1\12"
092: + "\2\0\2\12\1\0\4\12\1\0\2\12\11\0\1\12\2\0\5\12"
093: + "\1\0\1\12\25\0\2\12\42\0\1\12\77\0\10\12\1\0\42\12"
094: + "\35\0\4\12\164\0\42\12\1\0\5\12\1\0\2\12\45\0\6\12"
095: + "\112\0\46\12\12\0\47\12\11\0\132\12\5\0\104\12\5\0\122\12"
096: + "\6\0\7\12\1\0\77\12\1\0\1\12\1\0\4\12\2\0\7\12"
097: + "\1\0\1\12\1\0\4\12\2\0\47\12\1\0\1\12\1\0\4\12"
098: + "\2\0\37\12\1\0\1\12\1\0\4\12\2\0\7\12\1\0\1\12"
099: + "\1\0\4\12\2\0\7\12\1\0\7\12\1\0\27\12\1\0\37\12"
100: + "\1\0\1\12\1\0\4\12\2\0\7\12\1\0\47\12\1\0\23\12"
101: + "\105\0\125\12\14\0\u026c\12\2\0\10\12\12\0\32\12\5\0\113\12"
102: + "\225\0\64\12\154\0\130\12\10\0\51\12\u0557\0\234\12\4\0\132\12"
103: + "\6\0\26\12\2\0\6\12\2\0\46\12\2\0\6\12\2\0\10\12"
104: + "\1\0\1\12\1\0\1\12\1\0\1\12\1\0\37\12\2\0\65\12"
105: + "\1\0\7\12\1\0\1\12\3\0\3\12\1\0\7\12\3\0\4\12"
106: + "\2\0\6\12\4\0\15\12\5\0\3\12\1\0\7\12\202\0\1\12"
107: + "\202\0\1\12\4\0\1\12\2\0\12\12\1\0\1\12\3\0\5\12"
108: + "\6\0\1\12\1\0\1\12\1\0\1\12\1\0\4\12\1\0\3\12"
109: + "\1\0\7\12\u0ecb\0\2\12\52\0\5\12\13\0\124\12\10\0\2\12"
110: + "\2\0\132\12\1\0\3\12\6\0\50\12\4\0\136\12\21\0\30\12"
111: + "\u0248\0\u19b6\12\112\0\u51a6\12\132\0\u048d\12\u0773\0\u2ba4\12\u215c\0\u012e\12"
112: + "\322\0\7\12\14\0\5\12\5\0\1\12\1\0\12\12\1\0\15\12"
113: + "\1\0\5\12\1\0\1\12\1\0\2\12\1\0\2\12\1\0\154\12"
114: + "\41\0\u016b\12\22\0\100\12\2\0\66\12\50\0\14\12\164\0\3\12"
115: + "\1\0\1\12\1\0\207\12\44\0\32\12\6\0\32\12\13\0\131\12"
116: + "\3\0\6\12\2\0\6\12\2\0\6\12\2\0\3\12\43\0";
117:
118: /**
119: * Translates characters to character classes
120: */
121: final private static char[] yycmap = yy_unpack_cmap(yycmap_packed);
122:
123: /**
124: * Translates a state to a row index in the transition table
125: */
126: final private static int yy_rowMap[] = { 0, 17, 34, 51, 68, 85,
127: 102, 119, 136, 153, 170, 0, 0, 187, 0, 204, 221, 238, 255,
128: 272, 289, 306, 323, 340, 357, 374, 391, 0, 0, 408, 425, 0,
129: 442, 0, 459, 476, 493, 0, 510, 527, 544, 340, 561, 578,
130: 595, 0, 0, 612, 374, 629, 646, 0, 663, 680, 697, 714, 731,
131: 0, 748, 0, 765, 0, 782, 0, 0, 799, 0, 816, 663, 680, 0,
132: 833, 850, 867, 884, 901, 918, 935, 952, 0, 969, 0, 0, 986,
133: 0, 1003, 0, 1020, 0, 1037, 1054, 0 };
134:
135: /**
136: * The packed transition table of the DFA (part 0)
137: */
138: final private static String yy_packed0 = "\21\0\1\14\1\15\1\16\1\17\1\20\1\21\2\14"
139: + "\1\22\5\14\1\23\1\14\1\24\1\14\1\25\1\26"
140: + "\1\17\1\20\1\21\1\27\1\14\1\22\5\14\1\23"
141: + "\1\30\1\24\1\14\1\15\1\16\1\17\1\14\1\31"
142: + "\14\14\1\32\1\33\1\34\1\14\1\21\2\14\1\22"
143: + "\5\14\1\23\3\14\1\35\1\36\1\17\16\14\1\35"
144: + "\1\36\1\17\13\14\1\37\2\14\3\17\15\14\6\40"
145: + "\1\41\12\40\6\42\1\43\12\42\1\14\3\34\4\14"
146: + "\1\44\10\14\1\0\1\15\23\0\1\45\21\0\1\46"
147: + "\24\0\1\47\14\0\1\50\33\0\1\51\17\0\1\52"
148: + "\2\0\1\25\25\0\1\53\1\54\11\0\1\55\1\0"
149: + "\17\55\5\0\1\56\14\0\1\57\1\60\17\0\1\61"
150: + "\20\0\1\35\17\0\1\62\1\0\17\62\6\0\1\63"
151: + "\12\0\4\64\1\65\1\64\1\66\12\64\11\0\1\67"
152: + "\13\0\1\70\26\0\1\71\13\0\1\72\33\0\1\73"
153: + "\1\53\1\74\4\53\1\75\12\53\1\54\1\76\4\54"
154: + "\1\77\12\54\1\55\1\100\17\55\1\0\1\57\17\0"
155: + "\1\62\1\101\17\62\1\63\1\0\4\63\1\102\12\63"
156: + "\1\0\1\103\1\104\1\105\15\0\1\106\1\107\17\106"
157: + "\15\0\1\110\7\0\1\111\26\0\1\71\1\112\25\0"
158: + "\1\113\1\53\1\74\4\53\1\114\12\53\1\54\1\76"
159: + "\4\54\1\115\12\54\1\63\1\0\4\63\1\116\12\63"
160: + "\1\0\1\103\31\0\1\117\7\0\1\120\1\121\32\0"
161: + "\1\122\5\0\1\123\1\124\16\0\1\53\1\125\1\126"
162: + "\3\53\1\114\12\53\1\54\1\127\1\130\3\54\1\115"
163: + "\12\54\1\63\1\131\1\132\3\63\1\116\12\63\12\0"
164: + "\1\117\1\133\6\0\1\120\20\0\1\123\17\0\1\53"
165: + "\1\125\4\53\1\75\12\53\1\54\1\127\4\54\1\77"
166: + "\12\54\1\63\1\131\4\63\1\102\12\63\14\0\1\134" + "\4\0";
167:
168: /**
169: * The transition table of the DFA
170: */
171: final private static int yytrans[] = yy_unpack();
172:
173: /* error codes */
174: final private static int YY_UNKNOWN_ERROR = 0;
175: final private static int YY_ILLEGAL_STATE = 1;
176: final private static int YY_NO_MATCH = 2;
177: final private static int YY_PUSHBACK_2BIG = 3;
178:
179: /* error messages for the codes above */
180: final private static String YY_ERROR_MSG[] = {
181: "Unkown internal scanner error",
182: "Internal error: unknown state",
183: "Error: could not match input",
184: "Error: pushback value was too large" };
185:
186: /**
187: * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
188: */
189: private final static byte YY_ATTRIBUTE[] = { 8, 0, 0, 0, 0, 0, 0,
190: 0, 0, 0, 0, 9, 9, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
191: 9, 9, 1, 1, 9, 1, 9, 0, 1, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9,
192: 0, 0, 0, 0, 9, 1, 1, 0, 0, 0, 9, 0, 9, 0, 9, 0, 9, 9, 0, 9,
193: 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 9, 9, 0, 9, 0, 9,
194: 0, 9, 0, 0, 9 };
195:
196: /** the input device */
197: private java.io.Reader yy_reader;
198:
199: /** the current state of the DFA */
200: private int yy_state;
201:
202: /** the current lexical state */
203: private int yy_lexical_state = YYINITIAL;
204:
205: /** this buffer contains the current text to be matched and is
206: the source of the yytext() string */
207: private char yy_buffer[] = new char[YY_BUFFERSIZE];
208:
209: /** the textposition at the last accepting state */
210: private int yy_markedPos;
211:
212: /** the textposition at the last state to be included in yytext */
213: private int yy_pushbackPos;
214:
215: /** the current text position in the buffer */
216: private int yy_currentPos;
217:
218: /** startRead marks the beginning of the yytext() string in the buffer */
219: private int yy_startRead;
220:
221: /** endRead marks the last character in the buffer, that has been read
222: from input */
223: private int yy_endRead;
224:
225: /** number of newlines encountered up to the start of the matched text */
226: private int yyline;
227:
228: /** the number of characters up to the start of the matched text */
229: private int yychar;
230:
231: /**
232: * the number of characters from the last newline up to the start of the
233: * matched text
234: */
235: private int yycolumn;
236:
237: /**
238: * yy_atBOL == true <=> the scanner is currently at the beginning of a line
239: */
240: private boolean yy_atBOL = true;
241:
242: /** yy_atEOF == true <=> the scanner is at the EOF */
243: private boolean yy_atEOF;
244:
245: /* user code: */
246:
247: ExLayoutLexConvert convert = new ExLayoutLexConvert();
248:
249: public void setVirtualWiki(String vWiki) {
250: convert.setVirtualWiki(vWiki);
251: }
252:
253: /**
254: * Creates a new scanner
255: * There is also a java.io.InputStream version of this constructor.
256: *
257: * @param in the java.io.Reader to read input from.
258: */
259: public ExLayoutLex(java.io.Reader in) {
260: yybegin(NORMAL);
261: this .yy_reader = in;
262: }
263:
264: /**
265: * Creates a new scanner.
266: * There is also java.io.Reader version of this constructor.
267: *
268: * @param in the java.io.Inputstream to read input from.
269: */
270: public ExLayoutLex(java.io.InputStream in) {
271: this (new java.io.InputStreamReader(in));
272: }
273:
274: /**
275: * Unpacks the split, compressed DFA transition table.
276: *
277: * @return the unpacked transition table
278: */
279: private static int[] yy_unpack() {
280: int[] trans = new int[1071];
281: int offset = 0;
282: offset = yy_unpack(yy_packed0, offset, trans);
283: return trans;
284: }
285:
286: /**
287: * Unpacks the compressed DFA transition table.
288: *
289: * @param packed the packed transition table
290: * @return the index of the last entry
291: */
292: private static int yy_unpack(String packed, int offset, int[] trans) {
293: int i = 0; /* index in packed string */
294: int j = offset; /* index in unpacked array */
295: int l = packed.length();
296: while (i < l) {
297: int count = packed.charAt(i++);
298: int value = packed.charAt(i++);
299: value--;
300: do
301: trans[j++] = value;
302: while (--count > 0);
303: }
304: return j;
305: }
306:
307: /**
308: * Unpacks the compressed character translation table.
309: *
310: * @param packed the packed character translation table
311: * @return the unpacked character translation table
312: */
313: private static char[] yy_unpack_cmap(String packed) {
314: char[] map = new char[0x10000];
315: int i = 0; /* index in packed string */
316: int j = 0; /* index in unpacked array */
317: while (i < 1078) {
318: int count = packed.charAt(i++);
319: char value = packed.charAt(i++);
320: do
321: map[j++] = value;
322: while (--count > 0);
323: }
324: return map;
325: }
326:
327: /**
328: * Refills the input buffer.
329: *
330: * @return <code>false</code>, iff there was new input.
331: *
332: * @exception IOException if any I/O-Error occurs
333: */
334: private boolean yy_refill() throws java.io.IOException {
335:
336: /* first: make room (if you can) */
337: if (yy_startRead > 0) {
338: System.arraycopy(yy_buffer, yy_startRead, yy_buffer, 0,
339: yy_endRead - yy_startRead);
340:
341: /* translate stored positions */
342: yy_endRead -= yy_startRead;
343: yy_currentPos -= yy_startRead;
344: yy_markedPos -= yy_startRead;
345: yy_pushbackPos -= yy_startRead;
346: yy_startRead = 0;
347: }
348:
349: /* is the buffer big enough? */
350: if (yy_currentPos >= yy_buffer.length) {
351: /* if not: blow it up */
352: char newBuffer[] = new char[yy_currentPos * 2];
353: System.arraycopy(yy_buffer, 0, newBuffer, 0,
354: yy_buffer.length);
355: yy_buffer = newBuffer;
356: }
357:
358: /* finally: fill the buffer with new input */
359: int numRead = yy_reader.read(yy_buffer, yy_endRead,
360: yy_buffer.length - yy_endRead);
361:
362: if (numRead < 0) {
363: return true;
364: } else {
365: yy_endRead += numRead;
366: return false;
367: }
368: }
369:
370: /**
371: * Closes the input stream.
372: */
373: final public void yyclose() throws java.io.IOException {
374: yy_atEOF = true; /* indicate end of file */
375: yy_endRead = yy_startRead; /* invalidate buffer */
376:
377: if (yy_reader != null)
378: yy_reader.close();
379: }
380:
381: /**
382: * Closes the current stream, and resets the
383: * scanner to read from a new input stream.
384: *
385: * All internal variables are reset, the old input stream
386: * <b>cannot</b> be reused (internal buffer is discarded and lost).
387: * Lexical state is set to <tt>YY_INITIAL</tt>.
388: *
389: * @param reader the new input stream
390: */
391: final public void yyreset(java.io.Reader reader)
392: throws java.io.IOException {
393: yyclose();
394: yy_reader = reader;
395: yy_atBOL = true;
396: yy_atEOF = false;
397: yy_endRead = yy_startRead = 0;
398: yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
399: yyline = yychar = yycolumn = 0;
400: yy_lexical_state = YYINITIAL;
401: }
402:
403: /**
404: * Returns the current lexical state.
405: */
406: final public int yystate() {
407: return yy_lexical_state;
408: }
409:
410: /**
411: * Enters a new lexical state
412: *
413: * @param newState the new lexical state
414: */
415: final public void yybegin(int newState) {
416: yy_lexical_state = newState;
417: }
418:
419: /**
420: * Returns the text matched by the current regular expression.
421: */
422: final public String yytext() {
423: return new String(yy_buffer, yy_startRead, yy_markedPos
424: - yy_startRead);
425: }
426:
427: /**
428: * Returns the character at position <tt>pos</tt> from the
429: * matched text.
430: *
431: * It is equivalent to yytext().charAt(pos), but faster
432: *
433: * @param pos the position of the character to fetch.
434: * A value from 0 to yylength()-1.
435: *
436: * @return the character at position pos
437: */
438: final public char yycharat(int pos) {
439: return yy_buffer[yy_startRead + pos];
440: }
441:
442: /**
443: * Returns the length of the matched text region.
444: */
445: final public int yylength() {
446: return yy_markedPos - yy_startRead;
447: }
448:
449: /**
450: * Reports an error that occured while scanning.
451: *
452: * In a wellformed scanner (no or only correct usage of
453: * yypushback(int) and a match-all fallback rule) this method
454: * will only be called with things that "Can't Possibly Happen".
455: * If this method is called, something is seriously wrong
456: * (e.g. a JFlex bug producing a faulty scanner etc.).
457: *
458: * Usual syntax/scanner level error handling should be done
459: * in error fallback rules.
460: *
461: * @param errorCode the code of the errormessage to display
462: */
463: private void yy_ScanError(int errorCode) {
464: String message;
465: try {
466: message = YY_ERROR_MSG[errorCode];
467: } catch (ArrayIndexOutOfBoundsException e) {
468: message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];
469: }
470:
471: throw new Error(message);
472: }
473:
474: /**
475: * Pushes the specified amount of characters back into the input stream.
476: *
477: * They will be read again by then next call of the scanning method
478: *
479: * @param number the number of characters to be read again.
480: * This number must not be greater than yylength()!
481: */
482: private void yypushback(int number) {
483: if (number > yylength())
484: yy_ScanError(YY_PUSHBACK_2BIG);
485:
486: yy_markedPos -= number;
487: }
488:
489: /**
490: * Resumes scanning until the next regular expression is matched,
491: * the end of input is encountered or an I/O-Error occurs.
492: *
493: * @return the next token
494: * @exception IOException if any I/O-Error occurs
495: */
496: public String yylex() throws java.io.IOException {
497: int yy_input;
498: int yy_action;
499:
500: // cached fields:
501: int yy_currentPos_l;
502: int yy_startRead_l;
503: int yy_markedPos_l;
504: int yy_endRead_l = yy_endRead;
505: char[] yy_buffer_l = yy_buffer;
506: char[] yycmap_l = yycmap;
507:
508: int[] yytrans_l = yytrans;
509: int[] yy_rowMap_l = yy_rowMap;
510: byte[] yy_attr_l = YY_ATTRIBUTE;
511:
512: while (true) {
513: yy_markedPos_l = yy_markedPos;
514:
515: if (yy_markedPos_l > yy_startRead) {
516: switch (yy_buffer_l[yy_markedPos_l - 1]) {
517: case '\n':
518: case '\u000B':
519: case '\u000C':
520: case '\u0085':
521: case '\u2028':
522: case '\u2029':
523: yy_atBOL = true;
524: break;
525: case '\r':
526: if (yy_markedPos_l < yy_endRead_l)
527: yy_atBOL = yy_buffer_l[yy_markedPos_l] != '\n';
528: else if (yy_atEOF)
529: yy_atBOL = false;
530: else {
531: boolean eof = yy_refill();
532: yy_markedPos_l = yy_markedPos;
533: yy_buffer_l = yy_buffer;
534: if (eof)
535: yy_atBOL = false;
536: else
537: yy_atBOL = yy_buffer_l[yy_markedPos_l] != '\n';
538: }
539: break;
540: default:
541: yy_atBOL = false;
542: }
543: }
544: yy_action = -1;
545:
546: yy_startRead_l = yy_currentPos_l = yy_currentPos = yy_startRead = yy_markedPos_l;
547:
548: if (yy_atBOL)
549: yy_state = YY_LEXSTATE[yy_lexical_state + 1];
550: else
551: yy_state = YY_LEXSTATE[yy_lexical_state];
552:
553: yy_forAction: {
554: while (true) {
555:
556: if (yy_currentPos_l < yy_endRead_l)
557: yy_input = yy_buffer_l[yy_currentPos_l++];
558: else if (yy_atEOF) {
559: yy_input = YYEOF;
560: break yy_forAction;
561: } else {
562: // store back cached positions
563: yy_currentPos = yy_currentPos_l;
564: yy_markedPos = yy_markedPos_l;
565: boolean eof = yy_refill();
566: // get translated positions and possibly new buffer
567: yy_currentPos_l = yy_currentPos;
568: yy_markedPos_l = yy_markedPos;
569: yy_buffer_l = yy_buffer;
570: yy_endRead_l = yy_endRead;
571: if (eof) {
572: yy_input = YYEOF;
573: break yy_forAction;
574: } else {
575: yy_input = yy_buffer_l[yy_currentPos_l++];
576: }
577: }
578: int yy_next = yytrans_l[yy_rowMap_l[yy_state]
579: + yycmap_l[yy_input]];
580: if (yy_next == -1)
581: break yy_forAction;
582: yy_state = yy_next;
583:
584: int yy_attributes = yy_attr_l[yy_state];
585: if ((yy_attributes & 1) == 1) {
586: yy_action = yy_state;
587: yy_markedPos_l = yy_currentPos_l;
588: if ((yy_attributes & 8) == 8)
589: break yy_forAction;
590: }
591:
592: }
593: }
594:
595: // store back cached position
596: yy_markedPos = yy_markedPos_l;
597:
598: switch (yy_action) {
599:
600: case 82: {
601: yybegin(PRE);
602: return convert.onPreFormatBegin();
603: }
604: case 93:
605: break;
606: case 31: {
607: yypushback(1);
608: yybegin(NORMAL);
609: return convert.onTableEnd();
610: }
611: case 94:
612: break;
613: case 57: {
614: return "\\__";
615: }
616: case 95:
617: break;
618: case 63: {
619: // since the originalauthor removes \n after headers,
620: // we can't indicate at the beginning of the line.
621: // so we need to change headers also with \r at the end.
622: yybegin(LIST);
623: return convert.onListBegin(yytext());
624: }
625: case 96:
626: break;
627: case 64: {
628: return convert.onListLine(yytext());
629: }
630: case 97:
631: break;
632: case 11:
633: case 15:
634: case 16:
635: case 17:
636: case 18:
637: case 19:
638: case 22:
639: case 23:
640: case 24:
641: case 30:
642: case 32:
643: case 35: {
644: return yytext();
645: }
646: case 98:
647: break;
648: case 13:
649: case 14:
650: case 21:
651: case 29: {
652: return convert.onRemoveWhitespace(yytext());
653: }
654: case 99:
655: break;
656: case 70: {
657: return convert.onMultiTableCell(yytext());
658: }
659: case 100:
660: break;
661: case 86: {
662: yybegin(TABLE);
663: return convert.onTableStartWithHeader(yytext());
664: }
665: case 101:
666: break;
667: case 12:
668: case 20: {
669: return convert.onNewLine();
670: }
671: case 102:
672: break;
673: case 46: {
674: yybegin(NORMAL);
675: return convert.onPreFormatEnd();
676: }
677: case 103:
678: break;
679: case 61: {
680: yybegin(MULTITABLE);
681: return convert.onMultiTableStartWithHeader(yytext());
682: }
683: case 104:
684: break;
685: case 25:
686: case 26:
687: case 27: {
688: return convert.onKeepWhitespace(yytext());
689: }
690: case 105:
691: break;
692: case 79: {
693: return convert.onHorizontalRuler();
694: }
695: case 106:
696: break;
697: case 66: {
698: return convert.onMultiTableRow(yytext());
699: }
700: case 107:
701: break;
702: case 91: {
703: yybegin(NORMAL);
704: return yytext();
705: }
706: case 108:
707: break;
708: case 81: {
709: yybegin(EXTERNAL);
710: return yytext();
711: }
712: case 109:
713: break;
714: case 37: {
715: yybegin(OFF);
716: return "__";
717: }
718: case 110:
719: break;
720: case 33: {
721: yypushback(1);
722: yybegin(NORMAL);
723: return convert.onMultiTableEnd();
724: }
725: case 111:
726: break;
727: case 51:
728: case 52: {
729: yypushback(2);
730: yybegin(NORMAL);
731: return convert.onMultiTableEnd();
732: }
733: case 112:
734: break;
735: case 53: {
736: yypushback(2);
737: yybegin(NORMAL);
738: return convert.onMultiTableEnd();
739: }
740: case 113:
741: break;
742: case 28: {
743: yybegin(NORMAL);
744: return convert.onListEnd();
745: }
746: case 114:
747: break;
748: case 84: {
749: yybegin(TABLE);
750: return convert.onTableStart(yytext());
751: }
752: case 115:
753: break;
754: case 59: {
755: yybegin(MULTITABLE);
756: return convert.onMultiTableStart(yytext());
757: }
758: case 116:
759: break;
760: case 45: {
761: yybegin(NORMAL);
762: return "__";
763: }
764: case 117:
765: break;
766: case 88: {
767: return convert.onTableCell(yytext());
768: }
769: case 118:
770: break;
771: default:
772: if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
773: yy_atEOF = true;
774: {
775: if (yy_lexical_state == LIST) {
776: yybegin(NORMAL);
777: return convert.onListEOF();
778: }
779: if (yy_lexical_state == TABLE) {
780: yybegin(NORMAL);
781: return convert.onTableEOF();
782: }
783: if (yy_lexical_state == MULTITABLE) {
784: yybegin(NORMAL);
785: return convert.onMultiTableEOF();
786: }
787:
788: return null;
789: }
790: } else {
791: yy_ScanError(YY_NO_MATCH);
792: }
793: }
794: }
795: }
796:
797: }
|