]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.java
Fixed multiple issues causing dangling references to discarded queries
[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:/Simugawa.git/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\44\1\4\1\45\1\46\1\47"+
72     "\1\50\1\4\2\0\2\2\1\51\2\2\1\52\1\53"+
73     "\12\2\1\54\3\2\1\55\2\2\1\56\4\2\1\57"+
74     "\1\60\1\61\1\0\1\62\1\63\1\64\1\65\1\66"+
75     "\1\62\1\67\2\0\2\70\1\0\1\71\1\72\1\2"+
76     "\1\0\1\73\2\0\2\74\1\0\1\4\1\0\3\2"+
77     "\1\75\14\2\1\76\11\2\1\77\1\100\1\0\1\101"+
78     "\2\0\1\50\1\0\1\2\1\102\6\2\1\103\1\104"+
79     "\2\2\1\105\3\2\1\106\1\2\1\107\2\2\1\110"+
80     "\3\2\1\0\1\50\1\0\3\2\1\111\11\2\1\112"+
81     "\1\2\1\113\1\2\1\114\1\2\1\0\1\115\1\116"+
82     "\2\2\1\117\1\120\2\2\1\121\1\2\1\122\1\123"+
83     "\2\2\1\124\3\2\1\125\1\126\2\2\1\127\2\2"+
84     "\1\130\1\131\1\0\4\2\1\132\2\2\2\0\1\2"+
85     "\1\133\2\0\2\2\2\0\1\2\2\0\1\134\1\2"+
86     "\2\0\1\135\2\0\1\2\4\0\1\2\1\136\2\0"+
87     "\1\137\1\2\2\0\1\140\2\0\1\141\1\0\1\142";
88
89   private static int [] zzUnpackAction() {
90     int [] result = new int[300];
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\u03e0\0\u041e\0\u045c\0\u049a\0\272"+
118     "\0\u04d8\0\u0516\0\u0554\0\u0592\0\u05d0\0\u060e\0\u064c\0\u068a"+
119     "\0\u06c8\0\u0706\0\u0744\0\u0782\0\u07c0\0\u07fe\0\u083c\0\272"+
120     "\0\272\0\272\0\272\0\u087a\0\u08b8\0\272\0\u01b2\0\u08f6"+
121     "\0\370\0\272\0\272\0\u0934\0\u0972\0\u09b0\0\272\0\272"+
122     "\0\u09ee\0\u0a2c\0\u0a6a\0\u0934\0\272\0\u0aa8\0\u0ae6\0\u0b24"+
123     "\0\u0b62\0\u0ba0\0\u0bde\0\272\0\u0c1c\0\u0c5a\0\u0c98\0\u0cd6"+
124     "\0\u0d14\0\u0d52\0\u0d90\0\u0dce\0\u0e0c\0\u0e4a\0\u01b2\0\u0e88"+
125     "\0\u01b2\0\u01b2\0\u01b2\0\u0ec6\0\u0f04\0\u0f42\0\u0f80\0\u0fbe"+
126     "\0\u0ffc\0\370\0\u103a\0\u1078\0\370\0\u10b6\0\u10f4\0\u1132"+
127     "\0\u1170\0\u11ae\0\u11ec\0\u122a\0\u1268\0\u12a6\0\u12e4\0\u1322"+
128     "\0\370\0\u1360\0\u139e\0\u13dc\0\370\0\u141a\0\u1458\0\370"+
129     "\0\u1496\0\u14d4\0\u1512\0\u1550\0\u01b2\0\u01b2\0\u01b2\0\u158e"+
130     "\0\272\0\272\0\272\0\272\0\272\0\u15cc\0\272\0\u160a"+
131     "\0\u02e8\0\u1648\0\u1686\0\u1686\0\272\0\272\0\272\0\u16c4"+
132     "\0\272\0\u1702\0\u1740\0\272\0\u01b2\0\u177e\0\u17bc\0\u17fa"+
133     "\0\u1838\0\u1876\0\u18b4\0\370\0\u18f2\0\u1930\0\u196e\0\u19ac"+
134     "\0\u19ea\0\u1a28\0\u1a66\0\u1aa4\0\u1ae2\0\u1b20\0\u1b5e\0\u1b9c"+
135     "\0\370\0\u1bda\0\u1c18\0\u1c56\0\u1c94\0\u1cd2\0\u1d10\0\u1d4e"+
136     "\0\u1d8c\0\u1dca\0\370\0\272\0\u1e08\0\272\0\u1e46\0\u1e84"+
137     "\0\u01b2\0\u1ec2\0\u1f00\0\u1f3e\0\u1f7c\0\u1fba\0\u1ff8\0\u2036"+
138     "\0\u2074\0\u20b2\0\370\0\370\0\u20f0\0\u212e\0\370\0\u216c"+
139     "\0\u21aa\0\u21e8\0\370\0\u2226\0\370\0\u2264\0\u22a2\0\370"+
140     "\0\u22e0\0\u231e\0\u235c\0\u239a\0\272\0\u23d8\0\u2416\0\u2454"+
141     "\0\u2492\0\u24d0\0\u250e\0\u254c\0\u258a\0\u25c8\0\u2606\0\u2644"+
142     "\0\u2682\0\u26c0\0\u26fe\0\370\0\u273c\0\370\0\u277a\0\370"+
143     "\0\u27b8\0\u27f6\0\272\0\370\0\u2834\0\u2872\0\370\0\370"+
144     "\0\u28b0\0\u28ee\0\u292c\0\u296a\0\370\0\370\0\u29a8\0\u29e6"+
145     "\0\u2a24\0\u2a62\0\u2aa0\0\u2ade\0\272\0\370\0\u2b1c\0\u2b5a"+
146     "\0\370\0\u2b98\0\u2bd6\0\370\0\370\0\u2c14\0\u2c52\0\u2c90"+
147     "\0\u2cce\0\u2d0c\0\370\0\u2d4a\0\u2d88\0\u2dc6\0\u2e04\0\u2e42"+
148     "\0\370\0\u2e80\0\u2ebe\0\u2efc\0\u2f3a\0\u2f78\0\u2fb6\0\u2ff4"+
149     "\0\u3032\0\u3070\0\370\0\u30ae\0\u30ec\0\u312a\0\370\0\u3168"+
150     "\0\u31a6\0\u31e4\0\u3222\0\u3260\0\u329e\0\u32dc\0\u331a\0\272"+
151     "\0\u3358\0\u3396\0\272\0\u33d4\0\u3412\0\u3450\0\370\0\u348e"+
152     "\0\u34cc\0\272\0\u350a\0\272";
153
154   private static int [] zzUnpackRowMap() {
155     int [] result = new int[300];
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\117\1\120\1\11\1\0\1\121"+
206     "\1\0\2\11\1\0\1\11\34\0\2\11\1\0\1\120"+
207     "\12\0\2\11\1\0\1\11\6\0\2\11\1\122\1\0"+
208     "\1\11\1\0\2\11\1\0\1\11\34\0\2\11\1\0"+
209     "\1\11\12\0\2\11\1\0\1\11\6\0\2\11\1\123"+
210     "\1\0\1\11\1\0\2\11\1\0\1\11\34\0\2\11"+
211     "\1\0\1\11\31\0\1\26\56\0\2\11\1\0\1\11"+
212     "\6\0\3\11\1\0\1\11\1\0\1\124\1\125\1\0"+
213     "\1\11\34\0\2\11\1\0\1\11\12\0\2\11\1\0"+
214     "\1\11\6\0\3\11\1\0\1\11\1\126\2\11\1\0"+
215     "\1\11\21\0\1\127\12\0\2\11\1\0\1\11\6\0"+
216     "\4\6\2\0\1\76\12\0\1\6\6\0\1\6\1\130"+
217     "\26\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
218     "\1\6\6\0\14\6\1\131\13\6\11\0\1\6\4\0"+
219     "\4\6\2\0\1\76\12\0\1\6\6\0\12\6\1\132"+
220     "\2\6\1\133\12\6\11\0\1\6\4\0\4\6\2\0"+
221     "\1\76\12\0\1\6\6\0\10\6\1\134\17\6\11\0"+
222     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
223     "\1\135\10\6\1\136\7\6\1\137\6\6\11\0\1\6"+
224     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+
225     "\1\140\4\6\1\141\16\6\1\142\1\6\11\0\1\6"+
226     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\5\6"+
227     "\1\143\22\6\11\0\1\6\4\0\4\6\2\0\1\76"+
228     "\12\0\1\6\6\0\1\144\3\6\1\145\4\6\1\146"+
229     "\5\6\1\147\1\150\3\6\1\151\3\6\11\0\1\6"+
230     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\10\6"+
231     "\1\152\17\6\11\0\1\6\4\0\4\6\2\0\1\76"+
232     "\12\0\1\6\6\0\5\6\1\153\1\6\1\154\20\6"+
233     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
234     "\6\0\26\6\1\155\1\6\11\0\1\6\4\0\4\6"+
235     "\2\0\1\76\12\0\1\6\6\0\1\6\1\156\2\6"+
236     "\1\157\23\6\11\0\1\6\4\0\4\6\2\0\1\76"+
237     "\12\0\1\6\6\0\1\6\1\160\1\6\1\161\4\6"+
238     "\1\162\17\6\11\0\1\6\4\0\4\6\2\0\1\76"+
239     "\12\0\1\6\6\0\3\6\1\163\14\6\1\164\7\6"+
240     "\11\0\1\6\10\0\2\11\1\0\1\11\6\0\2\11"+
241     "\1\165\1\0\1\11\1\0\2\11\1\0\1\11\34\0"+
242     "\2\11\1\0\1\11\12\0\2\11\1\0\1\11\6\0"+
243     "\3\11\1\0\1\166\1\0\2\11\1\0\1\11\34\0"+
244     "\1\11\1\167\1\0\1\11\76\0\1\170\4\0\15\64"+
245     "\1\0\11\64\2\0\40\64\1\0\2\64\1\0\1\64"+
246     "\74\0\1\70\1\0\4\171\1\172\4\171\1\173\3\171"+
247     "\1\0\12\171\1\172\2\171\1\174\3\171\1\175\2\171"+
248     "\1\75\2\171\1\176\23\171\1\172\1\171\2\0\1\171"+
249     "\74\0\1\75\12\0\1\177\155\0\1\200\5\0\1\6"+
250     "\1\0\1\6\10\0\1\201\5\0\1\6\6\0\30\6"+
251     "\11\0\1\6\5\0\1\202\75\0\1\203\20\0\1\204"+
252     "\56\0\1\205\71\0\27\101\1\0\46\101\15\0\1\103"+
253     "\6\0\1\103\47\0\1\103\16\0\1\105\6\0\1\105"+
254     "\47\0\1\105\2\0\4\106\15\0\1\106\6\0\30\106"+
255     "\11\0\1\106\10\0\2\107\1\0\1\107\2\0\1\206"+
256     "\3\0\3\107\1\0\1\107\1\0\2\107\1\0\1\107"+
257     "\34\0\2\107\1\0\1\107\20\0\1\206\74\0\1\111"+
258     "\1\207\63\0\4\112\15\0\1\112\6\0\30\112\11\0"+
259     "\1\112\4\0\4\113\2\0\1\210\6\0\1\211\3\0"+
260     "\1\113\6\0\30\113\11\0\1\113\15\0\1\212\64\0"+
261     "\1\213\1\0\1\213\16\0\1\213\6\0\30\213\11\0"+
262     "\1\213\24\0\1\214\61\0\2\11\1\0\1\11\6\0"+
263     "\2\11\1\215\1\0\1\11\1\0\2\11\1\0\1\11"+
264     "\34\0\2\11\1\0\1\11\5\0\15\124\1\0\56\124"+
265     "\1\0\1\124\5\216\2\125\1\216\1\125\6\216\3\125"+
266     "\1\216\1\125\1\216\1\125\1\217\1\216\1\125\34\216"+
267     "\2\125\1\216\1\125\5\216\24\0\1\126\25\0\1\127"+
268     "\57\0\1\220\42\0\4\6\2\0\1\76\12\0\1\6"+
269     "\6\0\2\6\1\221\25\6\11\0\1\6\4\0\4\6"+
270     "\2\0\1\76\12\0\1\6\6\0\4\6\1\222\23\6"+
271     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
272     "\6\0\12\6\1\223\15\6\11\0\1\6\4\0\4\6"+
273     "\2\0\1\76\12\0\1\6\6\0\6\6\1\224\21\6"+
274     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
275     "\6\0\1\225\11\6\1\226\3\6\1\227\11\6\11\0"+
276     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
277     "\22\6\1\230\5\6\11\0\1\6\4\0\4\6\2\0"+
278     "\1\76\12\0\1\6\6\0\3\6\1\231\24\6\11\0"+
279     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
280     "\10\6\1\232\17\6\11\0\1\6\4\0\4\6\2\0"+
281     "\1\76\12\0\1\6\6\0\22\6\1\233\5\6\11\0"+
282     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
283     "\20\6\1\234\7\6\11\0\1\6\4\0\4\6\2\0"+
284     "\1\76\12\0\1\6\6\0\1\235\27\6\11\0\1\6"+
285     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\12\6"+
286     "\1\236\15\6\11\0\1\6\4\0\4\6\2\0\1\76"+
287     "\12\0\1\6\6\0\1\237\27\6\11\0\1\6\4\0"+
288     "\4\6\2\0\1\76\12\0\1\6\6\0\6\6\1\240"+
289     "\21\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
290     "\1\6\6\0\1\6\1\241\26\6\11\0\1\6\4\0"+
291     "\4\6\2\0\1\76\12\0\1\6\6\0\4\6\1\242"+
292     "\23\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
293     "\1\6\6\0\6\6\1\243\21\6\11\0\1\6\4\0"+
294     "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\244"+
295     "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
296     "\1\6\6\0\11\6\1\245\16\6\11\0\1\6\4\0"+
297     "\4\6\2\0\1\76\12\0\1\6\6\0\3\6\1\246"+
298     "\24\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
299     "\1\6\6\0\6\6\1\247\21\6\11\0\1\6\4\0"+
300     "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\250"+
301     "\25\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
302     "\1\6\6\0\6\6\1\251\13\6\1\252\5\6\11\0"+
303     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
304     "\1\6\1\253\26\6\11\0\1\6\74\0\1\254\6\0"+
305     "\2\255\16\0\1\255\6\0\1\255\2\0\1\255\4\0"+
306     "\1\255\4\0\2\255\1\0\1\255\115\0\1\256\6\0"+
307     "\1\202\17\0\1\100\16\0\1\100\36\0\1\203\74\0"+
308     "\1\113\1\0\1\113\10\0\1\115\5\0\1\113\6\0"+
309     "\30\113\11\0\1\113\15\0\1\212\1\257\63\0\4\213"+
310     "\11\0\1\211\3\0\1\213\6\0\30\213\11\0\1\213"+
311     "\3\0\26\216\1\260\54\216\2\125\1\216\1\125\6\216"+
312     "\3\125\1\216\1\125\1\216\1\261\1\217\1\216\1\125"+
313     "\34\216\2\125\1\216\1\125\5\216\37\0\1\262\37\0"+
314     "\4\6\2\0\1\76\12\0\1\6\6\0\3\6\1\263"+
315     "\24\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
316     "\1\6\6\0\10\6\1\264\17\6\11\0\1\6\4\0"+
317     "\4\6\2\0\1\76\12\0\1\6\6\0\6\6\1\265"+
318     "\21\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
319     "\1\6\6\0\5\6\1\266\22\6\11\0\1\6\4\0"+
320     "\4\6\2\0\1\76\12\0\1\6\6\0\6\6\1\267"+
321     "\21\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
322     "\1\6\6\0\4\6\1\270\23\6\11\0\1\6\4\0"+
323     "\4\6\2\0\1\76\12\0\1\6\6\0\1\6\1\271"+
324     "\26\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
325     "\1\6\6\0\11\6\1\272\16\6\11\0\1\6\4\0"+
326     "\4\6\2\0\1\76\12\0\1\6\6\0\11\6\1\273"+
327     "\16\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
328     "\1\6\6\0\10\6\1\274\17\6\11\0\1\6\4\0"+
329     "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\275"+
330     "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
331     "\1\6\6\0\10\6\1\276\17\6\11\0\1\6\4\0"+
332     "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\277"+
333     "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
334     "\1\6\6\0\1\6\1\300\26\6\11\0\1\6\4\0"+
335     "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\301"+
336     "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
337     "\1\6\6\0\10\6\1\302\17\6\11\0\1\6\4\0"+
338     "\4\6\2\0\1\76\12\0\1\6\6\0\7\6\1\303"+
339     "\20\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
340     "\1\6\6\0\2\6\1\304\6\6\1\305\16\6\11\0"+
341     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
342     "\12\6\1\306\15\6\11\0\1\6\4\0\4\6\2\0"+
343     "\1\76\12\0\1\6\6\0\12\6\1\307\15\6\11\0"+
344     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
345     "\3\6\1\310\24\6\11\0\1\6\4\0\4\6\2\0"+
346     "\1\76\12\0\1\6\6\0\5\6\1\311\22\6\11\0"+
347     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
348     "\16\6\1\312\11\6\11\0\1\6\4\0\4\6\2\0"+
349     "\1\76\12\0\1\6\6\0\22\6\1\313\5\6\11\0"+
350     "\1\6\5\0\2\314\16\0\1\314\6\0\1\314\2\0"+
351     "\1\314\4\0\1\314\4\0\2\314\1\0\1\314\42\0"+
352     "\1\211\57\0\25\216\1\315\1\260\47\216\47\0\1\316"+
353     "\27\0\4\6\2\0\1\76\12\0\1\6\6\0\4\6"+
354     "\1\317\23\6\11\0\1\6\4\0\4\6\2\0\1\76"+
355     "\12\0\1\6\6\0\12\6\1\320\15\6\11\0\1\6"+
356     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+
357     "\1\321\25\6\11\0\1\6\4\0\4\6\2\0\1\76"+
358     "\12\0\1\6\6\0\17\6\1\322\10\6\11\0\1\6"+
359     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\3\6"+
360     "\1\323\24\6\11\0\1\6\4\0\4\6\2\0\1\76"+
361     "\12\0\1\6\6\0\14\6\1\324\13\6\11\0\1\6"+
362     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+
363     "\1\325\25\6\11\0\1\6\4\0\4\6\2\0\1\76"+
364     "\12\0\1\6\6\0\12\6\1\326\15\6\11\0\1\6"+
365     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\11\6"+
366     "\1\327\16\6\11\0\1\6\4\0\4\6\2\0\1\76"+
367     "\12\0\1\6\6\0\16\6\1\330\11\6\11\0\1\6"+
368     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+
369     "\1\331\25\6\11\0\1\6\4\0\4\6\2\0\1\76"+
370     "\12\0\1\6\6\0\11\6\1\332\16\6\11\0\1\6"+
371     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\16\6"+
372     "\1\333\11\6\11\0\1\6\4\0\4\6\2\0\1\76"+
373     "\12\0\1\6\6\0\10\6\1\334\17\6\11\0\1\6"+
374     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\6\6"+
375     "\1\335\21\6\11\0\1\6\4\0\4\6\2\0\1\76"+
376     "\12\0\1\6\6\0\12\6\1\336\15\6\11\0\1\6"+
377     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\25\6"+
378     "\1\337\2\6\11\0\1\6\4\0\4\6\2\0\1\76"+
379     "\12\0\1\6\6\0\7\6\1\340\20\6\11\0\1\6"+
380     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\5\6"+
381     "\1\341\22\6\11\0\1\6\5\0\2\342\16\0\1\342"+
382     "\6\0\1\342\2\0\1\342\4\0\1\342\4\0\2\342"+
383     "\1\0\1\342\64\0\1\343\36\0\4\6\2\0\1\76"+
384     "\12\0\1\6\6\0\4\6\1\344\23\6\11\0\1\6"+
385     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\10\6"+
386     "\1\345\17\6\11\0\1\6\4\0\4\6\2\0\1\76"+
387     "\12\0\1\6\6\0\3\6\1\346\24\6\11\0\1\6"+
388     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+
389     "\1\347\1\6\1\350\23\6\11\0\1\6\4\0\4\6"+
390     "\2\0\1\76\12\0\1\6\6\0\11\6\1\351\16\6"+
391     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
392     "\6\0\20\6\1\352\7\6\11\0\1\6\4\0\4\6"+
393     "\2\0\1\76\12\0\1\6\6\0\6\6\1\353\21\6"+
394     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
395     "\6\0\1\354\27\6\11\0\1\6\4\0\4\6\2\0"+
396     "\1\76\12\0\1\6\6\0\23\6\1\355\4\6\11\0"+
397     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
398     "\6\6\1\356\21\6\11\0\1\6\4\0\4\6\2\0"+
399     "\1\76\12\0\1\6\6\0\16\6\1\357\11\6\11\0"+
400     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
401     "\20\6\1\360\7\6\11\0\1\6\4\0\4\6\2\0"+
402     "\1\76\12\0\1\6\6\0\6\6\1\361\21\6\11\0"+
403     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
404     "\2\6\1\362\25\6\11\0\1\6\4\0\4\6\2\0"+
405     "\1\76\12\0\1\6\6\0\5\6\1\363\22\6\11\0"+
406     "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+
407     "\11\6\1\364\16\6\11\0\1\6\5\0\2\365\16\0"+
408     "\1\365\6\0\1\365\2\0\1\365\4\0\1\365\4\0"+
409     "\2\365\1\0\1\365\25\0\4\6\2\0\1\76\12\0"+
410     "\1\6\6\0\6\6\1\366\21\6\11\0\1\6\4\0"+
411     "\4\6\2\0\1\76\12\0\1\6\6\0\16\6\1\367"+
412     "\11\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
413     "\1\6\6\0\16\6\1\370\11\6\11\0\1\6\4\0"+
414     "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\371"+
415     "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+
416     "\1\6\6\0\27\6\1\372\11\0\1\6\4\0\4\6"+
417     "\2\0\1\76\12\0\1\6\6\0\1\6\1\373\26\6"+
418     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
419     "\6\0\10\6\1\374\17\6\11\0\1\6\4\0\4\6"+
420     "\2\0\1\76\12\0\1\6\6\0\12\6\1\375\15\6"+
421     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
422     "\1\0\1\376\4\0\30\6\11\0\1\6\4\0\4\6"+
423     "\2\0\1\76\12\0\1\6\6\0\3\6\1\377\24\6"+
424     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
425     "\6\0\11\6\1\u0100\16\6\11\0\1\6\4\0\4\6"+
426     "\2\0\1\76\12\0\1\6\6\0\23\6\1\u0101\4\6"+
427     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
428     "\6\0\6\6\1\u0102\21\6\11\0\1\6\4\0\4\6"+
429     "\2\0\1\76\12\0\1\6\6\0\10\6\1\u0103\17\6"+
430     "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+
431     "\6\0\3\6\1\u0104\24\6\11\0\1\6\4\0\4\6"+
432     "\2\0\1\76\12\0\1\6\6\0\2\6\1\u0105\25\6"+
433     "\11\0\1\6\27\0\1\376\4\0\1\u0106\17\0\1\u0107"+
434     "\25\0\4\6\2\0\1\76\12\0\1\6\6\0\5\6"+
435     "\1\u0108\22\6\11\0\1\6\4\0\4\6\2\0\1\76"+
436     "\12\0\1\6\6\0\23\6\1\u0109\4\6\11\0\1\6"+
437     "\4\0\4\6\2\0\1\76\12\0\1\6\1\0\1\u010a"+
438     "\4\0\30\6\11\0\1\6\4\0\4\6\2\0\1\76"+
439     "\12\0\1\6\1\0\1\u010b\4\0\30\6\11\0\1\6"+
440     "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\25\6"+
441     "\1\u010c\2\6\11\0\1\6\4\0\4\6\2\0\1\76"+
442     "\12\0\1\6\6\0\21\6\1\u010d\6\6\11\0\1\6"+
443     "\41\0\1\u010e\75\0\1\u010f\40\0\4\6\2\0\1\76"+
444     "\12\0\1\6\6\0\11\6\1\u0110\16\6\11\0\1\6"+
445     "\27\0\1\u010a\6\0\1\u0111\66\0\1\u010b\6\0\1\u0112"+
446     "\43\0\4\6\2\0\1\76\12\0\1\6\6\0\3\6"+
447     "\1\u0113\24\6\11\0\1\6\4\0\4\6\2\0\1\76"+
448     "\12\0\1\6\6\0\3\6\1\u0114\24\6\11\0\1\6"+
449     "\36\0\1\u0115\105\0\1\u0116\33\0\4\6\2\0\1\76"+
450     "\12\0\1\6\6\0\6\6\1\u0117\21\6\11\0\1\6"+
451     "\44\0\1\u0118\101\0\1\u0119\31\0\4\6\2\0\1\76"+
452     "\12\0\1\6\6\0\6\6\1\u011a\21\6\11\0\1\6"+
453     "\46\0\1\u011b\71\0\1\u011c\73\0\1\u011d\75\0\1\u011e"+
454     "\41\0\4\6\2\0\1\76\12\0\1\6\6\0\5\6"+
455     "\1\u011f\22\6\11\0\1\6\42\0\1\u0120\74\0\1\u0121"+
456     "\73\0\1\u0122\102\0\1\u0123\35\0\4\6\2\0\1\76"+
457     "\12\0\1\6\6\0\1\6\1\u0124\26\6\11\0\1\6"+
458     "\45\0\1\u0125\72\0\1\u0126\37\0\4\6\2\0\1\76"+
459     "\12\0\1\6\6\0\11\6\1\u0127\16\6\11\0\1\6"+
460     "\52\0\1\u0128\64\0\1\u0129\76\0\1\u012a\70\0\1\u012b"+
461     "\105\0\1\u012c\33\0";
462
463   private static int [] zzUnpackTrans() {
464     int [] result = new int[13640];
465     int offset = 0;
466     offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
467     return result;
468   }
469
470   private static int zzUnpackTrans(String packed, int offset, int [] result) {
471     int i = 0;       /* index in packed string  */
472     int j = offset;  /* index in unpacked array */
473     int l = packed.length();
474     while (i < l) {
475       int count = packed.charAt(i++);
476       int value = packed.charAt(i++);
477       value--;
478       do result[j++] = value; while (--count > 0);
479     }
480     return j;
481   }
482
483
484   /* error codes */
485   private static final int ZZ_UNKNOWN_ERROR = 0;
486   private static final int ZZ_NO_MATCH = 1;
487   private static final int ZZ_PUSHBACK_2BIG = 2;
488
489   /* error messages for the codes above */
490   private static final String ZZ_ERROR_MSG[] = {
491     "Unknown internal scanner error",
492     "Error: could not match input",
493     "Error: pushback value was too large"
494   };
495
496   /**
497    * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
498    */
499   private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
500
501   private static final String ZZ_ATTRIBUTE_PACKED_0 =
502     "\3\0\1\10\1\11\10\1\2\11\10\1\1\11\17\1"+
503     "\4\11\2\1\1\11\3\1\2\11\2\1\1\0\2\11"+
504     "\4\1\1\11\5\0\1\1\1\11\2\1\3\0\1\1"+
505     "\4\0\7\1\2\0\40\1\1\0\5\11\1\1\1\11"+
506     "\2\0\2\1\1\0\3\11\1\0\1\11\2\0\1\11"+
507     "\1\1\1\0\1\1\1\0\33\1\1\11\1\0\1\11"+
508     "\2\0\1\1\1\0\31\1\1\0\1\11\1\0\23\1"+
509     "\1\0\1\11\21\1\1\11\10\1\1\0\7\1\2\0"+
510     "\2\1\2\0\2\1\2\0\1\1\2\0\2\1\2\0"+
511     "\1\1\2\0\1\1\4\0\1\1\1\11\2\0\1\11"+
512     "\1\1\2\0\1\1\2\0\1\11\1\0\1\11";
513
514   private static int [] zzUnpackAttribute() {
515     int [] result = new int[300];
516     int offset = 0;
517     offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
518     return result;
519   }
520
521   private static int zzUnpackAttribute(String packed, int offset, int [] result) {
522     int i = 0;       /* index in packed string  */
523     int j = offset;  /* index in unpacked array */
524     int l = packed.length();
525     while (i < l) {
526       int count = packed.charAt(i++);
527       int value = packed.charAt(i++);
528       do result[j++] = value; while (--count > 0);
529     }
530     return j;
531   }
532
533   /** the input device */
534   private java.io.Reader zzReader;
535
536   /** the current state of the DFA */
537   private int zzState;
538
539   /** the current lexical state */
540   private int zzLexicalState = YYINITIAL;
541
542   /** this buffer contains the current text to be matched and is
543       the source of the yytext() string */
544   private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
545
546   /** the textposition at the last accepting state */
547   private int zzMarkedPos;
548
549   /** the current text position in the buffer */
550   private int zzCurrentPos;
551
552   /** startRead marks the beginning of the yytext() string in the buffer */
553   private int zzStartRead;
554
555   /** endRead marks the last character in the buffer, that has been read
556       from input */
557   private int zzEndRead;
558
559   /** number of newlines encountered up to the start of the matched text */
560   private int yyline;
561
562   /** the number of characters up to the start of the matched text */
563   private int yychar;
564
565   /**
566    * the number of characters from the last newline up to the start of the 
567    * matched text
568    */
569   private int yycolumn;
570
571   /** 
572    * zzAtBOL == true <=> the scanner is currently at the beginning of a line
573    */
574   private boolean zzAtBOL = true;
575
576   /** zzAtEOF == true <=> the scanner is at the EOF */
577   private boolean zzAtEOF;
578
579   /** denotes if the user-EOF-code has already been executed */
580   private boolean zzEOFDone;
581   
582   /** 
583    * The number of occupied positions in zzBuffer beyond zzEndRead.
584    * When a lead/high surrogate has been read from the input stream
585    * into the final zzBuffer position, this will have a value of 1;
586    * otherwise, it will have a value of 0.
587    */
588   private int zzFinalHighSurrogate = 0;
589
590   /* user code: */
591     public SCLParserOptions options = SCLParserOptions.DEFAULT;
592     int stringStart;
593     TIntArrayList parenCountStack = new TIntArrayList(2);
594     int parenCount = 0;
595     TIntArrayList stateStack = new TIntArrayList(2);
596
597     StringBuffer string = new StringBuffer();
598     CompilationContext context;
599     
600     private Token sym(int id) {
601         return new Token(id, yychar, yychar+yylength(), yytext());
602     }
603     private Token sym(int id, String text) {
604         return new Token(id, yychar, yychar+yylength(), text);
605     }
606     public void setCompilationContext(CompilationContext context) {
607         this.context = context;
608     }
609     public boolean supportCHR() {
610         return context.header == null ? false : context.header.chr;
611     }
612     public boolean supportEDO() {
613         return context.header == null ? false : context.header.edo;
614     }
615
616
617   /**
618    * Creates a new scanner
619    *
620    * @param   in  the java.io.Reader to read input from.
621    */
622   public SCLLexer(java.io.Reader in) {
623     this.zzReader = in;
624   }
625
626
627   /** 
628    * Unpacks the compressed character translation table.
629    *
630    * @param packed   the packed character translation table
631    * @return         the unpacked character translation table
632    */
633   private static char [] zzUnpackCMap(String packed) {
634     char [] map = new char[0x110000];
635     int i = 0;  /* index in packed string  */
636     int j = 0;  /* index in unpacked array */
637     while (i < 190) {
638       int  count = packed.charAt(i++);
639       char value = packed.charAt(i++);
640       do map[j++] = value; while (--count > 0);
641     }
642     return map;
643   }
644
645
646   /**
647    * Refills the input buffer.
648    *
649    * @return      <code>false</code>, iff there was new input.
650    * 
651    * @exception   java.io.IOException  if any I/O-Error occurs
652    */
653   private boolean zzRefill() throws java.io.IOException {
654
655     /* first: make room (if you can) */
656     if (zzStartRead > 0) {
657       zzEndRead += zzFinalHighSurrogate;
658       zzFinalHighSurrogate = 0;
659       System.arraycopy(zzBuffer, zzStartRead,
660                        zzBuffer, 0,
661                        zzEndRead-zzStartRead);
662
663       /* translate stored positions */
664       zzEndRead-= zzStartRead;
665       zzCurrentPos-= zzStartRead;
666       zzMarkedPos-= zzStartRead;
667       zzStartRead = 0;
668     }
669
670     /* is the buffer big enough? */
671     if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
672       /* if not: blow it up */
673       char newBuffer[] = new char[zzBuffer.length*2];
674       System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
675       zzBuffer = newBuffer;
676       zzEndRead += zzFinalHighSurrogate;
677       zzFinalHighSurrogate = 0;
678     }
679
680     /* fill the buffer with new input */
681     int requested = zzBuffer.length - zzEndRead;
682     int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
683
684     /* not supposed to occur according to specification of java.io.Reader */
685     if (numRead == 0) {
686       throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
687     }
688     if (numRead > 0) {
689       zzEndRead += numRead;
690       /* If numRead == requested, we might have requested to few chars to
691          encode a full Unicode character. We assume that a Reader would
692          otherwise never return half characters. */
693       if (numRead == requested) {
694         if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
695           --zzEndRead;
696           zzFinalHighSurrogate = 1;
697         }
698       }
699       /* potentially more input available */
700       return false;
701     }
702
703     /* numRead < 0 ==> end of stream */
704     return true;
705   }
706
707     
708   /**
709    * Closes the input stream.
710    */
711   public final void yyclose() throws java.io.IOException {
712     zzAtEOF = true;            /* indicate end of file */
713     zzEndRead = zzStartRead;  /* invalidate buffer    */
714
715     if (zzReader != null)
716       zzReader.close();
717   }
718
719
720   /**
721    * Resets the scanner to read from a new input stream.
722    * Does not close the old reader.
723    *
724    * All internal variables are reset, the old input stream 
725    * <b>cannot</b> be reused (internal buffer is discarded and lost).
726    * Lexical state is set to <tt>ZZ_INITIAL</tt>.
727    *
728    * Internal scan buffer is resized down to its initial length, if it has grown.
729    *
730    * @param reader   the new input stream 
731    */
732   public final void yyreset(java.io.Reader reader) {
733     zzReader = reader;
734     zzAtBOL  = true;
735     zzAtEOF  = false;
736     zzEOFDone = false;
737     zzEndRead = zzStartRead = 0;
738     zzCurrentPos = zzMarkedPos = 0;
739     zzFinalHighSurrogate = 0;
740     yyline = yychar = yycolumn = 0;
741     zzLexicalState = YYINITIAL;
742     if (zzBuffer.length > ZZ_BUFFERSIZE)
743       zzBuffer = new char[ZZ_BUFFERSIZE];
744   }
745
746
747   /**
748    * Returns the current lexical state.
749    */
750   public final int yystate() {
751     return zzLexicalState;
752   }
753
754
755   /**
756    * Enters a new lexical state
757    *
758    * @param newState the new lexical state
759    */
760   public final void yybegin(int newState) {
761     zzLexicalState = newState;
762   }
763
764
765   /**
766    * Returns the text matched by the current regular expression.
767    */
768   public final String yytext() {
769     return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
770   }
771
772
773   /**
774    * Returns the character at position <tt>pos</tt> from the 
775    * matched text. 
776    * 
777    * It is equivalent to yytext().charAt(pos), but faster
778    *
779    * @param pos the position of the character to fetch. 
780    *            A value from 0 to yylength()-1.
781    *
782    * @return the character at position pos
783    */
784   public final char yycharat(int pos) {
785     return zzBuffer[zzStartRead+pos];
786   }
787
788
789   /**
790    * Returns the length of the matched text region.
791    */
792   public final int yylength() {
793     return zzMarkedPos-zzStartRead;
794   }
795
796
797   /**
798    * Reports an error that occured while scanning.
799    *
800    * In a wellformed scanner (no or only correct usage of 
801    * yypushback(int) and a match-all fallback rule) this method 
802    * will only be called with things that "Can't Possibly Happen".
803    * If this method is called, something is seriously wrong
804    * (e.g. a JFlex bug producing a faulty scanner etc.).
805    *
806    * Usual syntax/scanner level error handling should be done
807    * in error fallback rules.
808    *
809    * @param   errorCode  the code of the errormessage to display
810    */
811   private void zzScanError(int errorCode) throws RuntimeException {
812     String message;
813     try {
814       message = ZZ_ERROR_MSG[errorCode];
815     }
816     catch (ArrayIndexOutOfBoundsException e) {
817       message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
818     }
819
820     throw new RuntimeException(message);
821   } 
822
823
824   /**
825    * Pushes the specified amount of characters back into the input stream.
826    *
827    * They will be read again by then next call of the scanning method
828    *
829    * @param number  the number of characters to be read again.
830    *                This number must not be greater than yylength()!
831    */
832   public void yypushback(int number)  throws RuntimeException {
833     if ( number > yylength() )
834       zzScanError(ZZ_PUSHBACK_2BIG);
835
836     zzMarkedPos -= number;
837   }
838
839
840   /**
841    * Resumes scanning until the next regular expression is matched,
842    * the end of input is encountered or an I/O-Error occurs.
843    *
844    * @return      the next token
845    * @exception   java.io.IOException  if any I/O-Error occurs
846    */
847   public Token nextToken() throws java.io.IOException, SCLSyntaxErrorException, RuntimeException {
848     int zzInput;
849     int zzAction;
850
851     // cached fields:
852     int zzCurrentPosL;
853     int zzMarkedPosL;
854     int zzEndReadL = zzEndRead;
855     char [] zzBufferL = zzBuffer;
856     char [] zzCMapL = ZZ_CMAP;
857
858     int [] zzTransL = ZZ_TRANS;
859     int [] zzRowMapL = ZZ_ROWMAP;
860     int [] zzAttrL = ZZ_ATTRIBUTE;
861
862     while (true) {
863       zzMarkedPosL = zzMarkedPos;
864
865       yychar+= zzMarkedPosL-zzStartRead;
866
867       zzAction = -1;
868
869       zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
870   
871       zzState = ZZ_LEXSTATE[zzLexicalState];
872
873       // set up zzAction for empty match case:
874       int zzAttributes = zzAttrL[zzState];
875       if ( (zzAttributes & 1) == 1 ) {
876         zzAction = zzState;
877       }
878
879
880       zzForAction: {
881         while (true) {
882     
883           if (zzCurrentPosL < zzEndReadL) {
884             zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
885             zzCurrentPosL += Character.charCount(zzInput);
886           }
887           else if (zzAtEOF) {
888             zzInput = YYEOF;
889             break zzForAction;
890           }
891           else {
892             // store back cached positions
893             zzCurrentPos  = zzCurrentPosL;
894             zzMarkedPos   = zzMarkedPosL;
895             boolean eof = zzRefill();
896             // get translated positions and possibly new buffer
897             zzCurrentPosL  = zzCurrentPos;
898             zzMarkedPosL   = zzMarkedPos;
899             zzBufferL      = zzBuffer;
900             zzEndReadL     = zzEndRead;
901             if (eof) {
902               zzInput = YYEOF;
903               break zzForAction;
904             }
905             else {
906               zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
907               zzCurrentPosL += Character.charCount(zzInput);
908             }
909           }
910           int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
911           if (zzNext == -1) break zzForAction;
912           zzState = zzNext;
913
914           zzAttributes = zzAttrL[zzState];
915           if ( (zzAttributes & 1) == 1 ) {
916             zzAction = zzState;
917             zzMarkedPosL = zzCurrentPosL;
918             if ( (zzAttributes & 8) == 8 ) break zzForAction;
919           }
920
921         }
922       }
923
924       // store back cached position
925       zzMarkedPos = zzMarkedPosL;
926
927       if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
928         zzAtEOF = true;
929             switch (zzLexicalState) {
930             case STRING: {
931               throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
932             }
933             case 301: break;
934             case LONG_STRING: {
935               throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
936             }
937             case 302: break;
938             default:
939           {     return sym(SCLTerminals.EOF);
940  }
941         }
942       }
943       else {
944         switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
945           case 1: 
946             { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Illegal character '" + yytext() + "'.");
947             }
948           case 99: break;
949           case 2: 
950             { return sym(SCLTerminals.ID);
951             }
952           case 100: break;
953           case 3: 
954             { return sym(SCLTerminals.INTEGER);
955             }
956           case 101: break;
957           case 4: 
958             { return sym(SCLTerminals.SYMBOL, yytext().trim());
959             }
960           case 102: break;
961           case 5: 
962             { return sym(SCLTerminals.ATTACHED_HASH, "#");
963             }
964           case 103: break;
965           case 6: 
966             { return sym(SCLTerminals.ATTACHED_DOT, ".");
967             }
968           case 104: break;
969           case 7: 
970             { return sym(SCLTerminals.AT);
971             }
972           case 105: break;
973           case 8: 
974             { ++parenCount; return sym(SCLTerminals.LPAREN);
975             }
976           case 106: break;
977           case 9: 
978             { return sym(SCLTerminals.COMMA);
979             }
980           case 107: break;
981           case 10: 
982             { --parenCount;
983                     if(parenCount == 0 && !parenCountStack.isEmpty()) { 
984                        parenCount = parenCountStack.removeAt(parenCountStack.size()-1);
985                        string.setLength(0);
986                        stringStart=yychar;
987                        yybegin(stateStack.removeAt(stateStack.size()-1));
988                        return sym(SCLTerminals.CONTINUE_STRING);
989                     }
990                     else
991                        return sym(SCLTerminals.RPAREN);
992             }
993           case 108: break;
994           case 11: 
995             { return new Token(SCLTerminals.EOL, yychar, yychar+yylength(), "");
996             }
997           case 109: break;
998           case 12: 
999             { return sym(SCLTerminals.LESS, "<");
1000             }
1001           case 110: break;
1002           case 13: 
1003             { return sym(SCLTerminals.GREATER, ">");
1004             }
1005           case 111: break;
1006           case 14: 
1007             { return sym(SCLTerminals.MINUS, "-");
1008             }
1009           case 112: break;
1010           case 15: 
1011             { 
1012             }
1013           case 113: break;
1014           case 16: 
1015             { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Character does not conform to UTF-8 encoding.");
1016             }
1017           case 114: break;
1018           case 17: 
1019             { return sym(SCLTerminals.LAMBDA);
1020             }
1021           case 115: break;
1022           case 18: 
1023             { return sym(SCLTerminals.LBRACE);
1024             }
1025           case 116: break;
1026           case 19: 
1027             { return sym(SCLTerminals.RBRACE);
1028             }
1029           case 117: break;
1030           case 20: 
1031             { return sym(SCLTerminals.LBRACKET);
1032             }
1033           case 118: break;
1034           case 21: 
1035             { return sym(SCLTerminals.RBRACKET);
1036             }
1037           case 119: break;
1038           case 22: 
1039             { return sym(SCLTerminals.EQUALS);
1040             }
1041           case 120: break;
1042           case 23: 
1043             { return sym(SCLTerminals.COLON);
1044             }
1045           case 121: break;
1046           case 24: 
1047             { return sym(SCLTerminals.SEMICOLON);
1048             }
1049           case 122: break;
1050           case 25: 
1051             { return sym(SCLTerminals.BAR);
1052             }
1053           case 123: break;
1054           case 26: 
1055             { string.setLength(0); stringStart=yychar; yybegin(STRING); return sym(SCLTerminals.BEGIN_STRING);
1056             }
1057           case 124: break;
1058           case 27: 
1059             { return sym(SCLTerminals.BLANK);
1060             }
1061           case 125: break;
1062           case 28: 
1063             { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Tabulator is not allowed except inside string literals.");
1064             }
1065           case 126: break;
1066           case 29: 
1067             { string.append( yytext() );
1068             }
1069           case 127: break;
1070           case 30: 
1071             { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal.");
1072             }
1073           case 128: break;
1074           case 31: 
1075             { yybegin(YYINITIAL); 
1076                     return new Token(SCLTerminals.END_STRING, stringStart, yychar+1, string.toString());
1077             }
1078           case 129: break;
1079           case 32: 
1080             { string.append('\n');
1081             }
1082           case 130: break;
1083           case 33: 
1084             { return sym(SCLTerminals.DOTDOT, ".");
1085             }
1086           case 131: break;
1087           case 34: 
1088             { return sym(SCLTerminals.SEPARATED_DOT, ".");
1089             }
1090           case 132: break;
1091           case 35: 
1092             { return sym(SCLTerminals.ANNOTATION_ID);
1093             }
1094           case 133: break;
1095           case 36: 
1096             { return sym(SCLTerminals.DOUBLE_LESS, "<<");
1097             }
1098           case 134: break;
1099           case 37: 
1100             { return sym(SCLTerminals.BINDS);
1101             }
1102           case 135: break;
1103           case 38: 
1104             { return sym(SCLTerminals.DOUBLE_GREATER, ">>");
1105             }
1106           case 136: break;
1107           case 39: 
1108             { return sym(SCLTerminals.ARROW);
1109             }
1110           case 137: break;
1111           case 40: 
1112             { return sym(SCLTerminals.COMMENT);
1113             }
1114           case 138: break;
1115           case 41: 
1116             { return sym(SCLTerminals.AS);
1117             }
1118           case 139: break;
1119           case 42: 
1120             { return sym(SCLTerminals.IF);
1121             }
1122           case 140: break;
1123           case 43: 
1124             { return sym(SCLTerminals.IN);
1125             }
1126           case 141: break;
1127           case 44: 
1128             { return sym(options.supportEq ? SCLTerminals.EQ : SCLTerminals.ID);
1129             }
1130           case 142: break;
1131           case 45: 
1132             { return sym(SCLTerminals.BY);
1133             }
1134           case 143: break;
1135           case 46: 
1136             { return sym(SCLTerminals.DO);
1137             }
1138           case 144: break;
1139           case 47: 
1140             { return sym(SCLTerminals.IMPLIES);
1141             }
1142           case 145: break;
1143           case 48: 
1144             { return sym(SCLTerminals.FOLLOWS);
1145             }
1146           case 146: break;
1147           case 49: 
1148             { return sym(SCLTerminals.HASTYPE);
1149             }
1150           case 147: break;
1151           case 50: 
1152             { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Illegal string escape character.");
1153             }
1154           case 148: break;
1155           case 51: 
1156             { string.append(yytext().substring(1));
1157             }
1158           case 149: break;
1159           case 52: 
1160             { parenCountStack.add(parenCount);
1161                     parenCount = 1;
1162                     stateStack.add(STRING);
1163                     yybegin(YYINITIAL); 
1164                     return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
1165             }
1166           case 150: break;
1167           case 53: 
1168             { string.append('\r');
1169             }
1170           case 151: break;
1171           case 54: 
1172             { string.append('\t');
1173             }
1174           case 152: break;
1175           case 55: 
1176             { parenCountStack.add(parenCount);
1177                     parenCount = 1;
1178                     stateStack.add(LONG_STRING);
1179                     yybegin(YYINITIAL); 
1180                     return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString());
1181             }
1182           case 153: break;
1183           case 56: 
1184             { return sym(SCLTerminals.FLOAT);
1185             }
1186           case 154: break;
1187           case 57: 
1188             { return sym(SCLTerminals.CHAR);
1189             }
1190           case 155: break;
1191           case 58: 
1192             { String text = yytext();
1193                      return sym(SCLTerminals.ID, text.substring(1, text.length()-1));
1194             }
1195           case 156: break;
1196           case 59: 
1197             { String text = yytext();
1198                      return sym(SCLTerminals.SYMBOL, text.substring(1, text.length()-1));
1199             }
1200           case 157: break;
1201           case 60: 
1202             { return sym(SCLTerminals.QUERY_OP);
1203             }
1204           case 158: break;
1205           case 61: 
1206             { return sym(SCLTerminals.LET);
1207             }
1208           case 159: break;
1209           case 62: 
1210             { return sym(supportEDO() ? SCLTerminals.EDO : SCLTerminals.ID);
1211             }
1212           case 160: break;
1213           case 63: 
1214             { return sym(SCLTerminals.MDO);
1215             }
1216           case 161: break;
1217           case 64: 
1218             { string.setLength(0); stringStart=yychar; yybegin(LONG_STRING); return sym(SCLTerminals.BEGIN_STRING);
1219             }
1220           case 162: break;
1221           case 65: 
1222             { yybegin(YYINITIAL); 
1223                       return new Token(SCLTerminals.END_STRING, stringStart, yychar+3, string.toString());
1224             }
1225           case 163: break;
1226           case 66: 
1227             { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.RULE);
1228             }
1229           case 164: break;
1230           case 67: 
1231             { return sym(SCLTerminals.THEN);
1232             }
1233           case 165: break;
1234           case 68: 
1235             { return sym(SCLTerminals.TYPE);
1236             }
1237           case 166: break;
1238           case 69: 
1239             { return sym(SCLTerminals.ELSE);
1240             }
1241           case 167: break;
1242           case 70: 
1243             { return sym(SCLTerminals.WITH);
1244             }
1245           case 168: break;
1246           case 71: 
1247             { return sym(SCLTerminals.WHEN);
1248             }
1249           case 169: break;
1250           case 72: 
1251             { return sym(SCLTerminals.DATA);
1252             }
1253           case 170: break;
1254           case 73: 
1255             { return sym(SCLTerminals.INFIX);
1256             }
1257           case 171: break;
1258           case 74: 
1259             { return sym(SCLTerminals.WHERE);
1260             }
1261           case 172: break;
1262           case 75: 
1263             { return sym(SCLTerminals.CLASS);
1264             }
1265           case 173: break;
1266           case 76: 
1267             { return sym(SCLTerminals.MATCH);
1268             }
1269           case 174: break;
1270           case 77: 
1271             { return sym(SCLTerminals.LAMBDA_MATCH);
1272             }
1273           case 175: break;
1274           case 78: 
1275             { return sym(SCLTerminals.FORALL);
1276             }
1277           case 176: break;
1278           case 79: 
1279             { return sym(SCLTerminals.INFIXR);
1280             }
1281           case 177: break;
1282           case 80: 
1283             { return sym(SCLTerminals.INFIXL);
1284             }
1285           case 178: break;
1286           case 81: 
1287             { return sym(SCLTerminals.IMPORT);
1288             }
1289           case 179: break;
1290           case 82: 
1291             { return sym(SCLTerminals.HIDING);
1292             }
1293           case 180: break;
1294           case 83: 
1295             { return sym(SCLTerminals.EFFECT);
1296             }
1297           case 181: break;
1298           case 84: 
1299             { return sym(supportCHR() ? SCLTerminals.CHR_SELECT : SCLTerminals.SELECT);
1300             }
1301           case 182: break;
1302           case 85: 
1303             { string.append((char)Integer.parseInt(yytext().substring(2), 16));
1304             }
1305           case 183: break;
1306           case 86: 
1307             { return sym(supportCHR() ? SCLTerminals.RULESET : SCLTerminals.ID);
1308             }
1309           case 184: break;
1310           case 87: 
1311             { return sym(SCLTerminals.INCLUDE);
1312             }
1313           case 185: break;
1314           case 88: 
1315             { return sym(SCLTerminals.ENFORCE);
1316             }
1317           case 186: break;
1318           case 89: 
1319             { return sym(SCLTerminals.EXTENDS);
1320             }
1321           case 187: break;
1322           case 90: 
1323             { return sym(SCLTerminals.INSTANCE);
1324             }
1325           case 188: break;
1326           case 91: 
1327             { return sym(SCLTerminals.DERIVING);
1328             }
1329           case 189: break;
1330           case 92: 
1331             { return sym(SCLTerminals.IMPORTJAVA);
1332             }
1333           case 190: break;
1334           case 93: 
1335             { return sym(SCLTerminals.CONSTRAINT);
1336             }
1337           case 191: break;
1338           case 94: 
1339             { return sym(SCLTerminals.SELECT_FIRST);
1340             }
1341           case 192: break;
1342           case 95: 
1343             { return sym(SCLTerminals.ABSTRACT_RULE);
1344             }
1345           case 193: break;
1346           case 96: 
1347             { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.TRANSFORMATION);
1348             }
1349           case 194: break;
1350           case 97: 
1351             { return sym(SCLTerminals.SELECT_DISTINCT);
1352             }
1353           case 195: break;
1354           case 98: 
1355             { return sym(SCLTerminals.MAPPING_RELATION);
1356             }
1357           case 196: break;
1358           default:
1359             zzScanError(ZZ_NO_MATCH);
1360         }
1361       }
1362     }
1363   }
1364
1365
1366 }