source: other-projects/rsyntax-textarea/src/java/org/fife/ui/rsyntaxtextarea/modes/SQLTokenMaker.java@ 25584

Last change on this file since 25584 was 25584, checked in by davidb, 12 years ago

Initial cut an a text edit area for GLI that supports color syntax highlighting

File size: 40.0 KB
Line 
1/* The following code was generated by JFlex 1.4.1 on 2/7/09 11:02 AM */
2
3/*
4 * 02/15/2005
5 *
6 * SQLTokenMaker.java - Scanner for SQL.
7 *
8 * This library is distributed under a modified BSD license. See the included
9 * RSyntaxTextArea.License.txt file for details.
10 */
11package org.fife.ui.rsyntaxtextarea.modes;
12
13import java.io.*;
14import javax.swing.text.Segment;
15
16import org.fife.ui.rsyntaxtextarea.*;
17
18
19/**
20 * This class generates tokens representing a text stream as SQL.<p>
21 *
22 * This implementation was created using
23 * <a href="http://www.jflex.de/">JFlex</a> 1.4.1; however, the generated file
24 * was modified for performance. Memory allocation needs to be almost
25 * completely removed to be competitive with the handwritten lexers (subclasses
26 * of <code>AbstractTokenMaker</code>, so this class has been modified so that
27 * Strings are never allocated (via yytext()), and the scanner never has to
28 * worry about refilling its buffer (needlessly copying chars around).
29 * We can achieve this because RText always scans exactly 1 line of tokens at a
30 * time, and hands the scanner this line as an array of characters (a Segment
31 * really). Since tokens contain pointers to char arrays instead of Strings
32 * holding their contents, there is no need for allocating new memory for
33 * Strings.<p>
34 *
35 * The actual algorithm generated for scanning has, of course, not been
36 * modified.<p>
37 *
38 * If you wish to regenerate this file yourself, keep in mind the following:
39 * <ul>
40 * <li>The generated SQLTokenMaker.java</code> file will contain two
41 * definitions of both <code>zzRefill</code> and <code>yyreset</code>.
42 * You should hand-delete the second of each definition (the ones
43 * generated by the lexer), as these generated methods modify the input
44 * buffer, which we'll never have to do.</li>
45 * <li>You should also change the declaration/definition of zzBuffer to NOT
46 * be initialized. This is a needless memory allocation for us since we
47 * will be pointing the array somewhere else anyway.</li>
48 * <li>You should NOT call <code>yylex()</code> on the generated scanner
49 * directly; rather, you should use <code>getTokenList</code> as you would
50 * with any other <code>TokenMaker</code> instance.</li>
51 * </ul>
52 *
53 * @author Robert Futrell
54 * @version 0.5
55 *
56 */
57
58public class SQLTokenMaker extends AbstractJFlexTokenMaker {
59
60 /** This character denotes the end of file */
61 public static final int YYEOF = -1;
62
63 /** lexical states */
64 public static final int STRING = 1;
65 public static final int YYINITIAL = 0;
66 public static final int MLC = 3;
67 public static final int CHAR = 2;
68
69 /**
70 * Translates characters to character classes
71 */
72 private static final String ZZ_CMAP_PACKED =
73 "\11\0\1\4\1\1\25\0\1\4\1\0\1\54\4\0\1\55\2\15"+
74 "\1\13\1\11\1\0\1\12\1\17\1\14\1\3\1\50\1\50\1\3"+
75 "\1\45\3\3\1\46\1\3\1\16\1\0\1\10\1\7\1\6\2\0"+
76 "\1\21\1\37\1\31\1\22\1\20\1\44\1\47\1\41\1\34\1\51"+
77 "\1\52\1\23\1\35\1\26\1\33\1\42\1\53\1\25\1\30\1\24"+
78 "\1\32\1\36\1\40\1\43\1\27\1\2\1\56\1\0\1\57\1\0"+
79 "\1\5\1\0\1\21\1\37\1\31\1\22\1\20\1\44\1\47\1\41"+
80 "\1\34\1\51\1\52\1\23\1\35\1\26\1\33\1\42\1\53\1\25"+
81 "\1\30\1\24\1\32\1\36\1\40\1\43\1\27\1\2\uff85\0";
82
83 /**
84 * Translates characters to character classes
85 */
86 private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
87
88 /**
89 * Translates DFA states to action switch labels.
90 */
91 private static final int [] ZZ_ACTION = zzUnpackAction();
92
93 private static final String ZZ_ACTION_PACKED_0 =
94 "\4\0\1\1\1\2\1\1\1\3\1\4\5\5\1\6"+
95 "\1\1\1\7\27\1\1\10\1\11\1\12\1\13\1\14"+
96 "\1\15\1\13\1\16\1\17\1\13\1\20\1\13\1\0"+
97 "\1\21\1\22\4\1\1\23\45\1\2\23\4\1\1\23"+
98 "\7\1\1\23\22\1\1\24\1\13\1\25\1\7\1\0"+
99 "\3\1\1\26\51\1\1\23\4\1\1\23\2\1\1\23"+
100 "\22\1\1\23\4\1\1\23\4\1\1\23\17\1\1\23"+
101 "\35\1\1\23\5\1\1\23\10\1\1\23\5\1\1\23"+
102 "\11\1\1\23\42\1\1\23\4\1\1\23\16\1\1\26"+
103 "\4\1";
104
105 private static int [] zzUnpackAction() {
106 int [] result = new int[354];
107 int offset = 0;
108 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
109 return result;
110 }
111
112 private static int zzUnpackAction(String packed, int offset, int [] result) {
113 int i = 0; /* index in packed string */
114 int j = offset; /* index in unpacked array */
115 int l = packed.length();
116 while (i < l) {
117 int count = packed.charAt(i++);
118 int value = packed.charAt(i++);
119 do result[j++] = value; while (--count > 0);
120 }
121 return j;
122 }
123
124
125 /**
126 * Translates a state to a row index in the transition table
127 */
128 private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
129
130 private static final String ZZ_ROWMAP_PACKED_0 =
131 "\0\0\0\60\0\140\0\220\0\300\0\300\0\360\0\u0120"+
132 "\0\u0150\0\u0180\0\300\0\u01b0\0\u01e0\0\u0210\0\300\0\u0240"+
133 "\0\u0270\0\u02a0\0\u02d0\0\u0300\0\u0330\0\u0360\0\u0390\0\u03c0"+
134 "\0\u03f0\0\u0420\0\u0450\0\u0480\0\u04b0\0\u04e0\0\u0510\0\u0540"+
135 "\0\u0570\0\u05a0\0\u05d0\0\u0600\0\u0630\0\u0660\0\u0690\0\u06c0"+
136 "\0\300\0\300\0\u06f0\0\u0720\0\300\0\u0750\0\u0780\0\300"+
137 "\0\u07b0\0\u07e0\0\300\0\u0810\0\u0840\0\u0870\0\300\0\u08a0"+
138 "\0\u08d0\0\u0900\0\u0930\0\u0960\0\u0990\0\u09c0\0\u09f0\0\u0a20"+
139 "\0\u0a50\0\u0a80\0\u0ab0\0\u0ae0\0\u0b10\0\u0b40\0\u0b70\0\u0ba0"+
140 "\0\u0bd0\0\u0c00\0\u0c30\0\u0c60\0\u0c90\0\u0cc0\0\u0cf0\0\u0d20"+
141 "\0\u0d50\0\u0d80\0\u0db0\0\u0de0\0\u0e10\0\u0e40\0\u0e70\0\u0ea0"+
142 "\0\u0ed0\0\u0f00\0\u0f30\0\u0f60\0\u0f90\0\u0fc0\0\u0ff0\0\u1020"+
143 "\0\u1050\0\u1080\0\360\0\u10b0\0\u10e0\0\u1110\0\u1140\0\u1170"+
144 "\0\u11a0\0\u11d0\0\u1200\0\u1230\0\u1260\0\u1290\0\u12c0\0\u12f0"+
145 "\0\u1320\0\u1350\0\u1380\0\u13b0\0\u13e0\0\u1410\0\u1440\0\u1470"+
146 "\0\u14a0\0\u14d0\0\u1500\0\u1530\0\u1560\0\u1590\0\u15c0\0\u15f0"+
147 "\0\u1620\0\u1650\0\300\0\300\0\300\0\u1680\0\u1680\0\u16b0"+
148 "\0\u16e0\0\u1710\0\360\0\u1740\0\u0960\0\u1770\0\u17a0\0\u17d0"+
149 "\0\u1800\0\u1830\0\u1860\0\u1890\0\u18c0\0\u18f0\0\u1920\0\u1950"+
150 "\0\u1980\0\u19b0\0\u19e0\0\u1a10\0\u1a40\0\u1a70\0\u1aa0\0\u1ad0"+
151 "\0\u1b00\0\u1b30\0\u1b60\0\u1b90\0\u1bc0\0\u1bf0\0\u1c20\0\u1c50"+
152 "\0\u1c80\0\u1cb0\0\u1ce0\0\u1d10\0\u1d40\0\u1d70\0\u1da0\0\u1dd0"+
153 "\0\u1e00\0\u1e30\0\u1e60\0\u1e90\0\u1ec0\0\u1ef0\0\u1f20\0\u1f50"+
154 "\0\u1f80\0\u1fb0\0\u1fe0\0\u2010\0\u2040\0\u2070\0\u20a0\0\u20d0"+
155 "\0\u2100\0\u2130\0\u2160\0\u2190\0\u21c0\0\u21f0\0\u2220\0\u2250"+
156 "\0\u2280\0\u22b0\0\u22e0\0\u2310\0\u2340\0\u2370\0\u12f0\0\u23a0"+
157 "\0\u23d0\0\u2400\0\u2430\0\u2460\0\u2490\0\u24c0\0\u24f0\0\u2520"+
158 "\0\u2550\0\u2580\0\u25b0\0\u25e0\0\u2610\0\u2640\0\u2670\0\u26a0"+
159 "\0\u26d0\0\u2700\0\u2730\0\u2760\0\u2790\0\u27c0\0\u27f0\0\u2820"+
160 "\0\u2850\0\u2880\0\u28b0\0\u28e0\0\u2910\0\u2940\0\u2970\0\u29a0"+
161 "\0\u29d0\0\u2a00\0\u2a30\0\u2a60\0\u2a90\0\u2ac0\0\u2af0\0\u2b20"+
162 "\0\u2b50\0\u2b80\0\u2bb0\0\u2be0\0\u2c10\0\u2c40\0\u2c70\0\u2ca0"+
163 "\0\u2cd0\0\u2d00\0\u2d30\0\u2d60\0\u2d90\0\u2dc0\0\u2df0\0\u15f0"+
164 "\0\u2e20\0\u2e50\0\u2e80\0\u2eb0\0\u2ee0\0\u0c30\0\u2f10\0\u2f40"+
165 "\0\u2f70\0\u2fa0\0\u2fd0\0\u3000\0\u3030\0\u3060\0\u0ff0\0\u3090"+
166 "\0\u30c0\0\u2040\0\u30f0\0\u3120\0\u2ca0\0\u3150\0\u3180\0\u31b0"+
167 "\0\u31e0\0\u3210\0\u3240\0\u3270\0\u32a0\0\u32d0\0\u3300\0\u3330"+
168 "\0\u3360\0\u3390\0\u33c0\0\u33f0\0\u3420\0\u3450\0\u3480\0\u34b0"+
169 "\0\u34e0\0\u3510\0\u3540\0\u3570\0\u35a0\0\u35d0\0\u3600\0\u3630"+
170 "\0\u3660\0\u3690\0\u36c0\0\u36f0\0\u3720\0\u3750\0\u3780\0\u37b0"+
171 "\0\u37e0\0\u3810\0\u3840\0\u3870\0\u38a0\0\u38d0\0\u3900\0\u3930"+
172 "\0\u3960\0\u3990\0\u39c0\0\u39f0\0\u3a20\0\u3a50\0\u3a80\0\u3ab0"+
173 "\0\u3ae0\0\u3b10\0\u3b40\0\u3b70\0\u3ba0\0\u3bd0\0\u3c00\0\u3c30"+
174 "\0\u3c60\0\u3c90\0\u3cc0\0\u3cf0\0\u3d20\0\u3d50\0\u3d80\0\u3db0"+
175 "\0\u3de0\0\u3e10";
176
177 private static int [] zzUnpackRowMap() {
178 int [] result = new int[354];
179 int offset = 0;
180 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
181 return result;
182 }
183
184 private static int zzUnpackRowMap(String packed, int offset, int [] result) {
185 int i = 0; /* index in packed string */
186 int j = offset; /* index in unpacked array */
187 int l = packed.length();
188 while (i < l) {
189 int high = packed.charAt(i++) << 16;
190 result[j++] = high | packed.charAt(i++);
191 }
192 return j;
193 }
194
195 /**
196 * The transition table of the DFA
197 */
198 private static final int [] ZZ_TRANS = zzUnpackTrans();
199
200 private static final String ZZ_TRANS_PACKED_0 =
201 "\1\5\1\6\1\7\1\10\1\11\1\5\1\12\1\13"+
202 "\1\14\1\13\1\15\1\13\1\16\1\17\1\20\1\21"+
203 "\1\22\1\23\1\24\1\25\1\26\1\27\1\30\1\31"+
204 "\1\32\1\33\1\34\1\35\1\36\1\37\1\40\1\41"+
205 "\1\42\1\43\1\44\1\7\1\45\2\10\1\46\1\10"+
206 "\1\47\1\50\1\7\1\51\1\52\1\53\1\5\1\54"+
207 "\1\55\52\54\1\56\3\54\1\57\1\60\53\57\1\61"+
208 "\2\57\1\62\1\63\11\62\1\64\44\62\62\0\2\7"+
209 "\1\0\1\7\12\0\34\7\7\0\1\10\13\0\1\21"+
210 "\1\65\24\0\2\10\1\0\1\10\13\0\1\11\62\0"+
211 "\1\13\56\0\2\13\62\0\1\66\60\0\1\67\46\0"+
212 "\1\7\15\0\25\7\2\0\1\7\1\0\3\7\7\0"+
213 "\1\21\14\0\1\65\24\0\2\21\1\0\1\21\11\0"+
214 "\2\7\1\0\1\7\12\0\23\7\1\70\10\7\6\0"+
215 "\2\7\1\0\1\7\12\0\2\7\1\71\1\72\2\7"+
216 "\1\73\1\7\1\74\1\7\1\75\3\7\1\76\15\7"+
217 "\6\0\2\7\1\0\1\7\12\0\1\77\1\100\3\7"+
218 "\1\101\5\7\1\102\1\103\17\7\6\0\2\7\1\0"+
219 "\1\7\12\0\1\104\12\7\1\105\1\106\17\7\6\0"+
220 "\2\7\1\0\1\7\12\0\1\107\1\110\3\7\1\111"+
221 "\1\7\1\112\3\7\1\113\1\114\17\7\6\0\2\7"+
222 "\1\0\1\7\12\0\1\115\13\7\1\116\17\7\6\0"+
223 "\2\7\1\0\1\7\12\0\12\7\1\117\1\120\20\7"+
224 "\6\0\2\7\1\0\1\7\12\0\1\121\33\7\6\0"+
225 "\2\7\1\0\1\7\12\0\1\122\3\7\1\123\2\7"+
226 "\1\124\2\7\1\125\1\126\1\127\1\130\3\7\1\131"+
227 "\12\7\6\0\2\7\1\0\1\7\12\0\5\7\1\132"+
228 "\4\7\1\133\1\134\5\7\1\135\12\7\6\0\2\7"+
229 "\1\0\1\7\12\0\6\7\1\136\1\7\1\137\11\7"+
230 "\1\140\11\7\6\0\2\7\1\0\1\7\12\0\3\7"+
231 "\1\141\1\7\1\142\1\143\2\7\1\144\1\145\5\7"+
232 "\1\146\1\7\1\147\11\7\6\0\2\7\1\0\1\7"+
233 "\12\0\6\7\1\150\1\7\1\143\4\7\1\113\11\7"+
234 "\1\151\4\7\6\0\2\7\1\0\1\7\12\0\1\152"+
235 "\1\153\11\7\1\154\1\155\17\7\6\0\2\7\1\0"+
236 "\1\7\12\0\1\7\1\156\32\7\6\0\2\7\1\0"+
237 "\1\7\12\0\1\157\6\7\1\160\3\7\1\161\1\162"+
238 "\17\7\6\0\2\7\1\0\1\7\12\0\14\7\1\163"+
239 "\4\7\1\164\12\7\6\0\2\7\1\0\1\7\12\0"+
240 "\1\7\1\165\32\7\6\0\2\7\1\0\1\7\12\0"+
241 "\1\166\1\167\3\7\1\170\5\7\1\171\1\172\17\7"+
242 "\6\0\2\7\1\0\1\7\12\0\3\7\1\173\1\7"+
243 "\1\174\5\7\1\175\20\7\6\0\2\7\1\0\1\7"+
244 "\12\0\1\176\4\7\1\177\4\7\1\200\21\7\6\0"+
245 "\2\7\1\0\1\7\12\0\13\7\1\201\20\7\6\0"+
246 "\2\7\1\0\1\7\12\0\1\202\33\7\4\0\57\53"+
247 "\1\203\1\54\1\0\52\54\1\0\3\54\54\0\1\204"+
248 "\3\0\1\57\1\0\53\57\1\0\2\57\55\0\1\204"+
249 "\2\0\1\62\1\0\11\62\1\0\44\62\14\0\1\205"+
250 "\46\0\1\206\5\0\2\207\32\0\2\206\1\0\1\206"+
251 "\7\0\1\66\1\0\56\66\2\0\2\7\1\0\1\7"+
252 "\12\0\4\7\1\210\7\7\1\211\17\7\6\0\2\7"+
253 "\1\0\1\7\12\0\2\7\1\143\31\7\6\0\2\7"+
254 "\1\0\1\7\12\0\3\7\1\143\1\137\27\7\6\0"+
255 "\2\7\1\0\1\7\12\0\2\7\1\143\4\7\1\143"+
256 "\24\7\6\0\2\7\1\0\1\7\12\0\11\7\1\143"+
257 "\22\7\6\0\2\7\1\0\1\7\12\0\4\7\1\212"+
258 "\27\7\6\0\2\7\1\0\1\7\12\0\1\7\1\143"+
259 "\25\7\1\213\4\7\6\0\2\7\1\0\1\7\12\0"+
260 "\3\7\1\214\4\7\1\215\23\7\6\0\2\7\1\0"+
261 "\1\7\12\0\4\7\1\216\27\7\6\0\2\7\1\0"+
262 "\1\7\12\0\13\7\1\113\20\7\6\0\2\7\1\0"+
263 "\1\7\12\0\12\7\1\217\21\7\6\0\2\7\1\0"+
264 "\1\7\12\0\10\7\1\220\23\7\6\0\2\7\1\0"+
265 "\1\7\12\0\16\7\1\221\5\7\1\120\7\7\6\0"+
266 "\2\7\1\0\1\7\12\0\6\7\1\222\11\7\1\223"+
267 "\6\7\1\224\4\7\6\0\2\7\1\0\1\7\12\0"+
268 "\32\7\1\225\1\7\6\0\2\7\1\0\1\7\12\0"+
269 "\23\7\1\120\10\7\6\0\2\7\1\0\1\7\12\0"+
270 "\17\7\1\226\14\7\6\0\2\7\1\0\1\7\12\0"+
271 "\1\7\1\227\12\7\1\230\17\7\6\0\2\7\1\0"+
272 "\1\7\12\0\22\7\1\225\11\7\6\0\2\7\1\0"+
273 "\1\7\12\0\22\7\1\143\11\7\6\0\2\7\1\0"+
274 "\1\7\12\0\15\7\1\231\16\7\6\0\2\7\1\0"+
275 "\1\7\12\0\1\7\1\232\22\7\1\233\7\7\6\0"+
276 "\2\7\1\0\1\7\12\0\27\7\1\234\4\7\6\0"+
277 "\2\7\1\0\1\7\12\0\3\7\1\232\11\7\1\235"+
278 "\16\7\6\0\2\7\1\0\1\7\12\0\4\7\1\143"+
279 "\27\7\6\0\2\7\1\0\1\7\12\0\10\7\1\236"+
280 "\23\7\6\0\2\7\1\0\1\7\12\0\3\7\1\237"+
281 "\1\143\3\7\1\240\23\7\6\0\2\7\1\0\1\7"+
282 "\12\0\2\7\1\241\2\7\1\242\26\7\6\0\2\7"+
283 "\1\0\1\7\12\0\10\7\1\243\23\7\6\0\2\7"+
284 "\1\0\1\7\12\0\15\7\1\143\1\7\1\244\14\7"+
285 "\6\0\2\7\1\0\1\7\12\0\15\7\1\225\16\7"+
286 "\6\0\2\7\1\0\1\7\12\0\6\7\1\245\25\7"+
287 "\6\0\2\7\1\0\1\7\12\0\1\7\1\246\32\7"+
288 "\6\0\2\7\1\0\1\7\12\0\13\7\1\247\20\7"+
289 "\6\0\2\7\1\0\1\7\12\0\1\250\33\7\6\0"+
290 "\2\7\1\0\1\7\12\0\5\7\1\251\26\7\6\0"+
291 "\2\7\1\0\1\7\12\0\3\7\1\252\2\7\1\253"+
292 "\3\7\1\254\21\7\6\0\2\7\1\0\1\7\12\0"+
293 "\1\7\1\255\32\7\6\0\2\7\1\0\1\7\12\0"+
294 "\14\7\1\256\17\7\6\0\2\7\1\0\1\7\12\0"+
295 "\1\257\33\7\6\0\2\7\1\0\1\7\12\0\2\7"+
296 "\1\250\17\7\1\223\11\7\6\0\2\7\1\0\1\7"+
297 "\12\0\1\260\33\7\6\0\2\7\1\0\1\7\12\0"+
298 "\2\7\1\137\31\7\6\0\2\7\1\0\1\7\12\0"+
299 "\4\7\1\261\27\7\6\0\2\7\1\0\1\7\12\0"+
300 "\4\7\1\137\27\7\6\0\2\7\1\0\1\7\12\0"+
301 "\6\7\1\262\25\7\6\0\2\7\1\0\1\7\12\0"+
302 "\4\7\1\263\27\7\6\0\2\7\1\0\1\7\12\0"+
303 "\2\7\1\264\1\7\1\265\1\7\1\137\1\7\1\266"+
304 "\23\7\6\0\2\7\1\0\1\7\12\0\6\7\1\267"+
305 "\25\7\6\0\2\7\1\0\1\7\12\0\15\7\1\270"+
306 "\16\7\6\0\2\7\1\0\1\7\12\0\23\7\1\143"+
307 "\10\7\6\0\2\7\1\0\1\7\12\0\2\7\1\143"+
308 "\3\7\1\50\25\7\6\0\2\7\1\0\1\7\12\0"+
309 "\6\7\1\143\25\7\6\0\2\7\1\0\1\7\12\0"+
310 "\3\7\1\271\1\7\1\272\26\7\6\0\2\7\1\0"+
311 "\1\7\12\0\4\7\1\273\27\7\6\0\2\7\1\0"+
312 "\1\7\12\0\4\7\1\225\27\7\6\0\2\7\1\0"+
313 "\1\7\12\0\13\7\1\274\20\7\6\0\2\7\1\0"+
314 "\1\7\12\0\4\7\1\275\1\7\1\276\25\7\6\0"+
315 "\2\7\1\0\1\7\12\0\4\7\1\277\27\7\6\0"+
316 "\2\7\1\0\1\7\12\0\1\300\33\7\6\0\2\7"+
317 "\1\0\1\7\12\0\16\7\1\242\15\7\6\0\2\7"+
318 "\1\0\1\7\12\0\5\7\1\301\26\7\6\0\2\7"+
319 "\1\0\1\7\12\0\5\7\1\302\2\7\1\303\23\7"+
320 "\6\0\2\7\1\0\1\7\12\0\14\7\1\304\17\7"+
321 "\6\0\2\7\1\0\1\7\12\0\10\7\1\305\23\7"+
322 "\6\0\2\7\1\0\1\7\12\0\16\7\1\306\15\7"+
323 "\6\0\2\7\1\0\1\7\12\0\13\7\1\307\20\7"+
324 "\6\0\2\7\1\0\1\7\12\0\13\7\1\310\20\7"+
325 "\6\0\2\7\1\0\1\7\12\0\5\7\1\311\26\7"+
326 "\6\0\2\7\1\0\1\7\12\0\6\7\1\312\25\7"+
327 "\6\0\2\7\1\0\1\7\12\0\13\7\1\313\20\7"+
328 "\6\0\2\7\1\0\1\7\12\0\14\7\1\71\17\7"+
329 "\6\0\2\7\1\0\1\7\12\0\14\7\1\155\17\7"+
330 "\6\0\2\7\1\0\1\7\12\0\7\7\1\143\24\7"+
331 "\7\0\1\206\41\0\2\206\1\0\1\206\11\0\2\7"+
332 "\1\0\1\7\12\0\5\7\1\314\26\7\6\0\2\7"+
333 "\1\0\1\7\12\0\10\7\1\315\23\7\6\0\2\7"+
334 "\1\0\1\7\12\0\13\7\1\316\20\7\6\0\2\7"+
335 "\1\0\1\7\12\0\1\317\33\7\6\0\2\7\1\0"+
336 "\1\7\12\0\1\320\1\321\32\7\6\0\2\7\1\0"+
337 "\1\7\12\0\17\7\1\322\14\7\6\0\2\7\1\0"+
338 "\1\7\12\0\1\7\1\323\2\7\1\324\27\7\6\0"+
339 "\2\7\1\0\1\7\12\0\1\232\33\7\6\0\2\7"+
340 "\1\0\1\7\12\0\27\7\1\325\4\7\6\0\2\7"+
341 "\1\0\1\7\12\0\1\326\33\7\6\0\2\7\1\0"+
342 "\1\7\12\0\14\7\1\327\17\7\6\0\2\7\1\0"+
343 "\1\7\12\0\1\143\33\7\6\0\2\7\1\0\1\7"+
344 "\12\0\3\7\1\330\30\7\6\0\2\7\1\0\1\7"+
345 "\12\0\6\7\1\331\25\7\6\0\2\7\1\0\1\7"+
346 "\12\0\15\7\1\213\16\7\6\0\2\7\1\0\1\7"+
347 "\12\0\1\332\33\7\6\0\2\7\1\0\1\7\12\0"+
348 "\3\7\1\143\30\7\6\0\2\7\1\0\1\7\12\0"+
349 "\1\333\33\7\6\0\2\7\1\0\1\7\12\0\21\7"+
350 "\1\120\12\7\6\0\2\7\1\0\1\7\12\0\1\334"+
351 "\16\7\1\137\14\7\6\0\2\7\1\0\1\7\12\0"+
352 "\6\7\1\270\25\7\6\0\2\7\1\0\1\7\12\0"+
353 "\1\335\33\7\6\0\2\7\1\0\1\7\12\0\10\7"+
354 "\1\336\23\7\6\0\2\7\1\0\1\7\12\0\1\337"+
355 "\33\7\6\0\2\7\1\0\1\7\12\0\14\7\1\340"+
356 "\17\7\6\0\2\7\1\0\1\7\12\0\4\7\1\341"+
357 "\27\7\6\0\2\7\1\0\1\7\12\0\10\7\1\342"+
358 "\23\7\6\0\2\7\1\0\1\7\12\0\27\7\1\322"+
359 "\4\7\6\0\2\7\1\0\1\7\12\0\3\7\1\343"+
360 "\30\7\6\0\2\7\1\0\1\7\12\0\5\7\1\120"+
361 "\26\7\6\0\2\7\1\0\1\7\12\0\1\7\1\317"+
362 "\32\7\6\0\2\7\1\0\1\7\12\0\5\7\1\344"+
363 "\26\7\6\0\2\7\1\0\1\7\12\0\12\7\1\345"+
364 "\21\7\6\0\2\7\1\0\1\7\12\0\10\7\1\346"+
365 "\1\347\4\7\1\350\15\7\6\0\2\7\1\0\1\7"+
366 "\12\0\6\7\1\351\25\7\6\0\2\7\1\0\1\7"+
367 "\12\0\5\7\1\352\26\7\6\0\2\7\1\0\1\7"+
368 "\12\0\13\7\1\155\17\7\1\353\6\0\2\7\1\0"+
369 "\1\7\12\0\5\7\1\143\26\7\6\0\2\7\1\0"+
370 "\1\7\12\0\13\7\1\354\20\7\6\0\2\7\1\0"+
371 "\1\7\12\0\1\355\33\7\6\0\2\7\1\0\1\7"+
372 "\12\0\1\356\33\7\6\0\2\7\1\0\1\7\12\0"+
373 "\14\7\1\357\17\7\6\0\2\7\1\0\1\7\12\0"+
374 "\1\153\33\7\6\0\2\7\1\0\1\7\12\0\1\360"+
375 "\12\7\1\143\20\7\6\0\2\7\1\0\1\7\12\0"+
376 "\1\247\33\7\6\0\2\7\1\0\1\7\12\0\13\7"+
377 "\1\300\20\7\6\0\2\7\1\0\1\7\12\0\13\7"+
378 "\1\143\20\7\6\0\2\7\1\0\1\7\12\0\12\7"+
379 "\1\361\21\7\6\0\2\7\1\0\1\7\12\0\11\7"+
380 "\1\362\5\7\1\363\2\7\1\143\11\7\6\0\2\7"+
381 "\1\0\1\7\12\0\20\7\1\364\13\7\6\0\2\7"+
382 "\1\0\1\7\12\0\3\7\1\365\30\7\6\0\2\7"+
383 "\1\0\1\366\12\0\34\7\6\0\2\7\1\0\1\7"+
384 "\12\0\1\7\1\367\32\7\6\0\2\7\1\0\1\7"+
385 "\12\0\21\7\1\143\12\7\6\0\2\7\1\0\1\7"+
386 "\12\0\5\7\1\225\26\7\6\0\2\7\1\0\1\7"+
387 "\12\0\11\7\1\370\22\7\6\0\2\7\1\0\1\7"+
388 "\12\0\1\7\1\371\32\7\6\0\2\7\1\0\1\7"+
389 "\12\0\10\7\1\372\23\7\6\0\2\7\1\0\1\7"+
390 "\12\0\15\7\1\276\16\7\6\0\2\7\1\0\1\7"+
391 "\12\0\14\7\1\373\17\7\6\0\2\7\1\0\1\7"+
392 "\12\0\13\7\1\120\20\7\6\0\2\7\1\0\1\7"+
393 "\12\0\1\7\1\374\32\7\6\0\2\7\1\0\1\7"+
394 "\12\0\15\7\1\143\16\7\6\0\2\7\1\0\1\7"+
395 "\12\0\1\375\33\7\6\0\2\7\1\0\1\7\12\0"+
396 "\1\376\33\7\6\0\2\7\1\0\1\7\12\0\12\7"+
397 "\1\113\21\7\6\0\2\7\1\0\1\7\12\0\1\7"+
398 "\1\377\32\7\6\0\2\7\1\0\1\7\12\0\4\7"+
399 "\1\u0100\27\7\6\0\2\7\1\0\1\7\12\0\14\7"+
400 "\1\u0101\17\7\6\0\2\7\1\0\1\7\12\0\4\7"+
401 "\1\u0102\27\7\6\0\2\7\1\0\1\7\12\0\17\7"+
402 "\1\u0103\14\7\6\0\2\7\1\0\1\7\12\0\3\7"+
403 "\1\225\30\7\6\0\2\7\1\0\1\7\12\0\3\7"+
404 "\1\u0104\30\7\6\0\2\7\1\0\1\7\12\0\14\7"+
405 "\1\u0105\17\7\6\0\2\7\1\0\1\7\12\0\4\7"+
406 "\1\u0106\12\7\1\363\14\7\6\0\2\7\1\0\1\7"+
407 "\12\0\5\7\1\213\26\7\6\0\2\7\1\0\1\7"+
408 "\12\0\11\7\1\u0107\22\7\6\0\2\7\1\0\1\7"+
409 "\12\0\1\u0108\33\7\6\0\2\7\1\0\1\7\12\0"+
410 "\10\7\1\u0109\23\7\6\0\2\7\1\0\1\7\12\0"+
411 "\10\7\1\u010a\23\7\6\0\2\7\1\0\1\7\12\0"+
412 "\5\7\1\u010b\26\7\6\0\2\7\1\0\1\7\12\0"+
413 "\5\7\1\u010c\26\7\6\0\2\7\1\0\1\7\12\0"+
414 "\11\7\1\120\22\7\6\0\2\7\1\0\1\7\12\0"+
415 "\14\7\1\u010d\17\7\6\0\2\7\1\0\1\7\12\0"+
416 "\16\7\1\u010e\15\7\6\0\2\7\1\0\1\7\12\0"+
417 "\6\7\1\u010f\25\7\6\0\2\7\1\0\1\7\12\0"+
418 "\1\u0110\33\7\6\0\2\7\1\0\1\7\12\0\4\7"+
419 "\1\u0111\27\7\6\0\2\7\1\0\1\7\12\0\3\7"+
420 "\1\u0112\30\7\6\0\2\7\1\0\1\7\12\0\1\u0113"+
421 "\33\7\6\0\2\7\1\0\1\7\12\0\15\7\1\155"+
422 "\16\7\6\0\2\7\1\0\1\7\12\0\4\7\1\u0114"+
423 "\27\7\6\0\2\7\1\0\1\7\12\0\1\7\1\u0115"+
424 "\32\7\6\0\2\7\1\0\1\7\12\0\1\u0116\33\7"+
425 "\6\0\2\7\1\0\1\7\12\0\4\7\1\u0117\27\7"+
426 "\6\0\2\7\1\0\1\366\12\0\1\7\1\u0118\32\7"+
427 "\6\0\2\7\1\0\1\7\12\0\12\7\1\225\21\7"+
428 "\6\0\2\7\1\0\1\7\12\0\17\7\1\u0119\14\7"+
429 "\6\0\2\7\1\0\1\7\12\0\4\7\1\u011a\27\7"+
430 "\6\0\2\7\1\0\1\7\12\0\5\7\1\u011b\26\7"+
431 "\6\0\2\7\1\0\1\7\12\0\13\7\1\155\20\7"+
432 "\6\0\2\7\1\0\1\7\12\0\27\7\1\u011c\4\7"+
433 "\6\0\2\7\1\0\1\7\12\0\1\u011d\33\7\6\0"+
434 "\2\7\1\0\1\7\12\0\21\7\1\u011e\12\7\6\0"+
435 "\2\7\1\0\1\7\12\0\14\7\1\u011f\17\7\6\0"+
436 "\2\7\1\0\1\7\12\0\1\u0120\33\7\6\0\2\7"+
437 "\1\0\1\7\12\0\1\u0121\33\7\6\0\2\7\1\0"+
438 "\1\7\12\0\3\7\1\u0122\30\7\6\0\2\7\1\0"+
439 "\1\7\12\0\5\7\1\202\26\7\6\0\2\7\1\0"+
440 "\1\7\12\0\1\u0123\33\7\6\0\2\7\1\0\1\7"+
441 "\12\0\15\7\1\u0124\16\7\6\0\2\7\1\0\1\7"+
442 "\12\0\20\7\1\u0125\13\7\6\0\2\7\1\0\1\7"+
443 "\12\0\4\7\1\u0126\27\7\6\0\2\7\1\0\1\7"+
444 "\12\0\4\7\1\u0127\27\7\6\0\2\7\1\0\1\7"+
445 "\12\0\14\7\1\u0128\17\7\6\0\2\7\1\0\1\7"+
446 "\12\0\5\7\1\u0107\26\7\6\0\2\7\1\0\1\7"+
447 "\12\0\11\7\1\u0129\22\7\6\0\2\7\1\0\1\7"+
448 "\12\0\10\7\1\143\23\7\6\0\2\7\1\0\1\7"+
449 "\12\0\6\7\1\u012a\25\7\6\0\2\7\1\0\1\7"+
450 "\12\0\14\7\1\126\17\7\6\0\2\7\1\0\1\7"+
451 "\12\0\1\7\1\u012b\32\7\6\0\2\7\1\0\1\7"+
452 "\12\0\3\7\1\u012c\30\7\6\0\2\7\1\0\1\7"+
453 "\12\0\6\7\1\u012d\25\7\6\0\2\7\1\0\1\7"+
454 "\12\0\1\107\33\7\6\0\2\7\1\0\1\7\12\0"+
455 "\1\7\1\232\32\7\6\0\2\7\1\0\1\7\12\0"+
456 "\3\7\1\u012e\20\7\1\u012f\7\7\6\0\2\7\1\0"+
457 "\1\7\12\0\4\7\1\u0130\27\7\6\0\2\7\1\0"+
458 "\1\7\12\0\1\u0131\33\7\6\0\2\7\1\0\1\7"+
459 "\12\0\14\7\1\215\17\7\6\0\2\7\1\0\1\7"+
460 "\12\0\13\7\1\u0132\20\7\6\0\2\7\1\0\1\7"+
461 "\12\0\27\7\1\143\4\7\6\0\2\7\1\0\1\7"+
462 "\12\0\15\7\1\u0133\16\7\6\0\2\7\1\0\1\7"+
463 "\12\0\5\7\1\u0134\26\7\6\0\2\7\1\0\1\7"+
464 "\12\0\14\7\1\u0123\17\7\6\0\2\7\1\0\1\7"+
465 "\12\0\6\7\1\u0135\25\7\6\0\2\7\1\0\1\7"+
466 "\12\0\5\7\1\u0136\26\7\6\0\2\7\1\0\1\7"+
467 "\12\0\4\7\1\u0137\27\7\6\0\2\7\1\0\1\7"+
468 "\12\0\5\7\1\u0129\26\7\6\0\2\7\1\0\1\7"+
469 "\12\0\11\7\1\145\22\7\6\0\2\7\1\0\1\7"+
470 "\12\0\31\7\1\237\2\7\6\0\2\7\1\0\1\7"+
471 "\12\0\1\7\1\u0138\32\7\6\0\2\7\1\0\1\7"+
472 "\12\0\1\u0139\33\7\6\0\2\7\1\0\1\7\12\0"+
473 "\1\7\1\257\32\7\6\0\2\7\1\0\1\7\12\0"+
474 "\6\7\1\276\25\7\6\0\2\7\1\0\1\7\12\0"+
475 "\1\155\33\7\6\0\2\7\1\0\1\7\12\0\1\7"+
476 "\1\155\32\7\6\0\2\7\1\0\1\7\12\0\1\u013a"+
477 "\33\7\6\0\2\7\1\0\1\7\12\0\6\7\1\120"+
478 "\25\7\6\0\2\7\1\0\1\7\12\0\1\u013b\33\7"+
479 "\6\0\2\7\1\0\1\7\12\0\13\7\1\u013c\20\7"+
480 "\6\0\2\7\1\0\1\7\12\0\14\7\1\u013d\17\7"+
481 "\6\0\2\7\1\0\1\7\12\0\25\7\2\143\5\7"+
482 "\6\0\2\7\1\0\1\7\12\0\27\7\1\155\4\7"+
483 "\6\0\2\7\1\0\1\7\12\0\4\7\1\213\27\7"+
484 "\6\0\2\7\1\0\1\7\12\0\11\7\1\u013e\22\7"+
485 "\6\0\2\7\1\0\1\7\12\0\10\7\1\225\23\7"+
486 "\6\0\2\7\1\0\1\7\12\0\13\7\1\u013f\20\7"+
487 "\6\0\2\7\1\0\1\7\12\0\11\7\1\u0140\22\7"+
488 "\6\0\2\7\1\0\1\7\12\0\1\7\1\u0141\32\7"+
489 "\6\0\2\7\1\0\1\7\12\0\13\7\1\u0142\20\7"+
490 "\6\0\2\7\1\0\1\7\12\0\1\7\1\u0143\32\7"+
491 "\6\0\2\7\1\0\1\7\12\0\6\7\1\u0144\25\7"+
492 "\6\0\2\7\1\0\1\7\12\0\6\7\1\u0133\25\7"+
493 "\6\0\2\7\1\0\1\u0145\12\0\34\7\6\0\2\7"+
494 "\1\0\1\7\12\0\14\7\1\u0146\17\7\6\0\2\7"+
495 "\1\0\1\7\12\0\4\7\1\u0147\4\7\1\202\22\7"+
496 "\6\0\2\7\1\0\1\7\12\0\1\7\1\u0112\32\7"+
497 "\6\0\2\7\1\0\1\7\12\0\1\u0148\33\7\6\0"+
498 "\2\7\1\0\1\7\12\0\11\7\1\u0149\22\7\6\0"+
499 "\2\7\1\0\1\7\12\0\5\7\1\u014a\26\7\6\0"+
500 "\2\7\1\0\1\7\12\0\6\7\1\u014b\25\7\6\0"+
501 "\2\7\1\0\1\7\12\0\4\7\1\u014c\27\7\6\0"+
502 "\2\7\1\0\1\7\12\0\5\7\1\71\26\7\6\0"+
503 "\2\7\1\0\1\7\12\0\13\7\1\u014d\20\7\6\0"+
504 "\2\7\1\0\1\7\12\0\5\7\1\u014e\26\7\6\0"+
505 "\2\7\1\0\1\7\12\0\20\7\1\143\13\7\6\0"+
506 "\2\7\1\0\1\7\12\0\4\7\1\u014f\27\7\6\0"+
507 "\2\7\1\0\1\7\12\0\4\7\1\u0150\27\7\6\0"+
508 "\2\7\1\0\1\7\12\0\5\7\1\310\26\7\6\0"+
509 "\2\7\1\0\1\7\12\0\15\7\1\113\16\7\6\0"+
510 "\2\7\1\0\1\7\12\0\11\7\1\u0151\22\7\6\0"+
511 "\2\7\1\0\1\7\12\0\12\7\1\u0152\21\7\6\0"+
512 "\2\7\1\0\1\7\12\0\6\7\1\u0153\25\7\6\0"+
513 "\2\7\1\0\1\u0154\12\0\34\7\6\0\2\7\1\0"+
514 "\1\7\12\0\6\7\1\u012e\25\7\6\0\2\7\1\0"+
515 "\1\7\12\0\11\7\1\u0155\22\7\6\0\2\7\1\0"+
516 "\1\7\12\0\25\7\1\143\2\7\1\143\3\7\6\0"+
517 "\2\7\1\0\1\7\12\0\27\7\1\u0156\4\7\6\0"+
518 "\2\7\1\0\1\7\12\0\1\u0157\33\7\6\0\2\7"+
519 "\1\0\1\7\12\0\6\7\1\213\25\7\6\0\2\7"+
520 "\1\0\1\7\12\0\1\u0158\33\7\6\0\2\7\1\0"+
521 "\1\7\12\0\5\7\1\u012c\26\7\6\0\2\7\1\0"+
522 "\1\7\12\0\1\213\33\7\6\0\2\7\1\0\1\7"+
523 "\12\0\1\u0100\33\7\6\0\2\7\1\0\1\7\12\0"+
524 "\10\7\1\223\23\7\6\0\2\7\1\0\1\7\12\0"+
525 "\27\7\1\213\4\7\6\0\2\7\1\0\1\7\12\0"+
526 "\2\7\1\u012e\1\7\1\u0159\5\7\1\u0152\21\7\6\0"+
527 "\2\7\1\0\1\7\12\0\1\u015a\33\7\6\0\2\7"+
528 "\1\0\1\7\12\0\4\7\1\u015b\27\7\6\0\2\7"+
529 "\1\0\1\7\12\0\5\7\1\u0100\26\7\6\0\2\7"+
530 "\1\0\1\7\12\0\15\7\1\370\16\7\6\0\2\7"+
531 "\1\0\1\7\12\0\14\7\1\u015c\17\7\6\0\2\7"+
532 "\1\0\1\7\12\0\10\7\1\u0100\23\7\6\0\2\7"+
533 "\1\0\1\7\12\0\21\7\1\213\12\7\6\0\2\7"+
534 "\1\0\1\7\12\0\15\7\1\u015d\16\7\6\0\2\7"+
535 "\1\0\1\7\12\0\1\u015e\33\7\6\0\2\7\1\0"+
536 "\1\7\12\0\10\7\1\u015f\23\7\6\0\2\7\1\0"+
537 "\1\7\12\0\4\7\1\u0160\27\7\6\0\2\7\1\0"+
538 "\1\7\12\0\1\7\1\u0161\32\7\6\0\2\7\1\0"+
539 "\1\7\12\0\15\7\1\u0162\16\7\6\0\2\7\1\0"+
540 "\1\7\12\0\22\7\1\213\11\7\4\0";
541
542 private static int [] zzUnpackTrans() {
543 int [] result = new int[15936];
544 int offset = 0;
545 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
546 return result;
547 }
548
549 private static int zzUnpackTrans(String packed, int offset, int [] result) {
550 int i = 0; /* index in packed string */
551 int j = offset; /* index in unpacked array */
552 int l = packed.length();
553 while (i < l) {
554 int count = packed.charAt(i++);
555 int value = packed.charAt(i++);
556 value--;
557 do result[j++] = value; while (--count > 0);
558 }
559 return j;
560 }
561
562
563 /* error codes */
564 private static final int ZZ_UNKNOWN_ERROR = 0;
565 private static final int ZZ_NO_MATCH = 1;
566 private static final int ZZ_PUSHBACK_2BIG = 2;
567
568 /* error messages for the codes above */
569 private static final String ZZ_ERROR_MSG[] = {
570 "Unkown internal scanner error",
571 "Error: could not match input",
572 "Error: pushback value was too large"
573 };
574
575 /**
576 * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
577 */
578 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
579
580 private static final String ZZ_ATTRIBUTE_PACKED_0 =
581 "\4\0\2\11\4\1\1\11\3\1\1\11\31\1\2\11"+
582 "\2\1\1\11\2\1\1\11\2\1\1\11\1\1\1\0"+
583 "\1\1\1\11\113\1\3\11\1\1\1\0\333\1";
584
585 private static int [] zzUnpackAttribute() {
586 int [] result = new int[354];
587 int offset = 0;
588 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
589 return result;
590 }
591
592 private static int zzUnpackAttribute(String packed, int offset, int [] result) {
593 int i = 0; /* index in packed string */
594 int j = offset; /* index in unpacked array */
595 int l = packed.length();
596 while (i < l) {
597 int count = packed.charAt(i++);
598 int value = packed.charAt(i++);
599 do result[j++] = value; while (--count > 0);
600 }
601 return j;
602 }
603
604 /** the input device */
605 private java.io.Reader zzReader;
606
607 /** the current state of the DFA */
608 private int zzState;
609
610 /** the current lexical state */
611 private int zzLexicalState = YYINITIAL;
612
613 /** this buffer contains the current text to be matched and is
614 the source of the yytext() string */
615 private char zzBuffer[];
616
617 /** the textposition at the last accepting state */
618 private int zzMarkedPos;
619
620 /** the current text position in the buffer */
621 private int zzCurrentPos;
622
623 /** startRead marks the beginning of the yytext() string in the buffer */
624 private int zzStartRead;
625
626 /** endRead marks the last character in the buffer, that has been read
627 from input */
628 private int zzEndRead;
629
630 /** zzAtEOF == true <=> the scanner is at the EOF */
631 private boolean zzAtEOF;
632
633 /* user code: */
634
635
636 /**
637 * Constructor. This must be here because JFlex does not generate a
638 * no-parameter constructor.
639 */
640 public SQLTokenMaker() {
641 super();
642 }
643
644
645 /**
646 * Adds the token specified to the current linked list of tokens.
647 *
648 * @param tokenType The token's type.
649 */
650 private void addToken(int tokenType) {
651 addToken(zzStartRead, zzMarkedPos-1, tokenType);
652 }
653
654
655 /**
656 * Adds the token specified to the current linked list of tokens.
657 *
658 * @param tokenType The token's type.
659 */
660 private void addToken(int start, int end, int tokenType) {
661 int so = start + offsetShift;
662 addToken(zzBuffer, start,end, tokenType, so);
663 }
664
665
666 /**
667 * Adds the token specified to the current linked list of tokens.
668 *
669 * @param array The character array.
670 * @param start The starting offset in the array.
671 * @param end The ending offset in the array.
672 * @param tokenType The token's type.
673 * @param startOffset The offset in the document at which this token
674 * occurs.
675 */
676 public void addToken(char[] array, int start, int end, int tokenType, int startOffset) {
677 super.addToken(array, start,end, tokenType, startOffset);
678 zzStartRead = zzMarkedPos;
679 }
680
681
682 /**
683 * Returns the text to place at the beginning and end of a
684 * line to "comment" it in a this programming language.
685 *
686 * @return The start and end strings to add to a line to "comment"
687 * it out.
688 */
689 public String[] getLineCommentStartAndEnd() {
690 return new String[] { "--", null };
691 }
692
693
694 /**
695 * Returns the first token in the linked list of tokens generated
696 * from <code>text</code>. This method must be implemented by
697 * subclasses so they can correctly implement syntax highlighting.
698 *
699 * @param text The text from which to get tokens.
700 * @param initialTokenType The token type we should start with.
701 * @param startOffset The offset into the document at which
702 * <code>text</code> starts.
703 * @return The first <code>Token</code> in a linked list representing
704 * the syntax highlighted text.
705 */
706 public Token getTokenList(Segment text, int initialTokenType, int startOffset) {
707
708 resetTokenList();
709 this.offsetShift = -text.offset + startOffset;
710
711 // Start off in the proper state.
712 int state = Token.NULL;
713 switch (initialTokenType) {
714 case Token.LITERAL_STRING_DOUBLE_QUOTE:
715 state = STRING;
716 start = text.offset;
717 break;
718 case Token.LITERAL_CHAR:
719 state = CHAR;
720 start = text.offset;
721 break;
722 case Token.COMMENT_MULTILINE:
723 state = MLC;
724 start = text.offset;
725 break;
726 default:
727 state = Token.NULL;
728 }
729
730 s = text;
731 try {
732 yyreset(zzReader);
733 yybegin(state);
734 return yylex();
735 } catch (IOException ioe) {
736 ioe.printStackTrace();
737 return new DefaultToken();
738 }
739
740 }
741
742
743 /**
744 * Refills the input buffer.
745 *
746 * @return <code>true</code> if EOF was reached, otherwise
747 * <code>false</code>.
748 */
749 private boolean zzRefill() {
750 return zzCurrentPos>=s.offset+s.count;
751 }
752
753
754 /**
755 * Resets the scanner to read from a new input stream.
756 * Does not close the old reader.
757 *
758 * All internal variables are reset, the old input stream
759 * <b>cannot</b> be reused (internal buffer is discarded and lost).
760 * Lexical state is set to <tt>YY_INITIAL</tt>.
761 *
762 * @param reader the new input stream
763 */
764 public final void yyreset(java.io.Reader reader) {
765 // 's' has been updated.
766 zzBuffer = s.array;
767 /*
768 * We replaced the line below with the two below it because zzRefill
769 * no longer "refills" the buffer (since the way we do it, it's always
770 * "full" the first time through, since it points to the segment's
771 * array). So, we assign zzEndRead here.
772 */
773 //zzStartRead = zzEndRead = s.offset;
774 zzStartRead = s.offset;
775 zzEndRead = zzStartRead + s.count - 1;
776 zzCurrentPos = zzMarkedPos = s.offset;
777 zzLexicalState = YYINITIAL;
778 zzReader = reader;
779 zzAtEOF = false;
780 }
781
782
783
784
785 /**
786 * Creates a new scanner
787 * There is also a java.io.InputStream version of this constructor.
788 *
789 * @param in the java.io.Reader to read input from.
790 */
791 public SQLTokenMaker(java.io.Reader in) {
792 this.zzReader = in;
793 }
794
795 /**
796 * Creates a new scanner.
797 * There is also java.io.Reader version of this constructor.
798 *
799 * @param in the java.io.Inputstream to read input from.
800 */
801 public SQLTokenMaker(java.io.InputStream in) {
802 this(new java.io.InputStreamReader(in));
803 }
804
805 /**
806 * Unpacks the compressed character translation table.
807 *
808 * @param packed the packed character translation table
809 * @return the unpacked character translation table
810 */
811 private static char [] zzUnpackCMap(String packed) {
812 char [] map = new char[0x10000];
813 int i = 0; /* index in packed string */
814 int j = 0; /* index in unpacked array */
815 while (i < 178) {
816 int count = packed.charAt(i++);
817 char value = packed.charAt(i++);
818 do map[j++] = value; while (--count > 0);
819 }
820 return map;
821 }
822
823
824 /**
825 * Closes the input stream.
826 */
827 public final void yyclose() throws java.io.IOException {
828 zzAtEOF = true; /* indicate end of file */
829 zzEndRead = zzStartRead; /* invalidate buffer */
830
831 if (zzReader != null)
832 zzReader.close();
833 }
834
835
836 /**
837 * Returns the current lexical state.
838 */
839 public final int yystate() {
840 return zzLexicalState;
841 }
842
843
844 /**
845 * Enters a new lexical state
846 *
847 * @param newState the new lexical state
848 */
849 public final void yybegin(int newState) {
850 zzLexicalState = newState;
851 }
852
853
854 /**
855 * Returns the text matched by the current regular expression.
856 */
857 public final String yytext() {
858 return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
859 }
860
861
862 /**
863 * Returns the character at position <tt>pos</tt> from the
864 * matched text.
865 *
866 * It is equivalent to yytext().charAt(pos), but faster
867 *
868 * @param pos the position of the character to fetch.
869 * A value from 0 to yylength()-1.
870 *
871 * @return the character at position pos
872 */
873 public final char yycharat(int pos) {
874 return zzBuffer[zzStartRead+pos];
875 }
876
877
878 /**
879 * Returns the length of the matched text region.
880 */
881 public final int yylength() {
882 return zzMarkedPos-zzStartRead;
883 }
884
885
886 /**
887 * Reports an error that occured while scanning.
888 *
889 * In a wellformed scanner (no or only correct usage of
890 * yypushback(int) and a match-all fallback rule) this method
891 * will only be called with things that "Can't Possibly Happen".
892 * If this method is called, something is seriously wrong
893 * (e.g. a JFlex bug producing a faulty scanner etc.).
894 *
895 * Usual syntax/scanner level error handling should be done
896 * in error fallback rules.
897 *
898 * @param errorCode the code of the errormessage to display
899 */
900 private void zzScanError(int errorCode) {
901 String message;
902 try {
903 message = ZZ_ERROR_MSG[errorCode];
904 }
905 catch (ArrayIndexOutOfBoundsException e) {
906 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
907 }
908
909 throw new Error(message);
910 }
911
912
913 /**
914 * Pushes the specified amount of characters back into the input stream.
915 *
916 * They will be read again by then next call of the scanning method
917 *
918 * @param number the number of characters to be read again.
919 * This number must not be greater than yylength()!
920 */
921 public void yypushback(int number) {
922 if ( number > yylength() )
923 zzScanError(ZZ_PUSHBACK_2BIG);
924
925 zzMarkedPos -= number;
926 }
927
928
929 /**
930 * Resumes scanning until the next regular expression is matched,
931 * the end of input is encountered or an I/O-Error occurs.
932 *
933 * @return the next token
934 * @exception java.io.IOException if any I/O-Error occurs
935 */
936 public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException {
937 int zzInput;
938 int zzAction;
939
940 // cached fields:
941 int zzCurrentPosL;
942 int zzMarkedPosL;
943 int zzEndReadL = zzEndRead;
944 char [] zzBufferL = zzBuffer;
945 char [] zzCMapL = ZZ_CMAP;
946
947 int [] zzTransL = ZZ_TRANS;
948 int [] zzRowMapL = ZZ_ROWMAP;
949 int [] zzAttrL = ZZ_ATTRIBUTE;
950
951 while (true) {
952 zzMarkedPosL = zzMarkedPos;
953
954 zzAction = -1;
955
956 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
957
958 zzState = zzLexicalState;
959
960
961 zzForAction: {
962 while (true) {
963
964 if (zzCurrentPosL < zzEndReadL)
965 zzInput = zzBufferL[zzCurrentPosL++];
966 else if (zzAtEOF) {
967 zzInput = YYEOF;
968 break zzForAction;
969 }
970 else {
971 // store back cached positions
972 zzCurrentPos = zzCurrentPosL;
973 zzMarkedPos = zzMarkedPosL;
974 boolean eof = zzRefill();
975 // get translated positions and possibly new buffer
976 zzCurrentPosL = zzCurrentPos;
977 zzMarkedPosL = zzMarkedPos;
978 zzBufferL = zzBuffer;
979 zzEndReadL = zzEndRead;
980 if (eof) {
981 zzInput = YYEOF;
982 break zzForAction;
983 }
984 else {
985 zzInput = zzBufferL[zzCurrentPosL++];
986 }
987 }
988 int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
989 if (zzNext == -1) break zzForAction;
990 zzState = zzNext;
991
992 int zzAttributes = zzAttrL[zzState];
993 if ( (zzAttributes & 1) == 1 ) {
994 zzAction = zzState;
995 zzMarkedPosL = zzCurrentPosL;
996 if ( (zzAttributes & 8) == 8 ) break zzForAction;
997 }
998
999 }
1000 }
1001
1002 // store back cached position
1003 zzMarkedPos = zzMarkedPosL;
1004
1005 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
1006 case 20:
1007 { addToken(Token.PREPROCESSOR);
1008 }
1009 case 23: break;
1010 case 2:
1011 { addNullToken(); return firstToken;
1012 }
1013 case 24: break;
1014 case 21:
1015 { yybegin(YYINITIAL); addToken(start,zzStartRead+1, Token.COMMENT_MULTILINE);
1016 }
1017 case 25: break;
1018 case 18:
1019 { start = zzMarkedPos-2; yybegin(MLC);
1020 }
1021 case 26: break;
1022 case 4:
1023 { addToken(Token.WHITESPACE);
1024 }
1025 case 27: break;
1026 case 14:
1027 { addToken(start,zzStartRead-1, Token.LITERAL_CHAR); return firstToken;
1028 }
1029 case 28: break;
1030 case 9:
1031 { start = zzMarkedPos-1; yybegin(CHAR);
1032 }
1033 case 29: break;
1034 case 7:
1035 { addToken(Token.LITERAL_NUMBER_FLOAT);
1036 }
1037 case 30: break;
1038 case 19:
1039 { addToken(Token.RESERVED_WORD);
1040 }
1041 case 31: break;
1042 case 6:
1043 { addToken(Token.SEPARATOR);
1044 }
1045 case 32: break;
1046 case 15:
1047 { yybegin(YYINITIAL); addToken(start,zzStartRead, Token.LITERAL_CHAR);
1048 }
1049 case 33: break;
1050 case 1:
1051 { addToken(Token.IDENTIFIER);
1052 }
1053 case 34: break;
1054 case 22:
1055 { addToken(Token.FUNCTION);
1056 }
1057 case 35: break;
1058 case 12:
1059 { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); return firstToken;
1060 }
1061 case 36: break;
1062 case 17:
1063 { addToken(Token.COMMENT_EOL);
1064 }
1065 case 37: break;
1066 case 8:
1067 { start = zzMarkedPos-1; yybegin(STRING);
1068 }
1069 case 38: break;
1070 case 3:
1071 { addToken(Token.LITERAL_NUMBER_DECIMAL_INT);
1072 }
1073 case 39: break;
1074 case 5:
1075 { addToken(Token.OPERATOR);
1076 }
1077 case 40: break;
1078 case 13:
1079 { yybegin(YYINITIAL); addToken(start,zzStartRead, Token.LITERAL_STRING_DOUBLE_QUOTE);
1080 }
1081 case 41: break;
1082 case 10:
1083 { addToken(Token.ERROR_IDENTIFIER); addNullToken(); return firstToken;
1084 }
1085 case 42: break;
1086 case 11:
1087 {
1088 }
1089 case 43: break;
1090 case 16:
1091 { addToken(start,zzStartRead-1, Token.COMMENT_MULTILINE); return firstToken;
1092 }
1093 case 44: break;
1094 default:
1095 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
1096 zzAtEOF = true;
1097 switch (zzLexicalState) {
1098 case STRING: {
1099 addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); return firstToken;
1100 }
1101 case 355: break;
1102 case YYINITIAL: {
1103 addNullToken(); return firstToken;
1104 }
1105 case 356: break;
1106 case MLC: {
1107 addToken(start,zzStartRead-1, Token.COMMENT_MULTILINE); return firstToken;
1108 }
1109 case 357: break;
1110 case CHAR: {
1111 addToken(start,zzStartRead-1, Token.LITERAL_CHAR); return firstToken;
1112 }
1113 case 358: break;
1114 default:
1115 return null;
1116 }
1117 }
1118 else {
1119 zzScanError(ZZ_NO_MATCH);
1120 }
1121 }
1122 }
1123 }
1124
1125
1126}
Note: See TracBrowser for help on using the repository browser.