1 /* The following code was generated by JFlex 1.6.1 */
3 package org.simantics.scl.compiler.internal.parsing.parser;
5 import org.simantics.scl.compiler.compilation.CompilationContext;
6 import org.simantics.scl.compiler.internal.parsing.Token;
7 import org.simantics.scl.compiler.errors.Locations;
8 import org.simantics.scl.compiler.internal.parsing.exceptions.SCLSyntaxErrorException;
9 import gnu.trove.list.array.TIntArrayList;
13 * This class is a scanner generated by
14 * <a href="http://www.jflex.de/">JFlex</a> 1.6.1
15 * from the specification file <tt>C:/Simugawa.git/git/platform/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex</tt>
17 public class SCLLexer {
19 /** This character denotes the end of file */
20 public static final int YYEOF = -1;
22 /** initial size of the lookahead buffer */
23 private static final int ZZ_BUFFERSIZE = 16384;
26 public static final int YYINITIAL = 0;
27 public static final int STRING = 2;
28 public static final int LONG_STRING = 4;
29 public static final int CHAR = 6;
32 * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
33 * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
34 * at the beginning of a line
35 * l is of the form l = 2*k, k a non negative integer
37 private static final int ZZ_LEXSTATE[] = {
38 0, 0, 1, 1, 2, 2, 3, 3
42 * Translates characters to character classes
44 private static final String ZZ_CMAP_PACKED =
45 "\11\0\1\75\1\74\1\73\1\73\1\15\22\0\1\24\1\20\1\71"+
46 "\1\6\2\5\1\20\1\4\1\11\1\13\1\26\1\5\1\12\1\23"+
47 "\1\7\1\25\12\2\1\66\1\67\1\17\1\65\1\21\1\14\1\10"+
48 "\4\3\1\22\1\3\3\1\1\60\20\1\1\63\1\30\1\64\1\5"+
49 "\1\72\1\16\1\34\1\46\1\47\1\51\1\41\1\31\1\54\1\40"+
50 "\1\36\2\1\1\35\1\52\1\42\1\32\1\53\1\55\1\33\1\43"+
51 "\1\37\1\45\1\56\1\44\1\50\1\57\1\1\1\61\1\70\1\62"+
52 "\1\5\6\0\1\73\u1fa2\0\1\73\1\73\udfd3\0\1\27\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\22\0";
55 * Translates characters to character classes
57 private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
60 * Translates DFA states to action switch labels.
62 private static final int [] ZZ_ACTION = zzUnpackAction();
64 private static final String ZZ_ACTION_PACKED_0 =
65 "\4\0\1\1\1\2\1\3\1\1\1\4\1\5\1\6"+
66 "\1\7\1\10\1\11\1\12\1\1\1\13\1\1\1\14"+
67 "\1\15\1\16\1\17\1\4\1\20\1\21\16\2\1\22"+
68 "\1\23\1\24\1\25\1\26\1\27\1\30\1\31\1\32"+
69 "\1\33\1\13\1\34\1\35\1\36\1\0\1\37\1\36"+
70 "\1\40\2\35\2\40\5\0\1\4\1\41\1\42\1\43"+
71 "\3\0\1\2\4\0\1\4\1\44\1\45\1\46\1\4"+
72 "\2\0\2\2\1\47\2\2\1\50\1\51\11\2\1\52"+
73 "\3\2\1\53\2\2\1\54\4\2\1\55\1\56\1\57"+
74 "\1\0\1\60\1\61\1\62\1\63\1\64\1\60\1\65"+
75 "\2\0\2\66\1\0\1\67\1\70\1\2\1\0\1\71"+
76 "\2\0\2\72\1\0\1\4\1\0\3\2\1\73\25\2"+
77 "\1\74\1\75\1\0\1\76\2\0\1\46\1\0\1\2"+
78 "\1\77\6\2\1\100\1\101\2\2\1\102\3\2\1\103"+
79 "\1\2\1\104\2\2\1\105\3\2\1\0\1\46\1\0"+
80 "\3\2\1\106\11\2\1\107\1\2\1\110\1\2\1\111"+
81 "\1\2\1\0\1\112\1\113\2\2\1\114\1\115\2\2"+
82 "\1\116\1\2\1\117\1\120\2\2\1\121\3\2\1\122"+
83 "\1\123\2\2\1\124\2\2\1\125\1\126\1\0\4\2"+
84 "\1\127\2\2\2\0\1\2\1\130\2\0\2\2\2\0"+
85 "\1\2\2\0\1\131\1\2\2\0\1\132\2\0\1\2"+
86 "\4\0\1\2\1\133\2\0\1\134\1\2\2\0\1\135"+
87 "\2\0\1\136\1\0\1\137";
89 private static int [] zzUnpackAction() {
90 int [] result = new int[296];
92 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
96 private static int zzUnpackAction(String packed, int offset, int [] result) {
97 int i = 0; /* index in packed string */
98 int j = offset; /* index in unpacked array */
99 int l = packed.length();
101 int count = packed.charAt(i++);
102 int value = packed.charAt(i++);
103 do result[j++] = value; while (--count > 0);
110 * Translates a state to a row index in the transition table
112 private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
114 private static final String ZZ_ROWMAP_PACKED_0 =
115 "\0\0\0\76\0\174\0\272\0\272\0\370\0\u0136\0\u0174"+
116 "\0\u01b2\0\u01f0\0\u022e\0\u026c\0\u02aa\0\272\0\272\0\u02e8"+
117 "\0\u0326\0\u0364\0\u03a2\0\u01b2\0\u03e0\0\u041e\0\u045c\0\272"+
118 "\0\u049a\0\u04d8\0\u0516\0\u0554\0\u0592\0\u05d0\0\u060e\0\u064c"+
119 "\0\u068a\0\u06c8\0\u0706\0\u0744\0\u0782\0\u07c0\0\u07fe\0\272"+
120 "\0\272\0\272\0\272\0\u083c\0\u087a\0\272\0\u01b2\0\u08b8"+
121 "\0\370\0\272\0\272\0\u08f6\0\u0934\0\u0972\0\272\0\272"+
122 "\0\u09b0\0\u09ee\0\u0a2c\0\u08f6\0\272\0\u0a6a\0\u0aa8\0\u0ae6"+
123 "\0\u0b24\0\u0b62\0\u0ba0\0\272\0\u0bde\0\u0c1c\0\u0c5a\0\u0c98"+
124 "\0\u0cd6\0\u0d14\0\u0d52\0\u0d90\0\u0dce\0\u0e0c\0\u0e4a\0\u01b2"+
125 "\0\u01b2\0\u0e88\0\u0ec6\0\u0f04\0\u0f42\0\u0f80\0\u0fbe\0\370"+
126 "\0\u0ffc\0\u103a\0\370\0\u1078\0\u10b6\0\u10f4\0\u1132\0\u1170"+
127 "\0\u11ae\0\u11ec\0\u122a\0\u1268\0\u12a6\0\370\0\u12e4\0\u1322"+
128 "\0\u1360\0\370\0\u139e\0\u13dc\0\370\0\u141a\0\u1458\0\u1496"+
129 "\0\u14d4\0\u01b2\0\u01b2\0\u01b2\0\u1512\0\272\0\272\0\272"+
130 "\0\272\0\272\0\u1550\0\272\0\u158e\0\u02e8\0\u15cc\0\u160a"+
131 "\0\u160a\0\272\0\272\0\272\0\u1648\0\272\0\u1686\0\u16c4"+
132 "\0\272\0\u01b2\0\u1702\0\u1740\0\u177e\0\u17bc\0\u17fa\0\u1838"+
133 "\0\370\0\u1876\0\u18b4\0\u18f2\0\u1930\0\u196e\0\u19ac\0\u19ea"+
134 "\0\u1a28\0\u1a66\0\u1aa4\0\u1ae2\0\u1b20\0\u1b5e\0\u1b9c\0\u1bda"+
135 "\0\u1c18\0\u1c56\0\u1c94\0\u1cd2\0\u1d10\0\u1d4e\0\370\0\272"+
136 "\0\u1d8c\0\272\0\u1dca\0\u1e08\0\u01b2\0\u1e46\0\u1e84\0\u1ec2"+
137 "\0\u1f00\0\u1f3e\0\u1f7c\0\u1fba\0\u1ff8\0\u2036\0\370\0\370"+
138 "\0\u2074\0\u20b2\0\370\0\u20f0\0\u212e\0\u216c\0\370\0\u21aa"+
139 "\0\370\0\u21e8\0\u2226\0\370\0\u2264\0\u22a2\0\u22e0\0\u231e"+
140 "\0\272\0\u235c\0\u239a\0\u23d8\0\u2416\0\u2454\0\u2492\0\u24d0"+
141 "\0\u250e\0\u254c\0\u258a\0\u25c8\0\u2606\0\u2644\0\u2682\0\370"+
142 "\0\u26c0\0\370\0\u26fe\0\370\0\u273c\0\u277a\0\272\0\370"+
143 "\0\u27b8\0\u27f6\0\370\0\370\0\u2834\0\u2872\0\u28b0\0\u28ee"+
144 "\0\370\0\370\0\u292c\0\u296a\0\u29a8\0\u29e6\0\u2a24\0\u2a62"+
145 "\0\272\0\370\0\u2aa0\0\u2ade\0\370\0\u2b1c\0\u2b5a\0\370"+
146 "\0\370\0\u2b98\0\u2bd6\0\u2c14\0\u2c52\0\u2c90\0\370\0\u2cce"+
147 "\0\u2d0c\0\u2d4a\0\u2d88\0\u2dc6\0\370\0\u2e04\0\u2e42\0\u2e80"+
148 "\0\u2ebe\0\u2efc\0\u2f3a\0\u2f78\0\u2fb6\0\u2ff4\0\370\0\u3032"+
149 "\0\u3070\0\u30ae\0\370\0\u30ec\0\u312a\0\u3168\0\u31a6\0\u31e4"+
150 "\0\u3222\0\u3260\0\u329e\0\272\0\u32dc\0\u331a\0\272\0\u3358"+
151 "\0\u3396\0\u33d4\0\370\0\u3412\0\u3450\0\272\0\u348e\0\272";
153 private static int [] zzUnpackRowMap() {
154 int [] result = new int[296];
156 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
160 private static int zzUnpackRowMap(String packed, int offset, int [] result) {
161 int i = 0; /* index in packed string */
162 int j = offset; /* index in unpacked array */
163 int l = packed.length();
165 int high = packed.charAt(i++) << 16;
166 result[j++] = high | packed.charAt(i++);
172 * The transition table of the DFA
174 private static final int [] ZZ_TRANS = zzUnpackTrans();
176 private static final String ZZ_TRANS_PACKED_0 =
177 "\1\5\1\6\1\7\1\6\1\10\1\11\1\12\1\13"+
178 "\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\23"+
179 "\1\11\1\24\1\6\1\25\1\26\1\27\1\11\1\30"+
180 "\1\31\1\32\1\6\1\33\1\34\1\35\1\36\1\37"+
181 "\1\40\1\41\1\6\1\42\1\43\1\6\1\44\1\45"+
182 "\1\6\1\46\1\47\6\6\1\50\1\51\1\52\1\53"+
183 "\1\54\1\55\1\56\1\57\1\60\1\61\2\62\1\63"+
184 "\15\64\1\65\11\64\1\30\1\66\40\64\1\67\2\64"+
185 "\1\70\16\64\1\71\11\64\1\30\1\72\40\64\1\73"+
186 "\1\64\1\74\1\75\1\64\77\0\4\6\2\0\1\76"+
187 "\12\0\1\6\6\0\30\6\11\0\1\6\5\0\1\7"+
188 "\4\0\1\77\12\0\1\100\16\0\1\100\34\0\4\101"+
189 "\1\0\22\101\1\0\1\102\45\101\5\0\2\11\1\0"+
190 "\1\11\6\0\3\11\1\0\1\11\1\0\2\11\1\0"+
191 "\1\11\34\0\2\11\1\0\1\11\12\0\2\11\1\0"+
192 "\1\11\4\0\1\103\1\0\3\11\1\0\1\11\1\103"+
193 "\2\11\1\0\1\11\34\0\2\11\1\0\1\11\3\0"+
194 "\1\103\10\0\1\104\5\0\1\105\6\0\1\105\47\0"+
195 "\1\105\2\0\1\106\1\0\1\106\1\0\2\11\1\0"+
196 "\1\11\6\0\3\11\1\106\1\11\1\0\2\11\1\0"+
197 "\1\11\30\106\4\0\2\11\1\0\1\11\1\0\1\106"+
198 "\10\0\2\107\1\110\1\107\1\0\1\111\4\0\3\107"+
199 "\1\0\1\107\1\0\2\107\1\0\1\107\34\0\2\107"+
200 "\1\0\1\107\6\0\1\112\1\0\1\112\16\0\1\112"+
201 "\6\0\30\112\11\0\1\112\77\0\1\62\2\0\1\113"+
202 "\1\0\1\113\5\0\1\114\2\0\1\115\5\0\1\113"+
203 "\6\0\30\113\11\0\1\113\10\0\2\11\1\0\1\11"+
204 "\3\0\1\116\2\0\1\11\1\117\1\11\1\0\1\120"+
205 "\1\0\2\11\1\0\1\11\34\0\2\11\1\0\1\117"+
206 "\12\0\2\11\1\0\1\11\6\0\2\11\1\121\1\0"+
207 "\1\11\1\0\2\11\1\0\1\11\34\0\2\11\1\0"+
208 "\1\11\31\0\1\26\56\0\2\11\1\0\1\11\6\0"+
209 "\3\11\1\0\1\11\1\0\1\122\1\123\1\0\1\11"+
210 "\34\0\2\11\1\0\1\11\12\0\2\11\1\0\1\11"+
211 "\6\0\3\11\1\0\1\11\1\124\2\11\1\0\1\11"+
212 "\21\0\1\125\12\0\2\11\1\0\1\11\6\0\4\6"+
213 "\2\0\1\76\12\0\1\6\6\0\1\6\1\126\26\6"+
214 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
215 "\6\0\14\6\1\127\13\6\11\0\1\6\4\0\4\6"+
216 "\2\0\1\76\12\0\1\6\6\0\12\6\1\130\2\6"+
217 "\1\131\12\6\11\0\1\6\4\0\4\6\2\0\1\76"+
218 "\12\0\1\6\6\0\10\6\1\132\17\6\11\0\1\6"+
219 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\133"+
220 "\10\6\1\134\7\6\1\135\6\6\11\0\1\6\4\0"+
221 "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\136"+
222 "\4\6\1\137\16\6\1\140\1\6\11\0\1\6\4\0"+
223 "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\141"+
224 "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
225 "\1\6\6\0\1\142\3\6\1\143\4\6\1\144\5\6"+
226 "\1\145\4\6\1\146\3\6\11\0\1\6\4\0\4\6"+
227 "\2\0\1\76\12\0\1\6\6\0\10\6\1\147\17\6"+
228 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
229 "\6\0\5\6\1\150\1\6\1\151\20\6\11\0\1\6"+
230 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\26\6"+
231 "\1\152\1\6\11\0\1\6\4\0\4\6\2\0\1\76"+
232 "\12\0\1\6\6\0\1\6\1\153\2\6\1\154\23\6"+
233 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
234 "\6\0\1\6\1\155\1\6\1\156\4\6\1\157\17\6"+
235 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
236 "\6\0\3\6\1\160\14\6\1\161\7\6\11\0\1\6"+
237 "\10\0\2\11\1\0\1\11\6\0\2\11\1\162\1\0"+
238 "\1\11\1\0\2\11\1\0\1\11\34\0\2\11\1\0"+
239 "\1\11\12\0\2\11\1\0\1\11\6\0\3\11\1\0"+
240 "\1\163\1\0\2\11\1\0\1\11\34\0\1\11\1\164"+
241 "\1\0\1\11\76\0\1\165\4\0\15\64\1\0\11\64"+
242 "\2\0\40\64\1\0\2\64\1\0\1\64\74\0\1\70"+
243 "\1\0\4\166\1\167\4\166\1\170\3\166\1\0\12\166"+
244 "\1\167\2\166\1\171\3\166\1\172\2\166\1\75\2\166"+
245 "\1\173\23\166\1\167\1\166\2\0\1\166\74\0\1\75"+
246 "\12\0\1\174\155\0\1\175\5\0\1\6\1\0\1\6"+
247 "\10\0\1\176\5\0\1\6\6\0\30\6\11\0\1\6"+
248 "\5\0\1\177\75\0\1\200\20\0\1\201\56\0\1\202"+
249 "\71\0\27\101\1\0\46\101\15\0\1\103\6\0\1\103"+
250 "\47\0\1\103\16\0\1\105\6\0\1\105\47\0\1\105"+
251 "\2\0\4\106\15\0\1\106\6\0\30\106\11\0\1\106"+
252 "\10\0\2\107\1\0\1\107\2\0\1\203\3\0\3\107"+
253 "\1\0\1\107\1\0\2\107\1\0\1\107\34\0\2\107"+
254 "\1\0\1\107\20\0\1\203\74\0\1\111\1\204\63\0"+
255 "\4\112\15\0\1\112\6\0\30\112\11\0\1\112\4\0"+
256 "\4\113\2\0\1\205\6\0\1\206\3\0\1\113\6\0"+
257 "\30\113\11\0\1\113\15\0\1\207\64\0\1\210\1\0"+
258 "\1\210\16\0\1\210\6\0\30\210\11\0\1\210\24\0"+
259 "\1\211\61\0\2\11\1\0\1\11\6\0\2\11\1\212"+
260 "\1\0\1\11\1\0\2\11\1\0\1\11\34\0\2\11"+
261 "\1\0\1\11\5\0\15\122\1\0\56\122\1\0\1\122"+
262 "\5\213\2\123\1\213\1\123\6\213\3\123\1\213\1\123"+
263 "\1\213\1\123\1\214\1\213\1\123\34\213\2\123\1\213"+
264 "\1\123\5\213\24\0\1\124\25\0\1\125\57\0\1\215"+
265 "\42\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+
266 "\1\216\25\6\11\0\1\6\4\0\4\6\2\0\1\76"+
267 "\12\0\1\6\6\0\4\6\1\217\23\6\11\0\1\6"+
268 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\12\6"+
269 "\1\220\15\6\11\0\1\6\4\0\4\6\2\0\1\76"+
270 "\12\0\1\6\6\0\6\6\1\221\21\6\11\0\1\6"+
271 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\222"+
272 "\11\6\1\223\3\6\1\224\11\6\11\0\1\6\4\0"+
273 "\4\6\2\0\1\76\12\0\1\6\6\0\22\6\1\225"+
274 "\5\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
275 "\1\6\6\0\3\6\1\226\24\6\11\0\1\6\4\0"+
276 "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\227"+
277 "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
278 "\1\6\6\0\22\6\1\230\5\6\11\0\1\6\4\0"+
279 "\4\6\2\0\1\76\12\0\1\6\6\0\20\6\1\231"+
280 "\7\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
281 "\1\6\6\0\1\232\27\6\11\0\1\6\4\0\4\6"+
282 "\2\0\1\76\12\0\1\6\6\0\12\6\1\233\15\6"+
283 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
284 "\6\0\1\234\27\6\11\0\1\6\4\0\4\6\2\0"+
285 "\1\76\12\0\1\6\6\0\6\6\1\235\21\6\11\0"+
286 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
287 "\4\6\1\236\23\6\11\0\1\6\4\0\4\6\2\0"+
288 "\1\76\12\0\1\6\6\0\6\6\1\237\21\6\11\0"+
289 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
290 "\10\6\1\240\17\6\11\0\1\6\4\0\4\6\2\0"+
291 "\1\76\12\0\1\6\6\0\11\6\1\241\16\6\11\0"+
292 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
293 "\3\6\1\242\24\6\11\0\1\6\4\0\4\6\2\0"+
294 "\1\76\12\0\1\6\6\0\6\6\1\243\21\6\11\0"+
295 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
296 "\2\6\1\244\25\6\11\0\1\6\4\0\4\6\2\0"+
297 "\1\76\12\0\1\6\6\0\6\6\1\245\13\6\1\246"+
298 "\5\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
299 "\1\6\6\0\1\6\1\247\26\6\11\0\1\6\74\0"+
300 "\1\250\6\0\2\251\16\0\1\251\6\0\1\251\2\0"+
301 "\1\251\4\0\1\251\4\0\2\251\1\0\1\251\115\0"+
302 "\1\252\6\0\1\177\17\0\1\100\16\0\1\100\36\0"+
303 "\1\200\74\0\1\113\1\0\1\113\10\0\1\115\5\0"+
304 "\1\113\6\0\30\113\11\0\1\113\15\0\1\207\1\253"+
305 "\63\0\4\210\11\0\1\206\3\0\1\210\6\0\30\210"+
306 "\11\0\1\210\3\0\26\213\1\254\54\213\2\123\1\213"+
307 "\1\123\6\213\3\123\1\213\1\123\1\213\1\255\1\214"+
308 "\1\213\1\123\34\213\2\123\1\213\1\123\5\213\37\0"+
309 "\1\256\37\0\4\6\2\0\1\76\12\0\1\6\6\0"+
310 "\3\6\1\257\24\6\11\0\1\6\4\0\4\6\2\0"+
311 "\1\76\12\0\1\6\6\0\10\6\1\260\17\6\11\0"+
312 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
313 "\6\6\1\261\21\6\11\0\1\6\4\0\4\6\2\0"+
314 "\1\76\12\0\1\6\6\0\5\6\1\262\22\6\11\0"+
315 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
316 "\6\6\1\263\21\6\11\0\1\6\4\0\4\6\2\0"+
317 "\1\76\12\0\1\6\6\0\4\6\1\264\23\6\11\0"+
318 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
319 "\1\6\1\265\26\6\11\0\1\6\4\0\4\6\2\0"+
320 "\1\76\12\0\1\6\6\0\11\6\1\266\16\6\11\0"+
321 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
322 "\11\6\1\267\16\6\11\0\1\6\4\0\4\6\2\0"+
323 "\1\76\12\0\1\6\6\0\10\6\1\270\17\6\11\0"+
324 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
325 "\5\6\1\271\22\6\11\0\1\6\4\0\4\6\2\0"+
326 "\1\76\12\0\1\6\6\0\10\6\1\272\17\6\11\0"+
327 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
328 "\10\6\1\273\17\6\11\0\1\6\4\0\4\6\2\0"+
329 "\1\76\12\0\1\6\6\0\1\6\1\274\26\6\11\0"+
330 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
331 "\10\6\1\275\17\6\11\0\1\6\4\0\4\6\2\0"+
332 "\1\76\12\0\1\6\6\0\10\6\1\276\17\6\11\0"+
333 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
334 "\7\6\1\277\20\6\11\0\1\6\4\0\4\6\2\0"+
335 "\1\76\12\0\1\6\6\0\2\6\1\300\6\6\1\301"+
336 "\16\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
337 "\1\6\6\0\12\6\1\302\15\6\11\0\1\6\4\0"+
338 "\4\6\2\0\1\76\12\0\1\6\6\0\12\6\1\303"+
339 "\15\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
340 "\1\6\6\0\3\6\1\304\24\6\11\0\1\6\4\0"+
341 "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\305"+
342 "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
343 "\1\6\6\0\16\6\1\306\11\6\11\0\1\6\4\0"+
344 "\4\6\2\0\1\76\12\0\1\6\6\0\22\6\1\307"+
345 "\5\6\11\0\1\6\5\0\2\310\16\0\1\310\6\0"+
346 "\1\310\2\0\1\310\4\0\1\310\4\0\2\310\1\0"+
347 "\1\310\42\0\1\206\57\0\25\213\1\311\1\254\47\213"+
348 "\47\0\1\312\27\0\4\6\2\0\1\76\12\0\1\6"+
349 "\6\0\4\6\1\313\23\6\11\0\1\6\4\0\4\6"+
350 "\2\0\1\76\12\0\1\6\6\0\12\6\1\314\15\6"+
351 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
352 "\6\0\2\6\1\315\25\6\11\0\1\6\4\0\4\6"+
353 "\2\0\1\76\12\0\1\6\6\0\17\6\1\316\10\6"+
354 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
355 "\6\0\3\6\1\317\24\6\11\0\1\6\4\0\4\6"+
356 "\2\0\1\76\12\0\1\6\6\0\14\6\1\320\13\6"+
357 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
358 "\6\0\2\6\1\321\25\6\11\0\1\6\4\0\4\6"+
359 "\2\0\1\76\12\0\1\6\6\0\12\6\1\322\15\6"+
360 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
361 "\6\0\11\6\1\323\16\6\11\0\1\6\4\0\4\6"+
362 "\2\0\1\76\12\0\1\6\6\0\16\6\1\324\11\6"+
363 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
364 "\6\0\2\6\1\325\25\6\11\0\1\6\4\0\4\6"+
365 "\2\0\1\76\12\0\1\6\6\0\11\6\1\326\16\6"+
366 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
367 "\6\0\16\6\1\327\11\6\11\0\1\6\4\0\4\6"+
368 "\2\0\1\76\12\0\1\6\6\0\10\6\1\330\17\6"+
369 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
370 "\6\0\6\6\1\331\21\6\11\0\1\6\4\0\4\6"+
371 "\2\0\1\76\12\0\1\6\6\0\12\6\1\332\15\6"+
372 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
373 "\6\0\25\6\1\333\2\6\11\0\1\6\4\0\4\6"+
374 "\2\0\1\76\12\0\1\6\6\0\7\6\1\334\20\6"+
375 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
376 "\6\0\5\6\1\335\22\6\11\0\1\6\5\0\2\336"+
377 "\16\0\1\336\6\0\1\336\2\0\1\336\4\0\1\336"+
378 "\4\0\2\336\1\0\1\336\64\0\1\337\36\0\4\6"+
379 "\2\0\1\76\12\0\1\6\6\0\4\6\1\340\23\6"+
380 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
381 "\6\0\10\6\1\341\17\6\11\0\1\6\4\0\4\6"+
382 "\2\0\1\76\12\0\1\6\6\0\3\6\1\342\24\6"+
383 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
384 "\6\0\2\6\1\343\1\6\1\344\23\6\11\0\1\6"+
385 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\11\6"+
386 "\1\345\16\6\11\0\1\6\4\0\4\6\2\0\1\76"+
387 "\12\0\1\6\6\0\20\6\1\346\7\6\11\0\1\6"+
388 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\6\6"+
389 "\1\347\21\6\11\0\1\6\4\0\4\6\2\0\1\76"+
390 "\12\0\1\6\6\0\1\350\27\6\11\0\1\6\4\0"+
391 "\4\6\2\0\1\76\12\0\1\6\6\0\23\6\1\351"+
392 "\4\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
393 "\1\6\6\0\6\6\1\352\21\6\11\0\1\6\4\0"+
394 "\4\6\2\0\1\76\12\0\1\6\6\0\16\6\1\353"+
395 "\11\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
396 "\1\6\6\0\20\6\1\354\7\6\11\0\1\6\4\0"+
397 "\4\6\2\0\1\76\12\0\1\6\6\0\6\6\1\355"+
398 "\21\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
399 "\1\6\6\0\2\6\1\356\25\6\11\0\1\6\4\0"+
400 "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\357"+
401 "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
402 "\1\6\6\0\11\6\1\360\16\6\11\0\1\6\5\0"+
403 "\2\361\16\0\1\361\6\0\1\361\2\0\1\361\4\0"+
404 "\1\361\4\0\2\361\1\0\1\361\25\0\4\6\2\0"+
405 "\1\76\12\0\1\6\6\0\6\6\1\362\21\6\11\0"+
406 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
407 "\16\6\1\363\11\6\11\0\1\6\4\0\4\6\2\0"+
408 "\1\76\12\0\1\6\6\0\16\6\1\364\11\6\11\0"+
409 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
410 "\10\6\1\365\17\6\11\0\1\6\4\0\4\6\2\0"+
411 "\1\76\12\0\1\6\6\0\27\6\1\366\11\0\1\6"+
412 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\6"+
413 "\1\367\26\6\11\0\1\6\4\0\4\6\2\0\1\76"+
414 "\12\0\1\6\6\0\10\6\1\370\17\6\11\0\1\6"+
415 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\12\6"+
416 "\1\371\15\6\11\0\1\6\4\0\4\6\2\0\1\76"+
417 "\12\0\1\6\1\0\1\372\4\0\30\6\11\0\1\6"+
418 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\3\6"+
419 "\1\373\24\6\11\0\1\6\4\0\4\6\2\0\1\76"+
420 "\12\0\1\6\6\0\11\6\1\374\16\6\11\0\1\6"+
421 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\23\6"+
422 "\1\375\4\6\11\0\1\6\4\0\4\6\2\0\1\76"+
423 "\12\0\1\6\6\0\6\6\1\376\21\6\11\0\1\6"+
424 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\10\6"+
425 "\1\377\17\6\11\0\1\6\4\0\4\6\2\0\1\76"+
426 "\12\0\1\6\6\0\3\6\1\u0100\24\6\11\0\1\6"+
427 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+
428 "\1\u0101\25\6\11\0\1\6\27\0\1\372\4\0\1\u0102"+
429 "\17\0\1\u0103\25\0\4\6\2\0\1\76\12\0\1\6"+
430 "\6\0\5\6\1\u0104\22\6\11\0\1\6\4\0\4\6"+
431 "\2\0\1\76\12\0\1\6\6\0\23\6\1\u0105\4\6"+
432 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
433 "\1\0\1\u0106\4\0\30\6\11\0\1\6\4\0\4\6"+
434 "\2\0\1\76\12\0\1\6\1\0\1\u0107\4\0\30\6"+
435 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
436 "\6\0\25\6\1\u0108\2\6\11\0\1\6\4\0\4\6"+
437 "\2\0\1\76\12\0\1\6\6\0\21\6\1\u0109\6\6"+
438 "\11\0\1\6\41\0\1\u010a\75\0\1\u010b\40\0\4\6"+
439 "\2\0\1\76\12\0\1\6\6\0\11\6\1\u010c\16\6"+
440 "\11\0\1\6\27\0\1\u0106\6\0\1\u010d\66\0\1\u0107"+
441 "\6\0\1\u010e\43\0\4\6\2\0\1\76\12\0\1\6"+
442 "\6\0\3\6\1\u010f\24\6\11\0\1\6\4\0\4\6"+
443 "\2\0\1\76\12\0\1\6\6\0\3\6\1\u0110\24\6"+
444 "\11\0\1\6\36\0\1\u0111\105\0\1\u0112\33\0\4\6"+
445 "\2\0\1\76\12\0\1\6\6\0\6\6\1\u0113\21\6"+
446 "\11\0\1\6\44\0\1\u0114\101\0\1\u0115\31\0\4\6"+
447 "\2\0\1\76\12\0\1\6\6\0\6\6\1\u0116\21\6"+
448 "\11\0\1\6\46\0\1\u0117\71\0\1\u0118\73\0\1\u0119"+
449 "\75\0\1\u011a\41\0\4\6\2\0\1\76\12\0\1\6"+
450 "\6\0\5\6\1\u011b\22\6\11\0\1\6\42\0\1\u011c"+
451 "\74\0\1\u011d\73\0\1\u011e\102\0\1\u011f\35\0\4\6"+
452 "\2\0\1\76\12\0\1\6\6\0\1\6\1\u0120\26\6"+
453 "\11\0\1\6\45\0\1\u0121\72\0\1\u0122\37\0\4\6"+
454 "\2\0\1\76\12\0\1\6\6\0\11\6\1\u0123\16\6"+
455 "\11\0\1\6\52\0\1\u0124\64\0\1\u0125\76\0\1\u0126"+
456 "\70\0\1\u0127\105\0\1\u0128\33\0";
458 private static int [] zzUnpackTrans() {
459 int [] result = new int[13516];
461 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
465 private static int zzUnpackTrans(String packed, int offset, int [] result) {
466 int i = 0; /* index in packed string */
467 int j = offset; /* index in unpacked array */
468 int l = packed.length();
470 int count = packed.charAt(i++);
471 int value = packed.charAt(i++);
473 do result[j++] = value; while (--count > 0);
480 private static final int ZZ_UNKNOWN_ERROR = 0;
481 private static final int ZZ_NO_MATCH = 1;
482 private static final int ZZ_PUSHBACK_2BIG = 2;
484 /* error messages for the codes above */
485 private static final String ZZ_ERROR_MSG[] = {
486 "Unknown internal scanner error",
487 "Error: could not match input",
488 "Error: pushback value was too large"
492 * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
494 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
496 private static final String ZZ_ATTRIBUTE_PACKED_0 =
497 "\3\0\1\10\1\11\10\1\2\11\10\1\1\11\17\1"+
498 "\4\11\2\1\1\11\3\1\2\11\2\1\1\0\2\11"+
499 "\4\1\1\11\5\0\1\1\1\11\2\1\3\0\1\1"+
500 "\4\0\5\1\2\0\37\1\1\0\5\11\1\1\1\11"+
501 "\2\0\2\1\1\0\3\11\1\0\1\11\2\0\1\11"+
502 "\1\1\1\0\1\1\1\0\32\1\1\11\1\0\1\11"+
503 "\2\0\1\1\1\0\31\1\1\0\1\11\1\0\23\1"+
504 "\1\0\1\11\21\1\1\11\10\1\1\0\7\1\2\0"+
505 "\2\1\2\0\2\1\2\0\1\1\2\0\2\1\2\0"+
506 "\1\1\2\0\1\1\4\0\1\1\1\11\2\0\1\11"+
507 "\1\1\2\0\1\1\2\0\1\11\1\0\1\11";
509 private static int [] zzUnpackAttribute() {
510 int [] result = new int[296];
512 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
516 private static int zzUnpackAttribute(String packed, int offset, int [] result) {
517 int i = 0; /* index in packed string */
518 int j = offset; /* index in unpacked array */
519 int l = packed.length();
521 int count = packed.charAt(i++);
522 int value = packed.charAt(i++);
523 do result[j++] = value; while (--count > 0);
528 /** the input device */
529 private java.io.Reader zzReader;
531 /** the current state of the DFA */
534 /** the current lexical state */
535 private int zzLexicalState = YYINITIAL;
537 /** this buffer contains the current text to be matched and is
538 the source of the yytext() string */
539 private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
541 /** the textposition at the last accepting state */
542 private int zzMarkedPos;
544 /** the current text position in the buffer */
545 private int zzCurrentPos;
547 /** startRead marks the beginning of the yytext() string in the buffer */
548 private int zzStartRead;
550 /** endRead marks the last character in the buffer, that has been read
552 private int zzEndRead;
554 /** number of newlines encountered up to the start of the matched text */
557 /** the number of characters up to the start of the matched text */
561 * the number of characters from the last newline up to the start of the
564 private int yycolumn;
567 * zzAtBOL == true <=> the scanner is currently at the beginning of a line
569 private boolean zzAtBOL = true;
571 /** zzAtEOF == true <=> the scanner is at the EOF */
572 private boolean zzAtEOF;
574 /** denotes if the user-EOF-code has already been executed */
575 private boolean zzEOFDone;
578 * The number of occupied positions in zzBuffer beyond zzEndRead.
579 * When a lead/high surrogate has been read from the input stream
580 * into the final zzBuffer position, this will have a value of 1;
581 * otherwise, it will have a value of 0.
583 private int zzFinalHighSurrogate = 0;
586 public SCLParserOptions options = SCLParserOptions.DEFAULT;
588 TIntArrayList parenCountStack = new TIntArrayList(2);
590 TIntArrayList stateStack = new TIntArrayList(2);
592 StringBuffer string = new StringBuffer();
593 CompilationContext context;
595 private Token sym(int id) {
596 return new Token(id, yychar, yychar+yylength(), yytext());
598 private Token sym(int id, String text) {
599 return new Token(id, yychar, yychar+yylength(), text);
601 public void setCompilationContext(CompilationContext context) {
602 this.context = context;
604 public boolean supportCHR() {
605 return context.header == null ? false : context.header.chr;
610 * Creates a new scanner
612 * @param in the java.io.Reader to read input from.
614 public SCLLexer(java.io.Reader in) {
620 * Unpacks the compressed character translation table.
622 * @param packed the packed character translation table
623 * @return the unpacked character translation table
625 private static char [] zzUnpackCMap(String packed) {
626 char [] map = new char[0x110000];
627 int i = 0; /* index in packed string */
628 int j = 0; /* index in unpacked array */
630 int count = packed.charAt(i++);
631 char value = packed.charAt(i++);
632 do map[j++] = value; while (--count > 0);
639 * Refills the input buffer.
641 * @return <code>false</code>, iff there was new input.
643 * @exception java.io.IOException if any I/O-Error occurs
645 private boolean zzRefill() throws java.io.IOException {
647 /* first: make room (if you can) */
648 if (zzStartRead > 0) {
649 zzEndRead += zzFinalHighSurrogate;
650 zzFinalHighSurrogate = 0;
651 System.arraycopy(zzBuffer, zzStartRead,
653 zzEndRead-zzStartRead);
655 /* translate stored positions */
656 zzEndRead-= zzStartRead;
657 zzCurrentPos-= zzStartRead;
658 zzMarkedPos-= zzStartRead;
662 /* is the buffer big enough? */
663 if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
664 /* if not: blow it up */
665 char newBuffer[] = new char[zzBuffer.length*2];
666 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
667 zzBuffer = newBuffer;
668 zzEndRead += zzFinalHighSurrogate;
669 zzFinalHighSurrogate = 0;
672 /* fill the buffer with new input */
673 int requested = zzBuffer.length - zzEndRead;
674 int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
676 /* not supposed to occur according to specification of java.io.Reader */
678 throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
681 zzEndRead += numRead;
682 /* If numRead == requested, we might have requested to few chars to
683 encode a full Unicode character. We assume that a Reader would
684 otherwise never return half characters. */
685 if (numRead == requested) {
686 if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
688 zzFinalHighSurrogate = 1;
691 /* potentially more input available */
695 /* numRead < 0 ==> end of stream */
701 * Closes the input stream.
703 public final void yyclose() throws java.io.IOException {
704 zzAtEOF = true; /* indicate end of file */
705 zzEndRead = zzStartRead; /* invalidate buffer */
707 if (zzReader != null)
713 * Resets the scanner to read from a new input stream.
714 * Does not close the old reader.
716 * All internal variables are reset, the old input stream
717 * <b>cannot</b> be reused (internal buffer is discarded and lost).
718 * Lexical state is set to <tt>ZZ_INITIAL</tt>.
720 * Internal scan buffer is resized down to its initial length, if it has grown.
722 * @param reader the new input stream
724 public final void yyreset(java.io.Reader reader) {
729 zzEndRead = zzStartRead = 0;
730 zzCurrentPos = zzMarkedPos = 0;
731 zzFinalHighSurrogate = 0;
732 yyline = yychar = yycolumn = 0;
733 zzLexicalState = YYINITIAL;
734 if (zzBuffer.length > ZZ_BUFFERSIZE)
735 zzBuffer = new char[ZZ_BUFFERSIZE];
740 * Returns the current lexical state.
742 public final int yystate() {
743 return zzLexicalState;
748 * Enters a new lexical state
750 * @param newState the new lexical state
752 public final void yybegin(int newState) {
753 zzLexicalState = newState;
758 * Returns the text matched by the current regular expression.
760 public final String yytext() {
761 return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
766 * Returns the character at position <tt>pos</tt> from the
769 * It is equivalent to yytext().charAt(pos), but faster
771 * @param pos the position of the character to fetch.
772 * A value from 0 to yylength()-1.
774 * @return the character at position pos
776 public final char yycharat(int pos) {
777 return zzBuffer[zzStartRead+pos];
782 * Returns the length of the matched text region.
784 public final int yylength() {
785 return zzMarkedPos-zzStartRead;
790 * Reports an error that occured while scanning.
792 * In a wellformed scanner (no or only correct usage of
793 * yypushback(int) and a match-all fallback rule) this method
794 * will only be called with things that "Can't Possibly Happen".
795 * If this method is called, something is seriously wrong
796 * (e.g. a JFlex bug producing a faulty scanner etc.).
798 * Usual syntax/scanner level error handling should be done
799 * in error fallback rules.
801 * @param errorCode the code of the errormessage to display
803 private void zzScanError(int errorCode) throws RuntimeException {
806 message = ZZ_ERROR_MSG[errorCode];
808 catch (ArrayIndexOutOfBoundsException e) {
809 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
812 throw new RuntimeException(message);
817 * Pushes the specified amount of characters back into the input stream.
819 * They will be read again by then next call of the scanning method
821 * @param number the number of characters to be read again.
822 * This number must not be greater than yylength()!
824 public void yypushback(int number) throws RuntimeException {
825 if ( number > yylength() )
826 zzScanError(ZZ_PUSHBACK_2BIG);
828 zzMarkedPos -= number;
833 * Resumes scanning until the next regular expression is matched,
834 * the end of input is encountered or an I/O-Error occurs.
836 * @return the next token
837 * @exception java.io.IOException if any I/O-Error occurs
839 public Token nextToken() throws java.io.IOException, SCLSyntaxErrorException, RuntimeException {
846 int zzEndReadL = zzEndRead;
847 char [] zzBufferL = zzBuffer;
848 char [] zzCMapL = ZZ_CMAP;
850 int [] zzTransL = ZZ_TRANS;
851 int [] zzRowMapL = ZZ_ROWMAP;
852 int [] zzAttrL = ZZ_ATTRIBUTE;
855 zzMarkedPosL = zzMarkedPos;
857 yychar+= zzMarkedPosL-zzStartRead;
861 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
863 zzState = ZZ_LEXSTATE[zzLexicalState];
865 // set up zzAction for empty match case:
866 int zzAttributes = zzAttrL[zzState];
867 if ( (zzAttributes & 1) == 1 ) {
875 if (zzCurrentPosL < zzEndReadL) {
876 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
877 zzCurrentPosL += Character.charCount(zzInput);
884 // store back cached positions
885 zzCurrentPos = zzCurrentPosL;
886 zzMarkedPos = zzMarkedPosL;
887 boolean eof = zzRefill();
888 // get translated positions and possibly new buffer
889 zzCurrentPosL = zzCurrentPos;
890 zzMarkedPosL = zzMarkedPos;
891 zzBufferL = zzBuffer;
892 zzEndReadL = zzEndRead;
898 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
899 zzCurrentPosL += Character.charCount(zzInput);
902 int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
903 if (zzNext == -1) break zzForAction;
906 zzAttributes = zzAttrL[zzState];
907 if ( (zzAttributes & 1) == 1 ) {
909 zzMarkedPosL = zzCurrentPosL;
910 if ( (zzAttributes & 8) == 8 ) break zzForAction;
916 // store back cached position
917 zzMarkedPos = zzMarkedPosL;
919 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
921 switch (zzLexicalState) {
923 throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
927 throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
931 { return sym(SCLTerminals.EOF);
936 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
938 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Illegal character '" + yytext() + "'.");
942 { return sym(SCLTerminals.ID);
946 { return sym(SCLTerminals.INTEGER);
950 { return sym(SCLTerminals.SYMBOL, yytext().trim());
954 { return sym(SCLTerminals.ATTACHED_HASH, "#");
958 { return sym(SCLTerminals.ATTACHED_DOT, ".");
962 { return sym(SCLTerminals.AT);
966 { ++parenCount; return sym(SCLTerminals.LPAREN);
970 { return sym(SCLTerminals.COMMA);
975 if(parenCount == 0 && !parenCountStack.isEmpty()) {
976 parenCount = parenCountStack.removeAt(parenCountStack.size()-1);
979 yybegin(stateStack.removeAt(stateStack.size()-1));
980 return sym(SCLTerminals.CONTINUE_STRING);
983 return sym(SCLTerminals.RPAREN);
987 { return new Token(SCLTerminals.EOL, yychar, yychar+yylength(), "");
991 { return sym(SCLTerminals.LESS, "<");
995 { return sym(SCLTerminals.GREATER, ">");
999 { return sym(SCLTerminals.MINUS, "-");
1007 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Character does not conform to UTF-8 encoding.");
1011 { return sym(SCLTerminals.LAMBDA);
1015 { return sym(SCLTerminals.LBRACE);
1019 { return sym(SCLTerminals.RBRACE);
1023 { return sym(SCLTerminals.LBRACKET);
1027 { return sym(SCLTerminals.RBRACKET);
1031 { return sym(SCLTerminals.EQUALS);
1035 { return sym(SCLTerminals.COLON);
1039 { return sym(SCLTerminals.SEMICOLON);
1043 { return sym(SCLTerminals.BAR);
1047 { string.setLength(0); stringStart=yychar; yybegin(STRING); return sym(SCLTerminals.BEGIN_STRING);
1051 { return sym(SCLTerminals.BLANK);
1055 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Tabulator is not allowed except inside string literals.");
1059 { string.append( yytext() );
1063 { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
1067 { yybegin(YYINITIAL);
1068 return new Token(SCLTerminals.END_STRING, stringStart, yychar+1, string.toString());
1072 { string.append('\n');
1076 { return sym(SCLTerminals.DOTDOT, ".");
1080 { return sym(SCLTerminals.SEPARATED_DOT, ".");
1084 { return sym(SCLTerminals.ANNOTATION_ID);
1088 { return sym(SCLTerminals.BINDS);
1092 { return sym(SCLTerminals.ARROW);
1096 { return sym(SCLTerminals.COMMENT);
1100 { return sym(SCLTerminals.AS);
1104 { return sym(SCLTerminals.IF);
1108 { return sym(SCLTerminals.IN);
1112 { return sym(options.supportEq ? SCLTerminals.EQ : SCLTerminals.ID);
1116 { return sym(SCLTerminals.BY);
1120 { return sym(SCLTerminals.DO);
1124 { return sym(SCLTerminals.IMPLIES);
1128 { return sym(SCLTerminals.FOLLOWS);
1132 { return sym(SCLTerminals.HASTYPE);
1136 { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Illegal string escape character.");
1140 { string.append(yytext().substring(1));
1144 { parenCountStack.add(parenCount);
1146 stateStack.add(STRING);
1148 return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
1152 { string.append('\r');
1156 { string.append('\t');
1160 { parenCountStack.add(parenCount);
1162 stateStack.add(LONG_STRING);
1164 return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
1168 { return sym(SCLTerminals.FLOAT);
1172 { return sym(SCLTerminals.CHAR);
1176 { String text = yytext();
1177 return sym(SCLTerminals.ID, text.substring(1, text.length()-1));
1181 { String text = yytext();
1182 return sym(SCLTerminals.SYMBOL, text.substring(1, text.length()-1));
1186 { return sym(SCLTerminals.QUERY_OP);
1190 { return sym(SCLTerminals.LET);
1194 { return sym(SCLTerminals.MDO);
1198 { string.setLength(0); stringStart=yychar; yybegin(LONG_STRING); return sym(SCLTerminals.BEGIN_STRING);
1202 { yybegin(YYINITIAL);
1203 return new Token(SCLTerminals.END_STRING, stringStart, yychar+3, string.toString());
1207 { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.RULE);
1211 { return sym(SCLTerminals.THEN);
1215 { return sym(SCLTerminals.TYPE);
1219 { return sym(SCLTerminals.ELSE);
1223 { return sym(SCLTerminals.WITH);
1227 { return sym(SCLTerminals.WHEN);
1231 { return sym(SCLTerminals.DATA);
1235 { return sym(SCLTerminals.INFIX);
1239 { return sym(SCLTerminals.WHERE);
1243 { return sym(SCLTerminals.CLASS);
1247 { return sym(SCLTerminals.MATCH);
1251 { return sym(SCLTerminals.LAMBDA_MATCH);
1255 { return sym(SCLTerminals.FORALL);
1259 { return sym(SCLTerminals.INFIXR);
1263 { return sym(SCLTerminals.INFIXL);
1267 { return sym(SCLTerminals.IMPORT);
1271 { return sym(SCLTerminals.HIDING);
1275 { return sym(SCLTerminals.EFFECT);
1279 { return sym(supportCHR() ? SCLTerminals.CHR_SELECT : SCLTerminals.SELECT);
1283 { string.append((char)Integer.parseInt(yytext().substring(2), 16));
1287 { return sym(supportCHR() ? SCLTerminals.RULESET : SCLTerminals.ID);
1291 { return sym(SCLTerminals.INCLUDE);
1295 { return sym(SCLTerminals.ENFORCE);
1299 { return sym(SCLTerminals.EXTENDS);
1303 { return sym(SCLTerminals.INSTANCE);
1307 { return sym(SCLTerminals.DERIVING);
1311 { return sym(SCLTerminals.IMPORTJAVA);
1315 { return sym(SCLTerminals.CONSTRAINT);
1319 { return sym(SCLTerminals.SELECT_FIRST);
1323 { return sym(SCLTerminals.ABSTRACT_RULE);
1327 { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.TRANSFORMATION);
1331 { return sym(SCLTerminals.SELECT_DISTINCT);
1335 { return sym(SCLTerminals.MAPPING_RELATION);
1339 zzScanError(ZZ_NO_MATCH);