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:/GamsGui/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\12\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\14\2"+
77 "\1\74\11\2\1\75\1\76\1\0\1\77\2\0\1\46"+
78 "\1\0\1\2\1\100\6\2\1\101\1\102\2\2\1\103"+
79 "\3\2\1\104\1\2\1\105\2\2\1\106\3\2\1\0"+
80 "\1\46\1\0\3\2\1\107\11\2\1\110\1\2\1\111"+
81 "\1\2\1\112\1\2\1\0\1\113\1\114\2\2\1\115"+
82 "\1\116\2\2\1\117\1\2\1\120\1\121\2\2\1\122"+
83 "\3\2\1\123\1\124\2\2\1\125\2\2\1\126\1\127"+
84 "\1\0\4\2\1\130\2\2\2\0\1\2\1\131\2\0"+
85 "\2\2\2\0\1\2\2\0\1\132\1\2\2\0\1\133"+
86 "\2\0\1\2\4\0\1\2\1\134\2\0\1\135\1\2"+
87 "\2\0\1\136\2\0\1\137\1\0\1\140";
89 private static int [] zzUnpackAction() {
90 int [] result = new int[298];
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\u12e4\0\370\0\u1322"+
128 "\0\u1360\0\u139e\0\370\0\u13dc\0\u141a\0\370\0\u1458\0\u1496"+
129 "\0\u14d4\0\u1512\0\u01b2\0\u01b2\0\u01b2\0\u1550\0\272\0\272"+
130 "\0\272\0\272\0\272\0\u158e\0\272\0\u15cc\0\u02e8\0\u160a"+
131 "\0\u1648\0\u1648\0\272\0\272\0\272\0\u1686\0\272\0\u16c4"+
132 "\0\u1702\0\272\0\u01b2\0\u1740\0\u177e\0\u17bc\0\u17fa\0\u1838"+
133 "\0\u1876\0\370\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\370\0\u1b9c"+
135 "\0\u1bda\0\u1c18\0\u1c56\0\u1c94\0\u1cd2\0\u1d10\0\u1d4e\0\u1d8c"+
136 "\0\370\0\272\0\u1dca\0\272\0\u1e08\0\u1e46\0\u01b2\0\u1e84"+
137 "\0\u1ec2\0\u1f00\0\u1f3e\0\u1f7c\0\u1fba\0\u1ff8\0\u2036\0\u2074"+
138 "\0\370\0\370\0\u20b2\0\u20f0\0\370\0\u212e\0\u216c\0\u21aa"+
139 "\0\370\0\u21e8\0\370\0\u2226\0\u2264\0\370\0\u22a2\0\u22e0"+
140 "\0\u231e\0\u235c\0\272\0\u239a\0\u23d8\0\u2416\0\u2454\0\u2492"+
141 "\0\u24d0\0\u250e\0\u254c\0\u258a\0\u25c8\0\u2606\0\u2644\0\u2682"+
142 "\0\u26c0\0\370\0\u26fe\0\370\0\u273c\0\370\0\u277a\0\u27b8"+
143 "\0\272\0\370\0\u27f6\0\u2834\0\370\0\370\0\u2872\0\u28b0"+
144 "\0\u28ee\0\u292c\0\370\0\370\0\u296a\0\u29a8\0\u29e6\0\u2a24"+
145 "\0\u2a62\0\u2aa0\0\272\0\370\0\u2ade\0\u2b1c\0\370\0\u2b5a"+
146 "\0\u2b98\0\370\0\370\0\u2bd6\0\u2c14\0\u2c52\0\u2c90\0\u2cce"+
147 "\0\370\0\u2d0c\0\u2d4a\0\u2d88\0\u2dc6\0\u2e04\0\370\0\u2e42"+
148 "\0\u2e80\0\u2ebe\0\u2efc\0\u2f3a\0\u2f78\0\u2fb6\0\u2ff4\0\u3032"+
149 "\0\370\0\u3070\0\u30ae\0\u30ec\0\370\0\u312a\0\u3168\0\u31a6"+
150 "\0\u31e4\0\u3222\0\u3260\0\u329e\0\u32dc\0\272\0\u331a\0\u3358"+
151 "\0\272\0\u3396\0\u33d4\0\u3412\0\370\0\u3450\0\u348e\0\272"+
154 private static int [] zzUnpackRowMap() {
155 int [] result = new int[298];
157 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
161 private static int zzUnpackRowMap(String packed, int offset, int [] result) {
162 int i = 0; /* index in packed string */
163 int j = offset; /* index in unpacked array */
164 int l = packed.length();
166 int high = packed.charAt(i++) << 16;
167 result[j++] = high | packed.charAt(i++);
173 * The transition table of the DFA
175 private static final int [] ZZ_TRANS = zzUnpackTrans();
177 private static final String ZZ_TRANS_PACKED_0 =
178 "\1\5\1\6\1\7\1\6\1\10\1\11\1\12\1\13"+
179 "\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\23"+
180 "\1\11\1\24\1\6\1\25\1\26\1\27\1\11\1\30"+
181 "\1\31\1\32\1\6\1\33\1\34\1\35\1\36\1\37"+
182 "\1\40\1\41\1\6\1\42\1\43\1\6\1\44\1\45"+
183 "\1\6\1\46\1\47\6\6\1\50\1\51\1\52\1\53"+
184 "\1\54\1\55\1\56\1\57\1\60\1\61\2\62\1\63"+
185 "\15\64\1\65\11\64\1\30\1\66\40\64\1\67\2\64"+
186 "\1\70\16\64\1\71\11\64\1\30\1\72\40\64\1\73"+
187 "\1\64\1\74\1\75\1\64\77\0\4\6\2\0\1\76"+
188 "\12\0\1\6\6\0\30\6\11\0\1\6\5\0\1\7"+
189 "\4\0\1\77\12\0\1\100\16\0\1\100\34\0\4\101"+
190 "\1\0\22\101\1\0\1\102\45\101\5\0\2\11\1\0"+
191 "\1\11\6\0\3\11\1\0\1\11\1\0\2\11\1\0"+
192 "\1\11\34\0\2\11\1\0\1\11\12\0\2\11\1\0"+
193 "\1\11\4\0\1\103\1\0\3\11\1\0\1\11\1\103"+
194 "\2\11\1\0\1\11\34\0\2\11\1\0\1\11\3\0"+
195 "\1\103\10\0\1\104\5\0\1\105\6\0\1\105\47\0"+
196 "\1\105\2\0\1\106\1\0\1\106\1\0\2\11\1\0"+
197 "\1\11\6\0\3\11\1\106\1\11\1\0\2\11\1\0"+
198 "\1\11\30\106\4\0\2\11\1\0\1\11\1\0\1\106"+
199 "\10\0\2\107\1\110\1\107\1\0\1\111\4\0\3\107"+
200 "\1\0\1\107\1\0\2\107\1\0\1\107\34\0\2\107"+
201 "\1\0\1\107\6\0\1\112\1\0\1\112\16\0\1\112"+
202 "\6\0\30\112\11\0\1\112\77\0\1\62\2\0\1\113"+
203 "\1\0\1\113\5\0\1\114\2\0\1\115\5\0\1\113"+
204 "\6\0\30\113\11\0\1\113\10\0\2\11\1\0\1\11"+
205 "\3\0\1\116\2\0\1\11\1\117\1\11\1\0\1\120"+
206 "\1\0\2\11\1\0\1\11\34\0\2\11\1\0\1\117"+
207 "\12\0\2\11\1\0\1\11\6\0\2\11\1\121\1\0"+
208 "\1\11\1\0\2\11\1\0\1\11\34\0\2\11\1\0"+
209 "\1\11\31\0\1\26\56\0\2\11\1\0\1\11\6\0"+
210 "\3\11\1\0\1\11\1\0\1\122\1\123\1\0\1\11"+
211 "\34\0\2\11\1\0\1\11\12\0\2\11\1\0\1\11"+
212 "\6\0\3\11\1\0\1\11\1\124\2\11\1\0\1\11"+
213 "\21\0\1\125\12\0\2\11\1\0\1\11\6\0\4\6"+
214 "\2\0\1\76\12\0\1\6\6\0\1\6\1\126\26\6"+
215 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
216 "\6\0\14\6\1\127\13\6\11\0\1\6\4\0\4\6"+
217 "\2\0\1\76\12\0\1\6\6\0\12\6\1\130\2\6"+
218 "\1\131\12\6\11\0\1\6\4\0\4\6\2\0\1\76"+
219 "\12\0\1\6\6\0\10\6\1\132\17\6\11\0\1\6"+
220 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\133"+
221 "\10\6\1\134\7\6\1\135\6\6\11\0\1\6\4\0"+
222 "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\136"+
223 "\4\6\1\137\16\6\1\140\1\6\11\0\1\6\4\0"+
224 "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\141"+
225 "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
226 "\1\6\6\0\1\142\3\6\1\143\4\6\1\144\5\6"+
227 "\1\145\1\146\3\6\1\147\3\6\11\0\1\6\4\0"+
228 "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\150"+
229 "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
230 "\1\6\6\0\5\6\1\151\1\6\1\152\20\6\11\0"+
231 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
232 "\26\6\1\153\1\6\11\0\1\6\4\0\4\6\2\0"+
233 "\1\76\12\0\1\6\6\0\1\6\1\154\2\6\1\155"+
234 "\23\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
235 "\1\6\6\0\1\6\1\156\1\6\1\157\4\6\1\160"+
236 "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
237 "\1\6\6\0\3\6\1\161\14\6\1\162\7\6\11\0"+
238 "\1\6\10\0\2\11\1\0\1\11\6\0\2\11\1\163"+
239 "\1\0\1\11\1\0\2\11\1\0\1\11\34\0\2\11"+
240 "\1\0\1\11\12\0\2\11\1\0\1\11\6\0\3\11"+
241 "\1\0\1\164\1\0\2\11\1\0\1\11\34\0\1\11"+
242 "\1\165\1\0\1\11\76\0\1\166\4\0\15\64\1\0"+
243 "\11\64\2\0\40\64\1\0\2\64\1\0\1\64\74\0"+
244 "\1\70\1\0\4\167\1\170\4\167\1\171\3\167\1\0"+
245 "\12\167\1\170\2\167\1\172\3\167\1\173\2\167\1\75"+
246 "\2\167\1\174\23\167\1\170\1\167\2\0\1\167\74\0"+
247 "\1\75\12\0\1\175\155\0\1\176\5\0\1\6\1\0"+
248 "\1\6\10\0\1\177\5\0\1\6\6\0\30\6\11\0"+
249 "\1\6\5\0\1\200\75\0\1\201\20\0\1\202\56\0"+
250 "\1\203\71\0\27\101\1\0\46\101\15\0\1\103\6\0"+
251 "\1\103\47\0\1\103\16\0\1\105\6\0\1\105\47\0"+
252 "\1\105\2\0\4\106\15\0\1\106\6\0\30\106\11\0"+
253 "\1\106\10\0\2\107\1\0\1\107\2\0\1\204\3\0"+
254 "\3\107\1\0\1\107\1\0\2\107\1\0\1\107\34\0"+
255 "\2\107\1\0\1\107\20\0\1\204\74\0\1\111\1\205"+
256 "\63\0\4\112\15\0\1\112\6\0\30\112\11\0\1\112"+
257 "\4\0\4\113\2\0\1\206\6\0\1\207\3\0\1\113"+
258 "\6\0\30\113\11\0\1\113\15\0\1\210\64\0\1\211"+
259 "\1\0\1\211\16\0\1\211\6\0\30\211\11\0\1\211"+
260 "\24\0\1\212\61\0\2\11\1\0\1\11\6\0\2\11"+
261 "\1\213\1\0\1\11\1\0\2\11\1\0\1\11\34\0"+
262 "\2\11\1\0\1\11\5\0\15\122\1\0\56\122\1\0"+
263 "\1\122\5\214\2\123\1\214\1\123\6\214\3\123\1\214"+
264 "\1\123\1\214\1\123\1\215\1\214\1\123\34\214\2\123"+
265 "\1\214\1\123\5\214\24\0\1\124\25\0\1\125\57\0"+
266 "\1\216\42\0\4\6\2\0\1\76\12\0\1\6\6\0"+
267 "\2\6\1\217\25\6\11\0\1\6\4\0\4\6\2\0"+
268 "\1\76\12\0\1\6\6\0\4\6\1\220\23\6\11\0"+
269 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
270 "\12\6\1\221\15\6\11\0\1\6\4\0\4\6\2\0"+
271 "\1\76\12\0\1\6\6\0\6\6\1\222\21\6\11\0"+
272 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
273 "\1\223\11\6\1\224\3\6\1\225\11\6\11\0\1\6"+
274 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\22\6"+
275 "\1\226\5\6\11\0\1\6\4\0\4\6\2\0\1\76"+
276 "\12\0\1\6\6\0\3\6\1\227\24\6\11\0\1\6"+
277 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\10\6"+
278 "\1\230\17\6\11\0\1\6\4\0\4\6\2\0\1\76"+
279 "\12\0\1\6\6\0\22\6\1\231\5\6\11\0\1\6"+
280 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\20\6"+
281 "\1\232\7\6\11\0\1\6\4\0\4\6\2\0\1\76"+
282 "\12\0\1\6\6\0\1\233\27\6\11\0\1\6\4\0"+
283 "\4\6\2\0\1\76\12\0\1\6\6\0\12\6\1\234"+
284 "\15\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
285 "\1\6\6\0\1\235\27\6\11\0\1\6\4\0\4\6"+
286 "\2\0\1\76\12\0\1\6\6\0\6\6\1\236\21\6"+
287 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
288 "\6\0\1\6\1\237\26\6\11\0\1\6\4\0\4\6"+
289 "\2\0\1\76\12\0\1\6\6\0\4\6\1\240\23\6"+
290 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
291 "\6\0\6\6\1\241\21\6\11\0\1\6\4\0\4\6"+
292 "\2\0\1\76\12\0\1\6\6\0\10\6\1\242\17\6"+
293 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
294 "\6\0\11\6\1\243\16\6\11\0\1\6\4\0\4\6"+
295 "\2\0\1\76\12\0\1\6\6\0\3\6\1\244\24\6"+
296 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
297 "\6\0\6\6\1\245\21\6\11\0\1\6\4\0\4\6"+
298 "\2\0\1\76\12\0\1\6\6\0\2\6\1\246\25\6"+
299 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
300 "\6\0\6\6\1\247\13\6\1\250\5\6\11\0\1\6"+
301 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\6"+
302 "\1\251\26\6\11\0\1\6\74\0\1\252\6\0\2\253"+
303 "\16\0\1\253\6\0\1\253\2\0\1\253\4\0\1\253"+
304 "\4\0\2\253\1\0\1\253\115\0\1\254\6\0\1\200"+
305 "\17\0\1\100\16\0\1\100\36\0\1\201\74\0\1\113"+
306 "\1\0\1\113\10\0\1\115\5\0\1\113\6\0\30\113"+
307 "\11\0\1\113\15\0\1\210\1\255\63\0\4\211\11\0"+
308 "\1\207\3\0\1\211\6\0\30\211\11\0\1\211\3\0"+
309 "\26\214\1\256\54\214\2\123\1\214\1\123\6\214\3\123"+
310 "\1\214\1\123\1\214\1\257\1\215\1\214\1\123\34\214"+
311 "\2\123\1\214\1\123\5\214\37\0\1\260\37\0\4\6"+
312 "\2\0\1\76\12\0\1\6\6\0\3\6\1\261\24\6"+
313 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
314 "\6\0\10\6\1\262\17\6\11\0\1\6\4\0\4\6"+
315 "\2\0\1\76\12\0\1\6\6\0\6\6\1\263\21\6"+
316 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
317 "\6\0\5\6\1\264\22\6\11\0\1\6\4\0\4\6"+
318 "\2\0\1\76\12\0\1\6\6\0\6\6\1\265\21\6"+
319 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
320 "\6\0\4\6\1\266\23\6\11\0\1\6\4\0\4\6"+
321 "\2\0\1\76\12\0\1\6\6\0\1\6\1\267\26\6"+
322 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
323 "\6\0\11\6\1\270\16\6\11\0\1\6\4\0\4\6"+
324 "\2\0\1\76\12\0\1\6\6\0\11\6\1\271\16\6"+
325 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
326 "\6\0\10\6\1\272\17\6\11\0\1\6\4\0\4\6"+
327 "\2\0\1\76\12\0\1\6\6\0\5\6\1\273\22\6"+
328 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
329 "\6\0\10\6\1\274\17\6\11\0\1\6\4\0\4\6"+
330 "\2\0\1\76\12\0\1\6\6\0\10\6\1\275\17\6"+
331 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
332 "\6\0\1\6\1\276\26\6\11\0\1\6\4\0\4\6"+
333 "\2\0\1\76\12\0\1\6\6\0\10\6\1\277\17\6"+
334 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
335 "\6\0\10\6\1\300\17\6\11\0\1\6\4\0\4\6"+
336 "\2\0\1\76\12\0\1\6\6\0\7\6\1\301\20\6"+
337 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
338 "\6\0\2\6\1\302\6\6\1\303\16\6\11\0\1\6"+
339 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\12\6"+
340 "\1\304\15\6\11\0\1\6\4\0\4\6\2\0\1\76"+
341 "\12\0\1\6\6\0\12\6\1\305\15\6\11\0\1\6"+
342 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\3\6"+
343 "\1\306\24\6\11\0\1\6\4\0\4\6\2\0\1\76"+
344 "\12\0\1\6\6\0\5\6\1\307\22\6\11\0\1\6"+
345 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\16\6"+
346 "\1\310\11\6\11\0\1\6\4\0\4\6\2\0\1\76"+
347 "\12\0\1\6\6\0\22\6\1\311\5\6\11\0\1\6"+
348 "\5\0\2\312\16\0\1\312\6\0\1\312\2\0\1\312"+
349 "\4\0\1\312\4\0\2\312\1\0\1\312\42\0\1\207"+
350 "\57\0\25\214\1\313\1\256\47\214\47\0\1\314\27\0"+
351 "\4\6\2\0\1\76\12\0\1\6\6\0\4\6\1\315"+
352 "\23\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
353 "\1\6\6\0\12\6\1\316\15\6\11\0\1\6\4\0"+
354 "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\317"+
355 "\25\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
356 "\1\6\6\0\17\6\1\320\10\6\11\0\1\6\4\0"+
357 "\4\6\2\0\1\76\12\0\1\6\6\0\3\6\1\321"+
358 "\24\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
359 "\1\6\6\0\14\6\1\322\13\6\11\0\1\6\4\0"+
360 "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\323"+
361 "\25\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
362 "\1\6\6\0\12\6\1\324\15\6\11\0\1\6\4\0"+
363 "\4\6\2\0\1\76\12\0\1\6\6\0\11\6\1\325"+
364 "\16\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
365 "\1\6\6\0\16\6\1\326\11\6\11\0\1\6\4\0"+
366 "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\327"+
367 "\25\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
368 "\1\6\6\0\11\6\1\330\16\6\11\0\1\6\4\0"+
369 "\4\6\2\0\1\76\12\0\1\6\6\0\16\6\1\331"+
370 "\11\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
371 "\1\6\6\0\10\6\1\332\17\6\11\0\1\6\4\0"+
372 "\4\6\2\0\1\76\12\0\1\6\6\0\6\6\1\333"+
373 "\21\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
374 "\1\6\6\0\12\6\1\334\15\6\11\0\1\6\4\0"+
375 "\4\6\2\0\1\76\12\0\1\6\6\0\25\6\1\335"+
376 "\2\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
377 "\1\6\6\0\7\6\1\336\20\6\11\0\1\6\4\0"+
378 "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\337"+
379 "\22\6\11\0\1\6\5\0\2\340\16\0\1\340\6\0"+
380 "\1\340\2\0\1\340\4\0\1\340\4\0\2\340\1\0"+
381 "\1\340\64\0\1\341\36\0\4\6\2\0\1\76\12\0"+
382 "\1\6\6\0\4\6\1\342\23\6\11\0\1\6\4\0"+
383 "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\343"+
384 "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
385 "\1\6\6\0\3\6\1\344\24\6\11\0\1\6\4\0"+
386 "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\345"+
387 "\1\6\1\346\23\6\11\0\1\6\4\0\4\6\2\0"+
388 "\1\76\12\0\1\6\6\0\11\6\1\347\16\6\11\0"+
389 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
390 "\20\6\1\350\7\6\11\0\1\6\4\0\4\6\2\0"+
391 "\1\76\12\0\1\6\6\0\6\6\1\351\21\6\11\0"+
392 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
393 "\1\352\27\6\11\0\1\6\4\0\4\6\2\0\1\76"+
394 "\12\0\1\6\6\0\23\6\1\353\4\6\11\0\1\6"+
395 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\6\6"+
396 "\1\354\21\6\11\0\1\6\4\0\4\6\2\0\1\76"+
397 "\12\0\1\6\6\0\16\6\1\355\11\6\11\0\1\6"+
398 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\20\6"+
399 "\1\356\7\6\11\0\1\6\4\0\4\6\2\0\1\76"+
400 "\12\0\1\6\6\0\6\6\1\357\21\6\11\0\1\6"+
401 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+
402 "\1\360\25\6\11\0\1\6\4\0\4\6\2\0\1\76"+
403 "\12\0\1\6\6\0\5\6\1\361\22\6\11\0\1\6"+
404 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\11\6"+
405 "\1\362\16\6\11\0\1\6\5\0\2\363\16\0\1\363"+
406 "\6\0\1\363\2\0\1\363\4\0\1\363\4\0\2\363"+
407 "\1\0\1\363\25\0\4\6\2\0\1\76\12\0\1\6"+
408 "\6\0\6\6\1\364\21\6\11\0\1\6\4\0\4\6"+
409 "\2\0\1\76\12\0\1\6\6\0\16\6\1\365\11\6"+
410 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
411 "\6\0\16\6\1\366\11\6\11\0\1\6\4\0\4\6"+
412 "\2\0\1\76\12\0\1\6\6\0\10\6\1\367\17\6"+
413 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
414 "\6\0\27\6\1\370\11\0\1\6\4\0\4\6\2\0"+
415 "\1\76\12\0\1\6\6\0\1\6\1\371\26\6\11\0"+
416 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
417 "\10\6\1\372\17\6\11\0\1\6\4\0\4\6\2\0"+
418 "\1\76\12\0\1\6\6\0\12\6\1\373\15\6\11\0"+
419 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\1\0"+
420 "\1\374\4\0\30\6\11\0\1\6\4\0\4\6\2\0"+
421 "\1\76\12\0\1\6\6\0\3\6\1\375\24\6\11\0"+
422 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
423 "\11\6\1\376\16\6\11\0\1\6\4\0\4\6\2\0"+
424 "\1\76\12\0\1\6\6\0\23\6\1\377\4\6\11\0"+
425 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
426 "\6\6\1\u0100\21\6\11\0\1\6\4\0\4\6\2\0"+
427 "\1\76\12\0\1\6\6\0\10\6\1\u0101\17\6\11\0"+
428 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
429 "\3\6\1\u0102\24\6\11\0\1\6\4\0\4\6\2\0"+
430 "\1\76\12\0\1\6\6\0\2\6\1\u0103\25\6\11\0"+
431 "\1\6\27\0\1\374\4\0\1\u0104\17\0\1\u0105\25\0"+
432 "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\u0106"+
433 "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
434 "\1\6\6\0\23\6\1\u0107\4\6\11\0\1\6\4\0"+
435 "\4\6\2\0\1\76\12\0\1\6\1\0\1\u0108\4\0"+
436 "\30\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
437 "\1\6\1\0\1\u0109\4\0\30\6\11\0\1\6\4\0"+
438 "\4\6\2\0\1\76\12\0\1\6\6\0\25\6\1\u010a"+
439 "\2\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
440 "\1\6\6\0\21\6\1\u010b\6\6\11\0\1\6\41\0"+
441 "\1\u010c\75\0\1\u010d\40\0\4\6\2\0\1\76\12\0"+
442 "\1\6\6\0\11\6\1\u010e\16\6\11\0\1\6\27\0"+
443 "\1\u0108\6\0\1\u010f\66\0\1\u0109\6\0\1\u0110\43\0"+
444 "\4\6\2\0\1\76\12\0\1\6\6\0\3\6\1\u0111"+
445 "\24\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
446 "\1\6\6\0\3\6\1\u0112\24\6\11\0\1\6\36\0"+
447 "\1\u0113\105\0\1\u0114\33\0\4\6\2\0\1\76\12\0"+
448 "\1\6\6\0\6\6\1\u0115\21\6\11\0\1\6\44\0"+
449 "\1\u0116\101\0\1\u0117\31\0\4\6\2\0\1\76\12\0"+
450 "\1\6\6\0\6\6\1\u0118\21\6\11\0\1\6\46\0"+
451 "\1\u0119\71\0\1\u011a\73\0\1\u011b\75\0\1\u011c\41\0"+
452 "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\u011d"+
453 "\22\6\11\0\1\6\42\0\1\u011e\74\0\1\u011f\73\0"+
454 "\1\u0120\102\0\1\u0121\35\0\4\6\2\0\1\76\12\0"+
455 "\1\6\6\0\1\6\1\u0122\26\6\11\0\1\6\45\0"+
456 "\1\u0123\72\0\1\u0124\37\0\4\6\2\0\1\76\12\0"+
457 "\1\6\6\0\11\6\1\u0125\16\6\11\0\1\6\52\0"+
458 "\1\u0126\64\0\1\u0127\76\0\1\u0128\70\0\1\u0129\105\0"+
461 private static int [] zzUnpackTrans() {
462 int [] result = new int[13578];
464 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
468 private static int zzUnpackTrans(String packed, int offset, int [] result) {
469 int i = 0; /* index in packed string */
470 int j = offset; /* index in unpacked array */
471 int l = packed.length();
473 int count = packed.charAt(i++);
474 int value = packed.charAt(i++);
476 do result[j++] = value; while (--count > 0);
483 private static final int ZZ_UNKNOWN_ERROR = 0;
484 private static final int ZZ_NO_MATCH = 1;
485 private static final int ZZ_PUSHBACK_2BIG = 2;
487 /* error messages for the codes above */
488 private static final String ZZ_ERROR_MSG[] = {
489 "Unknown internal scanner error",
490 "Error: could not match input",
491 "Error: pushback value was too large"
495 * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
497 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
499 private static final String ZZ_ATTRIBUTE_PACKED_0 =
500 "\3\0\1\10\1\11\10\1\2\11\10\1\1\11\17\1"+
501 "\4\11\2\1\1\11\3\1\2\11\2\1\1\0\2\11"+
502 "\4\1\1\11\5\0\1\1\1\11\2\1\3\0\1\1"+
503 "\4\0\5\1\2\0\40\1\1\0\5\11\1\1\1\11"+
504 "\2\0\2\1\1\0\3\11\1\0\1\11\2\0\1\11"+
505 "\1\1\1\0\1\1\1\0\33\1\1\11\1\0\1\11"+
506 "\2\0\1\1\1\0\31\1\1\0\1\11\1\0\23\1"+
507 "\1\0\1\11\21\1\1\11\10\1\1\0\7\1\2\0"+
508 "\2\1\2\0\2\1\2\0\1\1\2\0\2\1\2\0"+
509 "\1\1\2\0\1\1\4\0\1\1\1\11\2\0\1\11"+
510 "\1\1\2\0\1\1\2\0\1\11\1\0\1\11";
512 private static int [] zzUnpackAttribute() {
513 int [] result = new int[298];
515 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
519 private static int zzUnpackAttribute(String packed, int offset, int [] result) {
520 int i = 0; /* index in packed string */
521 int j = offset; /* index in unpacked array */
522 int l = packed.length();
524 int count = packed.charAt(i++);
525 int value = packed.charAt(i++);
526 do result[j++] = value; while (--count > 0);
531 /** the input device */
532 private java.io.Reader zzReader;
534 /** the current state of the DFA */
537 /** the current lexical state */
538 private int zzLexicalState = YYINITIAL;
540 /** this buffer contains the current text to be matched and is
541 the source of the yytext() string */
542 private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
544 /** the textposition at the last accepting state */
545 private int zzMarkedPos;
547 /** the current text position in the buffer */
548 private int zzCurrentPos;
550 /** startRead marks the beginning of the yytext() string in the buffer */
551 private int zzStartRead;
553 /** endRead marks the last character in the buffer, that has been read
555 private int zzEndRead;
557 /** number of newlines encountered up to the start of the matched text */
560 /** the number of characters up to the start of the matched text */
564 * the number of characters from the last newline up to the start of the
567 private int yycolumn;
570 * zzAtBOL == true <=> the scanner is currently at the beginning of a line
572 private boolean zzAtBOL = true;
574 /** zzAtEOF == true <=> the scanner is at the EOF */
575 private boolean zzAtEOF;
577 /** denotes if the user-EOF-code has already been executed */
578 private boolean zzEOFDone;
581 * The number of occupied positions in zzBuffer beyond zzEndRead.
582 * When a lead/high surrogate has been read from the input stream
583 * into the final zzBuffer position, this will have a value of 1;
584 * otherwise, it will have a value of 0.
586 private int zzFinalHighSurrogate = 0;
589 public SCLParserOptions options = SCLParserOptions.DEFAULT;
591 TIntArrayList parenCountStack = new TIntArrayList(2);
593 TIntArrayList stateStack = new TIntArrayList(2);
595 StringBuffer string = new StringBuffer();
596 CompilationContext context;
598 private Token sym(int id) {
599 return new Token(id, yychar, yychar+yylength(), yytext());
601 private Token sym(int id, String text) {
602 return new Token(id, yychar, yychar+yylength(), text);
604 public void setCompilationContext(CompilationContext context) {
605 this.context = context;
607 public boolean supportCHR() {
608 return context.header == null ? false : context.header.chr;
613 * Creates a new scanner
615 * @param in the java.io.Reader to read input from.
617 public SCLLexer(java.io.Reader in) {
623 * Unpacks the compressed character translation table.
625 * @param packed the packed character translation table
626 * @return the unpacked character translation table
628 private static char [] zzUnpackCMap(String packed) {
629 char [] map = new char[0x110000];
630 int i = 0; /* index in packed string */
631 int j = 0; /* index in unpacked array */
633 int count = packed.charAt(i++);
634 char value = packed.charAt(i++);
635 do map[j++] = value; while (--count > 0);
642 * Refills the input buffer.
644 * @return <code>false</code>, iff there was new input.
646 * @exception java.io.IOException if any I/O-Error occurs
648 private boolean zzRefill() throws java.io.IOException {
650 /* first: make room (if you can) */
651 if (zzStartRead > 0) {
652 zzEndRead += zzFinalHighSurrogate;
653 zzFinalHighSurrogate = 0;
654 System.arraycopy(zzBuffer, zzStartRead,
656 zzEndRead-zzStartRead);
658 /* translate stored positions */
659 zzEndRead-= zzStartRead;
660 zzCurrentPos-= zzStartRead;
661 zzMarkedPos-= zzStartRead;
665 /* is the buffer big enough? */
666 if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
667 /* if not: blow it up */
668 char newBuffer[] = new char[zzBuffer.length*2];
669 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
670 zzBuffer = newBuffer;
671 zzEndRead += zzFinalHighSurrogate;
672 zzFinalHighSurrogate = 0;
675 /* fill the buffer with new input */
676 int requested = zzBuffer.length - zzEndRead;
677 int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
679 /* not supposed to occur according to specification of java.io.Reader */
681 throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
684 zzEndRead += numRead;
685 /* If numRead == requested, we might have requested to few chars to
686 encode a full Unicode character. We assume that a Reader would
687 otherwise never return half characters. */
688 if (numRead == requested) {
689 if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
691 zzFinalHighSurrogate = 1;
694 /* potentially more input available */
698 /* numRead < 0 ==> end of stream */
704 * Closes the input stream.
706 public final void yyclose() throws java.io.IOException {
707 zzAtEOF = true; /* indicate end of file */
708 zzEndRead = zzStartRead; /* invalidate buffer */
710 if (zzReader != null)
716 * Resets the scanner to read from a new input stream.
717 * Does not close the old reader.
719 * All internal variables are reset, the old input stream
720 * <b>cannot</b> be reused (internal buffer is discarded and lost).
721 * Lexical state is set to <tt>ZZ_INITIAL</tt>.
723 * Internal scan buffer is resized down to its initial length, if it has grown.
725 * @param reader the new input stream
727 public final void yyreset(java.io.Reader reader) {
732 zzEndRead = zzStartRead = 0;
733 zzCurrentPos = zzMarkedPos = 0;
734 zzFinalHighSurrogate = 0;
735 yyline = yychar = yycolumn = 0;
736 zzLexicalState = YYINITIAL;
737 if (zzBuffer.length > ZZ_BUFFERSIZE)
738 zzBuffer = new char[ZZ_BUFFERSIZE];
743 * Returns the current lexical state.
745 public final int yystate() {
746 return zzLexicalState;
751 * Enters a new lexical state
753 * @param newState the new lexical state
755 public final void yybegin(int newState) {
756 zzLexicalState = newState;
761 * Returns the text matched by the current regular expression.
763 public final String yytext() {
764 return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
769 * Returns the character at position <tt>pos</tt> from the
772 * It is equivalent to yytext().charAt(pos), but faster
774 * @param pos the position of the character to fetch.
775 * A value from 0 to yylength()-1.
777 * @return the character at position pos
779 public final char yycharat(int pos) {
780 return zzBuffer[zzStartRead+pos];
785 * Returns the length of the matched text region.
787 public final int yylength() {
788 return zzMarkedPos-zzStartRead;
793 * Reports an error that occured while scanning.
795 * In a wellformed scanner (no or only correct usage of
796 * yypushback(int) and a match-all fallback rule) this method
797 * will only be called with things that "Can't Possibly Happen".
798 * If this method is called, something is seriously wrong
799 * (e.g. a JFlex bug producing a faulty scanner etc.).
801 * Usual syntax/scanner level error handling should be done
802 * in error fallback rules.
804 * @param errorCode the code of the errormessage to display
806 private void zzScanError(int errorCode) throws RuntimeException {
809 message = ZZ_ERROR_MSG[errorCode];
811 catch (ArrayIndexOutOfBoundsException e) {
812 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
815 throw new RuntimeException(message);
820 * Pushes the specified amount of characters back into the input stream.
822 * They will be read again by then next call of the scanning method
824 * @param number the number of characters to be read again.
825 * This number must not be greater than yylength()!
827 public void yypushback(int number) throws RuntimeException {
828 if ( number > yylength() )
829 zzScanError(ZZ_PUSHBACK_2BIG);
831 zzMarkedPos -= number;
836 * Resumes scanning until the next regular expression is matched,
837 * the end of input is encountered or an I/O-Error occurs.
839 * @return the next token
840 * @exception java.io.IOException if any I/O-Error occurs
842 public Token nextToken() throws java.io.IOException, SCLSyntaxErrorException, RuntimeException {
849 int zzEndReadL = zzEndRead;
850 char [] zzBufferL = zzBuffer;
851 char [] zzCMapL = ZZ_CMAP;
853 int [] zzTransL = ZZ_TRANS;
854 int [] zzRowMapL = ZZ_ROWMAP;
855 int [] zzAttrL = ZZ_ATTRIBUTE;
858 zzMarkedPosL = zzMarkedPos;
860 yychar+= zzMarkedPosL-zzStartRead;
864 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
866 zzState = ZZ_LEXSTATE[zzLexicalState];
868 // set up zzAction for empty match case:
869 int zzAttributes = zzAttrL[zzState];
870 if ( (zzAttributes & 1) == 1 ) {
878 if (zzCurrentPosL < zzEndReadL) {
879 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
880 zzCurrentPosL += Character.charCount(zzInput);
887 // store back cached positions
888 zzCurrentPos = zzCurrentPosL;
889 zzMarkedPos = zzMarkedPosL;
890 boolean eof = zzRefill();
891 // get translated positions and possibly new buffer
892 zzCurrentPosL = zzCurrentPos;
893 zzMarkedPosL = zzMarkedPos;
894 zzBufferL = zzBuffer;
895 zzEndReadL = zzEndRead;
901 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
902 zzCurrentPosL += Character.charCount(zzInput);
905 int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
906 if (zzNext == -1) break zzForAction;
909 zzAttributes = zzAttrL[zzState];
910 if ( (zzAttributes & 1) == 1 ) {
912 zzMarkedPosL = zzCurrentPosL;
913 if ( (zzAttributes & 8) == 8 ) break zzForAction;
919 // store back cached position
920 zzMarkedPos = zzMarkedPosL;
922 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
924 switch (zzLexicalState) {
926 throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
930 throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
934 { return sym(SCLTerminals.EOF);
939 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
941 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Illegal character '" + yytext() + "'.");
945 { return sym(SCLTerminals.ID);
949 { return sym(SCLTerminals.INTEGER);
953 { return sym(SCLTerminals.SYMBOL, yytext().trim());
957 { return sym(SCLTerminals.ATTACHED_HASH, "#");
961 { return sym(SCLTerminals.ATTACHED_DOT, ".");
965 { return sym(SCLTerminals.AT);
969 { ++parenCount; return sym(SCLTerminals.LPAREN);
973 { return sym(SCLTerminals.COMMA);
978 if(parenCount == 0 && !parenCountStack.isEmpty()) {
979 parenCount = parenCountStack.removeAt(parenCountStack.size()-1);
982 yybegin(stateStack.removeAt(stateStack.size()-1));
983 return sym(SCLTerminals.CONTINUE_STRING);
986 return sym(SCLTerminals.RPAREN);
990 { return new Token(SCLTerminals.EOL, yychar, yychar+yylength(), "");
994 { return sym(SCLTerminals.LESS, "<");
998 { return sym(SCLTerminals.GREATER, ">");
1002 { return sym(SCLTerminals.MINUS, "-");
1010 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Character does not conform to UTF-8 encoding.");
1014 { return sym(SCLTerminals.LAMBDA);
1018 { return sym(SCLTerminals.LBRACE);
1022 { return sym(SCLTerminals.RBRACE);
1026 { return sym(SCLTerminals.LBRACKET);
1030 { return sym(SCLTerminals.RBRACKET);
1034 { return sym(SCLTerminals.EQUALS);
1038 { return sym(SCLTerminals.COLON);
1042 { return sym(SCLTerminals.SEMICOLON);
1046 { return sym(SCLTerminals.BAR);
1050 { string.setLength(0); stringStart=yychar; yybegin(STRING); return sym(SCLTerminals.BEGIN_STRING);
1054 { return sym(SCLTerminals.BLANK);
1058 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Tabulator is not allowed except inside string literals.");
1062 { string.append( yytext() );
1066 { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
1070 { yybegin(YYINITIAL);
1071 return new Token(SCLTerminals.END_STRING, stringStart, yychar+1, string.toString());
1075 { string.append('\n');
1079 { return sym(SCLTerminals.DOTDOT, ".");
1083 { return sym(SCLTerminals.SEPARATED_DOT, ".");
1087 { return sym(SCLTerminals.ANNOTATION_ID);
1091 { return sym(SCLTerminals.BINDS);
1095 { return sym(SCLTerminals.ARROW);
1099 { return sym(SCLTerminals.COMMENT);
1103 { return sym(SCLTerminals.AS);
1107 { return sym(SCLTerminals.IF);
1111 { return sym(SCLTerminals.IN);
1115 { return sym(options.supportEq ? SCLTerminals.EQ : SCLTerminals.ID);
1119 { return sym(SCLTerminals.BY);
1123 { return sym(SCLTerminals.DO);
1127 { return sym(SCLTerminals.IMPLIES);
1131 { return sym(SCLTerminals.FOLLOWS);
1135 { return sym(SCLTerminals.HASTYPE);
1139 { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Illegal string escape character.");
1143 { string.append(yytext().substring(1));
1147 { parenCountStack.add(parenCount);
1149 stateStack.add(STRING);
1151 return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
1155 { string.append('\r');
1159 { string.append('\t');
1163 { parenCountStack.add(parenCount);
1165 stateStack.add(LONG_STRING);
1167 return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
1171 { return sym(SCLTerminals.FLOAT);
1175 { return sym(SCLTerminals.CHAR);
1179 { String text = yytext();
1180 return sym(SCLTerminals.ID, text.substring(1, text.length()-1));
1184 { String text = yytext();
1185 return sym(SCLTerminals.SYMBOL, text.substring(1, text.length()-1));
1189 { return sym(SCLTerminals.QUERY_OP);
1193 { return sym(SCLTerminals.LET);
1197 { return sym(SCLTerminals.EDO);
1201 { return sym(SCLTerminals.MDO);
1205 { string.setLength(0); stringStart=yychar; yybegin(LONG_STRING); return sym(SCLTerminals.BEGIN_STRING);
1209 { yybegin(YYINITIAL);
1210 return new Token(SCLTerminals.END_STRING, stringStart, yychar+3, string.toString());
1214 { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.RULE);
1218 { return sym(SCLTerminals.THEN);
1222 { return sym(SCLTerminals.TYPE);
1226 { return sym(SCLTerminals.ELSE);
1230 { return sym(SCLTerminals.WITH);
1234 { return sym(SCLTerminals.WHEN);
1238 { return sym(SCLTerminals.DATA);
1242 { return sym(SCLTerminals.INFIX);
1246 { return sym(SCLTerminals.WHERE);
1250 { return sym(SCLTerminals.CLASS);
1254 { return sym(SCLTerminals.MATCH);
1258 { return sym(SCLTerminals.LAMBDA_MATCH);
1262 { return sym(SCLTerminals.FORALL);
1266 { return sym(SCLTerminals.INFIXR);
1270 { return sym(SCLTerminals.INFIXL);
1274 { return sym(SCLTerminals.IMPORT);
1278 { return sym(SCLTerminals.HIDING);
1282 { return sym(SCLTerminals.EFFECT);
1286 { return sym(supportCHR() ? SCLTerminals.CHR_SELECT : SCLTerminals.SELECT);
1290 { string.append((char)Integer.parseInt(yytext().substring(2), 16));
1294 { return sym(supportCHR() ? SCLTerminals.RULESET : SCLTerminals.ID);
1298 { return sym(SCLTerminals.INCLUDE);
1302 { return sym(SCLTerminals.ENFORCE);
1306 { return sym(SCLTerminals.EXTENDS);
1310 { return sym(SCLTerminals.INSTANCE);
1314 { return sym(SCLTerminals.DERIVING);
1318 { return sym(SCLTerminals.IMPORTJAVA);
1322 { return sym(SCLTerminals.CONSTRAINT);
1326 { return sym(SCLTerminals.SELECT_FIRST);
1330 { return sym(SCLTerminals.ABSTRACT_RULE);
1334 { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.TRANSFORMATION);
1338 { return sym(SCLTerminals.SELECT_DISTINCT);
1342 { return sym(SCLTerminals.MAPPING_RELATION);
1346 zzScanError(ZZ_NO_MATCH);