]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.java
New type class MonadE and corresponding monad syntax with edo keyword
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / parsing / parser / SCLLexer.java
1 /* The following code was generated by JFlex 1.6.1 */
2
3 package org.simantics.scl.compiler.internal.parsing.parser;
4
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;
10
11
12 /**
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>
16  */
17 public class SCLLexer {
18
19   /** This character denotes the end of file */
20   public static final int YYEOF = -1;
21
22   /** initial size of the lookahead buffer */
23   private static final int ZZ_BUFFERSIZE = 16384;
24
25   /** lexical states */
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;
30
31   /**
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
36    */
37   private static final int ZZ_LEXSTATE[] = { 
38      0,  0,  1,  1,  2,  2,  3, 3
39   };
40
41   /** 
42    * Translates characters to character classes
43    */
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";
53
54   /** 
55    * Translates characters to character classes
56    */
57   private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
58
59   /** 
60    * Translates DFA states to action switch labels.
61    */
62   private static final int [] ZZ_ACTION = zzUnpackAction();
63
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";
88
89   private static int [] zzUnpackAction() {
90     int [] result = new int[298];
91     int offset = 0;
92     offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
93     return result;
94   }
95
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();
100     while (i < l) {
101       int count = packed.charAt(i++);
102       int value = packed.charAt(i++);
103       do result[j++] = value; while (--count > 0);
104     }
105     return j;
106   }
107
108
109   /** 
110    * Translates a state to a row index in the transition table
111    */
112   private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
113
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"+
152     "\0\u34cc\0\272";
153
154   private static int [] zzUnpackRowMap() {
155     int [] result = new int[298];
156     int offset = 0;
157     offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
158     return result;
159   }
160
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();
165     while (i < l) {
166       int high = packed.charAt(i++) << 16;
167       result[j++] = high | packed.charAt(i++);
168     }
169     return j;
170   }
171
172   /** 
173    * The transition table of the DFA
174    */
175   private static final int [] ZZ_TRANS = zzUnpackTrans();
176
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"+
459     "\1\u012a\33\0";
460
461   private static int [] zzUnpackTrans() {
462     int [] result = new int[13578];
463     int offset = 0;
464     offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
465     return result;
466   }
467
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();
472     while (i < l) {
473       int count = packed.charAt(i++);
474       int value = packed.charAt(i++);
475       value--;
476       do result[j++] = value; while (--count > 0);
477     }
478     return j;
479   }
480
481
482   /* error codes */
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;
486
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"
492   };
493
494   /**
495    * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
496    */
497   private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
498
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";
511
512   private static int [] zzUnpackAttribute() {
513     int [] result = new int[298];
514     int offset = 0;
515     offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
516     return result;
517   }
518
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();
523     while (i < l) {
524       int count = packed.charAt(i++);
525       int value = packed.charAt(i++);
526       do result[j++] = value; while (--count > 0);
527     }
528     return j;
529   }
530
531   /** the input device */
532   private java.io.Reader zzReader;
533
534   /** the current state of the DFA */
535   private int zzState;
536
537   /** the current lexical state */
538   private int zzLexicalState = YYINITIAL;
539
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];
543
544   /** the textposition at the last accepting state */
545   private int zzMarkedPos;
546
547   /** the current text position in the buffer */
548   private int zzCurrentPos;
549
550   /** startRead marks the beginning of the yytext() string in the buffer */
551   private int zzStartRead;
552
553   /** endRead marks the last character in the buffer, that has been read
554       from input */
555   private int zzEndRead;
556
557   /** number of newlines encountered up to the start of the matched text */
558   private int yyline;
559
560   /** the number of characters up to the start of the matched text */
561   private int yychar;
562
563   /**
564    * the number of characters from the last newline up to the start of the 
565    * matched text
566    */
567   private int yycolumn;
568
569   /** 
570    * zzAtBOL == true <=> the scanner is currently at the beginning of a line
571    */
572   private boolean zzAtBOL = true;
573
574   /** zzAtEOF == true <=> the scanner is at the EOF */
575   private boolean zzAtEOF;
576
577   /** denotes if the user-EOF-code has already been executed */
578   private boolean zzEOFDone;
579   
580   /** 
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.
585    */
586   private int zzFinalHighSurrogate = 0;
587
588   /* user code: */
589     public SCLParserOptions options = SCLParserOptions.DEFAULT;
590     int stringStart;
591     TIntArrayList parenCountStack = new TIntArrayList(2);
592     int parenCount = 0;
593     TIntArrayList stateStack = new TIntArrayList(2);
594
595     StringBuffer string = new StringBuffer();
596     CompilationContext context;
597     
598     private Token sym(int id) {
599         return new Token(id, yychar, yychar+yylength(), yytext());
600     }
601     private Token sym(int id, String text) {
602         return new Token(id, yychar, yychar+yylength(), text);
603     }
604     public void setCompilationContext(CompilationContext context) {
605         this.context = context;
606     }
607     public boolean supportCHR() {
608         return context.header == null ? false : context.header.chr;
609     }
610
611
612   /**
613    * Creates a new scanner
614    *
615    * @param   in  the java.io.Reader to read input from.
616    */
617   public SCLLexer(java.io.Reader in) {
618     this.zzReader = in;
619   }
620
621
622   /** 
623    * Unpacks the compressed character translation table.
624    *
625    * @param packed   the packed character translation table
626    * @return         the unpacked character translation table
627    */
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 */
632     while (i < 190) {
633       int  count = packed.charAt(i++);
634       char value = packed.charAt(i++);
635       do map[j++] = value; while (--count > 0);
636     }
637     return map;
638   }
639
640
641   /**
642    * Refills the input buffer.
643    *
644    * @return      <code>false</code>, iff there was new input.
645    * 
646    * @exception   java.io.IOException  if any I/O-Error occurs
647    */
648   private boolean zzRefill() throws java.io.IOException {
649
650     /* first: make room (if you can) */
651     if (zzStartRead > 0) {
652       zzEndRead += zzFinalHighSurrogate;
653       zzFinalHighSurrogate = 0;
654       System.arraycopy(zzBuffer, zzStartRead,
655                        zzBuffer, 0,
656                        zzEndRead-zzStartRead);
657
658       /* translate stored positions */
659       zzEndRead-= zzStartRead;
660       zzCurrentPos-= zzStartRead;
661       zzMarkedPos-= zzStartRead;
662       zzStartRead = 0;
663     }
664
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;
673     }
674
675     /* fill the buffer with new input */
676     int requested = zzBuffer.length - zzEndRead;
677     int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
678
679     /* not supposed to occur according to specification of java.io.Reader */
680     if (numRead == 0) {
681       throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
682     }
683     if (numRead > 0) {
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])) {
690           --zzEndRead;
691           zzFinalHighSurrogate = 1;
692         }
693       }
694       /* potentially more input available */
695       return false;
696     }
697
698     /* numRead < 0 ==> end of stream */
699     return true;
700   }
701
702     
703   /**
704    * Closes the input stream.
705    */
706   public final void yyclose() throws java.io.IOException {
707     zzAtEOF = true;            /* indicate end of file */
708     zzEndRead = zzStartRead;  /* invalidate buffer    */
709
710     if (zzReader != null)
711       zzReader.close();
712   }
713
714
715   /**
716    * Resets the scanner to read from a new input stream.
717    * Does not close the old reader.
718    *
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>.
722    *
723    * Internal scan buffer is resized down to its initial length, if it has grown.
724    *
725    * @param reader   the new input stream 
726    */
727   public final void yyreset(java.io.Reader reader) {
728     zzReader = reader;
729     zzAtBOL  = true;
730     zzAtEOF  = false;
731     zzEOFDone = false;
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];
739   }
740
741
742   /**
743    * Returns the current lexical state.
744    */
745   public final int yystate() {
746     return zzLexicalState;
747   }
748
749
750   /**
751    * Enters a new lexical state
752    *
753    * @param newState the new lexical state
754    */
755   public final void yybegin(int newState) {
756     zzLexicalState = newState;
757   }
758
759
760   /**
761    * Returns the text matched by the current regular expression.
762    */
763   public final String yytext() {
764     return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
765   }
766
767
768   /**
769    * Returns the character at position <tt>pos</tt> from the 
770    * matched text. 
771    * 
772    * It is equivalent to yytext().charAt(pos), but faster
773    *
774    * @param pos the position of the character to fetch. 
775    *            A value from 0 to yylength()-1.
776    *
777    * @return the character at position pos
778    */
779   public final char yycharat(int pos) {
780     return zzBuffer[zzStartRead+pos];
781   }
782
783
784   /**
785    * Returns the length of the matched text region.
786    */
787   public final int yylength() {
788     return zzMarkedPos-zzStartRead;
789   }
790
791
792   /**
793    * Reports an error that occured while scanning.
794    *
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.).
800    *
801    * Usual syntax/scanner level error handling should be done
802    * in error fallback rules.
803    *
804    * @param   errorCode  the code of the errormessage to display
805    */
806   private void zzScanError(int errorCode) throws RuntimeException {
807     String message;
808     try {
809       message = ZZ_ERROR_MSG[errorCode];
810     }
811     catch (ArrayIndexOutOfBoundsException e) {
812       message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
813     }
814
815     throw new RuntimeException(message);
816   } 
817
818
819   /**
820    * Pushes the specified amount of characters back into the input stream.
821    *
822    * They will be read again by then next call of the scanning method
823    *
824    * @param number  the number of characters to be read again.
825    *                This number must not be greater than yylength()!
826    */
827   public void yypushback(int number)  throws RuntimeException {
828     if ( number > yylength() )
829       zzScanError(ZZ_PUSHBACK_2BIG);
830
831     zzMarkedPos -= number;
832   }
833
834
835   /**
836    * Resumes scanning until the next regular expression is matched,
837    * the end of input is encountered or an I/O-Error occurs.
838    *
839    * @return      the next token
840    * @exception   java.io.IOException  if any I/O-Error occurs
841    */
842   public Token nextToken() throws java.io.IOException, SCLSyntaxErrorException, RuntimeException {
843     int zzInput;
844     int zzAction;
845
846     // cached fields:
847     int zzCurrentPosL;
848     int zzMarkedPosL;
849     int zzEndReadL = zzEndRead;
850     char [] zzBufferL = zzBuffer;
851     char [] zzCMapL = ZZ_CMAP;
852
853     int [] zzTransL = ZZ_TRANS;
854     int [] zzRowMapL = ZZ_ROWMAP;
855     int [] zzAttrL = ZZ_ATTRIBUTE;
856
857     while (true) {
858       zzMarkedPosL = zzMarkedPos;
859
860       yychar+= zzMarkedPosL-zzStartRead;
861
862       zzAction = -1;
863
864       zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
865   
866       zzState = ZZ_LEXSTATE[zzLexicalState];
867
868       // set up zzAction for empty match case:
869       int zzAttributes = zzAttrL[zzState];
870       if ( (zzAttributes & 1) == 1 ) {
871         zzAction = zzState;
872       }
873
874
875       zzForAction: {
876         while (true) {
877     
878           if (zzCurrentPosL < zzEndReadL) {
879             zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
880             zzCurrentPosL += Character.charCount(zzInput);
881           }
882           else if (zzAtEOF) {
883             zzInput = YYEOF;
884             break zzForAction;
885           }
886           else {
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;
896             if (eof) {
897               zzInput = YYEOF;
898               break zzForAction;
899             }
900             else {
901               zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
902               zzCurrentPosL += Character.charCount(zzInput);
903             }
904           }
905           int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
906           if (zzNext == -1) break zzForAction;
907           zzState = zzNext;
908
909           zzAttributes = zzAttrL[zzState];
910           if ( (zzAttributes & 1) == 1 ) {
911             zzAction = zzState;
912             zzMarkedPosL = zzCurrentPosL;
913             if ( (zzAttributes & 8) == 8 ) break zzForAction;
914           }
915
916         }
917       }
918
919       // store back cached position
920       zzMarkedPos = zzMarkedPosL;
921
922       if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
923         zzAtEOF = true;
924             switch (zzLexicalState) {
925             case STRING: {
926               throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
927             }
928             case 299: break;
929             case LONG_STRING: {
930               throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
931             }
932             case 300: break;
933             default:
934           {     return sym(SCLTerminals.EOF);
935  }
936         }
937       }
938       else {
939         switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
940           case 1: 
941             { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Illegal character '" + yytext() + "'.");
942             }
943           case 97: break;
944           case 2: 
945             { return sym(SCLTerminals.ID);
946             }
947           case 98: break;
948           case 3: 
949             { return sym(SCLTerminals.INTEGER);
950             }
951           case 99: break;
952           case 4: 
953             { return sym(SCLTerminals.SYMBOL, yytext().trim());
954             }
955           case 100: break;
956           case 5: 
957             { return sym(SCLTerminals.ATTACHED_HASH, "#");
958             }
959           case 101: break;
960           case 6: 
961             { return sym(SCLTerminals.ATTACHED_DOT, ".");
962             }
963           case 102: break;
964           case 7: 
965             { return sym(SCLTerminals.AT);
966             }
967           case 103: break;
968           case 8: 
969             { ++parenCount; return sym(SCLTerminals.LPAREN);
970             }
971           case 104: break;
972           case 9: 
973             { return sym(SCLTerminals.COMMA);
974             }
975           case 105: break;
976           case 10: 
977             { --parenCount;
978                     if(parenCount == 0 && !parenCountStack.isEmpty()) { 
979                        parenCount = parenCountStack.removeAt(parenCountStack.size()-1);
980                        string.setLength(0);
981                        stringStart=yychar;
982                        yybegin(stateStack.removeAt(stateStack.size()-1));
983                        return sym(SCLTerminals.CONTINUE_STRING);
984                     }
985                     else
986                        return sym(SCLTerminals.RPAREN);
987             }
988           case 106: break;
989           case 11: 
990             { return new Token(SCLTerminals.EOL, yychar, yychar+yylength(), "");
991             }
992           case 107: break;
993           case 12: 
994             { return sym(SCLTerminals.LESS, "<");
995             }
996           case 108: break;
997           case 13: 
998             { return sym(SCLTerminals.GREATER, ">");
999             }
1000           case 109: break;
1001           case 14: 
1002             { return sym(SCLTerminals.MINUS, "-");
1003             }
1004           case 110: break;
1005           case 15: 
1006             { 
1007             }
1008           case 111: break;
1009           case 16: 
1010             { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Character does not conform to UTF-8 encoding.");
1011             }
1012           case 112: break;
1013           case 17: 
1014             { return sym(SCLTerminals.LAMBDA);
1015             }
1016           case 113: break;
1017           case 18: 
1018             { return sym(SCLTerminals.LBRACE);
1019             }
1020           case 114: break;
1021           case 19: 
1022             { return sym(SCLTerminals.RBRACE);
1023             }
1024           case 115: break;
1025           case 20: 
1026             { return sym(SCLTerminals.LBRACKET);
1027             }
1028           case 116: break;
1029           case 21: 
1030             { return sym(SCLTerminals.RBRACKET);
1031             }
1032           case 117: break;
1033           case 22: 
1034             { return sym(SCLTerminals.EQUALS);
1035             }
1036           case 118: break;
1037           case 23: 
1038             { return sym(SCLTerminals.COLON);
1039             }
1040           case 119: break;
1041           case 24: 
1042             { return sym(SCLTerminals.SEMICOLON);
1043             }
1044           case 120: break;
1045           case 25: 
1046             { return sym(SCLTerminals.BAR);
1047             }
1048           case 121: break;
1049           case 26: 
1050             { string.setLength(0); stringStart=yychar; yybegin(STRING); return sym(SCLTerminals.BEGIN_STRING);
1051             }
1052           case 122: break;
1053           case 27: 
1054             { return sym(SCLTerminals.BLANK);
1055             }
1056           case 123: break;
1057           case 28: 
1058             { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Tabulator is not allowed except inside string literals.");
1059             }
1060           case 124: break;
1061           case 29: 
1062             { string.append( yytext() );
1063             }
1064           case 125: break;
1065           case 30: 
1066             { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
1067             }
1068           case 126: break;
1069           case 31: 
1070             { yybegin(YYINITIAL); 
1071                     return new Token(SCLTerminals.END_STRING, stringStart, yychar+1, string.toString());
1072             }
1073           case 127: break;
1074           case 32: 
1075             { string.append('\n');
1076             }
1077           case 128: break;
1078           case 33: 
1079             { return sym(SCLTerminals.DOTDOT, ".");
1080             }
1081           case 129: break;
1082           case 34: 
1083             { return sym(SCLTerminals.SEPARATED_DOT, ".");
1084             }
1085           case 130: break;
1086           case 35: 
1087             { return sym(SCLTerminals.ANNOTATION_ID);
1088             }
1089           case 131: break;
1090           case 36: 
1091             { return sym(SCLTerminals.BINDS);
1092             }
1093           case 132: break;
1094           case 37: 
1095             { return sym(SCLTerminals.ARROW);
1096             }
1097           case 133: break;
1098           case 38: 
1099             { return sym(SCLTerminals.COMMENT);
1100             }
1101           case 134: break;
1102           case 39: 
1103             { return sym(SCLTerminals.AS);
1104             }
1105           case 135: break;
1106           case 40: 
1107             { return sym(SCLTerminals.IF);
1108             }
1109           case 136: break;
1110           case 41: 
1111             { return sym(SCLTerminals.IN);
1112             }
1113           case 137: break;
1114           case 42: 
1115             { return sym(options.supportEq ? SCLTerminals.EQ : SCLTerminals.ID);
1116             }
1117           case 138: break;
1118           case 43: 
1119             { return sym(SCLTerminals.BY);
1120             }
1121           case 139: break;
1122           case 44: 
1123             { return sym(SCLTerminals.DO);
1124             }
1125           case 140: break;
1126           case 45: 
1127             { return sym(SCLTerminals.IMPLIES);
1128             }
1129           case 141: break;
1130           case 46: 
1131             { return sym(SCLTerminals.FOLLOWS);
1132             }
1133           case 142: break;
1134           case 47: 
1135             { return sym(SCLTerminals.HASTYPE);
1136             }
1137           case 143: break;
1138           case 48: 
1139             { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Illegal string escape character.");
1140             }
1141           case 144: break;
1142           case 49: 
1143             { string.append(yytext().substring(1));
1144             }
1145           case 145: break;
1146           case 50: 
1147             { parenCountStack.add(parenCount);
1148                     parenCount = 1;
1149                     stateStack.add(STRING);
1150                     yybegin(YYINITIAL); 
1151                     return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
1152             }
1153           case 146: break;
1154           case 51: 
1155             { string.append('\r');
1156             }
1157           case 147: break;
1158           case 52: 
1159             { string.append('\t');
1160             }
1161           case 148: break;
1162           case 53: 
1163             { parenCountStack.add(parenCount);
1164                     parenCount = 1;
1165                     stateStack.add(LONG_STRING);
1166                     yybegin(YYINITIAL); 
1167                     return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
1168             }
1169           case 149: break;
1170           case 54: 
1171             { return sym(SCLTerminals.FLOAT);
1172             }
1173           case 150: break;
1174           case 55: 
1175             { return sym(SCLTerminals.CHAR);
1176             }
1177           case 151: break;
1178           case 56: 
1179             { String text = yytext();
1180                      return sym(SCLTerminals.ID, text.substring(1, text.length()-1));
1181             }
1182           case 152: break;
1183           case 57: 
1184             { String text = yytext();
1185                      return sym(SCLTerminals.SYMBOL, text.substring(1, text.length()-1));
1186             }
1187           case 153: break;
1188           case 58: 
1189             { return sym(SCLTerminals.QUERY_OP);
1190             }
1191           case 154: break;
1192           case 59: 
1193             { return sym(SCLTerminals.LET);
1194             }
1195           case 155: break;
1196           case 60: 
1197             { return sym(SCLTerminals.EDO);
1198             }
1199           case 156: break;
1200           case 61: 
1201             { return sym(SCLTerminals.MDO);
1202             }
1203           case 157: break;
1204           case 62: 
1205             { string.setLength(0); stringStart=yychar; yybegin(LONG_STRING); return sym(SCLTerminals.BEGIN_STRING);
1206             }
1207           case 158: break;
1208           case 63: 
1209             { yybegin(YYINITIAL); 
1210                       return new Token(SCLTerminals.END_STRING, stringStart, yychar+3, string.toString());
1211             }
1212           case 159: break;
1213           case 64: 
1214             { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.RULE);
1215             }
1216           case 160: break;
1217           case 65: 
1218             { return sym(SCLTerminals.THEN);
1219             }
1220           case 161: break;
1221           case 66: 
1222             { return sym(SCLTerminals.TYPE);
1223             }
1224           case 162: break;
1225           case 67: 
1226             { return sym(SCLTerminals.ELSE);
1227             }
1228           case 163: break;
1229           case 68: 
1230             { return sym(SCLTerminals.WITH);
1231             }
1232           case 164: break;
1233           case 69: 
1234             { return sym(SCLTerminals.WHEN);
1235             }
1236           case 165: break;
1237           case 70: 
1238             { return sym(SCLTerminals.DATA);
1239             }
1240           case 166: break;
1241           case 71: 
1242             { return sym(SCLTerminals.INFIX);
1243             }
1244           case 167: break;
1245           case 72: 
1246             { return sym(SCLTerminals.WHERE);
1247             }
1248           case 168: break;
1249           case 73: 
1250             { return sym(SCLTerminals.CLASS);
1251             }
1252           case 169: break;
1253           case 74: 
1254             { return sym(SCLTerminals.MATCH);
1255             }
1256           case 170: break;
1257           case 75: 
1258             { return sym(SCLTerminals.LAMBDA_MATCH);
1259             }
1260           case 171: break;
1261           case 76: 
1262             { return sym(SCLTerminals.FORALL);
1263             }
1264           case 172: break;
1265           case 77: 
1266             { return sym(SCLTerminals.INFIXR);
1267             }
1268           case 173: break;
1269           case 78: 
1270             { return sym(SCLTerminals.INFIXL);
1271             }
1272           case 174: break;
1273           case 79: 
1274             { return sym(SCLTerminals.IMPORT);
1275             }
1276           case 175: break;
1277           case 80: 
1278             { return sym(SCLTerminals.HIDING);
1279             }
1280           case 176: break;
1281           case 81: 
1282             { return sym(SCLTerminals.EFFECT);
1283             }
1284           case 177: break;
1285           case 82: 
1286             { return sym(supportCHR() ? SCLTerminals.CHR_SELECT : SCLTerminals.SELECT);
1287             }
1288           case 178: break;
1289           case 83: 
1290             { string.append((char)Integer.parseInt(yytext().substring(2), 16));
1291             }
1292           case 179: break;
1293           case 84: 
1294             { return sym(supportCHR() ? SCLTerminals.RULESET : SCLTerminals.ID);
1295             }
1296           case 180: break;
1297           case 85: 
1298             { return sym(SCLTerminals.INCLUDE);
1299             }
1300           case 181: break;
1301           case 86: 
1302             { return sym(SCLTerminals.ENFORCE);
1303             }
1304           case 182: break;
1305           case 87: 
1306             { return sym(SCLTerminals.EXTENDS);
1307             }
1308           case 183: break;
1309           case 88: 
1310             { return sym(SCLTerminals.INSTANCE);
1311             }
1312           case 184: break;
1313           case 89: 
1314             { return sym(SCLTerminals.DERIVING);
1315             }
1316           case 185: break;
1317           case 90: 
1318             { return sym(SCLTerminals.IMPORTJAVA);
1319             }
1320           case 186: break;
1321           case 91: 
1322             { return sym(SCLTerminals.CONSTRAINT);
1323             }
1324           case 187: break;
1325           case 92: 
1326             { return sym(SCLTerminals.SELECT_FIRST);
1327             }
1328           case 188: break;
1329           case 93: 
1330             { return sym(SCLTerminals.ABSTRACT_RULE);
1331             }
1332           case 189: break;
1333           case 94: 
1334             { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.TRANSFORMATION);
1335             }
1336           case 190: break;
1337           case 95: 
1338             { return sym(SCLTerminals.SELECT_DISTINCT);
1339             }
1340           case 191: break;
1341           case 96: 
1342             { return sym(SCLTerminals.MAPPING_RELATION);
1343             }
1344           case 192: break;
1345           default:
1346             zzScanError(ZZ_NO_MATCH);
1347         }
1348       }
1349     }
1350   }
1351
1352
1353 }