Source Code Cross Referenced for ExFormatLex.java in  » Wiki-Engine » VeryQuickWiki » vqwiki » lex » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Wiki Engine » VeryQuickWiki » vqwiki.lex 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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 org.apache.log4j.Logger;
025:        import vqwiki.WikiBase;
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/exformat.jflex</tt>
032:         */
033:        public class ExFormatLex 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 YYINITIAL = 0;
043:            final public static int EXTERNAL = 8;
044:            final public static int PRE = 6;
045:            final public static int OFF = 4;
046:            final public static int NORMAL = 2;
047:
048:            /**
049:             * YY_LEXSTATE[l] is the state in the DFA for the lexical state l
050:             * YY_LEXSTATE[l+1] is the state in the DFA for the lexical state l
051:             *                  at the beginning of a line
052:             * l is of the form l = 2*k, k a non negative integer
053:             */
054:            private final static int YY_LEXSTATE[] = { 0, 0, 1, 2, 3, 3, 4, 4,
055:                    5, 5 };
056:
057:            /** 
058:             * Translates characters to character classes
059:             */
060:            final private static String yycmap_packed = "\11\0\1\3\1\1\2\0\1\2\22\0\1\3\1\24\1\0\1\14"
061:                    + "\1\0\1\17\1\13\1\25\7\0\1\12\12\21\1\26\1\16\1\6"
062:                    + "\1\27\1\10\1\0\1\32\6\22\24\20\1\5\1\23\1\11\1\0"
063:                    + "\1\4\1\0\1\36\5\22\1\35\4\20\1\33\1\37\2\20\1\40"
064:                    + "\3\20\1\34\6\20\1\30\1\0\1\31\54\0\1\7\12\0\1\7"
065:                    + "\4\0\1\7\5\0\27\7\1\0\37\7\1\0\u0128\7\2\0\22\7"
066:                    + "\34\0\136\7\2\0\11\7\2\0\7\7\16\0\2\7\16\0\5\7"
067:                    + "\11\0\1\7\213\0\1\7\13\0\1\7\1\0\3\7\1\0\1\7"
068:                    + "\1\0\24\7\1\0\54\7\1\0\10\7\2\0\32\7\14\0\202\7"
069:                    + "\12\0\71\7\2\0\2\7\2\0\2\7\3\0\46\7\2\0\2\7"
070:                    + "\67\0\46\7\2\0\1\7\7\0\47\7\110\0\33\7\5\0\3\7"
071:                    + "\56\0\32\7\5\0\13\7\25\0\12\15\7\0\143\7\1\0\1\7"
072:                    + "\17\0\2\7\11\0\12\15\3\7\23\0\1\7\1\0\33\7\123\0"
073:                    + "\46\7\u015f\0\65\7\3\0\1\7\22\0\1\7\7\0\12\7\4\0"
074:                    + "\12\15\25\0\10\7\2\0\2\7\2\0\26\7\1\0\7\7\1\0"
075:                    + "\1\7\3\0\4\7\42\0\2\7\1\0\3\7\4\0\12\15\2\7"
076:                    + "\23\0\6\7\4\0\2\7\2\0\26\7\1\0\7\7\1\0\2\7"
077:                    + "\1\0\2\7\1\0\2\7\37\0\4\7\1\0\1\7\7\0\12\15"
078:                    + "\2\0\3\7\20\0\7\7\1\0\1\7\1\0\3\7\1\0\26\7"
079:                    + "\1\0\7\7\1\0\2\7\1\0\5\7\3\0\1\7\22\0\1\7"
080:                    + "\17\0\1\7\5\0\12\15\25\0\10\7\2\0\2\7\2\0\26\7"
081:                    + "\1\0\7\7\1\0\2\7\2\0\4\7\3\0\1\7\36\0\2\7"
082:                    + "\1\0\3\7\4\0\12\15\25\0\6\7\3\0\3\7\1\0\4\7"
083:                    + "\3\0\2\7\1\0\1\7\1\0\2\7\3\0\2\7\3\0\3\7"
084:                    + "\3\0\10\7\1\0\3\7\55\0\11\15\25\0\10\7\1\0\3\7"
085:                    + "\1\0\27\7\1\0\12\7\1\0\5\7\46\0\2\7\4\0\12\15"
086:                    + "\25\0\10\7\1\0\3\7\1\0\27\7\1\0\12\7\1\0\5\7"
087:                    + "\44\0\1\7\1\0\2\7\4\0\12\15\25\0\10\7\1\0\3\7"
088:                    + "\1\0\27\7\1\0\20\7\46\0\2\7\4\0\12\15\25\0\22\7"
089:                    + "\3\0\30\7\1\0\11\7\1\0\1\7\2\0\7\7\72\0\60\7"
090:                    + "\1\0\2\7\14\0\7\7\11\0\12\15\47\0\2\7\1\0\1\7"
091:                    + "\2\0\2\7\1\0\1\7\2\0\1\7\6\0\4\7\1\0\7\7"
092:                    + "\1\0\3\7\1\0\1\7\1\0\1\7\2\0\2\7\1\0\4\7"
093:                    + "\1\0\2\7\11\0\1\7\2\0\5\7\1\0\1\7\11\0\12\15"
094:                    + "\2\0\2\7\42\0\1\7\37\0\12\15\26\0\10\7\1\0\42\7"
095:                    + "\35\0\4\7\164\0\42\7\1\0\5\7\1\0\2\7\25\0\12\15"
096:                    + "\6\0\6\7\112\0\46\7\12\0\47\7\11\0\132\7\5\0\104\7"
097:                    + "\5\0\122\7\6\0\7\7\1\0\77\7\1\0\1\7\1\0\4\7"
098:                    + "\2\0\7\7\1\0\1\7\1\0\4\7\2\0\47\7\1\0\1\7"
099:                    + "\1\0\4\7\2\0\37\7\1\0\1\7\1\0\4\7\2\0\7\7"
100:                    + "\1\0\1\7\1\0\4\7\2\0\7\7\1\0\7\7\1\0\27\7"
101:                    + "\1\0\37\7\1\0\1\7\1\0\4\7\2\0\7\7\1\0\47\7"
102:                    + "\1\0\23\7\16\0\11\15\56\0\125\7\14\0\u026c\7\2\0\10\7"
103:                    + "\12\0\32\7\5\0\113\7\225\0\64\7\54\0\12\15\46\0\12\15"
104:                    + "\6\0\130\7\10\0\51\7\u0557\0\234\7\4\0\132\7\6\0\26\7"
105:                    + "\2\0\6\7\2\0\46\7\2\0\6\7\2\0\10\7\1\0\1\7"
106:                    + "\1\0\1\7\1\0\1\7\1\0\37\7\2\0\65\7\1\0\7\7"
107:                    + "\1\0\1\7\3\0\3\7\1\0\7\7\3\0\4\7\2\0\6\7"
108:                    + "\4\0\15\7\5\0\3\7\1\0\7\7\202\0\1\7\202\0\1\7"
109:                    + "\4\0\1\7\2\0\12\7\1\0\1\7\3\0\5\7\6\0\1\7"
110:                    + "\1\0\1\7\1\0\1\7\1\0\4\7\1\0\3\7\1\0\7\7"
111:                    + "\u0ecb\0\2\7\52\0\5\7\13\0\124\7\10\0\2\7\2\0\132\7"
112:                    + "\1\0\3\7\6\0\50\7\4\0\136\7\21\0\30\7\u0248\0\u19b6\7"
113:                    + "\112\0\u51a6\7\132\0\u048d\7\u0773\0\u2ba4\7\u215c\0\u012e\7\322\0\7\7"
114:                    + "\14\0\5\7\5\0\1\7\1\0\12\7\1\0\15\7\1\0\5\7"
115:                    + "\1\0\1\7\1\0\2\7\1\0\2\7\1\0\154\7\41\0\u016b\7"
116:                    + "\22\0\100\7\2\0\66\7\50\0\14\7\164\0\3\7\1\0\1\7"
117:                    + "\1\0\207\7\23\0\12\15\7\0\32\7\6\0\32\7\13\0\131\7"
118:                    + "\3\0\6\7\2\0\6\7\2\0\6\7\2\0\3\7\43\0";
119:
120:            /** 
121:             * Translates characters to character classes
122:             */
123:            final private static char[] yycmap = yy_unpack_cmap(yycmap_packed);
124:
125:            /** 
126:             * Translates a state to a row index in the transition table
127:             */
128:            final private static int yy_rowMap[] = { 0, 33, 66, 99, 132, 165,
129:                    0, 0, 198, 0, 231, 264, 0, 0, 297, 330, 363, 396, 429, 462,
130:                    495, 528, 561, 594, 627, 660, 693, 0, 726, 759, 0, 0, 792,
131:                    825, 858, 891, 924, 957, 0, 990, 1023, 1056, 0, 1089, 1122,
132:                    1155, 1188, 1221, 1254, 0, 0, 1287, 660, 1320, 1353, 1386,
133:                    1419, 1452, 1485, 1518, 0, 0, 0, 0, 0, 0, 1551, 1584, 1617,
134:                    1650, 1683, 1716, 0, 0, 0, 1749, 1782, 1815, 0, 1848, 1881,
135:                    1914, 1947, 1980, 2013, 2046, 0, 0, 2079, 0, 2112, 2145,
136:                    2178, 2211, 2244, 2277, 2310, 2343, 0, 2376, 2409, 2442,
137:                    2475, 2508, 0, 2541, 2574, 2607, 0, 2640, 2673 };
138:
139:            /** 
140:             * The packed transition table of the DFA (part 0)
141:             */
142:            final private static String yy_packed0 = "\41\0\1\7\1\10\1\11\1\12\1\13\1\14\1\15"
143:                    + "\1\7\1\16\2\7\1\17\3\7\1\20\3\7\1\21"
144:                    + "\1\7\1\22\1\23\1\24\1\25\1\26\1\27\7\7"
145:                    + "\1\10\1\11\1\12\1\13\1\14\1\15\1\7\1\16"
146:                    + "\2\7\1\17\3\7\1\20\3\7\1\21\1\30\1\22"
147:                    + "\1\23\1\24\1\25\1\26\1\27\7\7\1\10\1\11"
148:                    + "\1\12\1\31\1\7\1\15\1\7\1\16\2\7\1\17"
149:                    + "\26\7\1\32\1\33\1\34\1\35\1\14\1\15\1\7"
150:                    + "\1\16\2\7\1\17\7\7\1\21\16\7\3\12\1\7"
151:                    + "\1\36\33\7\1\0\1\10\43\0\1\37\6\0\1\40"
152:                    + "\33\0\1\41\46\0\1\42\16\0\1\43\1\0\1\44"
153:                    + "\1\45\16\0\1\46\2\0\1\47\1\50\1\0\1\50"
154:                    + "\10\0\6\50\4\0\1\51\61\0\1\52\41\0\1\53"
155:                    + "\41\0\1\54\41\0\1\55\41\0\1\56\41\0\1\57"
156:                    + "\6\0\1\60\1\0\22\60\1\61\14\60\4\0\1\62"
157:                    + "\35\0\1\63\1\64\37\0\1\65\43\0\1\37\42\0"
158:                    + "\1\66\41\0\1\67\10\0\1\67\1\0\1\67\10\0"
159:                    + "\6\67\15\0\1\70\3\0\1\70\53\0\1\71\40\0"
160:                    + "\1\72\43\0\1\73\22\0\2\74\13\0\1\74\21\0"
161:                    + "\1\75\1\50\1\0\1\50\10\0\6\50\4\0\1\76"
162:                    + "\61\0\1\77\42\0\1\100\41\0\1\101\41\0\1\102"
163:                    + "\41\0\1\103\6\0\1\60\1\0\22\60\1\104\14\60"
164:                    + "\1\105\1\0\22\105\1\106\14\105\1\0\1\63\51\0"
165:                    + "\1\107\35\0\1\67\1\110\7\0\1\67\1\0\1\67"
166:                    + "\10\0\6\67\15\0\1\70\1\111\2\0\1\70\35\0"
167:                    + "\1\112\40\0\1\113\62\0\1\114\21\0\2\115\13\0"
168:                    + "\1\115\34\0\1\116\6\0\1\60\1\117\1\120\1\104"
169:                    + "\20\60\1\104\14\60\1\105\1\0\22\105\1\121\14\105"
170:                    + "\1\122\1\117\1\123\1\124\20\122\1\125\14\122\7\0"
171:                    + "\1\126\10\0\1\126\1\0\1\126\10\0\6\126\11\0"
172:                    + "\1\127\45\0\1\130\43\0\2\131\13\0\1\131\3\0"
173:                    + "\1\132\1\133\36\0\1\60\1\117\22\60\1\104\14\60"
174:                    + "\1\105\1\117\1\134\1\135\20\105\1\136\14\105\1\122"
175:                    + "\1\0\22\122\1\137\15\122\1\117\22\122\1\137\15\122"
176:                    + "\1\117\1\123\1\124\20\122\1\137\15\122\1\117\1\123"
177:                    + "\1\124\20\122\1\140\14\122\7\0\1\126\1\141\7\0"
178:                    + "\1\126\1\0\1\126\10\0\6\126\21\0\2\142\13\0"
179:                    + "\1\142\3\0\1\132\37\0\1\105\1\117\22\105\1\121"
180:                    + "\15\105\1\117\1\134\1\135\20\105\1\121\15\105\1\143"
181:                    + "\1\144\1\145\20\105\1\136\14\105\1\122\1\117\1\123"
182:                    + "\1\124\20\122\1\146\15\122\1\143\1\147\1\150\20\122"
183:                    + "\1\146\14\122\11\0\1\151\50\0\2\152\13\0\1\152"
184:                    + "\2\0\1\105\1\143\22\105\1\121\15\105\1\143\1\144"
185:                    + "\1\145\20\105\1\121\14\105\1\122\1\143\1\147\1\150"
186:                    + "\20\122\1\153\15\122\1\143\22\122\1\137\15\122\1\143"
187:                    + "\1\147\1\150\20\122\1\137\14\122\21\0\2\154\13\0"
188:                    + "\1\154\2\0\1\122\1\155\1\156\1\157\20\122\1\153"
189:                    + "\14\122\17\0\1\75\21\0\1\122\1\155\22\122\1\137"
190:                    + "\15\122\1\155\1\156\1\157\20\122\1\137\14\122";
191:
192:            /** 
193:             * The transition table of the DFA
194:             */
195:            final private static int yytrans[] = yy_unpack();
196:
197:            /* error codes */
198:            final private static int YY_UNKNOWN_ERROR = 0;
199:            final private static int YY_ILLEGAL_STATE = 1;
200:            final private static int YY_NO_MATCH = 2;
201:            final private static int YY_PUSHBACK_2BIG = 3;
202:
203:            /* error messages for the codes above */
204:            final private static String YY_ERROR_MSG[] = {
205:                    "Unkown internal scanner error",
206:                    "Internal error: unknown state",
207:                    "Error: could not match input",
208:                    "Error: pushback value was too large" };
209:
210:            /**
211:             * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
212:             */
213:            private final static byte YY_ATTRIBUTE[] = { 8, 0, 0, 0, 0, 0, 9,
214:                    9, 1, 9, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
215:                    9, 1, 1, 9, 9, 0, 0, 0, 0, 0, 0, 9, 0, 0, 1, 9, 0, 0, 0, 1,
216:                    0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0,
217:                    0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9,
218:                    9, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 9, 0, 0,
219:                    0, 9, 0, 0 };
220:
221:            /** the input device */
222:            private java.io.Reader yy_reader;
223:
224:            /** the current state of the DFA */
225:            private int yy_state;
226:
227:            /** the current lexical state */
228:            private int yy_lexical_state = YYINITIAL;
229:
230:            /** this buffer contains the current text to be matched and is
231:                the source of the yytext() string */
232:            private char yy_buffer[] = new char[YY_BUFFERSIZE];
233:
234:            /** the textposition at the last accepting state */
235:            private int yy_markedPos;
236:
237:            /** the textposition at the last state to be included in yytext */
238:            private int yy_pushbackPos;
239:
240:            /** the current text position in the buffer */
241:            private int yy_currentPos;
242:
243:            /** startRead marks the beginning of the yytext() string in the buffer */
244:            private int yy_startRead;
245:
246:            /** endRead marks the last character in the buffer, that has been read
247:                from input */
248:            private int yy_endRead;
249:
250:            /** number of newlines encountered up to the start of the matched text */
251:            private int yyline;
252:
253:            /** the number of characters up to the start of the matched text */
254:            private int yychar;
255:
256:            /**
257:             * the number of characters from the last newline up to the start of the 
258:             * matched text
259:             */
260:            private int yycolumn;
261:
262:            /** 
263:             * yy_atBOL == true <=> the scanner is currently at the beginning of a line
264:             */
265:            private boolean yy_atBOL = true;
266:
267:            /** yy_atEOF == true <=> the scanner is at the EOF */
268:            private boolean yy_atEOF;
269:
270:            /* user code: */
271:
272:            protected ExFormatLexConvert convert = new ExFormatLexConvert();
273:            protected static Logger cat = Logger.getLogger(FormatLex.class);
274:
275:            public void setVirtualWiki(String vWiki) {
276:                convert.setVirtualWiki(vWiki);
277:            }
278:
279:            /**
280:             * Creates a new scanner
281:             * There is also a java.io.InputStream version of this constructor.
282:             *
283:             * @param   in  the java.io.Reader to read input from.
284:             */
285:            public ExFormatLex(java.io.Reader in) {
286:                yybegin(NORMAL);
287:                this .yy_reader = in;
288:            }
289:
290:            /**
291:             * Creates a new scanner.
292:             * There is also java.io.Reader version of this constructor.
293:             *
294:             * @param   in  the java.io.Inputstream to read input from.
295:             */
296:            public ExFormatLex(java.io.InputStream in) {
297:                this (new java.io.InputStreamReader(in));
298:            }
299:
300:            /** 
301:             * Unpacks the split, compressed DFA transition table.
302:             *
303:             * @return the unpacked transition table
304:             */
305:            private static int[] yy_unpack() {
306:                int[] trans = new int[2706];
307:                int offset = 0;
308:                offset = yy_unpack(yy_packed0, offset, trans);
309:                return trans;
310:            }
311:
312:            /** 
313:             * Unpacks the compressed DFA transition table.
314:             *
315:             * @param packed   the packed transition table
316:             * @return         the index of the last entry
317:             */
318:            private static int yy_unpack(String packed, int offset, int[] trans) {
319:                int i = 0; /* index in packed string  */
320:                int j = offset; /* index in unpacked array */
321:                int l = packed.length();
322:                while (i < l) {
323:                    int count = packed.charAt(i++);
324:                    int value = packed.charAt(i++);
325:                    value--;
326:                    do
327:                        trans[j++] = value;
328:                    while (--count > 0);
329:                }
330:                return j;
331:            }
332:
333:            /** 
334:             * Unpacks the compressed character translation table.
335:             *
336:             * @param packed   the packed character translation table
337:             * @return         the unpacked character translation table
338:             */
339:            private static char[] yy_unpack_cmap(String packed) {
340:                char[] map = new char[0x10000];
341:                int i = 0; /* index in packed string  */
342:                int j = 0; /* index in unpacked array */
343:                while (i < 1178) {
344:                    int count = packed.charAt(i++);
345:                    char value = packed.charAt(i++);
346:                    do
347:                        map[j++] = value;
348:                    while (--count > 0);
349:                }
350:                return map;
351:            }
352:
353:            /**
354:             * Refills the input buffer.
355:             *
356:             * @return      <code>false</code>, iff there was new input.
357:             * 
358:             * @exception   IOException  if any I/O-Error occurs
359:             */
360:            private boolean yy_refill() throws java.io.IOException {
361:
362:                /* first: make room (if you can) */
363:                if (yy_startRead > 0) {
364:                    System.arraycopy(yy_buffer, yy_startRead, yy_buffer, 0,
365:                            yy_endRead - yy_startRead);
366:
367:                    /* translate stored positions */
368:                    yy_endRead -= yy_startRead;
369:                    yy_currentPos -= yy_startRead;
370:                    yy_markedPos -= yy_startRead;
371:                    yy_pushbackPos -= yy_startRead;
372:                    yy_startRead = 0;
373:                }
374:
375:                /* is the buffer big enough? */
376:                if (yy_currentPos >= yy_buffer.length) {
377:                    /* if not: blow it up */
378:                    char newBuffer[] = new char[yy_currentPos * 2];
379:                    System.arraycopy(yy_buffer, 0, newBuffer, 0,
380:                            yy_buffer.length);
381:                    yy_buffer = newBuffer;
382:                }
383:
384:                /* finally: fill the buffer with new input */
385:                int numRead = yy_reader.read(yy_buffer, yy_endRead,
386:                        yy_buffer.length - yy_endRead);
387:
388:                if (numRead < 0) {
389:                    return true;
390:                } else {
391:                    yy_endRead += numRead;
392:                    return false;
393:                }
394:            }
395:
396:            /**
397:             * Closes the input stream.
398:             */
399:            final public void yyclose() throws java.io.IOException {
400:                yy_atEOF = true; /* indicate end of file */
401:                yy_endRead = yy_startRead; /* invalidate buffer    */
402:
403:                if (yy_reader != null)
404:                    yy_reader.close();
405:            }
406:
407:            /**
408:             * Closes the current stream, and resets the
409:             * scanner to read from a new input stream.
410:             *
411:             * All internal variables are reset, the old input stream 
412:             * <b>cannot</b> be reused (internal buffer is discarded and lost).
413:             * Lexical state is set to <tt>YY_INITIAL</tt>.
414:             *
415:             * @param reader   the new input stream 
416:             */
417:            final public void yyreset(java.io.Reader reader)
418:                    throws java.io.IOException {
419:                yyclose();
420:                yy_reader = reader;
421:                yy_atBOL = true;
422:                yy_atEOF = false;
423:                yy_endRead = yy_startRead = 0;
424:                yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
425:                yyline = yychar = yycolumn = 0;
426:                yy_lexical_state = YYINITIAL;
427:            }
428:
429:            /**
430:             * Returns the current lexical state.
431:             */
432:            final public int yystate() {
433:                return yy_lexical_state;
434:            }
435:
436:            /**
437:             * Enters a new lexical state
438:             *
439:             * @param newState the new lexical state
440:             */
441:            final public void yybegin(int newState) {
442:                yy_lexical_state = newState;
443:            }
444:
445:            /**
446:             * Returns the text matched by the current regular expression.
447:             */
448:            final public String yytext() {
449:                return new String(yy_buffer, yy_startRead, yy_markedPos
450:                        - yy_startRead);
451:            }
452:
453:            /**
454:             * Returns the character at position <tt>pos</tt> from the 
455:             * matched text. 
456:             * 
457:             * It is equivalent to yytext().charAt(pos), but faster
458:             *
459:             * @param pos the position of the character to fetch. 
460:             *            A value from 0 to yylength()-1.
461:             *
462:             * @return the character at position pos
463:             */
464:            final public char yycharat(int pos) {
465:                return yy_buffer[yy_startRead + pos];
466:            }
467:
468:            /**
469:             * Returns the length of the matched text region.
470:             */
471:            final public int yylength() {
472:                return yy_markedPos - yy_startRead;
473:            }
474:
475:            /**
476:             * Reports an error that occured while scanning.
477:             *
478:             * In a wellformed scanner (no or only correct usage of 
479:             * yypushback(int) and a match-all fallback rule) this method 
480:             * will only be called with things that "Can't Possibly Happen".
481:             * If this method is called, something is seriously wrong
482:             * (e.g. a JFlex bug producing a faulty scanner etc.).
483:             *
484:             * Usual syntax/scanner level error handling should be done
485:             * in error fallback rules.
486:             *
487:             * @param   errorCode  the code of the errormessage to display
488:             */
489:            private void yy_ScanError(int errorCode) {
490:                String message;
491:                try {
492:                    message = YY_ERROR_MSG[errorCode];
493:                } catch (ArrayIndexOutOfBoundsException e) {
494:                    message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];
495:                }
496:
497:                throw new Error(message);
498:            }
499:
500:            /**
501:             * Pushes the specified amount of characters back into the input stream.
502:             *
503:             * They will be read again by then next call of the scanning method
504:             *
505:             * @param number  the number of characters to be read again.
506:             *                This number must not be greater than yylength()!
507:             */
508:            private void yypushback(int number) {
509:                if (number > yylength())
510:                    yy_ScanError(YY_PUSHBACK_2BIG);
511:
512:                yy_markedPos -= number;
513:            }
514:
515:            /**
516:             * Resumes scanning until the next regular expression is matched,
517:             * the end of input is encountered or an I/O-Error occurs.
518:             *
519:             * @return      the next token
520:             * @exception   IOException  if any I/O-Error occurs
521:             */
522:            public String yylex() throws java.io.IOException {
523:                int yy_input;
524:                int yy_action;
525:
526:                // cached fields:
527:                int yy_currentPos_l;
528:                int yy_startRead_l;
529:                int yy_markedPos_l;
530:                int yy_endRead_l = yy_endRead;
531:                char[] yy_buffer_l = yy_buffer;
532:                char[] yycmap_l = yycmap;
533:
534:                int[] yytrans_l = yytrans;
535:                int[] yy_rowMap_l = yy_rowMap;
536:                byte[] yy_attr_l = YY_ATTRIBUTE;
537:
538:                while (true) {
539:                    yy_markedPos_l = yy_markedPos;
540:
541:                    if (yy_markedPos_l > yy_startRead) {
542:                        switch (yy_buffer_l[yy_markedPos_l - 1]) {
543:                        case '\n':
544:                        case '\u000B':
545:                        case '\u000C':
546:                        case '\u0085':
547:                        case '\u2028':
548:                        case '\u2029':
549:                            yy_atBOL = true;
550:                            break;
551:                        case '\r':
552:                            if (yy_markedPos_l < yy_endRead_l)
553:                                yy_atBOL = yy_buffer_l[yy_markedPos_l] != '\n';
554:                            else if (yy_atEOF)
555:                                yy_atBOL = false;
556:                            else {
557:                                boolean eof = yy_refill();
558:                                yy_markedPos_l = yy_markedPos;
559:                                yy_buffer_l = yy_buffer;
560:                                if (eof)
561:                                    yy_atBOL = false;
562:                                else
563:                                    yy_atBOL = yy_buffer_l[yy_markedPos_l] != '\n';
564:                            }
565:                            break;
566:                        default:
567:                            yy_atBOL = false;
568:                        }
569:                    }
570:                    yy_action = -1;
571:
572:                    yy_startRead_l = yy_currentPos_l = yy_currentPos = yy_startRead = yy_markedPos_l;
573:
574:                    if (yy_atBOL)
575:                        yy_state = YY_LEXSTATE[yy_lexical_state + 1];
576:                    else
577:                        yy_state = YY_LEXSTATE[yy_lexical_state];
578:
579:                    yy_forAction: {
580:                        while (true) {
581:
582:                            if (yy_currentPos_l < yy_endRead_l)
583:                                yy_input = yy_buffer_l[yy_currentPos_l++];
584:                            else if (yy_atEOF) {
585:                                yy_input = YYEOF;
586:                                break yy_forAction;
587:                            } else {
588:                                // store back cached positions
589:                                yy_currentPos = yy_currentPos_l;
590:                                yy_markedPos = yy_markedPos_l;
591:                                boolean eof = yy_refill();
592:                                // get translated positions and possibly new buffer
593:                                yy_currentPos_l = yy_currentPos;
594:                                yy_markedPos_l = yy_markedPos;
595:                                yy_buffer_l = yy_buffer;
596:                                yy_endRead_l = yy_endRead;
597:                                if (eof) {
598:                                    yy_input = YYEOF;
599:                                    break yy_forAction;
600:                                } else {
601:                                    yy_input = yy_buffer_l[yy_currentPos_l++];
602:                                }
603:                            }
604:                            int yy_next = yytrans_l[yy_rowMap_l[yy_state]
605:                                    + yycmap_l[yy_input]];
606:                            if (yy_next == -1)
607:                                break yy_forAction;
608:                            yy_state = yy_next;
609:
610:                            int yy_attributes = yy_attr_l[yy_state];
611:                            if ((yy_attributes & 1) == 1) {
612:                                yy_action = yy_state;
613:                                yy_markedPos_l = yy_currentPos_l;
614:                                if ((yy_attributes & 8) == 8)
615:                                    break yy_forAction;
616:                            }
617:
618:                        }
619:                    }
620:
621:                    // store back cached position
622:                    yy_markedPos = yy_markedPos_l;
623:
624:                    switch (yy_action) {
625:
626:                    case 89: {
627:                        cat.debug("@@@@{newline} entering PRE");
628:                        yybegin(PRE);
629:                        return yytext();
630:                    }
631:                    case 112:
632:                        break;
633:                    case 14: {
634:                        return "&amp;";
635:                    }
636:                    case 113:
637:                        break;
638:                    case 13: {
639:                        return "&gt;";
640:                    }
641:                    case 114:
642:                        break;
643:                    case 12: {
644:                        return "&lt;";
645:                    }
646:                    case 115:
647:                        break;
648:                    case 6:
649:                    case 10:
650:                    case 11:
651:                    case 15:
652:                    case 16:
653:                    case 17:
654:                    case 18:
655:                    case 19:
656:                    case 20:
657:                    case 21:
658:                    case 22:
659:                    case 23:
660:                    case 24:
661:                    case 28:
662:                    case 29: {
663:                        cat.debug(". (" + yytext() + ")");
664:                        return yytext();
665:                    }
666:                    case 116:
667:                        break;
668:                    case 61: {
669:                        return "\\__";
670:                    }
671:                    case 117:
672:                        break;
673:                    case 8:
674:                    case 9: {
675:                        cat.debug("{whitespace}");
676:                        return yytext();
677:                    }
678:                    case 118:
679:                        break;
680:                    case 72: {
681:                        return yytext();
682:                    }
683:                    case 119:
684:                        break;
685:                    case 64: {
686:                        return convert.onCodeBegin();
687:                    }
688:                    case 120:
689:                        break;
690:                    case 7: {
691:                        return convert.onEndOfLine(yytext());
692:                    }
693:                    case 121:
694:                        break;
695:                    case 65: {
696:                        return convert.onCodeEnd();
697:                    }
698:                    case 122:
699:                        break;
700:                    case 38: {
701:                        return convert.onColorEnd(yytext());
702:                    }
703:                    case 123:
704:                        break;
705:                    case 46: {
706:                        return convert.onNewline();
707:                    }
708:                    case 124:
709:                        break;
710:                    case 62: {
711:                        return convert.onBold(yytext());
712:                    }
713:                    case 125:
714:                        break;
715:                    case 60: {
716:                        return convert.onColorStart(yytext());
717:                    }
718:                    case 126:
719:                        break;
720:                    case 41: {
721:                        return convert.onItalic(yytext());
722:                    }
723:                    case 127:
724:                        break;
725:                    case 42: {
726:                        return convert.onCenter(yytext());
727:                    }
728:                    case 128:
729:                        break;
730:                    case 104: {
731:                        yybegin(NORMAL);
732:                        return yytext();
733:                    }
734:                    case 129:
735:                        break;
736:                    case 50: {
737:                        cat.debug("{newline}x2 leaving pre");
738:                        yybegin(NORMAL);
739:                        return yytext();
740:                    }
741:                    case 130:
742:                        break;
743:                    case 86: {
744:                        yybegin(EXTERNAL);
745:                        return yytext();
746:                    }
747:                    case 131:
748:                        break;
749:                    case 30: {
750:                        yybegin(OFF);
751:                        return "__";
752:                    }
753:                    case 132:
754:                        break;
755:                    case 108: {
756:                        return convert.onHeadlineOne(yytext());
757:                    }
758:                    case 133:
759:                        break;
760:                    case 98: {
761:                        return convert.onHeadlineTwo(yytext());
762:                    }
763:                    case 134:
764:                        break;
765:                    case 31: {
766:                        return convert.onNbsp();
767:                    }
768:                    case 135:
769:                        break;
770:                    case 25:
771:                    case 26:
772:                    case 27: {
773:                        cat.debug("PRE {whitespace}");
774:                        return yytext();
775:                    }
776:                    case 136:
777:                        break;
778:                    case 78: {
779:                        return convert.onHeadlineThree(yytext());
780:                    }
781:                    case 137:
782:                        break;
783:                    case 49: {
784:                        yybegin(NORMAL);
785:                        return "__";
786:                    }
787:                    case 138:
788:                        break;
789:                    case 87: {
790:                        return "&amp;amp;";
791:                    }
792:                    case 139:
793:                        break;
794:                    case 74: {
795:                        return "&amp;gt;";
796:                    }
797:                    case 140:
798:                        break;
799:                    case 73: {
800:                        return "&amp;lt;";
801:                    }
802:                    case 141:
803:                        break;
804:                    case 63: {
805:                        return convert.onUnderline(yytext());
806:                    }
807:                    case 142:
808:                        break;
809:                    default:
810:                        if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
811:                            yy_atEOF = true;
812:                            {
813:                                return convert.onEOF();
814:                            }
815:                        } else {
816:                            yy_ScanError(YY_NO_MATCH);
817:                        }
818:                    }
819:                }
820:            }
821:
822:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.