1 /* The following code was generated by JFlex 1.6.1 */
\r
3 package org.simantics.scl.compiler.internal.parsing.parser;
5 import org.simantics.scl.compiler.internal.parsing.Token;
6 import org.simantics.scl.compiler.errors.Locations;
7 import org.simantics.scl.compiler.internal.parsing.exceptions.SCLSyntaxErrorException;
8 import gnu.trove.list.array.TIntArrayList;
12 * This class is a scanner generated by
\r
13 * <a href="http://www.jflex.de/">JFlex</a> 1.6.1
\r
14 * from the specification file <tt>C:/Users/hannu/git/scl/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex</tt>
\r
16 public class SCLLexer {
\r
18 /** This character denotes the end of file */
\r
19 public static final int YYEOF = -1;
\r
21 /** initial size of the lookahead buffer */
\r
22 private static final int ZZ_BUFFERSIZE = 16384;
\r
24 /** lexical states */
\r
25 public static final int YYINITIAL = 0;
\r
26 public static final int STRING = 2;
\r
27 public static final int LONG_STRING = 4;
\r
28 public static final int CHAR = 6;
\r
31 * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
\r
32 * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
\r
33 * at the beginning of a line
\r
34 * l is of the form l = 2*k, k a non negative integer
\r
36 private static final int ZZ_LEXSTATE[] = {
\r
37 0, 0, 1, 1, 2, 2, 3, 3
\r
41 * Translates characters to character classes
\r
43 private static final String ZZ_CMAP_PACKED =
\r
44 "\11\0\1\75\1\74\1\73\1\73\1\15\22\0\1\24\1\20\1\71"+
\r
45 "\1\6\2\5\1\20\1\4\1\11\1\13\1\26\1\5\1\12\1\23"+
\r
46 "\1\7\1\25\12\2\1\66\1\67\1\17\1\65\1\21\1\14\1\10"+
\r
47 "\4\3\1\22\1\3\3\1\1\60\20\1\1\63\1\30\1\64\1\5"+
\r
48 "\1\72\1\16\1\34\1\46\1\47\1\51\1\41\1\31\1\54\1\40"+
\r
49 "\1\36\2\1\1\35\1\52\1\42\1\32\1\53\1\55\1\33\1\43"+
\r
50 "\1\37\1\45\1\56\1\44\1\50\1\57\1\1\1\61\1\70\1\62"+
\r
51 "\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";
\r
54 * Translates characters to character classes
\r
56 private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
\r
59 * Translates DFA states to action switch labels.
\r
61 private static final int [] ZZ_ACTION = zzUnpackAction();
\r
63 private static final String ZZ_ACTION_PACKED_0 =
\r
64 "\4\0\1\1\1\2\1\3\1\1\1\4\1\5\1\6"+
\r
65 "\1\7\1\10\1\11\1\12\1\4\1\13\1\1\1\14"+
\r
66 "\1\15\1\16\1\17\1\4\1\20\1\21\16\2\1\22"+
\r
67 "\1\23\1\24\1\25\1\26\1\27\1\30\1\31\1\32"+
\r
68 "\1\33\1\13\1\34\1\35\1\36\1\0\1\37\1\36"+
\r
69 "\1\40\2\35\2\40\5\0\1\4\1\41\1\42\1\43"+
\r
70 "\3\0\1\2\3\0\1\4\1\44\1\45\1\46\1\4"+
\r
71 "\2\2\1\47\2\2\1\50\1\51\11\2\1\52\3\2"+
\r
72 "\1\53\1\2\1\54\4\2\1\55\1\56\1\57\1\0"+
\r
73 "\1\60\1\61\1\62\1\63\1\64\1\60\1\65\2\0"+
\r
74 "\2\66\1\0\1\67\1\70\1\2\1\0\1\71\2\0"+
\r
75 "\1\72\1\0\1\4\3\2\1\73\24\2\1\74\1\75"+
\r
76 "\1\0\1\76\2\0\1\46\1\2\1\77\6\2\1\100"+
\r
77 "\1\101\2\2\1\102\3\2\1\103\1\2\1\104\1\2"+
\r
78 "\1\105\3\2\1\0\1\46\2\2\1\106\11\2\1\107"+
\r
79 "\1\110\1\2\1\111\1\2\1\0\1\112\1\2\1\113"+
\r
80 "\1\114\2\2\1\115\1\2\1\116\1\117\2\2\1\120"+
\r
81 "\2\2\1\121\2\2\1\122\2\2\1\123\1\124\1\0"+
\r
82 "\3\2\1\125\2\2\2\0\1\126\2\0\2\2\4\0"+
\r
83 "\1\127\1\2\4\0\1\2\4\0\1\2\1\130\2\0"+
\r
84 "\1\131\1\2\2\0\1\132\2\0\1\133\1\0\1\134";
\r
86 private static int [] zzUnpackAction() {
\r
87 int [] result = new int[276];
\r
89 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
\r
93 private static int zzUnpackAction(String packed, int offset, int [] result) {
\r
94 int i = 0; /* index in packed string */
\r
95 int j = offset; /* index in unpacked array */
\r
96 int l = packed.length();
\r
98 int count = packed.charAt(i++);
\r
99 int value = packed.charAt(i++);
\r
100 do result[j++] = value; while (--count > 0);
\r
107 * Translates a state to a row index in the transition table
\r
109 private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
\r
111 private static final String ZZ_ROWMAP_PACKED_0 =
\r
112 "\0\0\0\76\0\174\0\272\0\272\0\370\0\u0136\0\u0174"+
\r
113 "\0\u01b2\0\u01f0\0\u022e\0\u026c\0\u02aa\0\272\0\272\0\u02e8"+
\r
114 "\0\u0326\0\u0364\0\u03a2\0\u01b2\0\u03e0\0\u041e\0\u045c\0\272"+
\r
115 "\0\u01b2\0\u049a\0\u04d8\0\u0516\0\u0554\0\u0592\0\u05d0\0\u060e"+
\r
116 "\0\u064c\0\u068a\0\u06c8\0\u0706\0\u0744\0\u0782\0\u07c0\0\272"+
\r
117 "\0\272\0\272\0\272\0\u07fe\0\u083c\0\272\0\u01b2\0\u087a"+
\r
118 "\0\370\0\272\0\272\0\u08b8\0\u08f6\0\u0934\0\272\0\272"+
\r
119 "\0\u0972\0\u09b0\0\u09ee\0\u08b8\0\272\0\u0a2c\0\u0a6a\0\u0aa8"+
\r
120 "\0\u0ae6\0\u0b24\0\u0b62\0\272\0\u0ba0\0\u0bde\0\u0c1c\0\u0c5a"+
\r
121 "\0\u0c98\0\u0cd6\0\u0d14\0\u0d52\0\u0d90\0\u0dce\0\u01b2\0\u01b2"+
\r
122 "\0\u0e0c\0\u0e4a\0\u0e88\0\u0ec6\0\370\0\u0f04\0\u0f42\0\370"+
\r
123 "\0\u0f80\0\u0fbe\0\u0ffc\0\u103a\0\u1078\0\u10b6\0\u10f4\0\u1132"+
\r
124 "\0\u1170\0\u11ae\0\370\0\u11ec\0\u122a\0\u1268\0\370\0\u12a6"+
\r
125 "\0\370\0\u12e4\0\u1322\0\u1360\0\u139e\0\u01b2\0\u01b2\0\u01b2"+
\r
126 "\0\u13dc\0\272\0\272\0\272\0\272\0\272\0\u141a\0\272"+
\r
127 "\0\u1458\0\u1496\0\u14d4\0\u1512\0\u1512\0\272\0\272\0\272"+
\r
128 "\0\u1550\0\272\0\u158e\0\u15cc\0\u01b2\0\u160a\0\u1648\0\u1686"+
\r
129 "\0\u16c4\0\u1702\0\370\0\u1740\0\u177e\0\u17bc\0\u17fa\0\u1838"+
\r
130 "\0\u1876\0\u18b4\0\u18f2\0\u1930\0\u196e\0\u19ac\0\u19ea\0\u1a28"+
\r
131 "\0\u1a66\0\u1aa4\0\u1ae2\0\u1b20\0\u1b5e\0\u1b9c\0\u1bda\0\370"+
\r
132 "\0\272\0\u1c18\0\272\0\u1c56\0\u1c94\0\u01b2\0\u1cd2\0\370"+
\r
133 "\0\u1d10\0\u1d4e\0\u1d8c\0\u1dca\0\u1e08\0\u1e46\0\370\0\370"+
\r
134 "\0\u1e84\0\u1ec2\0\370\0\u1f00\0\u1f3e\0\u1f7c\0\370\0\u1fba"+
\r
135 "\0\370\0\u1ff8\0\370\0\u2036\0\u2074\0\u20b2\0\u20f0\0\272"+
\r
136 "\0\u212e\0\u216c\0\u21aa\0\u21e8\0\u2226\0\u2264\0\u22a2\0\u22e0"+
\r
137 "\0\u231e\0\u235c\0\u239a\0\u23d8\0\370\0\370\0\u2416\0\370"+
\r
138 "\0\u2454\0\u2492\0\370\0\u24d0\0\370\0\370\0\u250e\0\u254c"+
\r
139 "\0\u258a\0\u25c8\0\370\0\370\0\u2606\0\u2644\0\u2682\0\u26c0"+
\r
140 "\0\u26fe\0\272\0\u273c\0\u277a\0\370\0\u27b8\0\u27f6\0\370"+
\r
141 "\0\370\0\u2834\0\u2872\0\u28b0\0\u28ee\0\370\0\u292c\0\u296a"+
\r
142 "\0\u29a8\0\u29e6\0\370\0\u2a24\0\u2a62\0\u2aa0\0\u2ade\0\u2b1c"+
\r
143 "\0\u2b5a\0\u2b98\0\u2bd6\0\370\0\u2c14\0\u2c52\0\u2c90\0\u2cce"+
\r
144 "\0\u2d0c\0\u2d4a\0\u2d88\0\u2dc6\0\u2e04\0\u2e42\0\u2e80\0\272"+
\r
145 "\0\u2ebe\0\u2efc\0\272\0\u2f3a\0\u2f78\0\u2fb6\0\370\0\u2ff4"+
\r
146 "\0\u3032\0\272\0\u3070\0\272";
\r
148 private static int [] zzUnpackRowMap() {
\r
149 int [] result = new int[276];
\r
151 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
\r
155 private static int zzUnpackRowMap(String packed, int offset, int [] result) {
\r
156 int i = 0; /* index in packed string */
\r
157 int j = offset; /* index in unpacked array */
\r
158 int l = packed.length();
\r
160 int high = packed.charAt(i++) << 16;
\r
161 result[j++] = high | packed.charAt(i++);
\r
167 * The transition table of the DFA
\r
169 private static final int [] ZZ_TRANS = zzUnpackTrans();
\r
171 private static final String ZZ_TRANS_PACKED_0 =
\r
172 "\1\5\1\6\1\7\1\6\1\10\1\11\1\12\1\13"+
\r
173 "\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\23"+
\r
174 "\1\11\1\24\1\6\1\25\1\26\1\27\1\11\1\30"+
\r
175 "\1\31\1\32\1\6\1\33\1\34\1\35\1\36\1\37"+
\r
176 "\1\40\1\41\1\6\1\42\1\43\1\6\1\44\1\45"+
\r
177 "\1\6\1\46\1\47\6\6\1\50\1\51\1\52\1\53"+
\r
178 "\1\54\1\55\1\56\1\57\1\60\1\61\2\62\1\63"+
\r
179 "\15\64\1\65\11\64\1\30\1\66\40\64\1\67\2\64"+
\r
180 "\1\70\16\64\1\71\11\64\1\30\1\72\40\64\1\73"+
\r
181 "\1\64\1\74\1\75\1\64\77\0\4\6\2\0\1\76"+
\r
182 "\12\0\1\6\6\0\30\6\11\0\1\6\5\0\1\7"+
\r
183 "\4\0\1\77\12\0\1\100\16\0\1\100\34\0\4\101"+
\r
184 "\1\0\22\101\1\0\1\102\45\101\5\0\2\11\1\0"+
\r
185 "\1\11\3\0\1\11\2\0\3\11\1\0\1\11\1\0"+
\r
186 "\2\11\1\0\1\11\34\0\2\11\1\0\1\11\12\0"+
\r
187 "\2\11\1\0\1\11\3\0\1\11\1\103\1\0\3\11"+
\r
188 "\1\0\1\11\1\103\2\11\1\0\1\11\34\0\2\11"+
\r
189 "\1\0\1\11\3\0\1\103\10\0\1\104\5\0\1\105"+
\r
190 "\6\0\1\105\47\0\1\105\2\0\1\106\1\0\1\106"+
\r
191 "\1\0\2\11\1\0\1\11\3\0\1\11\2\0\3\11"+
\r
192 "\1\106\1\11\1\0\2\11\1\0\1\11\30\106\4\0"+
\r
193 "\2\11\1\0\1\11\1\0\1\106\10\0\2\107\1\110"+
\r
194 "\1\107\1\0\1\111\1\0\1\107\2\0\3\107\1\0"+
\r
195 "\1\107\1\0\2\107\1\0\1\107\34\0\2\107\1\0"+
\r
196 "\1\107\6\0\1\112\1\0\1\112\1\0\2\11\1\0"+
\r
197 "\1\11\3\0\1\11\2\0\3\11\1\112\1\11\1\0"+
\r
198 "\2\11\1\0\1\11\30\112\4\0\2\11\1\0\1\11"+
\r
199 "\1\0\1\112\77\0\1\62\2\0\1\113\1\0\1\113"+
\r
200 "\5\0\1\114\2\0\1\115\5\0\1\113\6\0\30\113"+
\r
201 "\11\0\1\113\10\0\2\11\1\0\1\11\3\0\1\116"+
\r
202 "\2\0\1\11\1\116\1\11\1\0\1\117\1\0\2\11"+
\r
203 "\1\0\1\11\34\0\2\11\1\0\1\116\12\0\2\11"+
\r
204 "\1\0\1\11\3\0\1\11\2\0\2\11\1\120\1\0"+
\r
205 "\1\11\1\0\2\11\1\0\1\11\34\0\2\11\1\0"+
\r
206 "\1\11\31\0\1\26\56\0\2\11\1\0\1\11\3\0"+
\r
207 "\1\11\2\0\3\11\1\0\1\11\1\0\1\121\1\122"+
\r
208 "\1\0\1\11\34\0\2\11\1\0\1\11\6\0\4\6"+
\r
209 "\2\0\1\76\12\0\1\6\6\0\1\6\1\123\26\6"+
\r
210 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
211 "\6\0\14\6\1\124\13\6\11\0\1\6\4\0\4\6"+
\r
212 "\2\0\1\76\12\0\1\6\6\0\12\6\1\125\2\6"+
\r
213 "\1\126\12\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
214 "\12\0\1\6\6\0\10\6\1\127\17\6\11\0\1\6"+
\r
215 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\130"+
\r
216 "\10\6\1\131\7\6\1\132\6\6\11\0\1\6\4\0"+
\r
217 "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\133"+
\r
218 "\4\6\1\134\16\6\1\135\1\6\11\0\1\6\4\0"+
\r
219 "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\136"+
\r
220 "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
\r
221 "\1\6\6\0\1\137\3\6\1\140\4\6\1\141\5\6"+
\r
222 "\1\142\4\6\1\143\3\6\11\0\1\6\4\0\4\6"+
\r
223 "\2\0\1\76\12\0\1\6\6\0\10\6\1\144\17\6"+
\r
224 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
225 "\6\0\5\6\1\145\1\6\1\146\20\6\11\0\1\6"+
\r
226 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\26\6"+
\r
227 "\1\147\1\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
228 "\12\0\1\6\6\0\4\6\1\150\23\6\11\0\1\6"+
\r
229 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\6"+
\r
230 "\1\151\1\6\1\152\4\6\1\153\17\6\11\0\1\6"+
\r
231 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\3\6"+
\r
232 "\1\154\14\6\1\155\7\6\11\0\1\6\10\0\2\11"+
\r
233 "\1\0\1\11\3\0\1\11\2\0\2\11\1\156\1\0"+
\r
234 "\1\11\1\0\2\11\1\0\1\11\34\0\2\11\1\0"+
\r
235 "\1\11\12\0\2\11\1\0\1\11\3\0\1\11\2\0"+
\r
236 "\3\11\1\0\1\157\1\0\2\11\1\0\1\11\34\0"+
\r
237 "\1\11\1\160\1\0\1\11\76\0\1\161\4\0\15\64"+
\r
238 "\1\0\11\64\2\0\40\64\1\0\2\64\1\0\1\64"+
\r
239 "\74\0\1\70\1\0\4\162\1\163\4\162\1\164\3\162"+
\r
240 "\1\0\12\162\1\163\2\162\1\165\3\162\1\166\2\162"+
\r
241 "\1\75\2\162\1\167\23\162\1\163\1\162\2\0\1\162"+
\r
242 "\74\0\1\75\12\0\1\170\155\0\1\171\5\0\1\6"+
\r
243 "\1\0\1\6\10\0\1\172\5\0\1\6\6\0\30\6"+
\r
244 "\11\0\1\6\5\0\1\173\75\0\1\174\20\0\1\175"+
\r
245 "\56\0\1\176\71\0\27\101\1\0\46\101\15\0\1\103"+
\r
246 "\6\0\1\103\47\0\1\103\16\0\1\105\6\0\1\105"+
\r
247 "\47\0\1\105\2\0\4\106\15\0\1\106\6\0\30\106"+
\r
248 "\11\0\1\106\10\0\2\107\1\0\1\107\2\0\1\177"+
\r
249 "\1\107\2\0\3\107\1\0\1\107\1\0\2\107\1\0"+
\r
250 "\1\107\34\0\2\107\1\0\1\107\20\0\1\177\74\0"+
\r
251 "\1\111\1\200\63\0\4\112\15\0\1\112\6\0\30\112"+
\r
252 "\11\0\1\112\4\0\4\113\2\0\1\201\6\0\1\202"+
\r
253 "\3\0\1\113\6\0\30\113\11\0\1\113\15\0\1\203"+
\r
254 "\64\0\1\204\1\0\1\204\16\0\1\204\6\0\30\204"+
\r
255 "\11\0\1\204\10\0\2\11\1\0\1\11\3\0\1\11"+
\r
256 "\2\0\2\11\1\205\1\0\1\11\1\0\2\11\1\0"+
\r
257 "\1\11\34\0\2\11\1\0\1\11\5\0\15\121\1\0"+
\r
258 "\56\121\1\0\1\121\5\206\2\122\1\206\1\122\3\206"+
\r
259 "\1\122\2\206\3\122\1\206\1\122\1\206\1\122\1\207"+
\r
260 "\1\206\1\122\34\206\2\122\1\206\1\122\5\206\1\0"+
\r
261 "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\210"+
\r
262 "\25\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
\r
263 "\1\6\6\0\4\6\1\211\23\6\11\0\1\6\4\0"+
\r
264 "\4\6\2\0\1\76\12\0\1\6\6\0\12\6\1\212"+
\r
265 "\15\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
\r
266 "\1\6\6\0\6\6\1\213\21\6\11\0\1\6\4\0"+
\r
267 "\4\6\2\0\1\76\12\0\1\6\6\0\1\214\11\6"+
\r
268 "\1\215\3\6\1\216\11\6\11\0\1\6\4\0\4\6"+
\r
269 "\2\0\1\76\12\0\1\6\6\0\22\6\1\217\5\6"+
\r
270 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
271 "\6\0\3\6\1\220\24\6\11\0\1\6\4\0\4\6"+
\r
272 "\2\0\1\76\12\0\1\6\6\0\10\6\1\221\17\6"+
\r
273 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
274 "\6\0\22\6\1\222\5\6\11\0\1\6\4\0\4\6"+
\r
275 "\2\0\1\76\12\0\1\6\6\0\20\6\1\223\7\6"+
\r
276 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
277 "\6\0\1\224\27\6\11\0\1\6\4\0\4\6\2\0"+
\r
278 "\1\76\12\0\1\6\6\0\12\6\1\225\15\6\11\0"+
\r
279 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
280 "\1\226\27\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
281 "\12\0\1\6\6\0\6\6\1\227\21\6\11\0\1\6"+
\r
282 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\4\6"+
\r
283 "\1\230\23\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
284 "\12\0\1\6\6\0\6\6\1\231\21\6\11\0\1\6"+
\r
285 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\10\6"+
\r
286 "\1\232\17\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
287 "\12\0\1\6\6\0\3\6\1\233\24\6\11\0\1\6"+
\r
288 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\6\6"+
\r
289 "\1\234\21\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
290 "\12\0\1\6\6\0\2\6\1\235\25\6\11\0\1\6"+
\r
291 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\6\6"+
\r
292 "\1\236\13\6\1\237\5\6\11\0\1\6\4\0\4\6"+
\r
293 "\2\0\1\76\12\0\1\6\6\0\1\6\1\240\26\6"+
\r
294 "\11\0\1\6\74\0\1\241\6\0\2\242\16\0\1\242"+
\r
295 "\6\0\1\242\2\0\1\242\4\0\1\242\4\0\2\242"+
\r
296 "\1\0\1\242\115\0\1\243\5\0\1\112\1\0\1\112"+
\r
297 "\16\0\1\112\6\0\30\112\11\0\1\112\5\0\1\173"+
\r
298 "\17\0\1\100\16\0\1\100\36\0\1\174\74\0\1\113"+
\r
299 "\1\0\1\113\10\0\1\115\5\0\1\113\6\0\30\113"+
\r
300 "\11\0\1\113\15\0\1\203\1\244\63\0\4\204\11\0"+
\r
301 "\1\202\3\0\1\204\6\0\30\204\11\0\1\204\3\0"+
\r
302 "\26\206\1\245\54\206\2\122\1\206\1\122\3\206\1\122"+
\r
303 "\2\206\3\122\1\206\1\122\1\206\1\246\1\207\1\206"+
\r
304 "\1\122\34\206\2\122\1\206\1\122\5\206\1\0\4\6"+
\r
305 "\2\0\1\76\12\0\1\6\6\0\3\6\1\247\24\6"+
\r
306 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
307 "\6\0\10\6\1\250\17\6\11\0\1\6\4\0\4\6"+
\r
308 "\2\0\1\76\12\0\1\6\6\0\6\6\1\251\21\6"+
\r
309 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
310 "\6\0\5\6\1\252\22\6\11\0\1\6\4\0\4\6"+
\r
311 "\2\0\1\76\12\0\1\6\6\0\6\6\1\253\21\6"+
\r
312 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
313 "\6\0\4\6\1\254\23\6\11\0\1\6\4\0\4\6"+
\r
314 "\2\0\1\76\12\0\1\6\6\0\1\6\1\255\26\6"+
\r
315 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
316 "\6\0\11\6\1\256\16\6\11\0\1\6\4\0\4\6"+
\r
317 "\2\0\1\76\12\0\1\6\6\0\11\6\1\257\16\6"+
\r
318 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
319 "\6\0\10\6\1\260\17\6\11\0\1\6\4\0\4\6"+
\r
320 "\2\0\1\76\12\0\1\6\6\0\5\6\1\261\22\6"+
\r
321 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
322 "\6\0\10\6\1\262\17\6\11\0\1\6\4\0\4\6"+
\r
323 "\2\0\1\76\12\0\1\6\6\0\10\6\1\263\17\6"+
\r
324 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
325 "\6\0\1\6\1\264\26\6\11\0\1\6\4\0\4\6"+
\r
326 "\2\0\1\76\12\0\1\6\6\0\10\6\1\265\17\6"+
\r
327 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
328 "\6\0\10\6\1\266\17\6\11\0\1\6\4\0\4\6"+
\r
329 "\2\0\1\76\12\0\1\6\6\0\7\6\1\267\20\6"+
\r
330 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
331 "\6\0\2\6\1\270\6\6\1\271\16\6\11\0\1\6"+
\r
332 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\12\6"+
\r
333 "\1\272\15\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
334 "\12\0\1\6\6\0\3\6\1\273\24\6\11\0\1\6"+
\r
335 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\5\6"+
\r
336 "\1\274\22\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
337 "\12\0\1\6\6\0\16\6\1\275\11\6\11\0\1\6"+
\r
338 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\22\6"+
\r
339 "\1\276\5\6\11\0\1\6\5\0\2\277\16\0\1\277"+
\r
340 "\6\0\1\277\2\0\1\277\4\0\1\277\4\0\2\277"+
\r
341 "\1\0\1\277\42\0\1\202\57\0\25\206\1\300\1\245"+
\r
342 "\47\206\1\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
343 "\4\6\1\301\23\6\11\0\1\6\4\0\4\6\2\0"+
\r
344 "\1\76\12\0\1\6\6\0\2\6\1\302\25\6\11\0"+
\r
345 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
346 "\17\6\1\303\10\6\11\0\1\6\4\0\4\6\2\0"+
\r
347 "\1\76\12\0\1\6\6\0\3\6\1\304\24\6\11\0"+
\r
348 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
349 "\14\6\1\305\13\6\11\0\1\6\4\0\4\6\2\0"+
\r
350 "\1\76\12\0\1\6\6\0\2\6\1\306\25\6\11\0"+
\r
351 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
352 "\12\6\1\307\15\6\11\0\1\6\4\0\4\6\2\0"+
\r
353 "\1\76\12\0\1\6\6\0\11\6\1\310\16\6\11\0"+
\r
354 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
355 "\16\6\1\311\11\6\11\0\1\6\4\0\4\6\2\0"+
\r
356 "\1\76\12\0\1\6\6\0\2\6\1\312\25\6\11\0"+
\r
357 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
358 "\11\6\1\313\16\6\11\0\1\6\4\0\4\6\2\0"+
\r
359 "\1\76\12\0\1\6\6\0\16\6\1\314\11\6\11\0"+
\r
360 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
361 "\10\6\1\315\17\6\11\0\1\6\4\0\4\6\2\0"+
\r
362 "\1\76\12\0\1\6\6\0\12\6\1\316\15\6\11\0"+
\r
363 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
364 "\25\6\1\317\2\6\11\0\1\6\4\0\4\6\2\0"+
\r
365 "\1\76\12\0\1\6\6\0\7\6\1\320\20\6\11\0"+
\r
366 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
367 "\5\6\1\321\22\6\11\0\1\6\5\0\2\322\16\0"+
\r
368 "\1\322\6\0\1\322\2\0\1\322\4\0\1\322\4\0"+
\r
369 "\2\322\1\0\1\322\25\0\4\6\2\0\1\76\12\0"+
\r
370 "\1\6\6\0\4\6\1\323\23\6\11\0\1\6\4\0"+
\r
371 "\4\6\2\0\1\76\12\0\1\6\6\0\3\6\1\324"+
\r
372 "\24\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
\r
373 "\1\6\6\0\2\6\1\325\1\6\1\326\23\6\11\0"+
\r
374 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
375 "\11\6\1\327\16\6\11\0\1\6\4\0\4\6\2\0"+
\r
376 "\1\76\12\0\1\6\6\0\20\6\1\330\7\6\11\0"+
\r
377 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
378 "\6\6\1\331\21\6\11\0\1\6\4\0\4\6\2\0"+
\r
379 "\1\76\12\0\1\6\6\0\1\332\27\6\11\0\1\6"+
\r
380 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\23\6"+
\r
381 "\1\333\4\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
382 "\12\0\1\6\6\0\6\6\1\334\21\6\11\0\1\6"+
\r
383 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\16\6"+
\r
384 "\1\335\11\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
385 "\12\0\1\6\6\0\20\6\1\336\7\6\11\0\1\6"+
\r
386 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\6\6"+
\r
387 "\1\337\21\6\11\0\1\6\4\0\4\6\2\0\1\76"+
\r
388 "\12\0\1\6\6\0\5\6\1\340\22\6\11\0\1\6"+
\r
389 "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\11\6"+
\r
390 "\1\341\16\6\11\0\1\6\5\0\2\342\16\0\1\342"+
\r
391 "\6\0\1\342\2\0\1\342\4\0\1\342\4\0\2\342"+
\r
392 "\1\0\1\342\25\0\4\6\2\0\1\76\12\0\1\6"+
\r
393 "\6\0\16\6\1\343\11\6\11\0\1\6\4\0\4\6"+
\r
394 "\2\0\1\76\12\0\1\6\6\0\16\6\1\344\11\6"+
\r
395 "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
\r
396 "\6\0\10\6\1\345\17\6\11\0\1\6\4\0\4\6"+
\r
397 "\2\0\1\76\12\0\1\6\6\0\27\6\1\346\11\0"+
\r
398 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
399 "\1\6\1\347\26\6\11\0\1\6\4\0\4\6\2\0"+
\r
400 "\1\76\12\0\1\6\6\0\10\6\1\350\17\6\11\0"+
\r
401 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
402 "\12\6\1\351\15\6\11\0\1\6\4\0\4\6\2\0"+
\r
403 "\1\76\12\0\1\6\1\0\1\352\4\0\30\6\11\0"+
\r
404 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
405 "\11\6\1\353\16\6\11\0\1\6\4\0\4\6\2\0"+
\r
406 "\1\76\12\0\1\6\6\0\23\6\1\354\4\6\11\0"+
\r
407 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
408 "\6\6\1\355\21\6\11\0\1\6\4\0\4\6\2\0"+
\r
409 "\1\76\12\0\1\6\6\0\10\6\1\356\17\6\11\0"+
\r
410 "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
\r
411 "\3\6\1\357\24\6\11\0\1\6\4\0\4\6\2\0"+
\r
412 "\1\76\12\0\1\6\6\0\2\6\1\360\25\6\11\0"+
\r
413 "\1\6\27\0\1\352\4\0\1\361\17\0\1\362\25\0"+
\r
414 "\4\6\2\0\1\76\12\0\1\6\6\0\23\6\1\363"+
\r
415 "\4\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
\r
416 "\1\6\1\0\1\364\4\0\30\6\11\0\1\6\4\0"+
\r
417 "\4\6\2\0\1\76\12\0\1\6\1\0\1\365\4\0"+
\r
418 "\30\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
\r
419 "\1\6\6\0\25\6\1\366\2\6\11\0\1\6\4\0"+
\r
420 "\4\6\2\0\1\76\12\0\1\6\6\0\21\6\1\367"+
\r
421 "\6\6\11\0\1\6\41\0\1\370\75\0\1\371\63\0"+
\r
422 "\1\364\6\0\1\372\66\0\1\365\6\0\1\373\43\0"+
\r
423 "\4\6\2\0\1\76\12\0\1\6\6\0\3\6\1\374"+
\r
424 "\24\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
\r
425 "\1\6\6\0\3\6\1\375\24\6\11\0\1\6\36\0"+
\r
426 "\1\376\105\0\1\377\73\0\1\u0100\101\0\1\u0101\31\0"+
\r
427 "\4\6\2\0\1\76\12\0\1\6\6\0\6\6\1\u0102"+
\r
428 "\21\6\11\0\1\6\46\0\1\u0103\71\0\1\u0104\73\0"+
\r
429 "\1\u0105\75\0\1\u0106\41\0\4\6\2\0\1\76\12\0"+
\r
430 "\1\6\6\0\5\6\1\u0107\22\6\11\0\1\6\42\0"+
\r
431 "\1\u0108\74\0\1\u0109\73\0\1\u010a\102\0\1\u010b\35\0"+
\r
432 "\4\6\2\0\1\76\12\0\1\6\6\0\1\6\1\u010c"+
\r
433 "\26\6\11\0\1\6\45\0\1\u010d\72\0\1\u010e\37\0"+
\r
434 "\4\6\2\0\1\76\12\0\1\6\6\0\11\6\1\u010f"+
\r
435 "\16\6\11\0\1\6\52\0\1\u0110\64\0\1\u0111\76\0"+
\r
436 "\1\u0112\70\0\1\u0113\105\0\1\u0114\33\0";
\r
438 private static int [] zzUnpackTrans() {
\r
439 int [] result = new int[12462];
\r
441 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
\r
445 private static int zzUnpackTrans(String packed, int offset, int [] result) {
\r
446 int i = 0; /* index in packed string */
\r
447 int j = offset; /* index in unpacked array */
\r
448 int l = packed.length();
\r
450 int count = packed.charAt(i++);
\r
451 int value = packed.charAt(i++);
\r
453 do result[j++] = value; while (--count > 0);
\r
460 private static final int ZZ_UNKNOWN_ERROR = 0;
\r
461 private static final int ZZ_NO_MATCH = 1;
\r
462 private static final int ZZ_PUSHBACK_2BIG = 2;
\r
464 /* error messages for the codes above */
\r
465 private static final String ZZ_ERROR_MSG[] = {
\r
466 "Unknown internal scanner error",
\r
467 "Error: could not match input",
\r
468 "Error: pushback value was too large"
\r
472 * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
\r
474 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
\r
476 private static final String ZZ_ATTRIBUTE_PACKED_0 =
\r
477 "\3\0\1\10\1\11\10\1\2\11\10\1\1\11\17\1"+
\r
478 "\4\11\2\1\1\11\3\1\2\11\2\1\1\0\2\11"+
\r
479 "\4\1\1\11\5\0\1\1\1\11\2\1\3\0\1\1"+
\r
480 "\3\0\43\1\1\0\5\11\1\1\1\11\2\0\2\1"+
\r
481 "\1\0\3\11\1\0\1\11\2\0\1\1\1\0\32\1"+
\r
482 "\1\11\1\0\1\11\2\0\31\1\1\0\1\11\21\1"+
\r
483 "\1\0\17\1\1\11\7\1\1\0\6\1\2\0\1\1"+
\r
484 "\2\0\2\1\4\0\2\1\4\0\1\1\4\0\1\1"+
\r
485 "\1\11\2\0\1\11\1\1\2\0\1\1\2\0\1\11"+
\r
488 private static int [] zzUnpackAttribute() {
\r
489 int [] result = new int[276];
\r
491 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
\r
495 private static int zzUnpackAttribute(String packed, int offset, int [] result) {
\r
496 int i = 0; /* index in packed string */
\r
497 int j = offset; /* index in unpacked array */
\r
498 int l = packed.length();
\r
500 int count = packed.charAt(i++);
\r
501 int value = packed.charAt(i++);
\r
502 do result[j++] = value; while (--count > 0);
\r
507 /** the input device */
\r
508 private java.io.Reader zzReader;
\r
510 /** the current state of the DFA */
\r
511 private int zzState;
\r
513 /** the current lexical state */
\r
514 private int zzLexicalState = YYINITIAL;
\r
516 /** this buffer contains the current text to be matched and is
\r
517 the source of the yytext() string */
\r
518 private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
\r
520 /** the textposition at the last accepting state */
\r
521 private int zzMarkedPos;
\r
523 /** the current text position in the buffer */
\r
524 private int zzCurrentPos;
\r
526 /** startRead marks the beginning of the yytext() string in the buffer */
\r
527 private int zzStartRead;
\r
529 /** endRead marks the last character in the buffer, that has been read
\r
531 private int zzEndRead;
\r
533 /** number of newlines encountered up to the start of the matched text */
\r
534 private int yyline;
\r
536 /** the number of characters up to the start of the matched text */
\r
537 private int yychar;
\r
540 * the number of characters from the last newline up to the start of the
\r
543 private int yycolumn;
\r
546 * zzAtBOL == true <=> the scanner is currently at the beginning of a line
\r
548 private boolean zzAtBOL = true;
\r
550 /** zzAtEOF == true <=> the scanner is at the EOF */
\r
551 private boolean zzAtEOF;
\r
553 /** denotes if the user-EOF-code has already been executed */
\r
554 private boolean zzEOFDone;
\r
557 * The number of occupied positions in zzBuffer beyond zzEndRead.
\r
558 * When a lead/high surrogate has been read from the input stream
\r
559 * into the final zzBuffer position, this will have a value of 1;
\r
560 * otherwise, it will have a value of 0.
\r
562 private int zzFinalHighSurrogate = 0;
\r
565 public SCLParserOptions options = SCLParserOptions.DEFAULT;
567 TIntArrayList parenCountStack = new TIntArrayList(2);
569 TIntArrayList stateStack = new TIntArrayList(2);
571 StringBuffer string = new StringBuffer();
573 private Token sym(int id) {
574 return new Token(id, yychar, yychar+yylength(), yytext());
576 private Token sym(int id, String text) {
577 return new Token(id, yychar, yychar+yylength(), text);
582 * Creates a new scanner
\r
584 * @param in the java.io.Reader to read input from.
\r
586 public SCLLexer(java.io.Reader in) {
\r
587 this.zzReader = in;
\r
592 * Unpacks the compressed character translation table.
\r
594 * @param packed the packed character translation table
\r
595 * @return the unpacked character translation table
\r
597 private static char [] zzUnpackCMap(String packed) {
\r
598 char [] map = new char[0x110000];
\r
599 int i = 0; /* index in packed string */
\r
600 int j = 0; /* index in unpacked array */
\r
602 int count = packed.charAt(i++);
\r
603 char value = packed.charAt(i++);
\r
604 do map[j++] = value; while (--count > 0);
\r
611 * Refills the input buffer.
\r
613 * @return <code>false</code>, iff there was new input.
\r
615 * @exception java.io.IOException if any I/O-Error occurs
\r
617 private boolean zzRefill() throws java.io.IOException {
\r
619 /* first: make room (if you can) */
\r
620 if (zzStartRead > 0) {
\r
621 zzEndRead += zzFinalHighSurrogate;
\r
622 zzFinalHighSurrogate = 0;
\r
623 System.arraycopy(zzBuffer, zzStartRead,
\r
625 zzEndRead-zzStartRead);
\r
627 /* translate stored positions */
\r
628 zzEndRead-= zzStartRead;
\r
629 zzCurrentPos-= zzStartRead;
\r
630 zzMarkedPos-= zzStartRead;
\r
634 /* is the buffer big enough? */
\r
635 if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
\r
636 /* if not: blow it up */
\r
637 char newBuffer[] = new char[zzBuffer.length*2];
\r
638 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
\r
639 zzBuffer = newBuffer;
\r
640 zzEndRead += zzFinalHighSurrogate;
\r
641 zzFinalHighSurrogate = 0;
\r
644 /* fill the buffer with new input */
\r
645 int requested = zzBuffer.length - zzEndRead;
\r
646 int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
\r
648 /* not supposed to occur according to specification of java.io.Reader */
\r
649 if (numRead == 0) {
\r
650 throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
\r
653 zzEndRead += numRead;
\r
654 /* If numRead == requested, we might have requested to few chars to
\r
655 encode a full Unicode character. We assume that a Reader would
\r
656 otherwise never return half characters. */
\r
657 if (numRead == requested) {
\r
658 if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
\r
660 zzFinalHighSurrogate = 1;
\r
663 /* potentially more input available */
\r
667 /* numRead < 0 ==> end of stream */
\r
673 * Closes the input stream.
\r
675 public final void yyclose() throws java.io.IOException {
\r
676 zzAtEOF = true; /* indicate end of file */
\r
677 zzEndRead = zzStartRead; /* invalidate buffer */
\r
679 if (zzReader != null)
\r
685 * Resets the scanner to read from a new input stream.
\r
686 * Does not close the old reader.
\r
688 * All internal variables are reset, the old input stream
\r
689 * <b>cannot</b> be reused (internal buffer is discarded and lost).
\r
690 * Lexical state is set to <tt>ZZ_INITIAL</tt>.
\r
692 * Internal scan buffer is resized down to its initial length, if it has grown.
\r
694 * @param reader the new input stream
\r
696 public final void yyreset(java.io.Reader reader) {
\r
701 zzEndRead = zzStartRead = 0;
\r
702 zzCurrentPos = zzMarkedPos = 0;
\r
703 zzFinalHighSurrogate = 0;
\r
704 yyline = yychar = yycolumn = 0;
\r
705 zzLexicalState = YYINITIAL;
\r
706 if (zzBuffer.length > ZZ_BUFFERSIZE)
\r
707 zzBuffer = new char[ZZ_BUFFERSIZE];
\r
712 * Returns the current lexical state.
\r
714 public final int yystate() {
\r
715 return zzLexicalState;
\r
720 * Enters a new lexical state
\r
722 * @param newState the new lexical state
\r
724 public final void yybegin(int newState) {
\r
725 zzLexicalState = newState;
\r
730 * Returns the text matched by the current regular expression.
\r
732 public final String yytext() {
\r
733 return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
\r
738 * Returns the character at position <tt>pos</tt> from the
\r
741 * It is equivalent to yytext().charAt(pos), but faster
\r
743 * @param pos the position of the character to fetch.
\r
744 * A value from 0 to yylength()-1.
\r
746 * @return the character at position pos
\r
748 public final char yycharat(int pos) {
\r
749 return zzBuffer[zzStartRead+pos];
\r
754 * Returns the length of the matched text region.
\r
756 public final int yylength() {
\r
757 return zzMarkedPos-zzStartRead;
\r
762 * Reports an error that occured while scanning.
\r
764 * In a wellformed scanner (no or only correct usage of
\r
765 * yypushback(int) and a match-all fallback rule) this method
\r
766 * will only be called with things that "Can't Possibly Happen".
\r
767 * If this method is called, something is seriously wrong
\r
768 * (e.g. a JFlex bug producing a faulty scanner etc.).
\r
770 * Usual syntax/scanner level error handling should be done
\r
771 * in error fallback rules.
\r
773 * @param errorCode the code of the errormessage to display
\r
775 private void zzScanError(int errorCode) throws RuntimeException {
\r
778 message = ZZ_ERROR_MSG[errorCode];
\r
780 catch (ArrayIndexOutOfBoundsException e) {
\r
781 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
\r
784 throw new RuntimeException(message);
\r
789 * Pushes the specified amount of characters back into the input stream.
\r
791 * They will be read again by then next call of the scanning method
\r
793 * @param number the number of characters to be read again.
\r
794 * This number must not be greater than yylength()!
\r
796 public void yypushback(int number) throws RuntimeException {
\r
797 if ( number > yylength() )
\r
798 zzScanError(ZZ_PUSHBACK_2BIG);
\r
800 zzMarkedPos -= number;
\r
805 * Resumes scanning until the next regular expression is matched,
\r
806 * the end of input is encountered or an I/O-Error occurs.
\r
808 * @return the next token
\r
809 * @exception java.io.IOException if any I/O-Error occurs
\r
811 public Token nextToken() throws java.io.IOException, SCLSyntaxErrorException, RuntimeException {
\r
818 int zzEndReadL = zzEndRead;
\r
819 char [] zzBufferL = zzBuffer;
\r
820 char [] zzCMapL = ZZ_CMAP;
\r
822 int [] zzTransL = ZZ_TRANS;
\r
823 int [] zzRowMapL = ZZ_ROWMAP;
\r
824 int [] zzAttrL = ZZ_ATTRIBUTE;
\r
827 zzMarkedPosL = zzMarkedPos;
\r
829 yychar+= zzMarkedPosL-zzStartRead;
\r
833 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
\r
835 zzState = ZZ_LEXSTATE[zzLexicalState];
\r
837 // set up zzAction for empty match case:
\r
838 int zzAttributes = zzAttrL[zzState];
\r
839 if ( (zzAttributes & 1) == 1 ) {
\r
840 zzAction = zzState;
\r
847 if (zzCurrentPosL < zzEndReadL) {
\r
848 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
\r
849 zzCurrentPosL += Character.charCount(zzInput);
\r
851 else if (zzAtEOF) {
\r
856 // store back cached positions
\r
857 zzCurrentPos = zzCurrentPosL;
\r
858 zzMarkedPos = zzMarkedPosL;
\r
859 boolean eof = zzRefill();
\r
860 // get translated positions and possibly new buffer
\r
861 zzCurrentPosL = zzCurrentPos;
\r
862 zzMarkedPosL = zzMarkedPos;
\r
863 zzBufferL = zzBuffer;
\r
864 zzEndReadL = zzEndRead;
\r
870 zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
\r
871 zzCurrentPosL += Character.charCount(zzInput);
\r
874 int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
\r
875 if (zzNext == -1) break zzForAction;
\r
878 zzAttributes = zzAttrL[zzState];
\r
879 if ( (zzAttributes & 1) == 1 ) {
\r
880 zzAction = zzState;
\r
881 zzMarkedPosL = zzCurrentPosL;
\r
882 if ( (zzAttributes & 8) == 8 ) break zzForAction;
\r
888 // store back cached position
\r
889 zzMarkedPos = zzMarkedPosL;
\r
891 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
\r
893 switch (zzLexicalState) {
\r
895 throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
\r
898 case LONG_STRING: {
\r
899 throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
\r
903 { return sym(SCLTerminals.EOF);
908 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
\r
910 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Illegal character '" + yytext() + "'.");
\r
914 { return sym(SCLTerminals.ID);
\r
918 { return sym(SCLTerminals.INTEGER);
\r
922 { return sym(SCLTerminals.SYMBOL, yytext().trim());
\r
926 { return sym(SCLTerminals.ATTACHED_HASH, "#");
\r
930 { return sym(SCLTerminals.ATTACHED_DOT, ".");
\r
934 { return sym(SCLTerminals.AT);
\r
938 { ++parenCount; return sym(SCLTerminals.LPAREN);
\r
942 { return sym(SCLTerminals.COMMA);
\r
947 if(parenCount == 0 && !parenCountStack.isEmpty()) {
948 parenCount = parenCountStack.removeAt(parenCountStack.size()-1);
951 yybegin(stateStack.removeAt(stateStack.size()-1));
952 return sym(SCLTerminals.CONTINUE_STRING);
955 return sym(SCLTerminals.RPAREN);
\r
959 { return new Token(SCLTerminals.EOL, yychar, yychar+yylength(), "");
\r
963 { return sym(SCLTerminals.LESS, "<");
\r
967 { return sym(SCLTerminals.GREATER, ">");
\r
971 { return sym(SCLTerminals.MINUS, "-");
\r
979 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Character does not conform to UTF-8 encoding.");
\r
983 { return sym(SCLTerminals.LAMBDA);
\r
987 { return sym(SCLTerminals.LBRACE);
\r
991 { return sym(SCLTerminals.RBRACE);
\r
995 { return sym(SCLTerminals.LBRACKET);
\r
999 { return sym(SCLTerminals.RBRACKET);
\r
1003 { return sym(SCLTerminals.EQUALS);
\r
1007 { return sym(SCLTerminals.COLON);
\r
1011 { return sym(SCLTerminals.SEMICOLON);
\r
1015 { return sym(SCLTerminals.BAR);
\r
1019 { string.setLength(0); stringStart=yychar; yybegin(STRING); return sym(SCLTerminals.BEGIN_STRING);
\r
1023 { return sym(SCLTerminals.BLANK);
\r
1027 { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Tabulator is not allowed except inside string literals.");
\r
1031 { string.append( yytext() );
\r
1035 { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
\r
1039 { yybegin(YYINITIAL);
1040 return new Token(SCLTerminals.END_STRING, stringStart, yychar+1, string.toString());
\r
1044 { string.append('\n');
\r
1048 { return sym(SCLTerminals.DOTDOT, ".");
\r
1052 { return sym(SCLTerminals.SEPARATED_DOT, ".");
\r
1056 { return sym(SCLTerminals.ANNOTATION_ID);
\r
1060 { return sym(SCLTerminals.BINDS);
\r
1064 { return sym(SCLTerminals.ARROW);
\r
1068 { return sym(SCLTerminals.COMMENT);
\r
1072 { return sym(SCLTerminals.AS);
\r
1076 { return sym(SCLTerminals.IF);
\r
1080 { return sym(SCLTerminals.IN);
\r
1084 { return sym(options.supportEq ? SCLTerminals.EQ : SCLTerminals.ID);
\r
1088 { return sym(SCLTerminals.BY);
\r
1092 { return sym(SCLTerminals.DO);
\r
1096 { return sym(SCLTerminals.IMPLIES);
\r
1100 { return sym(SCLTerminals.FOLLOWS);
\r
1104 { return sym(SCLTerminals.HASTYPE);
\r
1108 { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Illegal string escape character.");
\r
1112 { string.append(yytext().substring(1));
\r
1116 { parenCountStack.add(parenCount);
1118 stateStack.add(STRING);
1120 return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
\r
1124 { string.append('\r');
\r
1128 { string.append('\t');
\r
1132 { parenCountStack.add(parenCount);
1134 stateStack.add(LONG_STRING);
1136 return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
\r
1140 { return sym(SCLTerminals.FLOAT);
\r
1144 { return sym(SCLTerminals.CHAR);
\r
1148 { String text = yytext();
1149 return sym(SCLTerminals.ID, text.substring(1, text.length()-1));
\r
1153 { String text = yytext();
1154 return sym(SCLTerminals.SYMBOL, text.substring(1, text.length()-1));
\r
1158 { return sym(SCLTerminals.QUERY_OP);
\r
1162 { return sym(SCLTerminals.LET);
\r
1166 { return sym(SCLTerminals.MDO);
\r
1170 { string.setLength(0); stringStart=yychar; yybegin(LONG_STRING); return sym(SCLTerminals.BEGIN_STRING);
\r
1174 { yybegin(YYINITIAL);
1175 return new Token(SCLTerminals.END_STRING, stringStart, yychar+3, string.toString());
\r
1179 { return sym(SCLTerminals.RULE);
\r
1183 { return sym(SCLTerminals.THEN);
\r
1187 { return sym(SCLTerminals.TYPE);
\r
1191 { return sym(SCLTerminals.ELSE);
\r
1195 { return sym(SCLTerminals.WITH);
\r
1199 { return sym(SCLTerminals.WHEN);
\r
1203 { return sym(SCLTerminals.DATA);
\r
1207 { return sym(SCLTerminals.INFIX);
\r
1211 { return sym(SCLTerminals.WHERE);
\r
1215 { return sym(SCLTerminals.CLASS);
\r
1219 { return sym(SCLTerminals.MATCH);
\r
1223 { return sym(SCLTerminals.FORALL);
\r
1227 { return sym(SCLTerminals.INFIXR);
\r
1231 { return sym(SCLTerminals.INFIXL);
\r
1235 { return sym(SCLTerminals.IMPORT);
\r
1239 { return sym(SCLTerminals.HIDING);
\r
1243 { return sym(SCLTerminals.EFFECT);
\r
1247 { return sym(SCLTerminals.SELECT);
\r
1251 { string.append((char)Integer.parseInt(yytext().substring(2), 16));
\r
1255 { return sym(SCLTerminals.INCLUDE);
\r
1259 { return sym(SCLTerminals.ENFORCE);
\r
1263 { return sym(SCLTerminals.EXTENDS);
\r
1267 { return sym(SCLTerminals.INSTANCE);
\r
1271 { return sym(SCLTerminals.DERIVING);
\r
1275 { return sym(SCLTerminals.IMPORTJAVA);
\r
1279 { return sym(SCLTerminals.SELECT_FIRST);
\r
1283 { return sym(SCLTerminals.ABSTRACT_RULE);
\r
1287 { return sym(SCLTerminals.TRANSFORMATION);
\r
1291 { return sym(SCLTerminals.SELECT_DISTINCT);
\r
1295 { return sym(SCLTerminals.MAPPING_RELATION);
\r
1299 zzScanError(ZZ_NO_MATCH);
\r