[project @ 1996-01-08 20:28:12 by partain]
[ghc.git] / ghc / compiler / yaccParser / hslexer.c
1 /* A lexical scanner generated by flex */
2
3 /* Scanner skeleton version:
4 * $Header: /srv/cvs/cvs.haskell.org/fptools/ghc/compiler/yaccParser/Attic/hslexer.c,v 1.1 1996/01/08 20:15:54 partain Exp $
5 */
6
7 #define FLEX_SCANNER
8
9 #include <stdio.h>
10
11
12 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
13 #ifdef c_plusplus
14 #ifndef __cplusplus
15 #define __cplusplus
16 #endif
17 #endif
18
19
20 #ifdef __cplusplus
21
22 #include <stdlib.h>
23 #include <unistd.h>
24
25 /* Use prototypes in function declarations. */
26 #define YY_USE_PROTOS
27
28 /* The "const" storage-class-modifier is valid. */
29 #define YY_USE_CONST
30
31 #else /* ! __cplusplus */
32
33 #ifdef __STDC__
34
35 #define YY_USE_PROTOS
36 #define YY_USE_CONST
37
38 #endif /* __STDC__ */
39 #endif /* ! __cplusplus */
40
41
42 #ifdef __TURBOC__
43 #define YY_USE_CONST
44 #endif
45
46
47 #ifndef YY_USE_CONST
48 #ifndef const
49 #define const
50 #endif
51 #endif
52
53
54 #ifdef YY_USE_PROTOS
55 #define YY_PROTO(proto) proto
56 #else
57 #define YY_PROTO(proto) ()
58 #endif
59
60 /* Returned upon end-of-file. */
61 #define YY_NULL 0
62
63 /* Promotes a possibly negative, possibly signed char to an unsigned
64 * integer for use as an array index. If the signed char is negative,
65 * we want to instead treat it as an 8-bit unsigned char, hence the
66 * double cast.
67 */
68 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
69
70 /* Enter a start condition. This macro really ought to take a parameter,
71 * but we do it the disgusting crufty way forced on us by the ()-less
72 * definition of BEGIN.
73 */
74 #define BEGIN yy_start = 1 + 2 *
75
76 /* Translate the current start state into a value that can be later handed
77 * to BEGIN to return to the state.
78 */
79 #define YY_START ((yy_start - 1) / 2)
80
81 /* Action number for EOF rule of a given start state. */
82 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
83
84 /* Special action meaning "start processing a new file". Now included
85 * only for backward compatibility with previous versions of flex.
86 */
87 #define YY_NEW_FILE yyrestart( yyin )
88
89 #define YY_END_OF_BUFFER_CHAR 0
90
91 /* Size of default input buffer. */
92 #define YY_BUF_SIZE 16384
93
94 typedef struct yy_buffer_state *YY_BUFFER_STATE;
95
96 extern int yyleng;
97 extern FILE *yyin, *yyout;
98
99 #ifdef __cplusplus
100 extern "C" {
101 #endif
102 extern int yywrap YY_PROTO(( void ));
103 #ifdef __cplusplus
104 }
105 #endif
106
107 #define EOB_ACT_CONTINUE_SCAN 0
108 #define EOB_ACT_END_OF_FILE 1
109 #define EOB_ACT_LAST_MATCH 2
110
111 /* The funky do-while in the following #define is used to turn the definition
112 * int a single C statement (which needs a semi-colon terminator). This
113 * avoids problems with code like:
114 *
115 * if ( condition_holds )
116 * yyless( 5 );
117 * else
118 * do_something_else();
119 *
120 * Prior to using the do-while the compiler would get upset at the
121 * "else" because it interpreted the "if" statement as being all
122 * done when it reached the ';' after the yyless() call.
123 */
124
125 /* Return all but the first 'n' matched characters back to the input stream. */
126
127 #define yyless(n) \
128 do \
129 { \
130 /* Undo effects of setting up yytext. */ \
131 *yy_cp = yy_hold_char; \
132 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
133 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
134 } \
135 while ( 0 )
136
137 #define unput(c) yyunput( c, yytext_ptr )
138
139
140 struct yy_buffer_state
141 {
142 FILE *yy_input_file;
143
144 char *yy_ch_buf; /* input buffer */
145 char *yy_buf_pos; /* current position in input buffer */
146
147 /* Size of input buffer in bytes, not including room for EOB
148 * characters.
149 */
150 int yy_buf_size;
151
152 /* Number of characters read into yy_ch_buf, not including EOB
153 * characters.
154 */
155 int yy_n_chars;
156
157 /* Whether this is an "interactive" input source; if so, and
158 * if we're using stdio for input, then we want to use getc()
159 * instead of fread(), to make sure we stop fetching input after
160 * each newline.
161 */
162 int yy_is_interactive;
163
164 /* Whether to try to fill the input buffer when we reach the
165 * end of it.
166 */
167 int yy_fill_buffer;
168
169 int yy_buffer_status;
170 #define YY_BUFFER_NEW 0
171 #define YY_BUFFER_NORMAL 1
172 /* When an EOF's been seen but there's still some text to process
173 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
174 * shouldn't try reading from the input source any more. We might
175 * still have a bunch of tokens to match, though, because of
176 * possible backing-up.
177 *
178 * When we actually see the EOF, we change the status to "new"
179 * (via yyrestart()), so that the user can continue scanning by
180 * just pointing yyin at a new input file.
181 */
182 #define YY_BUFFER_EOF_PENDING 2
183 };
184
185 static YY_BUFFER_STATE yy_current_buffer = 0;
186
187 /* We provide macros for accessing buffer states in case in the
188 * future we want to put the buffer states in a more general
189 * "scanner state".
190 */
191 #define YY_CURRENT_BUFFER yy_current_buffer
192
193
194 /* yy_hold_char holds the character lost when yytext is formed. */
195 static char yy_hold_char;
196
197 static int yy_n_chars; /* number of characters read into yy_ch_buf */
198
199
200 int yyleng;
201
202 /* Points to current character in buffer. */
203 static char *yy_c_buf_p = (char *) 0;
204 static int yy_init = 1; /* whether we need to initialize */
205 static int yy_start = 0; /* start state number */
206
207 /* Flag which is used to allow yywrap()'s to do buffer switches
208 * instead of setting up a fresh yyin. A bit of a hack ...
209 */
210 static int yy_did_buffer_switch_on_eof;
211
212 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
213 void yyrestart YY_PROTO(( FILE *input_file ));
214 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
215 void yy_load_buffer_state YY_PROTO(( void ));
216 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
217 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
218 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
219
220 static int yy_start_stack_ptr = 0;
221 static int yy_start_stack_depth = 0;
222 static int *yy_start_stack = 0;
223 static void yy_push_state YY_PROTO(( int new_state ));
224 static void yy_pop_state YY_PROTO(( void ));
225 static int yy_top_state YY_PROTO(( void ));
226
227 static void *yy_flex_alloc YY_PROTO(( unsigned int ));
228 static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
229 static void yy_flex_free YY_PROTO(( void * ));
230
231 #define yy_new_buffer yy_create_buffer
232
233 #define INITIAL 0
234 #define Char 1
235 #define CharEsc 2
236 #define Code 3
237 #define Comment 4
238 #define GlaExt 5
239 #define GhcPragma 6
240 #define UserPragma 7
241 #define String 8
242 #define StringEsc 9
243 typedef unsigned char YY_CHAR;
244 typedef int yy_state_type;
245 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
246 extern char *yytext;
247 #define yytext_ptr yytext
248
249 #ifndef yytext_ptr
250 static void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));
251 #endif
252
253 #ifdef __cplusplus
254 static int yyinput YY_PROTO(( void ));
255 #else
256 static int input YY_PROTO(( void ));
257 #endif
258
259 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
260 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
261 static int yy_get_next_buffer YY_PROTO(( void ));
262 static void yy_fatal_error YY_PROTO(( const char msg[] ));
263
264 /* Done after the current pattern has been matched and before the
265 * corresponding action - sets up yytext.
266 */
267 #define YY_DO_BEFORE_ACTION \
268 yytext_ptr = yy_bp; \
269 yyleng = yy_cp - yy_bp; \
270 yy_hold_char = *yy_cp; \
271 *yy_cp = '\0'; \
272 yy_c_buf_p = yy_cp;
273
274 #define YY_END_OF_BUFFER 202
275 static const short int yy_accept[838] =
276 { 0,
277 0, 0, 0, 0, 0, 0, 0, 0, 190, 190,
278 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
279 202, 196, 197, 129, 128, 136, 198, 141, 184, 198,
280 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
281 198, 198, 198, 139, 198, 150, 152, 160, 156, 198,
282 162, 154, 158, 198, 188, 121, 132, 126, 91, 92,
283 97, 84, 104, 121, 110, 110, 121, 83, 121, 86,
284 98, 120, 93, 99, 94, 101, 102, 120, 120, 120,
285 120, 120, 120, 120, 120, 120, 120, 120, 95, 85,
286 96, 103, 121, 190, 195, 195, 132, 126, 104, 110,
287
288 110, 120, 101, 102, 120, 120, 120, 120, 120, 120,
289 120, 120, 120, 120, 120, 188, 126, 121, 110, 196,
290 120, 120, 120, 120, 120, 95, 121, 121, 121, 196,
291 196, 120, 120, 196, 199, 135, 134, 138, 200, 188,
292 141, 200, 184, 200, 200, 200, 200, 200, 200, 200,
293 200, 200, 200, 200, 200, 200, 200, 140, 200, 150,
294 152, 160, 156, 200, 162, 154, 158, 200, 200, 129,
295 128, 127, 184, 0, 0, 151, 0, 161, 0, 0,
296 0, 174, 0, 0, 0, 0, 159, 177, 178, 153,
297 155, 0, 0, 179, 164, 163, 181, 0, 0, 0,
298
299 180, 157, 183, 185, 186, 188, 121, 132, 131, 126,
300 125, 0, 88, 82, 0, 110, 0, 0, 90, 87,
301 89, 120, 119, 0, 119, 120, 120, 120, 120, 120,
302 120, 60, 120, 74, 120, 120, 68, 120, 120, 71,
303 120, 120, 189, 0, 0, 190, 191, 0, 194, 192,
304 193, 0, 132, 131, 126, 0, 0, 109, 0, 110,
305 0, 0, 118, 120, 119, 0, 0, 120, 120, 120,
306 120, 120, 120, 60, 120, 74, 120, 120, 68, 120,
307 120, 71, 120, 120, 0, 126, 0, 110, 0, 0,
308 0, 119, 119, 119, 119, 119, 119, 119, 119, 119,
309
310 119, 119, 119, 119, 119, 119, 119, 0, 120, 120,
311 74, 120, 68, 189, 0, 120, 135, 134, 133, 137,
312 148, 149, 173, 166, 167, 168, 169, 182, 165, 147,
313 146, 176, 172, 145, 170, 142, 143, 144, 175, 171,
314 126, 124, 0, 187, 187, 113, 106, 108, 119, 119,
315 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
316 120, 75, 120, 120, 120, 120, 120, 0, 0, 1,
317 1, 0, 130, 124, 0, 0, 113, 106, 108, 119,
318 119, 0, 0, 0, 120, 120, 120, 120, 120, 120,
319 120, 120, 120, 120, 120, 75, 120, 120, 120, 120,
320
321 120, 0, 0, 0, 18, 19, 0, 119, 119, 119,
322 119, 12, 119, 119, 119, 119, 119, 119, 17, 119,
323 15, 119, 119, 119, 11, 119, 119, 6, 119, 119,
324 119, 119, 14, 119, 119, 119, 13, 119, 119, 117,
325 120, 75, 52, 187, 187, 187, 187, 0, 119, 53,
326 120, 55, 120, 120, 58, 120, 120, 120, 120, 120,
327 120, 120, 70, 72, 120, 0, 0, 0, 0, 0,
328 0, 0, 0, 123, 0, 0, 112, 0, 105, 107,
329 119, 119, 122, 0, 53, 120, 55, 120, 120, 58,
330 120, 120, 120, 120, 120, 120, 120, 70, 72, 120,
331
332 46, 0, 100, 119, 119, 119, 119, 119, 119, 119,
333 119, 119, 119, 119, 119, 119, 119, 119, 16, 119,
334 7, 119, 119, 119, 119, 119, 119, 119, 119, 119,
335 119, 119, 119, 117, 53, 0, 113, 80, 54, 120,
336 120, 120, 120, 62, 120, 120, 120, 120, 73, 0,
337 0, 0, 0, 0, 0, 0, 0, 111, 0, 113,
338 119, 119, 114, 54, 120, 120, 120, 120, 62, 120,
339 120, 120, 120, 73, 0, 0, 119, 22, 119, 119,
340 20, 119, 119, 119, 119, 119, 119, 119, 119, 119,
341 119, 119, 115, 119, 119, 119, 119, 119, 119, 119,
342
343 119, 119, 119, 119, 119, 120, 120, 59, 61, 63,
344 64, 120, 120, 67, 120, 0, 0, 0, 0, 0,
345 0, 0, 0, 78, 119, 120, 120, 59, 61, 63,
346 64, 120, 120, 67, 120, 119, 119, 119, 119, 119,
347 119, 35, 119, 36, 119, 119, 119, 119, 34, 119,
348 119, 40, 119, 23, 119, 119, 38, 116, 119, 119,
349 39, 119, 56, 120, 120, 120, 120, 0, 0, 0,
350 0, 0, 0, 0, 0, 2, 2, 119, 76, 56,
351 120, 120, 120, 120, 119, 119, 119, 119, 119, 119,
352 119, 119, 119, 119, 119, 119, 119, 119, 33, 119,
353
354 21, 119, 119, 57, 65, 120, 69, 0, 0, 0,
355 0, 0, 0, 0, 119, 119, 57, 65, 120, 69,
356 119, 119, 41, 119, 32, 37, 119, 119, 119, 119,
357 25, 119, 119, 119, 119, 119, 119, 119, 81, 66,
358 0, 0, 0, 0, 48, 0, 0, 79, 119, 66,
359 119, 119, 29, 119, 30, 31, 42, 43, 44, 45,
360 119, 119, 119, 28, 0, 0, 0, 0, 0, 0,
361 0, 77, 8, 119, 9, 24, 119, 119, 0, 0,
362 51, 50, 0, 0, 119, 119, 119, 0, 3, 3,
363 0, 0, 119, 119, 10, 0, 0, 47, 119, 119,
364
365 0, 0, 27, 119, 5, 0, 119, 0, 0, 119,
366 0, 0, 119, 0, 49, 26, 0, 0, 0, 0,
367 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
368 0, 0, 0, 0, 0, 4, 0
369 } ;
370
371 static const int yy_ec[256] =
372 { 0,
373 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
374 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
376 1, 5, 6, 7, 8, 9, 10, 11, 12, 13,
377 14, 10, 15, 16, 17, 18, 19, 20, 21, 22,
378 23, 24, 25, 25, 25, 26, 26, 27, 28, 29,
379 30, 31, 10, 32, 33, 34, 35, 36, 37, 38,
380 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
381 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
382 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
383
384 69, 70, 71, 72, 73, 74, 74, 75, 76, 77,
385 78, 79, 74, 80, 81, 82, 83, 84, 85, 86,
386 87, 74, 88, 89, 90, 91, 1, 1, 1, 1,
387 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1
401 } ;
402
403 static const int yy_meta[92] =
404 { 0,
405 1, 1, 2, 1, 3, 4, 3, 5, 6, 4,
406 4, 7, 3, 3, 4, 3, 8, 4, 4, 9,
407 9, 9, 9, 9, 9, 9, 4, 3, 4, 4,
408 4, 10, 11, 11, 11, 11, 11, 11, 12, 12,
409 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
410 12, 12, 12, 12, 12, 12, 12, 12, 13, 14,
411 13, 10, 15, 16, 17, 17, 17, 17, 17, 17,
412 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
413 18, 18, 18, 18, 18, 18, 18, 19, 4, 20,
414 4
415
416 } ;
417
418 static const short int yy_base[881] =
419 { 0,
420 0, 0, 0, 4, 58, 138, 224, 2192, 0, 1,
421 315, 2191, 402, 0, 487, 0, 25, 39, 578, 0,
422 2198, 2201, 2201, 2185, 2188, 2201, 2201, 2201, 13, 2160,
423 7, 12, 12, 21, 10, 2143, 2141, 2154, 18, 2140,
424 69, 2139, 2137, 2201, 0, 2201, 2201, 2201, 2201, 0,
425 2201, 2201, 2201, 0, 50, 0, 2181, 2175, 2201, 2201,
426 0, 2201, 46, 2168, 131, 415, 2158, 2201, 2167, 2152,
427 0, 0, 2201, 0, 2201, 6, 2201, 11, 36, 2107,
428 2108, 30, 2111, 2101, 2108, 2108, 47, 2104, 2158, 0,
429 2201, 0, 52, 0, 13, 2, 2167, 2161, 425, 662,
430
431 506, 2164, 66, 2107, 66, 452, 105, 2, 129, 124,
432 107, 131, 138, 663, 42, 407, 0, 148, 515, 745,
433 5, 158, 421, 449, 455, 2153, 0, 2152, 2137, 2104,
434 2102, 122, 135, 2148, 2201, 2157, 2155, 2151, 2201, 192,
435 2201, 2144, 652, 2125, 132, 169, 417, 497, 370, 2108,
436 2106, 2119, 137, 2105, 648, 2104, 2102, 2201, 0, 2201,
437 2201, 2201, 2201, 686, 2201, 2201, 2201, 0, 2136, 2140,
438 2143, 2201, 692, 2107, 2105, 2201, 2102, 2201, 669, 2103,
439 2109, 2201, 2096, 2092, 2108, 410, 2201, 2201, 2201, 2201,
440 2201, 2099, 2097, 2201, 2201, 2100, 2201, 2083, 2104, 2091,
441
442 2201, 2201, 2201, 699, 0, 723, 0, 2129, 2201, 2123,
443 2201, 207, 0, 0, 734, 745, 709, 0, 0, 2201,
444 0, 0, 0, 2071, 2066, 2051, 2066, 2048, 373, 2048,
445 2060, 0, 2048, 464, 2044, 2057, 0, 2047, 2054, 0,
446 2043, 2052, 2112, 210, 2046, 0, 0, 2101, 2201, 0,
447 2201, 2029, 2109, 2107, 2102, 796, 815, 2201, 822, 841,
448 722, 0, 2201, 2105, 114, 2104, 0, 140, 488, 410,
449 729, 483, 454, 2103, 424, 691, 489, 493, 2102, 728,
450 451, 2101, 673, 741, 2091, 2095, 830, 863, 2043, 2042,
451 2044, 846, 519, 838, 2040, 2064, 2038, 2063, 738, 766,
452
453 2049, 2048, 856, 517, 711, 2047, 2018, 0, 549, 730,
454 689, 695, 776, 2201, 2005, 492, 2087, 2085, 2201, 2201,
455 2201, 2201, 2201, 2201, 2201, 2201, 2201, 2201, 2201, 2201,
456 2201, 2201, 2201, 2201, 2201, 2201, 2201, 2201, 2201, 2201,
457 2080, 2201, 791, 893, 898, 890, 900, 0, 0, 2024,
458 2021, 2008, 2023, 2022, 2013, 2016, 2011, 2005, 2009, 1999,
459 2011, 0, 1996, 2013, 2000, 2007, 1995, 903, 799, 2201,
460 821, 1997, 2201, 2065, 908, 0, 941, 948, 2064, 1990,
461 2005, 2005, 2060, 2055, 824, 779, 861, 869, 862, 849,
462 864, 860, 870, 865, 932, 2058, 909, 933, 934, 937,
463
464 938, 1975, 2056, 999, 2201, 2201, 2000, 2011, 935, 2013,
465 2008, 0, 2021, 2012, 2019, 2003, 2020, 2006, 0, 1990,
466 0, 2000, 1999, 1987, 0, 913, 925, 0, 2008, 790,
467 1997, 2010, 0, 1998, 2012, 2007, 0, 2000, 1962, 0,
468 943, 972, 2201, 980, 991, 1000, 1011, 1017, 1978, 0,
469 1959, 0, 1956, 1954, 0, 1960, 1956, 1949, 1969, 1953,
470 1957, 1955, 0, 0, 1961, 1024, 1043, 1995, 1991, 1981,
471 1993, 1977, 1955, 2201, 1075, 2015, 2014, 1086, 2201, 2201,
472 1945, 1945, 2201, 2007, 2010, 950, 2009, 947, 774, 2008,
473 978, 969, 981, 952, 979, 983, 1001, 2007, 2006, 992,
474
475 2201, 1098, 2201, 1961, 1949, 1948, 1977, 1946, 1961, 1944,
476 1955, 783, 1959, 1952, 1967, 1969, 1951, 1960, 0, 1936,
477 0, 1961, 1961, 1957, 1951, 1949, 1956, 1957, 1928, 1942,
478 1939, 1938, 1922, 0, 1042, 1105, 1112, 0, 0, 1911,
479 1912, 1913, 1901, 991, 1905, 1911, 1911, 1906, 0, 1938,
480 1936, 1925, 1937, 1930, 1934, 1935, 1966, 2201, 1119, 1138,
481 1907, 1894, 2201, 1960, 989, 1000, 991, 1066, 1072, 1025,
482 498, 1036, 1044, 1959, 1145, 1164, 1916, 0, 1929, 1907,
483 0, 1900, 1927, 1909, 1897, 1909, 1895, 1894, 1893, 1905,
484 1917, 1890, 0, 1904, 1914, 1887, 1896, 1885, 1903, 1015,
485
486 1153, 1898, 1882, 1881, 1868, 1860, 1864, 0, 0, 0,
487 0, 1873, 1874, 0, 1861, 1902, 1890, 1883, 1887, 1892,
488 1891, 1896, 1050, 1891, 1866, 1073, 1027, 1920, 1919, 1918,
489 1917, 1082, 1085, 1916, 1077, 1890, 1881, 1870, 1885, 1884,
490 1873, 0, 1880, 0, 1881, 1880, 1875, 1878, 0, 1849,
491 1873, 0, 1874, 0, 1846, 1875, 0, 1171, 1844, 1871,
492 0, 1830, 0, 1833, 1834, 1835, 1830, 1837, 1862, 1848,
493 1847, 1850, 1860, 1853, 1088, 2201, 1153, 1858, 1853, 1883,
494 1143, 1172, 1145, 1173, 1855, 1854, 1807, 1811, 1781, 1780,
495 1789, 1803, 1795, 1765, 1751, 1157, 1769, 1773, 0, 1764,
496
497 0, 1756, 1719, 0, 0, 1711, 0, 1731, 1771, 1741,
498 1735, 1727, 1679, 1691, 1652, 1669, 1666, 1664, 1174, 1663,
499 1616, 1614, 0, 1599, 0, 0, 1608, 1596, 1593, 1591,
500 0, 1563, 1545, 1531, 1540, 1528, 1547, 1523, 0, 0,
501 1526, 1552, 1526, 1509, 2201, 1506, 1510, 0, 1489, 1543,
502 1485, 1495, 0, 1481, 0, 0, 0, 0, 0, 0,
503 1473, 1482, 1435, 0, 1433, 1438, 1166, 1393, 1391, 1396,
504 1396, 0, 0, 1372, 0, 0, 1393, 1394, 1390, 1196,
505 2201, 2201, 1383, 1012, 1368, 1355, 1326, 1343, 2201, 1369,
506 1338, 1347, 1333, 1203, 0, 1221, 1209, 2201, 1189, 1200,
507
508 1245, 1213, 0, 1185, 1206, 1205, 1210, 1196, 1192, 1202,
509 1184, 1196, 1143, 1164, 2201, 0, 1066, 1076, 1056, 1051,
510 1035, 948, 896, 797, 756, 728, 661, 647, 633, 450,
511 1195, 1204, 408, 396, 96, 2201, 2201, 1256, 1276, 1296,
512 1316, 1336, 1354, 1365, 1193, 1377, 1389, 1407, 1421, 1429,
513 1447, 1467, 1487, 1504, 1522, 1538, 1546, 1562, 1578, 1594,
514 1612, 1632, 1194, 1646, 1658, 1676, 1696, 1716, 1734, 1750,
515 1222, 1766, 1784, 1205, 1800, 1816, 1223, 1830, 1848, 1868
516 } ;
517
518 static const short int yy_def[881] =
519 { 0,
520 838, 838, 839, 839, 840, 840, 837, 7, 841, 841,
521 837, 11, 11, 13, 11, 15, 842, 842, 837, 19,
522 837, 837, 837, 843, 837, 837, 837, 837, 837, 837,
523 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
524 837, 837, 837, 837, 844, 837, 837, 837, 837, 837,
525 837, 837, 837, 845, 837, 846, 847, 848, 837, 837,
526 846, 837, 846, 846, 837, 837, 846, 837, 846, 846,
527 846, 849, 837, 846, 837, 850, 837, 849, 849, 849,
528 849, 849, 849, 849, 849, 849, 849, 849, 837, 846,
529 837, 846, 846, 851, 852, 853, 854, 855, 846, 837,
530
531 837, 856, 850, 857, 856, 856, 856, 856, 856, 856,
532 856, 856, 856, 856, 856, 837, 858, 99, 837, 850,
533 859, 859, 859, 859, 859, 837, 846, 846, 846, 850,
534 857, 856, 856, 837, 837, 860, 837, 837, 837, 837,
535 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
536 837, 837, 837, 837, 837, 837, 837, 837, 844, 837,
537 837, 837, 837, 837, 837, 837, 837, 845, 837, 843,
538 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
539 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
540 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
541
542 837, 837, 837, 837, 845, 837, 846, 847, 837, 861,
543 837, 862, 846, 846, 837, 837, 837, 863, 846, 837,
544 846, 864, 865, 850, 865, 864, 864, 864, 864, 864,
545 864, 864, 864, 864, 864, 864, 864, 864, 864, 864,
546 864, 864, 837, 866, 837, 867, 868, 868, 837, 869,
547 837, 869, 870, 837, 861, 837, 837, 837, 837, 837,
548 837, 871, 837, 856, 865, 872, 873, 856, 856, 856,
549 856, 856, 856, 856, 856, 856, 856, 856, 856, 856,
550 856, 856, 856, 856, 837, 861, 837, 837, 837, 837,
551 837, 865, 865, 865, 865, 865, 865, 865, 865, 865,
552
553 865, 865, 865, 865, 865, 865, 865, 874, 875, 875,
554 875, 875, 875, 837, 837, 856, 876, 837, 837, 837,
555 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
556 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
557 861, 837, 862, 837, 862, 837, 837, 863, 865, 865,
558 864, 864, 864, 864, 864, 864, 864, 864, 864, 864,
559 864, 864, 864, 864, 864, 864, 864, 837, 866, 837,
560 866, 837, 837, 837, 837, 877, 837, 837, 871, 865,
561 865, 837, 872, 873, 856, 856, 856, 856, 856, 856,
562 856, 856, 856, 856, 856, 856, 856, 856, 856, 856,
563
564 856, 837, 837, 837, 837, 837, 837, 865, 865, 865,
565 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
566 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
567 865, 865, 865, 865, 865, 865, 865, 865, 865, 878,
568 875, 875, 837, 837, 862, 837, 862, 837, 865, 864,
569 864, 864, 864, 864, 864, 864, 864, 864, 864, 864,
570 864, 864, 864, 864, 864, 837, 837, 837, 837, 837,
571 837, 837, 837, 837, 837, 877, 837, 837, 837, 837,
572 865, 865, 837, 837, 856, 856, 856, 856, 856, 856,
573 856, 856, 856, 856, 856, 856, 856, 856, 856, 856,
574
575 837, 837, 837, 865, 865, 865, 865, 865, 865, 865,
576 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
577 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
578 865, 865, 865, 878, 875, 837, 837, 865, 864, 864,
579 864, 864, 864, 864, 864, 864, 864, 864, 864, 837,
580 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
581 865, 865, 837, 856, 856, 856, 856, 856, 856, 856,
582 856, 856, 856, 856, 837, 837, 865, 865, 865, 865,
583 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
584 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
585
586 865, 865, 865, 865, 865, 864, 864, 864, 864, 864,
587 864, 864, 864, 864, 864, 837, 837, 837, 837, 837,
588 837, 837, 879, 865, 865, 856, 856, 856, 856, 856,
589 856, 856, 856, 856, 856, 865, 865, 865, 865, 865,
590 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
591 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
592 865, 865, 864, 864, 864, 864, 864, 837, 837, 837,
593 837, 837, 837, 837, 879, 837, 879, 865, 865, 856,
594 856, 856, 856, 856, 865, 865, 865, 865, 865, 865,
595 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
596
597 865, 865, 865, 864, 864, 864, 864, 837, 837, 837,
598 837, 837, 837, 837, 865, 865, 856, 856, 856, 856,
599 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
600 865, 865, 865, 865, 865, 865, 865, 865, 865, 864,
601 837, 880, 837, 837, 837, 837, 837, 865, 865, 856,
602 865, 865, 865, 865, 865, 865, 865, 865, 865, 865,
603 865, 865, 865, 865, 837, 880, 880, 837, 837, 837,
604 837, 865, 865, 865, 865, 865, 865, 865, 837, 880,
605 837, 837, 837, 837, 865, 865, 865, 837, 837, 880,
606 837, 837, 865, 865, 865, 837, 837, 837, 865, 865,
607
608 837, 837, 865, 865, 837, 837, 865, 837, 837, 865,
609 837, 837, 865, 837, 837, 865, 837, 837, 837, 837,
610 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
611 837, 837, 837, 837, 837, 837, 0, 837, 837, 837,
612 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
613 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
614 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
615 837, 837, 837, 837, 837, 837, 837, 837, 837, 837
616 } ;
617
618 static const short int yy_nxt[2293] =
619 { 0,
620 23, 23, 23, 23, 23, 23, 23, 23, 837, 263,
621 837, 25, 263, 308, 837, 25, 95, 95, 251, 204,
622 204, 204, 204, 204, 204, 135, 135, 135, 135, 248,
623 837, 137, 173, 173, 173, 173, 173, 173, 173, 135,
624 135, 135, 135, 175, 177, 137, 179, 187, 180, 263,
625 192, 206, 206, 206, 206, 181, 244, 176, 837, 26,
626 188, 178, 212, 26, 28, 182, 183, 184, 224, 28,
627 193, 185, 186, 263, 273, 226, 213, 29, 29, 29,
628 29, 29, 29, 29, 138, 227, 225, 96, 96, 252,
629 30, 31, 32, 33, 34, 35, 36, 37, 138, 232,
630
631 228, 38, 249, 39, 229, 233, 234, 40, 41, 195,
632 42, 43, 263, 284, 263, 196, 197, 44, 239, 45,
633 198, 199, 46, 47, 240, 200, 245, 48, 224, 263,
634 268, 263, 265, 241, 49, 50, 263, 51, 263, 52,
635 269, 53, 263, 54, 28, 263, 225, 263, 215, 28,
636 216, 216, 216, 216, 216, 216, 216, 29, 29, 29,
637 29, 29, 29, 29, 837, 263, 308, 257, 175, 192,
638 30, 31, 32, 33, 34, 35, 36, 37, 380, 272,
639 381, 38, 176, 39, 278, 836, 270, 40, 41, 193,
640 42, 43, 277, 206, 206, 206, 206, 44, 274, 45,
641
642 279, 177, 46, 47, 275, 276, 280, 48, 217, 344,
643 345, 316, 370, 371, 49, 50, 218, 51, 178, 52,
644 385, 53, 310, 54, 22, 55, 55, 55, 55, 56,
645 57, 56, 56, 56, 56, 58, 59, 60, 61, 62,
646 63, 64, 56, 65, 66, 66, 66, 66, 66, 66,
647 67, 68, 69, 70, 56, 71, 72, 72, 72, 72,
648 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
649 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
650 72, 72, 73, 74, 75, 56, 76, 77, 72, 72,
651 78, 79, 80, 72, 72, 81, 82, 72, 83, 84,
652
653 72, 85, 72, 86, 72, 87, 72, 72, 88, 72,
654 72, 89, 90, 91, 92, 22, 55, 55, 55, 55,
655 56, 97, 56, 56, 56, 56, 98, 59, 60, 61,
656 62, 99, 64, 56, 100, 101, 101, 101, 101, 101,
657 101, 67, 68, 69, 70, 56, 71, 102, 102, 102,
658 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
659 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
660 102, 102, 102, 73, 74, 75, 56, 103, 104, 102,
661 102, 105, 106, 107, 102, 102, 108, 109, 102, 110,
662 111, 102, 112, 102, 113, 102, 114, 102, 102, 115,
663
664 102, 102, 89, 90, 91, 92, 116, 187, 206, 206,
665 206, 206, 835, 117, 285, 834, 56, 263, 118, 56,
666 188, 119, 119, 119, 119, 119, 119, 119, 263, 308,
667 56, 263, 215, 56, 216, 216, 216, 216, 216, 216,
668 216, 212, 354, 333, 256, 257, 257, 257, 257, 257,
669 257, 179, 355, 180, 831, 213, 263, 308, 263, 263,
670 181, 263, 263, 308, 120, 334, 121, 121, 122, 121,
671 121, 121, 121, 121, 123, 121, 124, 121, 121, 125,
672 121, 121, 121, 121, 121, 121, 121, 121, 121, 126,
673 263, 387, 127, 22, 128, 263, 263, 311, 22, 263,
674
675 263, 56, 392, 129, 56, 263, 22, 22, 22, 22,
676 22, 22, 22, 258, 22, 56, 270, 312, 56, 399,
677 271, 391, 258, 259, 313, 260, 260, 260, 260, 260,
678 260, 260, 287, 359, 288, 288, 288, 288, 288, 288,
679 288, 182, 183, 184, 360, 361, 56, 185, 186, 130,
680 131, 413, 386, 102, 132, 102, 263, 308, 102, 133,
681 397, 102, 102, 390, 102, 414, 102, 633, 102, 434,
682 396, 102, 394, 435, 134, 56, 22, 127, 139, 140,
683 140, 140, 140, 139, 141, 139, 139, 139, 139, 141,
684 139, 139, 139, 139, 142, 139, 139, 143, 143, 143,
685
686 143, 143, 143, 143, 139, 139, 139, 139, 139, 139,
687 144, 145, 146, 147, 148, 149, 150, 151, 139, 139,
688 139, 152, 139, 153, 139, 139, 139, 154, 155, 139,
689 156, 157, 139, 139, 139, 139, 139, 158, 139, 159,
690 139, 139, 160, 161, 139, 139, 139, 162, 139, 139,
691 139, 139, 139, 139, 163, 164, 139, 165, 139, 166,
692 139, 167, 139, 168, 139, 169, 139, 139, 139, 258,
693 263, 173, 173, 173, 173, 173, 173, 173, 830, 259,
694 263, 260, 260, 260, 260, 260, 260, 260, 195, 324,
695 325, 326, 327, 829, 196, 197, 263, 308, 263, 198,
696
697 199, 828, 263, 308, 200, 204, 204, 204, 204, 204,
698 204, 173, 173, 173, 173, 173, 173, 173, 204, 204,
699 204, 204, 204, 204, 206, 206, 206, 206, 347, 347,
700 347, 347, 347, 347, 281, 263, 263, 263, 308, 261,
701 282, 378, 378, 378, 378, 378, 378, 262, 263, 283,
702 289, 400, 290, 346, 346, 346, 346, 346, 346, 346,
703 393, 436, 215, 291, 216, 216, 216, 216, 216, 216,
704 216, 394, 395, 437, 423, 424, 442, 292, 827, 293,
705 294, 263, 295, 263, 308, 296, 263, 297, 298, 299,
706 300, 301, 302, 344, 345, 303, 304, 305, 388, 306,
707
708 425, 370, 371, 258, 398, 826, 426, 224, 389, 401,
709 441, 265, 427, 287, 307, 257, 257, 257, 257, 257,
710 257, 257, 258, 370, 371, 225, 525, 585, 428, 586,
711 526, 263, 287, 825, 257, 257, 257, 257, 257, 257,
712 257, 377, 377, 377, 377, 377, 377, 377, 258, 404,
713 404, 404, 404, 404, 404, 404, 263, 566, 259, 486,
714 260, 260, 260, 260, 260, 260, 260, 263, 263, 263,
715 258, 263, 263, 375, 415, 416, 263, 263, 417, 408,
716 287, 376, 288, 288, 288, 288, 288, 288, 288, 409,
717 418, 431, 485, 410, 444, 444, 444, 444, 411, 445,
718
719 446, 447, 445, 432, 466, 466, 466, 467, 412, 346,
720 346, 346, 346, 346, 346, 346, 263, 490, 433, 347,
721 347, 347, 347, 347, 347, 487, 448, 475, 475, 475,
722 475, 475, 475, 488, 489, 468, 491, 492, 469, 263,
723 263, 263, 493, 470, 263, 263, 494, 471, 477, 824,
724 263, 308, 823, 472, 263, 479, 520, 263, 448, 263,
725 377, 377, 377, 377, 377, 377, 377, 378, 378, 378,
726 378, 378, 378, 505, 522, 521, 263, 478, 506, 263,
727 308, 444, 444, 444, 444, 263, 263, 523, 263, 507,
728 263, 496, 445, 446, 447, 445, 263, 497, 263, 263,
729
730 495, 444, 444, 444, 444, 499, 477, 263, 263, 478,
731 498, 535, 445, 446, 447, 445, 570, 500, 404, 404,
732 404, 404, 404, 404, 404, 466, 466, 466, 466, 565,
733 564, 536, 263, 536, 263, 502, 537, 537, 537, 537,
734 537, 537, 537, 263, 466, 466, 466, 466, 568, 263,
735 308, 263, 676, 677, 567, 656, 468, 572, 571, 469,
736 574, 628, 792, 626, 470, 610, 569, 502, 471, 792,
737 611, 822, 627, 263, 472, 468, 573, 657, 469, 263,
738 263, 550, 479, 470, 263, 821, 551, 471, 820, 263,
739 676, 677, 263, 472, 475, 475, 475, 475, 475, 475,
740
741 559, 632, 559, 681, 634, 560, 560, 560, 560, 560,
742 560, 560, 575, 819, 575, 818, 635, 576, 576, 576,
743 576, 576, 576, 576, 537, 537, 537, 537, 537, 537,
744 537, 537, 537, 537, 537, 537, 537, 537, 560, 560,
745 560, 560, 560, 560, 560, 477, 630, 629, 682, 683,
746 263, 631, 263, 684, 680, 676, 677, 560, 560, 560,
747 560, 560, 560, 560, 576, 576, 576, 576, 576, 576,
748 576, 477, 658, 658, 658, 658, 658, 658, 658, 263,
749 263, 263, 767, 576, 576, 576, 576, 576, 576, 576,
750 658, 658, 658, 658, 658, 658, 658, 732, 789, 790,
751
752 817, 205, 348, 205, 348, 816, 733, 734, 833, 205,
753 348, 719, 767, 717, 832, 832, 832, 832, 832, 832,
754 832, 440, 440, 832, 832, 832, 832, 832, 832, 832,
755 379, 476, 379, 476, 815, 814, 813, 812, 379, 476,
756 718, 811, 750, 720, 810, 809, 808, 807, 806, 805,
757 804, 803, 802, 801, 800, 780, 22, 22, 22, 22,
758 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
759 22, 22, 22, 22, 22, 22, 24, 24, 24, 24,
760 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
761 24, 24, 24, 24, 24, 24, 27, 27, 27, 27,
762
763 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
764 27, 27, 27, 27, 27, 27, 94, 94, 94, 94,
765 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
766 94, 94, 94, 94, 94, 94, 136, 136, 136, 136,
767 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
768 136, 136, 136, 136, 136, 136, 170, 170, 170, 170,
769 170, 170, 170, 170, 170, 170, 170, 799, 170, 170,
770 170, 170, 170, 170, 203, 203, 203, 203, 203, 203,
771 207, 207, 207, 798, 797, 767, 207, 796, 795, 794,
772 207, 208, 208, 208, 208, 208, 208, 208, 208, 208,
773
774 208, 208, 793, 208, 208, 208, 208, 208, 208, 210,
775 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
776 791, 210, 210, 210, 210, 210, 210, 222, 788, 222,
777 787, 222, 222, 786, 785, 222, 784, 222, 222, 223,
778 223, 783, 782, 223, 781, 223, 223, 246, 246, 246,
779 246, 246, 246, 246, 767, 246, 246, 246, 246, 246,
780 246, 246, 246, 246, 246, 779, 246, 247, 247, 247,
781 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
782 247, 247, 247, 247, 247, 778, 247, 250, 250, 250,
783 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
784
785 250, 250, 250, 250, 250, 250, 253, 253, 253, 253,
786 253, 253, 253, 253, 253, 253, 253, 777, 253, 253,
787 253, 253, 253, 253, 255, 255, 255, 255, 255, 255,
788 255, 255, 255, 255, 255, 776, 255, 255, 255, 255,
789 255, 255, 264, 775, 264, 774, 264, 773, 264, 264,
790 263, 772, 264, 771, 264, 264, 266, 266, 770, 769,
791 768, 266, 266, 266, 286, 286, 286, 286, 767, 286,
792 286, 286, 286, 286, 286, 765, 286, 286, 286, 286,
793 286, 286, 309, 309, 309, 764, 309, 763, 309, 309,
794 762, 761, 309, 760, 309, 309, 317, 317, 317, 317,
795
796 317, 317, 317, 317, 317, 317, 317, 759, 317, 317,
797 317, 317, 317, 317, 341, 341, 341, 341, 341, 341,
798 341, 341, 341, 341, 341, 758, 341, 341, 341, 341,
799 341, 341, 343, 343, 343, 343, 343, 343, 343, 343,
800 343, 343, 343, 343, 343, 343, 343, 343, 343, 343,
801 343, 343, 222, 757, 222, 756, 222, 222, 755, 754,
802 222, 753, 222, 222, 349, 752, 349, 751, 349, 349,
803 263, 263, 349, 263, 349, 349, 369, 369, 369, 369,
804 369, 369, 369, 369, 369, 369, 369, 369, 369, 369,
805 369, 369, 369, 369, 369, 369, 246, 246, 246, 246,
806
807 246, 246, 246, 749, 246, 246, 246, 246, 246, 246,
808 246, 246, 246, 246, 748, 246, 247, 247, 247, 247,
809 247, 247, 247, 747, 247, 247, 247, 247, 247, 247,
810 247, 247, 247, 247, 250, 250, 250, 250, 250, 250,
811 250, 746, 250, 250, 250, 250, 250, 250, 250, 250,
812 250, 250, 253, 253, 253, 253, 253, 253, 253, 253,
813 253, 253, 253, 745, 253, 253, 253, 253, 253, 253,
814 383, 744, 383, 743, 383, 742, 383, 383, 741, 740,
815 383, 739, 383, 383, 384, 384, 384, 384, 384, 384,
816 738, 384, 384, 384, 384, 384, 384, 384, 384, 384,
817
818 384, 384, 384, 384, 309, 309, 309, 737, 309, 736,
819 309, 309, 735, 731, 309, 730, 309, 309, 317, 317,
820 317, 317, 317, 317, 317, 317, 317, 317, 317, 729,
821 317, 317, 317, 317, 317, 317, 534, 728, 534, 727,
822 534, 534, 726, 725, 534, 724, 534, 534, 675, 675,
823 675, 675, 675, 675, 675, 675, 675, 675, 675, 675,
824 675, 675, 675, 675, 675, 675, 675, 675, 766, 723,
825 766, 766, 766, 766, 766, 766, 766, 766, 766, 766,
826 766, 766, 766, 766, 766, 766, 766, 766, 722, 721,
827 263, 716, 715, 714, 713, 712, 711, 710, 709, 708,
828
829 707, 706, 705, 704, 703, 702, 701, 700, 699, 698,
830 697, 696, 695, 694, 693, 692, 691, 690, 689, 688,
831 687, 686, 685, 263, 263, 263, 263, 263, 679, 678,
832 674, 673, 672, 671, 670, 669, 668, 667, 666, 665,
833 664, 663, 662, 661, 660, 659, 655, 654, 653, 652,
834 651, 650, 649, 648, 647, 646, 645, 644, 643, 642,
835 641, 640, 639, 638, 637, 636, 263, 263, 625, 624,
836 623, 622, 621, 620, 619, 618, 617, 616, 615, 614,
837 613, 612, 609, 608, 607, 606, 605, 604, 603, 602,
838 601, 600, 599, 598, 597, 596, 595, 594, 593, 592,
839
840 591, 590, 589, 588, 587, 584, 583, 582, 581, 580,
841 579, 578, 577, 263, 263, 263, 263, 263, 563, 562,
842 561, 558, 480, 557, 556, 555, 554, 553, 552, 549,
843 548, 547, 546, 545, 544, 543, 542, 541, 540, 539,
844 538, 533, 532, 531, 530, 529, 528, 527, 524, 519,
845 518, 517, 516, 515, 514, 513, 512, 511, 510, 509,
846 508, 504, 503, 474, 501, 263, 484, 382, 483, 482,
847 481, 480, 474, 473, 465, 464, 463, 462, 461, 460,
848 459, 458, 457, 456, 455, 454, 453, 452, 451, 450,
849 449, 837, 319, 318, 443, 439, 438, 430, 429, 422,
850
851 421, 420, 419, 407, 406, 405, 403, 402, 263, 263,
852 263, 382, 263, 374, 373, 254, 252, 248, 372, 368,
853 367, 366, 365, 364, 363, 362, 358, 357, 356, 353,
854 352, 351, 350, 224, 342, 209, 340, 339, 338, 337,
855 336, 335, 332, 331, 330, 329, 328, 323, 322, 321,
856 172, 171, 314, 202, 201, 194, 191, 190, 189, 174,
857 212, 320, 319, 318, 314, 837, 224, 213, 315, 314,
858 267, 263, 211, 254, 243, 242, 238, 237, 236, 235,
859 231, 230, 221, 220, 219, 214, 211, 209, 202, 201,
860 194, 191, 190, 189, 174, 172, 171, 837, 93, 93,
861
862 21, 837, 837, 837, 837, 837, 837, 837, 837, 837,
863 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
864 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
865 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
866 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
867 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
868 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
869 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
870 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
871 837, 837
872
873 } ;
874
875 static const short int yy_chk[2293] =
876 { 0,
877 3, 3, 3, 3, 4, 4, 4, 4, 0, 108,
878 0, 3, 121, 121, 0, 4, 9, 10, 96, 50,
879 50, 50, 50, 50, 50, 17, 17, 17, 17, 95,
880 0, 17, 29, 29, 29, 29, 29, 29, 29, 18,
881 18, 18, 18, 31, 32, 18, 33, 35, 33, 115,
882 39, 55, 55, 55, 55, 33, 93, 31, 0, 3,
883 35, 32, 63, 4, 5, 34, 34, 34, 76, 5,
884 39, 34, 34, 105, 108, 78, 63, 5, 5, 5,
885 5, 5, 5, 5, 17, 78, 76, 9, 10, 96,
886 5, 5, 5, 5, 5, 5, 5, 5, 18, 82,
887
888 79, 5, 95, 5, 79, 82, 82, 5, 5, 41,
889 5, 5, 107, 115, 111, 41, 41, 5, 87, 5,
890 41, 41, 5, 5, 87, 41, 93, 5, 103, 132,
891 105, 110, 103, 87, 5, 5, 109, 5, 112, 5,
892 105, 5, 133, 5, 6, 113, 103, 268, 65, 6,
893 65, 65, 65, 65, 65, 65, 65, 6, 6, 6,
894 6, 6, 6, 6, 118, 122, 122, 118, 145, 153,
895 6, 6, 6, 6, 6, 6, 6, 6, 265, 107,
896 265, 6, 145, 6, 111, 835, 132, 6, 6, 153,
897 6, 6, 110, 140, 140, 140, 140, 6, 109, 6,
898
899 112, 146, 6, 6, 109, 109, 113, 6, 65, 212,
900 212, 133, 244, 244, 6, 6, 65, 6, 146, 6,
901 268, 6, 122, 6, 7, 7, 7, 7, 7, 7,
902 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
903 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
904 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
905 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
906 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
907 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
908 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
909
910 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
911 7, 7, 7, 7, 7, 11, 11, 11, 11, 11,
912 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
913 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
914 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
915 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
916 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
917 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
918 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
919 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
920
921 11, 11, 11, 11, 11, 11, 13, 149, 116, 116,
922 116, 116, 834, 13, 116, 833, 13, 270, 13, 13,
923 149, 13, 13, 13, 13, 13, 13, 13, 123, 123,
924 13, 275, 66, 13, 66, 66, 66, 66, 66, 66,
925 66, 99, 229, 186, 99, 99, 99, 99, 99, 99,
926 99, 147, 229, 147, 830, 99, 124, 124, 281, 106,
927 147, 273, 125, 125, 13, 186, 13, 13, 13, 13,
928 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
929 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
930 272, 270, 13, 15, 15, 269, 277, 123, 15, 316,
931
932 278, 15, 275, 15, 15, 571, 15, 15, 15, 15,
933 15, 15, 15, 101, 15, 15, 106, 124, 15, 281,
934 106, 273, 119, 101, 125, 101, 101, 101, 101, 101,
935 101, 101, 119, 234, 119, 119, 119, 119, 119, 119,
936 119, 148, 148, 148, 234, 234, 15, 148, 148, 15,
937 15, 293, 269, 15, 15, 15, 309, 309, 15, 15,
938 278, 15, 15, 272, 15, 293, 15, 571, 15, 304,
939 277, 15, 316, 304, 15, 15, 15, 15, 19, 19,
940 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
941 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
942
943 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
944 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
945 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
946 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
947 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
948 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
949 19, 19, 19, 19, 19, 19, 19, 19, 19, 100,
950 114, 143, 143, 143, 143, 143, 143, 143, 829, 100,
951 283, 100, 100, 100, 100, 100, 100, 100, 155, 179,
952 179, 179, 179, 828, 155, 155, 311, 311, 276, 155,
953
954 155, 827, 312, 312, 155, 164, 164, 164, 164, 164,
955 164, 173, 173, 173, 173, 173, 173, 173, 204, 204,
956 204, 204, 204, 204, 206, 206, 206, 206, 217, 217,
957 217, 217, 217, 217, 114, 280, 271, 310, 310, 100,
958 114, 261, 261, 261, 261, 261, 261, 100, 284, 114,
959 120, 283, 120, 215, 215, 215, 215, 215, 215, 215,
960 276, 305, 216, 120, 216, 216, 216, 216, 216, 216,
961 216, 276, 276, 305, 299, 299, 312, 120, 826, 120,
962 120, 489, 120, 313, 313, 120, 386, 120, 120, 120,
963 120, 120, 120, 343, 343, 120, 120, 120, 271, 120,
964
965 299, 369, 369, 256, 280, 825, 300, 120, 271, 284,
966 310, 120, 300, 256, 120, 256, 256, 256, 256, 256,
967 256, 256, 257, 371, 371, 120, 430, 512, 300, 512,
968 430, 385, 257, 824, 257, 257, 257, 257, 257, 257,
969 257, 259, 259, 259, 259, 259, 259, 259, 260, 287,
970 287, 287, 287, 287, 287, 287, 390, 489, 260, 386,
971 260, 260, 260, 260, 260, 260, 260, 392, 387, 389,
972 288, 391, 394, 256, 294, 294, 388, 393, 294, 292,
973 288, 256, 288, 288, 288, 288, 288, 288, 288, 292,
974 294, 303, 385, 292, 344, 344, 344, 344, 292, 345,
975
976 345, 345, 345, 303, 368, 368, 368, 368, 292, 346,
977 346, 346, 346, 346, 346, 346, 397, 390, 303, 347,
978 347, 347, 347, 347, 347, 387, 346, 375, 375, 375,
979 375, 375, 375, 388, 389, 368, 391, 392, 368, 395,
980 398, 399, 393, 368, 400, 401, 394, 368, 377, 823,
981 441, 441, 822, 368, 488, 378, 426, 486, 346, 494,
982 377, 377, 377, 377, 377, 377, 377, 378, 378, 378,
983 378, 378, 378, 409, 427, 426, 492, 377, 409, 442,
984 442, 444, 444, 444, 444, 491, 495, 427, 493, 409,
985 496, 397, 445, 445, 445, 445, 565, 398, 567, 500,
986
987 395, 446, 446, 446, 446, 400, 404, 566, 497, 377,
988 399, 441, 447, 447, 447, 447, 494, 401, 404, 404,
989 404, 404, 404, 404, 404, 466, 466, 466, 466, 488,
990 486, 448, 570, 448, 627, 404, 448, 448, 448, 448,
991 448, 448, 448, 572, 467, 467, 467, 467, 492, 535,
992 535, 573, 623, 623, 491, 600, 466, 496, 495, 466,
993 500, 567, 784, 565, 466, 544, 493, 404, 466, 784,
994 544, 821, 566, 568, 466, 467, 497, 600, 467, 569,
995 626, 467, 475, 467, 635, 820, 467, 467, 819, 632,
996 675, 675, 633, 467, 475, 475, 475, 475, 475, 475,
997
998 478, 570, 478, 627, 572, 478, 478, 478, 478, 478,
999 478, 478, 502, 818, 502, 817, 573, 502, 502, 502,
1000 502, 502, 502, 502, 536, 536, 536, 536, 536, 536,
1001 536, 537, 537, 537, 537, 537, 537, 537, 559, 559,
1002 559, 559, 559, 559, 559, 560, 569, 568, 632, 633,
1003 681, 569, 683, 635, 626, 677, 677, 560, 560, 560,
1004 560, 560, 560, 560, 575, 575, 575, 575, 575, 575,
1005 575, 576, 601, 601, 601, 601, 601, 601, 601, 682,
1006 684, 719, 767, 576, 576, 576, 576, 576, 576, 576,
1007 658, 658, 658, 658, 658, 658, 658, 696, 780, 780,
1008
1009 814, 845, 863, 845, 863, 813, 696, 696, 832, 845,
1010 863, 683, 780, 681, 831, 831, 831, 831, 831, 831,
1011 831, 874, 874, 832, 832, 832, 832, 832, 832, 832,
1012 871, 877, 871, 877, 812, 811, 810, 809, 871, 877,
1013 682, 808, 719, 684, 807, 806, 805, 804, 802, 801,
1014 800, 799, 797, 796, 794, 767, 838, 838, 838, 838,
1015 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
1016 838, 838, 838, 838, 838, 838, 839, 839, 839, 839,
1017 839, 839, 839, 839, 839, 839, 839, 839, 839, 839,
1018 839, 839, 839, 839, 839, 839, 840, 840, 840, 840,
1019
1020 840, 840, 840, 840, 840, 840, 840, 840, 840, 840,
1021 840, 840, 840, 840, 840, 840, 841, 841, 841, 841,
1022 841, 841, 841, 841, 841, 841, 841, 841, 841, 841,
1023 841, 841, 841, 841, 841, 841, 842, 842, 842, 842,
1024 842, 842, 842, 842, 842, 842, 842, 842, 842, 842,
1025 842, 842, 842, 842, 842, 842, 843, 843, 843, 843,
1026 843, 843, 843, 843, 843, 843, 843, 793, 843, 843,
1027 843, 843, 843, 843, 844, 844, 844, 844, 844, 844,
1028 846, 846, 846, 792, 791, 790, 846, 788, 787, 786,
1029 846, 847, 847, 847, 847, 847, 847, 847, 847, 847,
1030
1031 847, 847, 785, 847, 847, 847, 847, 847, 847, 848,
1032 848, 848, 848, 848, 848, 848, 848, 848, 848, 848,
1033 783, 848, 848, 848, 848, 848, 848, 849, 779, 849,
1034 778, 849, 849, 777, 774, 849, 771, 849, 849, 850,
1035 850, 770, 769, 850, 768, 850, 850, 851, 851, 851,
1036 851, 851, 851, 851, 766, 851, 851, 851, 851, 851,
1037 851, 851, 851, 851, 851, 765, 851, 852, 852, 852,
1038 852, 852, 852, 852, 852, 852, 852, 852, 852, 852,
1039 852, 852, 852, 852, 852, 763, 852, 853, 853, 853,
1040 853, 853, 853, 853, 853, 853, 853, 853, 853, 853,
1041
1042 853, 853, 853, 853, 853, 853, 854, 854, 854, 854,
1043 854, 854, 854, 854, 854, 854, 854, 762, 854, 854,
1044 854, 854, 854, 854, 855, 855, 855, 855, 855, 855,
1045 855, 855, 855, 855, 855, 761, 855, 855, 855, 855,
1046 855, 855, 856, 754, 856, 752, 856, 751, 856, 856,
1047 750, 749, 856, 747, 856, 856, 857, 857, 746, 744,
1048 743, 857, 857, 857, 858, 858, 858, 858, 742, 858,
1049 858, 858, 858, 858, 858, 741, 858, 858, 858, 858,
1050 858, 858, 859, 859, 859, 738, 859, 737, 859, 859,
1051 736, 735, 859, 734, 859, 859, 860, 860, 860, 860,
1052
1053 860, 860, 860, 860, 860, 860, 860, 733, 860, 860,
1054 860, 860, 860, 860, 861, 861, 861, 861, 861, 861,
1055 861, 861, 861, 861, 861, 732, 861, 861, 861, 861,
1056 861, 861, 862, 862, 862, 862, 862, 862, 862, 862,
1057 862, 862, 862, 862, 862, 862, 862, 862, 862, 862,
1058 862, 862, 864, 730, 864, 729, 864, 864, 728, 727,
1059 864, 724, 864, 864, 865, 722, 865, 721, 865, 865,
1060 720, 718, 865, 717, 865, 865, 866, 866, 866, 866,
1061 866, 866, 866, 866, 866, 866, 866, 866, 866, 866,
1062 866, 866, 866, 866, 866, 866, 867, 867, 867, 867,
1063
1064 867, 867, 867, 716, 867, 867, 867, 867, 867, 867,
1065 867, 867, 867, 867, 715, 867, 868, 868, 868, 868,
1066 868, 868, 868, 714, 868, 868, 868, 868, 868, 868,
1067 868, 868, 868, 868, 869, 869, 869, 869, 869, 869,
1068 869, 713, 869, 869, 869, 869, 869, 869, 869, 869,
1069 869, 869, 870, 870, 870, 870, 870, 870, 870, 870,
1070 870, 870, 870, 712, 870, 870, 870, 870, 870, 870,
1071 872, 711, 872, 710, 872, 709, 872, 872, 708, 706,
1072 872, 703, 872, 872, 873, 873, 873, 873, 873, 873,
1073 702, 873, 873, 873, 873, 873, 873, 873, 873, 873,
1074
1075 873, 873, 873, 873, 875, 875, 875, 700, 875, 698,
1076 875, 875, 697, 695, 875, 694, 875, 875, 876, 876,
1077 876, 876, 876, 876, 876, 876, 876, 876, 876, 693,
1078 876, 876, 876, 876, 876, 876, 878, 692, 878, 691,
1079 878, 878, 690, 689, 878, 688, 878, 878, 879, 879,
1080 879, 879, 879, 879, 879, 879, 879, 879, 879, 879,
1081 879, 879, 879, 879, 879, 879, 879, 879, 880, 687,
1082 880, 880, 880, 880, 880, 880, 880, 880, 880, 880,
1083 880, 880, 880, 880, 880, 880, 880, 880, 686, 685,
1084 680, 679, 678, 674, 673, 672, 671, 670, 669, 668,
1085
1086 667, 666, 665, 664, 662, 660, 659, 656, 655, 653,
1087 651, 650, 648, 647, 646, 645, 643, 641, 640, 639,
1088 638, 637, 636, 634, 631, 630, 629, 628, 625, 624,
1089 622, 621, 620, 619, 618, 617, 616, 615, 613, 612,
1090 607, 606, 605, 604, 603, 602, 599, 598, 597, 596,
1091 595, 594, 592, 591, 590, 589, 588, 587, 586, 585,
1092 584, 583, 582, 580, 579, 577, 574, 564, 562, 561,
1093 557, 556, 555, 554, 553, 552, 551, 550, 548, 547,
1094 546, 545, 543, 542, 541, 540, 533, 532, 531, 530,
1095 529, 528, 527, 526, 525, 524, 523, 522, 520, 518,
1096
1097 517, 516, 515, 514, 513, 511, 510, 509, 508, 507,
1098 506, 505, 504, 499, 498, 490, 487, 485, 484, 482,
1099 481, 477, 476, 473, 472, 471, 470, 469, 468, 465,
1100 462, 461, 460, 459, 458, 457, 456, 454, 453, 451,
1101 449, 439, 438, 436, 435, 434, 432, 431, 429, 424,
1102 423, 422, 420, 418, 417, 416, 415, 414, 413, 411,
1103 410, 408, 407, 403, 402, 396, 384, 383, 382, 381,
1104 380, 379, 374, 372, 367, 366, 365, 364, 363, 361,
1105 360, 359, 358, 357, 356, 355, 354, 353, 352, 351,
1106 350, 341, 318, 317, 315, 307, 306, 302, 301, 298,
1107
1108 297, 296, 295, 291, 290, 289, 286, 285, 282, 279,
1109 274, 266, 264, 255, 254, 253, 252, 248, 245, 243,
1110 242, 241, 239, 238, 236, 235, 233, 231, 230, 228,
1111 227, 226, 225, 224, 210, 208, 200, 199, 198, 196,
1112 193, 192, 185, 184, 183, 181, 180, 177, 175, 174,
1113 171, 170, 169, 157, 156, 154, 152, 151, 150, 144,
1114 142, 138, 137, 136, 134, 131, 130, 129, 128, 126,
1115 104, 102, 98, 97, 89, 88, 86, 85, 84, 83,
1116 81, 80, 70, 69, 67, 64, 58, 57, 43, 42,
1117 40, 38, 37, 36, 30, 25, 24, 21, 12, 8,
1118
1119 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1120 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1121 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1122 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1123 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1124 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1125 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1126 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1127 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
1128 837, 837
1129
1130 } ;
1131
1132 static yy_state_type yy_last_accepting_state;
1133 static char *yy_last_accepting_cpos;
1134
1135 /* The intent behind this definition is that it'll catch
1136 * any uses of REJECT which flex missed.
1137 */
1138 #define REJECT reject_used_but_not_detected
1139 #define yymore() yymore_used_but_not_detected
1140 #define YY_MORE_ADJ 0
1141 char *yytext;
1142 # line 1 "yaccParser/hslexer.flex"
1143 # line 2 "yaccParser/hslexer.flex"
1144 /**********************************************************************
1145 * *
1146 * *
1147 * LEX grammar for Haskell. *
1148 * ------------------------ *
1149 * *
1150 * (c) Copyright K. Hammond, University of Glasgow, *
1151 * 10th. February 1989 *
1152 * *
1153 * Modification History *
1154 * -------------------- *
1155 * *
1156 * 22/08/91 kh Initial Haskell 1.1 version. *
1157 * 18/10/91 kh Added 'ccall'. *
1158 * 19/11/91 kh Tidied generally. *
1159 * 04/12/91 kh Added Int#. *
1160 * 31/01/92 kh Haskell 1.2 version. *
1161 * 24/04/92 ps Added 'scc'. *
1162 * 03/06/92 kh Changed Infix/Prelude Handling. *
1163 * 23/08/93 jsm Changed to support flex *
1164 * *
1165 * *
1166 * Known Problems: *
1167 * *
1168 * None, any more. *
1169 * *
1170 **********************************************************************/
1171
1172 #include "../../includes/config.h"
1173
1174 #include <stdio.h>
1175
1176 #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
1177 #include <string.h>
1178 /* An ANSI string.h and pre-ANSI memory.h might conflict. */
1179 #if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
1180 #include <memory.h>
1181 #endif /* not STDC_HEADERS and HAVE_MEMORY_H */
1182 #define index strchr
1183 #define rindex strrchr
1184 #define bcopy(s, d, n) memcpy ((d), (s), (n))
1185 #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
1186 #define bzero(s, n) memset ((s), 0, (n))
1187 #else /* not STDC_HEADERS and not HAVE_STRING_H */
1188 #include <strings.h>
1189 /* memory.h and strings.h conflict on some systems. */
1190 #endif /* not STDC_HEADERS and not HAVE_STRING_H */
1191
1192 #include "hspincl.h"
1193 #include "hsparser.tab.h"
1194 #include "constants.h"
1195 #include "utils.h"
1196
1197 /* Our substitute for <ctype.h> */
1198
1199 #define NCHARS 256
1200 #define _S 0x1
1201 #define _D 0x2
1202 #define _H 0x4
1203 #define _O 0x8
1204 #define _C 0x10
1205
1206 #define _isconstr(s) (CharTable[*s]&(_C))
1207 BOOLEAN isconstr PROTO((char *)); /* fwd decl */
1208
1209 unsigned char CharTable[NCHARS] = {
1210 /* nul */ 0, 0, 0, 0, 0, 0, 0, 0,
1211 /* bs */ 0, _S, _S, _S, _S, 0, 0, 0,
1212 /* dle */ 0, 0, 0, 0, 0, 0, 0, 0,
1213 /* can */ 0, 0, 0, 0, 0, 0, 0, 0,
1214 /* sp */ _S, 0, 0, 0, 0, 0, 0, 0,
1215 /* '(' */ 0, 0, 0, 0, 0, 0, 0, 0,
1216 /* '0' */ _D|_H|_O,_D|_H|_O,_D|_H|_O,_D|_H|_O,_D|_H|_O,_D|_H|_O,_D|_H|_O,_D|_H|_O,
1217 /* '8' */ _D|_H, _D|_H, _C, 0, 0, 0, 0, 0,
1218 /* '@' */ 0, _H|_C, _H|_C, _H|_C, _H|_C, _H|_C, _H|_C, _C,
1219 /* 'H' */ _C, _C, _C, _C, _C, _C, _C, _C,
1220 /* 'P' */ _C, _C, _C, _C, _C, _C, _C, _C,
1221 /* 'X' */ _C, _C, _C, 0, 0, 0, 0, 0,
1222 /* '`' */ 0, _H, _H, _H, _H, _H, _H, 0,
1223 /* 'h' */ 0, 0, 0, 0, 0, 0, 0, 0,
1224 /* 'p' */ 0, 0, 0, 0, 0, 0, 0, 0,
1225 /* 'x' */ 0, 0, 0, 0, 0, 0, 0, 0,
1226
1227 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1228 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1229 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1230 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1231 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1232 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1233 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1234 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1235 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1236 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1237 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1238 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1239 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1240 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1241 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1242 /* */ 0, 0, 0, 0, 0, 0, 0, 0,
1243 };
1244
1245 /**********************************************************************
1246 * *
1247 * *
1248 * Declarations *
1249 * *
1250 * *
1251 **********************************************************************/
1252
1253 char *input_filename = NULL; /* Always points to a dynamically allocated string */
1254
1255 /*
1256 * For my own sanity, things that are not part of the flex skeleton
1257 * have been renamed as hsXXXXX rather than yyXXXXX. --JSM
1258 */
1259
1260 int hslineno = 0; /* Line number at end of token */
1261 int hsplineno = 0; /* Line number at end of previous token */
1262
1263 int hscolno = 0; /* Column number at end of token */
1264 int hspcolno = 0; /* Column number at end of previous token */
1265 int hsmlcolno = 0; /* Column number for multiple-rule lexemes */
1266
1267 int startlineno = 0; /* The line number where something starts */
1268 int endlineno = 0; /* The line number where something ends */
1269
1270 static BOOLEAN noGap = TRUE; /* For checking string gaps */
1271 static BOOLEAN forgetindent = FALSE; /* Don't bother applying indentation rules */
1272
1273 static int nested_comments; /* For counting comment nesting depth */
1274
1275 /* Hacky definition of yywrap: see flex doc.
1276
1277 If we don't do this, then we'll have to get the default
1278 yywrap from the flex library, which is often something
1279 we are not good at locating. This avoids that difficulty.
1280 (Besides which, this is the way old flexes (pre 2.4.x) did it.)
1281 WDP 94/09/05
1282 */
1283 #define yywrap() 1
1284
1285 /* Essential forward declarations */
1286
1287 static VOID hsnewid PROTO((char *, int));
1288 static VOID layout_input PROTO((char *, int));
1289 static VOID cleartext (NO_ARGS);
1290 static VOID addtext PROTO((char *, unsigned));
1291 static VOID addchar PROTO((char));
1292 static char *fetchtext PROTO((unsigned *));
1293
1294 /* Special file handling for IMPORTS */
1295 /* Note: imports only ever go *one deep* (hence no need for a stack) WDP 94/09 */
1296
1297 static YY_BUFFER_STATE hsbuf_save = NULL; /* Saved input buffer */
1298 static char *filename_save; /* File Name */
1299 static int hslineno_save = 0, /* Line Number */
1300 hsplineno_save = 0, /* Line Number of Prev. token */
1301 hscolno_save = 0, /* Indentation */
1302 hspcolno_save = 0; /* Left Indentation */
1303 static short icontexts_save = 0; /* Indent Context Level */
1304
1305 static BOOLEAN etags_save; /* saved: whether doing etags stuff or not */
1306 extern BOOLEAN etags; /* that which is saved */
1307
1308 extern BOOLEAN nonstandardFlag; /* Glasgow extensions allowed */
1309
1310 static BOOLEAN in_interface = FALSE; /* TRUE if we are reading a .hi file */
1311
1312 extern BOOLEAN ignorePragmas; /* True when we should ignore pragmas */
1313 extern int minAcceptablePragmaVersion; /* see documentation in main.c */
1314 extern int maxAcceptablePragmaVersion;
1315 extern int thisIfacePragmaVersion;
1316
1317 static int hssttok = -1; /* Stacked Token: -1 -- no token; -ve -- ";"
1318 * inserted before token +ve -- "}" inserted before
1319 * token */
1320
1321 short icontexts = 0; /* Which context we're in */
1322
1323
1324
1325 /*
1326 Table of indentations: right bit indicates whether to use
1327 indentation rules (1 = use rules; 0 = ignore)
1328
1329 partain:
1330 push one of these "contexts" at every "case" or "where"; the right bit says
1331 whether user supplied braces, etc., or not. pop appropriately (hsendindent).
1332
1333 ALSO, a push/pop when enter/exit a new file (e.g., on importing). A -1 is
1334 pushed (the "column" for "module", "interface" and EOF). The -1 from the initial
1335 push is shown just below.
1336
1337 */
1338
1339
1340 static short indenttab[MAX_CONTEXTS] = {-1};
1341
1342 #define INDENTPT (indenttab[icontexts]>>1)
1343 #define INDENTON (indenttab[icontexts]&1)
1344
1345 #define RETURN(tok) return(Return(tok))
1346
1347 #undef YY_DECL
1348 #define YY_DECL int yylex1()
1349
1350 /* We should not peek at yy_act, but flex calls us even for the internal action
1351 triggered on 'end-of-buffer' (This is not true of flex 2.4.4 and up, but
1352 to support older versions of flex, we'll continue to peek for now.
1353 */
1354 #define YY_USER_ACTION \
1355 if (yy_act != YY_END_OF_BUFFER) layout_input(yytext, yyleng);
1356
1357 #if 0/*debug*/
1358 #undef YY_BREAK
1359 #define YY_BREAK if (etags) fprintf(stderr,"%d %d / %d %d / %d\n",hsplineno,hspcolno,hslineno,hscolno,startlineno); break;
1360 #endif
1361
1362 /* Each time we enter a new start state, we push it onto the state stack.
1363 Note that the rules do not allow us to underflow or overflow the stack.
1364 (At least, they shouldn't.) The maximum expected depth is 4:
1365 0: Code -> 1: String -> 2: StringEsc -> 3: Comment
1366 */
1367 static int StateStack[5];
1368 static int StateDepth = -1;
1369
1370 #ifdef HSP_DEBUG
1371 #define PUSH_STATE(n) do {\
1372 fprintf(stderr,"Pushing %d (%d)\n", n, StateDepth + 1);\
1373 StateStack[++StateDepth] = (n); BEGIN(n);} while(0)
1374 #define POP_STATE do {--StateDepth;\
1375 fprintf(stderr,"Popping %d (%d)\n", StateStack[StateDepth], StateDepth);\
1376 BEGIN(StateStack[StateDepth]);} while(0)
1377 #else
1378 #define PUSH_STATE(n) do {StateStack[++StateDepth] = (n); BEGIN(n);} while(0)
1379 #define POP_STATE do {--StateDepth; BEGIN(StateStack[StateDepth]);} while(0)
1380 #endif
1381
1382 /* The start states are:
1383 Code -- normal Haskell code (principal lexer)
1384 GlaExt -- Haskell code with Glasgow extensions
1385 Comment -- Nested comment processing
1386 String -- Inside a string literal with backslashes
1387 StringEsc -- Immediately following a backslash in a string literal
1388 Char -- Inside a character literal with backslashes
1389 CharEsc -- Immediately following a backslash in a character literal
1390
1391 Note that the INITIAL state is unused. Also note that these states
1392 are _exclusive_. All rules should be prefixed with an appropriate
1393 list of start states.
1394 */
1395
1396 /* Macros after this point can all be overridden by user definitions in
1397 * section 1.
1398 */
1399
1400 #ifdef YY_MALLOC_DECL
1401 YY_MALLOC_DECL
1402 #else
1403 #if __STDC__
1404 #ifndef __cplusplus
1405 #include <stdlib.h>
1406 #endif
1407 #else
1408 /* Just try to get by without declaring the routines. This will fail
1409 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1410 * or sizeof(void*) != sizeof(int).
1411 */
1412 #endif
1413 #endif
1414
1415 /* Amount of stuff to slurp up with each read. */
1416 #ifndef YY_READ_BUF_SIZE
1417 #define YY_READ_BUF_SIZE 8192
1418 #endif
1419
1420 /* Copy whatever the last rule matched to the standard output. */
1421
1422 #ifndef ECHO
1423 /* This used to be an fputs(), but since the string might contain NUL's,
1424 * we now use fwrite().
1425 */
1426 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1427 #endif
1428
1429 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1430 * is returned in "result".
1431 */
1432 #ifndef YY_INPUT
1433 #define YY_INPUT(buf,result,max_size) \
1434 if ( yy_current_buffer->yy_is_interactive ) \
1435 { \
1436 int c = getc( yyin ); \
1437 result = c == EOF ? 0 : 1; \
1438 buf[0] = (char) c; \
1439 } \
1440 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1441 && ferror( yyin ) ) \
1442 YY_FATAL_ERROR( "input in flex scanner failed" );
1443 #endif
1444
1445 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1446 * we don't want an extra ';' after the "return" because that will cause
1447 * some compilers to complain about unreachable statements.
1448 */
1449 #ifndef yyterminate
1450 #define yyterminate() return YY_NULL
1451 #endif
1452
1453 /* Number of entries by which start-condition stack grows. */
1454 #ifndef YY_START_STACK_INCR
1455 #define YY_START_STACK_INCR 25
1456 #endif
1457
1458 /* Report a fatal error. */
1459 #ifndef YY_FATAL_ERROR
1460 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1461 #endif
1462
1463 /* Default declaration of generated scanner - a define so the user can
1464 * easily add parameters.
1465 */
1466 #ifndef YY_DECL
1467 #define YY_DECL int yylex YY_PROTO(( void ))
1468 #endif
1469
1470 /* Code executed at the beginning of each rule, after yytext and yyleng
1471 * have been set up.
1472 */
1473 #ifndef YY_USER_ACTION
1474 #define YY_USER_ACTION
1475 #endif
1476
1477 /* Code executed at the end of each rule. */
1478 #ifndef YY_BREAK
1479 #define YY_BREAK break;
1480 #endif
1481
1482 YY_DECL
1483 {
1484 register yy_state_type yy_current_state;
1485 register char *yy_cp, *yy_bp;
1486 register int yy_act;
1487
1488 # line 274 "yaccParser/hslexer.flex"
1489
1490
1491
1492 /*
1493 * Special GHC pragma rules. Do we need a start state for interface files,
1494 * so these won't be matched in source files? --JSM
1495 */
1496
1497
1498
1499 if ( yy_init )
1500 {
1501 #ifdef YY_USER_INIT
1502 YY_USER_INIT;
1503 #endif
1504
1505 if ( ! yy_start )
1506 yy_start = 1; /* first start state */
1507
1508 if ( ! yyin )
1509 yyin = stdin;
1510
1511 if ( ! yyout )
1512 yyout = stdout;
1513
1514 if ( yy_current_buffer )
1515 yy_init_buffer( yy_current_buffer, yyin );
1516 else
1517 yy_current_buffer =
1518 yy_create_buffer( yyin, YY_BUF_SIZE );
1519
1520 yy_load_buffer_state();
1521
1522 yy_init = 0;
1523 }
1524
1525 while ( 1 ) /* loops until end-of-file is reached */
1526 {
1527 yy_cp = yy_c_buf_p;
1528
1529 /* Support of yytext. */
1530 *yy_cp = yy_hold_char;
1531
1532 /* yy_bp points to the position in yy_ch_buf of the start of
1533 * the current run.
1534 */
1535 yy_bp = yy_cp;
1536
1537 yy_current_state = yy_start;
1538 if ( yy_bp[-1] == '\n' )
1539 ++yy_current_state;
1540 yy_match:
1541 do
1542 {
1543 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1544 if ( yy_accept[yy_current_state] )
1545 {
1546 yy_last_accepting_state = yy_current_state;
1547 yy_last_accepting_cpos = yy_cp;
1548 }
1549 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1550 {
1551 yy_current_state = (int) yy_def[yy_current_state];
1552 if ( yy_current_state >= 838 )
1553 yy_c = yy_meta[(unsigned int) yy_c];
1554 }
1555 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1556 ++yy_cp;
1557 }
1558 while ( yy_base[yy_current_state] != 2201 );
1559
1560 yy_find_action:
1561 yy_act = yy_accept[yy_current_state];
1562
1563 YY_DO_BEFORE_ACTION;
1564
1565
1566 do_action: /* This label is used only to access EOF actions. */
1567
1568
1569 switch ( yy_act )
1570 { /* beginning of action switch */
1571 case 0: /* must back up */
1572 /* undo the effects of YY_DO_BEFORE_ACTION */
1573 *yy_cp = yy_hold_char;
1574 yy_cp = yy_last_accepting_cpos;
1575 yy_current_state = yy_last_accepting_state;
1576 goto yy_find_action;
1577
1578 case 1:
1579 YY_USER_ACTION
1580 # line 283 "yaccParser/hslexer.flex"
1581 {
1582 char tempf[FILENAME_SIZE];
1583 sscanf(yytext+1, "%d \"%[^\"]", &hslineno, tempf);
1584 new_filename(tempf);
1585 hsplineno = hslineno; hscolno = 0; hspcolno = 0;
1586 }
1587 YY_BREAK
1588 case 2:
1589 YY_USER_ACTION
1590 # line 290 "yaccParser/hslexer.flex"
1591 {
1592 char tempf[FILENAME_SIZE];
1593 sscanf(yytext+5, "%d \"%[^\"]", &hslineno, tempf);
1594 new_filename(tempf);
1595 hsplineno = hslineno; hscolno = 0; hspcolno = 0;
1596 }
1597 YY_BREAK
1598 case 3:
1599 YY_USER_ACTION
1600 # line 297 "yaccParser/hslexer.flex"
1601 {
1602 /* partain: pragma-style line directive */
1603 char tempf[FILENAME_SIZE];
1604 sscanf(yytext+9, "%d \"%[^\"]", &hslineno, tempf);
1605 new_filename(tempf);
1606 hsplineno = hslineno; hscolno = 0; hspcolno = 0;
1607 }
1608 YY_BREAK
1609 case 4:
1610 YY_USER_ACTION
1611 # line 304 "yaccParser/hslexer.flex"
1612 {
1613 sscanf(yytext+33,"%d ",&thisIfacePragmaVersion);
1614 }
1615 YY_BREAK
1616 case 5:
1617 YY_USER_ACTION
1618 # line 307 "yaccParser/hslexer.flex"
1619 {
1620 if ( ignorePragmas ||
1621 thisIfacePragmaVersion < minAcceptablePragmaVersion ||
1622 thisIfacePragmaVersion > maxAcceptablePragmaVersion) {
1623 nested_comments = 1;
1624 PUSH_STATE(Comment);
1625 } else {
1626 PUSH_STATE(GhcPragma);
1627 RETURN(GHC_PRAGMA);
1628 }
1629 }
1630 YY_BREAK
1631 case 6:
1632 YY_USER_ACTION
1633 # line 318 "yaccParser/hslexer.flex"
1634 { RETURN(NO_PRAGMA); }
1635 YY_BREAK
1636 case 7:
1637 YY_USER_ACTION
1638 # line 319 "yaccParser/hslexer.flex"
1639 { RETURN(NOINFO_PRAGMA); }
1640 YY_BREAK
1641 case 8:
1642 YY_USER_ACTION
1643 # line 320 "yaccParser/hslexer.flex"
1644 { RETURN(ABSTRACT_PRAGMA); }
1645 YY_BREAK
1646 case 9:
1647 YY_USER_ACTION
1648 # line 321 "yaccParser/hslexer.flex"
1649 { RETURN(DEFOREST_PRAGMA); }
1650 YY_BREAK
1651 case 10:
1652 YY_USER_ACTION
1653 # line 322 "yaccParser/hslexer.flex"
1654 { RETURN(SPECIALISE_PRAGMA); }
1655 YY_BREAK
1656 case 11:
1657 YY_USER_ACTION
1658 # line 323 "yaccParser/hslexer.flex"
1659 { RETURN(MODNAME_PRAGMA); }
1660 YY_BREAK
1661 case 12:
1662 YY_USER_ACTION
1663 # line 324 "yaccParser/hslexer.flex"
1664 { RETURN(ARITY_PRAGMA); }
1665 YY_BREAK
1666 case 13:
1667 YY_USER_ACTION
1668 # line 325 "yaccParser/hslexer.flex"
1669 { RETURN(UPDATE_PRAGMA); }
1670 YY_BREAK
1671 case 14:
1672 YY_USER_ACTION
1673 # line 326 "yaccParser/hslexer.flex"
1674 { RETURN(STRICTNESS_PRAGMA); }
1675 YY_BREAK
1676 case 15:
1677 YY_USER_ACTION
1678 # line 327 "yaccParser/hslexer.flex"
1679 { RETURN(KIND_PRAGMA); }
1680 YY_BREAK
1681 case 16:
1682 YY_USER_ACTION
1683 # line 328 "yaccParser/hslexer.flex"
1684 { RETURN(MAGIC_UNFOLDING_PRAGMA); }
1685 YY_BREAK
1686 case 17:
1687 YY_USER_ACTION
1688 # line 329 "yaccParser/hslexer.flex"
1689 { RETURN(UNFOLDING_PRAGMA); }
1690 YY_BREAK
1691 case 18:
1692 YY_USER_ACTION
1693 # line 331 "yaccParser/hslexer.flex"
1694 { RETURN(COCON); }
1695 YY_BREAK
1696 case 19:
1697 YY_USER_ACTION
1698 # line 332 "yaccParser/hslexer.flex"
1699 { RETURN(COPRIM); }
1700 YY_BREAK
1701 case 20:
1702 YY_USER_ACTION
1703 # line 333 "yaccParser/hslexer.flex"
1704 { RETURN(COAPP); }
1705 YY_BREAK
1706 case 21:
1707 YY_USER_ACTION
1708 # line 334 "yaccParser/hslexer.flex"
1709 { RETURN(COTYAPP); }
1710 YY_BREAK
1711 case 22:
1712 YY_USER_ACTION
1713 # line 335 "yaccParser/hslexer.flex"
1714 { RETURN(CO_ALG_ALTS); }
1715 YY_BREAK
1716 case 23:
1717 YY_USER_ACTION
1718 # line 336 "yaccParser/hslexer.flex"
1719 { RETURN(CO_PRIM_ALTS); }
1720 YY_BREAK
1721 case 24:
1722 YY_USER_ACTION
1723 # line 337 "yaccParser/hslexer.flex"
1724 { RETURN(CO_NO_DEFAULT); }
1725 YY_BREAK
1726 case 25:
1727 YY_USER_ACTION
1728 # line 338 "yaccParser/hslexer.flex"
1729 { RETURN(CO_LETREC); }
1730 YY_BREAK
1731 case 26:
1732 YY_USER_ACTION
1733 # line 340 "yaccParser/hslexer.flex"
1734 { RETURN(CO_PRELUDE_DICTS_CC); }
1735 YY_BREAK
1736 case 27:
1737 YY_USER_ACTION
1738 # line 341 "yaccParser/hslexer.flex"
1739 { RETURN(CO_ALL_DICTS_CC); }
1740 YY_BREAK
1741 case 28:
1742 YY_USER_ACTION
1743 # line 342 "yaccParser/hslexer.flex"
1744 { RETURN(CO_USER_CC); }
1745 YY_BREAK
1746 case 29:
1747 YY_USER_ACTION
1748 # line 343 "yaccParser/hslexer.flex"
1749 { RETURN(CO_AUTO_CC); }
1750 YY_BREAK
1751 case 30:
1752 YY_USER_ACTION
1753 # line 344 "yaccParser/hslexer.flex"
1754 { RETURN(CO_DICT_CC); }
1755 YY_BREAK
1756 case 31:
1757 YY_USER_ACTION
1758 # line 346 "yaccParser/hslexer.flex"
1759 { RETURN(CO_DUPD_CC); }
1760 YY_BREAK
1761 case 32:
1762 YY_USER_ACTION
1763 # line 347 "yaccParser/hslexer.flex"
1764 { RETURN(CO_CAF_CC); }
1765 YY_BREAK
1766 case 33:
1767 YY_USER_ACTION
1768 # line 349 "yaccParser/hslexer.flex"
1769 { RETURN(CO_SDSEL_ID); }
1770 YY_BREAK
1771 case 34:
1772 YY_USER_ACTION
1773 # line 350 "yaccParser/hslexer.flex"
1774 { RETURN(CO_METH_ID); }
1775 YY_BREAK
1776 case 35:
1777 YY_USER_ACTION
1778 # line 351 "yaccParser/hslexer.flex"
1779 { RETURN(CO_DEFM_ID); }
1780 YY_BREAK
1781 case 36:
1782 YY_USER_ACTION
1783 # line 352 "yaccParser/hslexer.flex"
1784 { RETURN(CO_DFUN_ID); }
1785 YY_BREAK
1786 case 37:
1787 YY_USER_ACTION
1788 # line 353 "yaccParser/hslexer.flex"
1789 { RETURN(CO_CONSTM_ID); }
1790 YY_BREAK
1791 case 38:
1792 YY_USER_ACTION
1793 # line 354 "yaccParser/hslexer.flex"
1794 { RETURN(CO_SPEC_ID); }
1795 YY_BREAK
1796 case 39:
1797 YY_USER_ACTION
1798 # line 355 "yaccParser/hslexer.flex"
1799 { RETURN(CO_WRKR_ID); }
1800 YY_BREAK
1801 case 40:
1802 YY_USER_ACTION
1803 # line 356 "yaccParser/hslexer.flex"
1804 { RETURN(CO_ORIG_NM); /* fully-qualified original name*/ }
1805 YY_BREAK
1806 case 41:
1807 YY_USER_ACTION
1808 # line 358 "yaccParser/hslexer.flex"
1809 { RETURN(UNFOLD_ALWAYS); }
1810 YY_BREAK
1811 case 42:
1812 YY_USER_ACTION
1813 # line 359 "yaccParser/hslexer.flex"
1814 { RETURN(UNFOLD_IF_ARGS); }
1815 YY_BREAK
1816 case 43:
1817 YY_USER_ACTION
1818 # line 361 "yaccParser/hslexer.flex"
1819 { RETURN(NOREP_INTEGER); }
1820 YY_BREAK
1821 case 44:
1822 YY_USER_ACTION
1823 # line 362 "yaccParser/hslexer.flex"
1824 { RETURN(NOREP_RATIONAL); }
1825 YY_BREAK
1826 case 45:
1827 YY_USER_ACTION
1828 # line 363 "yaccParser/hslexer.flex"
1829 { RETURN(NOREP_STRING); }
1830 YY_BREAK
1831 case 46:
1832 YY_USER_ACTION
1833 # line 365 "yaccParser/hslexer.flex"
1834 { POP_STATE; RETURN(END_PRAGMA); }
1835 YY_BREAK
1836 case 47:
1837 YY_USER_ACTION
1838 # line 367 "yaccParser/hslexer.flex"
1839 {
1840 PUSH_STATE(UserPragma);
1841 RETURN(SPECIALISE_UPRAGMA);
1842 }
1843 YY_BREAK
1844 case 48:
1845 YY_USER_ACTION
1846 # line 371 "yaccParser/hslexer.flex"
1847 {
1848 PUSH_STATE(UserPragma);
1849 RETURN(INLINE_UPRAGMA);
1850 }
1851 YY_BREAK
1852 case 49:
1853 YY_USER_ACTION
1854 # line 375 "yaccParser/hslexer.flex"
1855 {
1856 PUSH_STATE(UserPragma);
1857 RETURN(MAGIC_UNFOLDING_UPRAGMA);
1858 }
1859 YY_BREAK
1860 case 50:
1861 YY_USER_ACTION
1862 # line 379 "yaccParser/hslexer.flex"
1863 {
1864 PUSH_STATE(UserPragma);
1865 RETURN(DEFOREST_UPRAGMA);
1866 }
1867 YY_BREAK
1868 case 51:
1869 YY_USER_ACTION
1870 # line 383 "yaccParser/hslexer.flex"
1871 {
1872 PUSH_STATE(UserPragma);
1873 RETURN(ABSTRACT_UPRAGMA);
1874 }
1875 YY_BREAK
1876 case 52:
1877 YY_USER_ACTION
1878 # line 387 "yaccParser/hslexer.flex"
1879 { POP_STATE; RETURN(END_UPRAGMA); }
1880 YY_BREAK
1881
1882 /*
1883 * Haskell keywords. `scc' is actually a Glasgow extension, but it is
1884 * intentionally accepted as a keyword even for normal <Code>.
1885 */
1886
1887 case 53:
1888 YY_USER_ACTION
1889 # line 396 "yaccParser/hslexer.flex"
1890 { RETURN(CASE); }
1891 YY_BREAK
1892 case 54:
1893 YY_USER_ACTION
1894 # line 397 "yaccParser/hslexer.flex"
1895 { RETURN(CLASS); }
1896 YY_BREAK
1897 case 55:
1898 YY_USER_ACTION
1899 # line 398 "yaccParser/hslexer.flex"
1900 { RETURN(DATA); }
1901 YY_BREAK
1902 case 56:
1903 YY_USER_ACTION
1904 # line 399 "yaccParser/hslexer.flex"
1905 { RETURN(DEFAULT); }
1906 YY_BREAK
1907 case 57:
1908 YY_USER_ACTION
1909 # line 400 "yaccParser/hslexer.flex"
1910 { RETURN(DERIVING); }
1911 YY_BREAK
1912 case 58:
1913 YY_USER_ACTION
1914 # line 401 "yaccParser/hslexer.flex"
1915 { RETURN(ELSE); }
1916 YY_BREAK
1917 case 59:
1918 YY_USER_ACTION
1919 # line 402 "yaccParser/hslexer.flex"
1920 { RETURN(HIDING); }
1921 YY_BREAK
1922 case 60:
1923 YY_USER_ACTION
1924 # line 403 "yaccParser/hslexer.flex"
1925 { RETURN(IF); }
1926 YY_BREAK
1927 case 61:
1928 YY_USER_ACTION
1929 # line 404 "yaccParser/hslexer.flex"
1930 { RETURN(IMPORT); }
1931 YY_BREAK
1932 case 62:
1933 YY_USER_ACTION
1934 # line 405 "yaccParser/hslexer.flex"
1935 { RETURN(INFIX); }
1936 YY_BREAK
1937 case 63:
1938 YY_USER_ACTION
1939 # line 406 "yaccParser/hslexer.flex"
1940 { RETURN(INFIXL); }
1941 YY_BREAK
1942 case 64:
1943 YY_USER_ACTION
1944 # line 407 "yaccParser/hslexer.flex"
1945 { RETURN(INFIXR); }
1946 YY_BREAK
1947 case 65:
1948 YY_USER_ACTION
1949 # line 408 "yaccParser/hslexer.flex"
1950 { RETURN(INSTANCE); }
1951 YY_BREAK
1952 case 66:
1953 YY_USER_ACTION
1954 # line 409 "yaccParser/hslexer.flex"
1955 { RETURN(INTERFACE); }
1956 YY_BREAK
1957 case 67:
1958 YY_USER_ACTION
1959 # line 410 "yaccParser/hslexer.flex"
1960 { RETURN(MODULE); }
1961 YY_BREAK
1962 case 68:
1963 YY_USER_ACTION
1964 # line 411 "yaccParser/hslexer.flex"
1965 { RETURN(OF); }
1966 YY_BREAK
1967 case 69:
1968 YY_USER_ACTION
1969 # line 412 "yaccParser/hslexer.flex"
1970 { RETURN(RENAMING); }
1971 YY_BREAK
1972 case 70:
1973 YY_USER_ACTION
1974 # line 413 "yaccParser/hslexer.flex"
1975 { RETURN(THEN); }
1976 YY_BREAK
1977 case 71:
1978 YY_USER_ACTION
1979 # line 414 "yaccParser/hslexer.flex"
1980 { RETURN(TO); }
1981 YY_BREAK
1982 case 72:
1983 YY_USER_ACTION
1984 # line 415 "yaccParser/hslexer.flex"
1985 { RETURN(TYPE); }
1986 YY_BREAK
1987 case 73:
1988 YY_USER_ACTION
1989 # line 416 "yaccParser/hslexer.flex"
1990 { RETURN(WHERE); }
1991 YY_BREAK
1992 case 74:
1993 YY_USER_ACTION
1994 # line 417 "yaccParser/hslexer.flex"
1995 { RETURN(IN); }
1996 YY_BREAK
1997 case 75:
1998 YY_USER_ACTION
1999 # line 418 "yaccParser/hslexer.flex"
2000 { RETURN(LET); }
2001 YY_BREAK
2002 case 76:
2003 YY_USER_ACTION
2004 # line 419 "yaccParser/hslexer.flex"
2005 { RETURN(CCALL); }
2006 YY_BREAK
2007 case 77:
2008 YY_USER_ACTION
2009 # line 420 "yaccParser/hslexer.flex"
2010 { RETURN(CCALL_GC); }
2011 YY_BREAK
2012 case 78:
2013 YY_USER_ACTION
2014 # line 421 "yaccParser/hslexer.flex"
2015 { RETURN(CASM); }
2016 YY_BREAK
2017 case 79:
2018 YY_USER_ACTION
2019 # line 422 "yaccParser/hslexer.flex"
2020 { RETURN(CASM_GC); }
2021 YY_BREAK
2022 case 80:
2023 YY_USER_ACTION
2024 # line 423 "yaccParser/hslexer.flex"
2025 { RETURN(SCC); }
2026 YY_BREAK
2027 case 81:
2028 YY_USER_ACTION
2029 # line 424 "yaccParser/hslexer.flex"
2030 { RETURN(FORALL); }
2031 YY_BREAK
2032
2033 /*
2034 * Haskell operators. Nothing special about these.
2035 */
2036
2037 case 82:
2038 YY_USER_ACTION
2039 # line 432 "yaccParser/hslexer.flex"
2040 { RETURN(DOTDOT); }
2041 YY_BREAK
2042 case 83:
2043 YY_USER_ACTION
2044 # line 433 "yaccParser/hslexer.flex"
2045 { RETURN(SEMI); }
2046 YY_BREAK
2047 case 84:
2048 YY_USER_ACTION
2049 # line 434 "yaccParser/hslexer.flex"
2050 { RETURN(COMMA); }
2051 YY_BREAK
2052 case 85:
2053 YY_USER_ACTION
2054 # line 435 "yaccParser/hslexer.flex"
2055 { RETURN(VBAR); }
2056 YY_BREAK
2057 case 86:
2058 YY_USER_ACTION
2059 # line 436 "yaccParser/hslexer.flex"
2060 { RETURN(EQUAL); }
2061 YY_BREAK
2062 case 87:
2063 YY_USER_ACTION
2064 # line 437 "yaccParser/hslexer.flex"
2065 { RETURN(LARROW); }
2066 YY_BREAK
2067 case 88:
2068 YY_USER_ACTION
2069 # line 438 "yaccParser/hslexer.flex"
2070 { RETURN(RARROW); }
2071 YY_BREAK
2072 case 89:
2073 YY_USER_ACTION
2074 # line 439 "yaccParser/hslexer.flex"
2075 { RETURN(DARROW); }
2076 YY_BREAK
2077 case 90:
2078 YY_USER_ACTION
2079 # line 440 "yaccParser/hslexer.flex"
2080 { RETURN(DCOLON); }
2081 YY_BREAK
2082 case 91:
2083 YY_USER_ACTION
2084 # line 441 "yaccParser/hslexer.flex"
2085 { RETURN(OPAREN); }
2086 YY_BREAK
2087 case 92:
2088 YY_USER_ACTION
2089 # line 442 "yaccParser/hslexer.flex"
2090 { RETURN(CPAREN); }
2091 YY_BREAK
2092 case 93:
2093 YY_USER_ACTION
2094 # line 443 "yaccParser/hslexer.flex"
2095 { RETURN(OBRACK); }
2096 YY_BREAK
2097 case 94:
2098 YY_USER_ACTION
2099 # line 444 "yaccParser/hslexer.flex"
2100 { RETURN(CBRACK); }
2101 YY_BREAK
2102 case 95:
2103 YY_USER_ACTION
2104 # line 445 "yaccParser/hslexer.flex"
2105 { RETURN(OCURLY); }
2106 YY_BREAK
2107 case 96:
2108 YY_USER_ACTION
2109 # line 446 "yaccParser/hslexer.flex"
2110 { RETURN(CCURLY); }
2111 YY_BREAK
2112 case 97:
2113 YY_USER_ACTION
2114 # line 447 "yaccParser/hslexer.flex"
2115 { RETURN(PLUS); }
2116 YY_BREAK
2117 case 98:
2118 YY_USER_ACTION
2119 # line 448 "yaccParser/hslexer.flex"
2120 { RETURN(AT); }
2121 YY_BREAK
2122 case 99:
2123 YY_USER_ACTION
2124 # line 449 "yaccParser/hslexer.flex"
2125 { RETURN(LAMBDA); }
2126 YY_BREAK
2127 case 100:
2128 YY_USER_ACTION
2129 # line 450 "yaccParser/hslexer.flex"
2130 { RETURN(TYLAMBDA); }
2131 YY_BREAK
2132 case 101:
2133 YY_USER_ACTION
2134 # line 451 "yaccParser/hslexer.flex"
2135 { RETURN(WILDCARD); }
2136 YY_BREAK
2137 case 102:
2138 YY_USER_ACTION
2139 # line 452 "yaccParser/hslexer.flex"
2140 { RETURN(BQUOTE); }
2141 YY_BREAK
2142 case 103:
2143 YY_USER_ACTION
2144 # line 453 "yaccParser/hslexer.flex"
2145 { RETURN(LAZY); }
2146 YY_BREAK
2147 case 104:
2148 YY_USER_ACTION
2149 # line 454 "yaccParser/hslexer.flex"
2150 { RETURN(MINUS); }
2151 YY_BREAK
2152
2153 /*
2154 * Integers and (for Glasgow extensions) primitive integers. Note that
2155 * we pass all of the text on to the parser, because flex/C can't handle
2156 * arbitrary precision numbers.
2157 */
2158
2159 case 105:
2160 YY_USER_ACTION
2161 # line 464 "yaccParser/hslexer.flex"
2162 { /* octal */
2163 yylval.uid = xstrndup(yytext, yyleng - 1);
2164 RETURN(INTPRIM);
2165 }
2166 YY_BREAK
2167 case 106:
2168 YY_USER_ACTION
2169 # line 468 "yaccParser/hslexer.flex"
2170 { /* octal */
2171 yylval.uid = xstrndup(yytext, yyleng);
2172 RETURN(INTEGER);
2173 }
2174 YY_BREAK
2175 case 107:
2176 YY_USER_ACTION
2177 # line 472 "yaccParser/hslexer.flex"
2178 { /* hexadecimal */
2179 yylval.uid = xstrndup(yytext, yyleng - 1);
2180 RETURN(INTPRIM);
2181 }
2182 YY_BREAK
2183 case 108:
2184 YY_USER_ACTION
2185 # line 476 "yaccParser/hslexer.flex"
2186 { /* hexadecimal */
2187 yylval.uid = xstrndup(yytext, yyleng);
2188 RETURN(INTEGER);
2189 }
2190 YY_BREAK
2191 case 109:
2192 YY_USER_ACTION
2193 # line 480 "yaccParser/hslexer.flex"
2194 {
2195 yylval.uid = xstrndup(yytext, yyleng - 1);
2196 RETURN(INTPRIM);
2197 }
2198 YY_BREAK
2199 case 110:
2200 YY_USER_ACTION
2201 # line 484 "yaccParser/hslexer.flex"
2202 {
2203 yylval.uid = xstrndup(yytext, yyleng);
2204 RETURN(INTEGER);
2205 }
2206 YY_BREAK
2207
2208 /*
2209 * Floats and (for Glasgow extensions) primitive floats/doubles.
2210 */
2211
2212 case 111:
2213 YY_USER_ACTION
2214 # line 495 "yaccParser/hslexer.flex"
2215 {
2216 yylval.uid = xstrndup(yytext, yyleng - 2);
2217 RETURN(DOUBLEPRIM);
2218 }
2219 YY_BREAK
2220 case 112:
2221 YY_USER_ACTION
2222 # line 499 "yaccParser/hslexer.flex"
2223 {
2224 yylval.uid = xstrndup(yytext, yyleng - 1);
2225 RETURN(FLOATPRIM);
2226 }
2227 YY_BREAK
2228 case 113:
2229 YY_USER_ACTION
2230 # line 503 "yaccParser/hslexer.flex"
2231 {
2232 yylval.uid = xstrndup(yytext, yyleng);
2233 RETURN(FLOAT);
2234 }
2235 YY_BREAK
2236
2237 /*
2238 * Funky ``foo'' style C literals for Glasgow extensions
2239 */
2240
2241 case 114:
2242 YY_USER_ACTION
2243 # line 514 "yaccParser/hslexer.flex"
2244 {
2245 hsnewid(yytext + 2, yyleng - 4);
2246 RETURN(CLITLIT);
2247 }
2248 YY_BREAK
2249
2250 /*
2251 * Identifiers, both variables and operators. The trailing hash is allowed
2252 * for Glasgow extensions.
2253 */
2254
2255 case 115:
2256 YY_USER_ACTION
2257 # line 526 "yaccParser/hslexer.flex"
2258 { hsnewid(yytext, yyleng); RETURN(CONID); }
2259 YY_BREAK
2260 case 116:
2261 YY_USER_ACTION
2262 # line 527 "yaccParser/hslexer.flex"
2263 { hsnewid(yytext, yyleng); RETURN(CONID); }
2264 YY_BREAK
2265 case 117:
2266 YY_USER_ACTION
2267 # line 528 "yaccParser/hslexer.flex"
2268 { hsnewid(yytext, yyleng); RETURN(TYVAR_TEMPLATE_ID); }
2269 YY_BREAK
2270 case 118:
2271 YY_USER_ACTION
2272 # line 530 "yaccParser/hslexer.flex"
2273 {
2274 hsnewid(yytext, yyleng);
2275 RETURN(_isconstr(yytext) ? CONID : VARID);
2276 }
2277 YY_BREAK
2278
2279 /* This SHOULDNAE work in "Code" (sigh) */
2280
2281 case 119:
2282 YY_USER_ACTION
2283 # line 537 "yaccParser/hslexer.flex"
2284 {
2285 if (! (nonstandardFlag || in_interface)) {
2286 char errbuf[ERR_BUF_SIZE];
2287 sprintf(errbuf, "Non-standard identifier (leading underscore): %s\n", yytext);
2288 hsperror(errbuf);
2289 }
2290 hsnewid(yytext, yyleng);
2291 RETURN(isconstr(yytext) ? CONID : VARID);
2292 /* NB: ^^^^^^^^ : not the macro! */
2293 }
2294 YY_BREAK
2295 case 120:
2296 YY_USER_ACTION
2297 # line 547 "yaccParser/hslexer.flex"
2298 {
2299 hsnewid(yytext, yyleng);
2300 RETURN(_isconstr(yytext) ? CONID : VARID);
2301 }
2302 YY_BREAK
2303 case 121:
2304 YY_USER_ACTION
2305 # line 551 "yaccParser/hslexer.flex"
2306 {
2307 hsnewid(yytext, yyleng);
2308 RETURN(_isconstr(yytext) ? CONSYM : VARSYM);
2309 }
2310 YY_BREAK
2311
2312 /* Why is `{Id}#` matched this way, and `{Id}` lexed as three tokens? --JSM */
2313
2314 /* Because we can make the former well-behaved (we defined them).
2315
2316 Sadly, the latter is defined by Haskell, which allows such
2317 la-la land constructs as `{-a 900-line comment-} foo`. (WDP 94/12)
2318 */
2319
2320 case 122:
2321 YY_USER_ACTION
2322 # line 566 "yaccParser/hslexer.flex"
2323 {
2324 hsnewid(yytext + 1, yyleng - 2);
2325 RETURN(_isconstr(yytext+1) ? CONSYM : VARSYM);
2326 }
2327 YY_BREAK
2328
2329 /*
2330 * Character literals. The first form is the quick form, for character
2331 * literals that don't contain backslashes. Literals with backslashes are
2332 * lexed through multiple rules. First, we match the open ' and as many
2333 * normal characters as possible. This puts us into the <Char> state, where
2334 * a backslash is legal. Then, we match the backslash and move into the
2335 * <CharEsc> state. When we drop out of <CharEsc>, we collect more normal
2336 * characters and the close '. We may end up with too many characters, but
2337 * this allows us to easily share the lex rules with strings. Excess characters
2338 * are ignored with a warning.
2339 */
2340
2341 case 123:
2342 YY_USER_ACTION
2343 # line 585 "yaccParser/hslexer.flex"
2344 {
2345 yylval.uhstring = installHstring(1, yytext+1);
2346 RETURN(CHARPRIM);
2347 }
2348 YY_BREAK
2349 case 124:
2350 YY_USER_ACTION
2351 # line 589 "yaccParser/hslexer.flex"
2352 {
2353 yylval.uhstring = installHstring(1, yytext+1);
2354 RETURN(CHAR);
2355 }
2356 YY_BREAK
2357 case 125:
2358 YY_USER_ACTION
2359 # line 593 "yaccParser/hslexer.flex"
2360 {char errbuf[ERR_BUF_SIZE];
2361 sprintf(errbuf, "'' is not a valid character (or string) literal\n");
2362 hsperror(errbuf);
2363 }
2364 YY_BREAK
2365 case 126:
2366 YY_USER_ACTION
2367 # line 597 "yaccParser/hslexer.flex"
2368 {
2369 hsmlcolno = hspcolno;
2370 cleartext();
2371 addtext(yytext+1, yyleng-1);
2372 PUSH_STATE(Char);
2373 }
2374 YY_BREAK
2375 case 127:
2376 YY_USER_ACTION
2377 # line 603 "yaccParser/hslexer.flex"
2378 {
2379 unsigned length;
2380 char *text;
2381
2382 addtext(yytext, yyleng - 2);
2383 text = fetchtext(&length);
2384
2385 if (! (nonstandardFlag || in_interface)) {
2386 char errbuf[ERR_BUF_SIZE];
2387 sprintf(errbuf, "`Char-hash' literals are non-standard: %s\n", text);
2388 hsperror(errbuf);
2389 }
2390
2391 if (length > 1) {
2392 fprintf(stderr, "\"%s\", line %d, column %d: Unboxed character literal '",
2393 input_filename, hsplineno, hspcolno + 1);
2394 format_string(stderr, (unsigned char *) text, length);
2395 fputs("' too long\n", stderr);
2396 hsperror("");
2397 }
2398 yylval.uhstring = installHstring(1, text);
2399 hspcolno = hsmlcolno;
2400 POP_STATE;
2401 RETURN(CHARPRIM);
2402 }
2403 YY_BREAK
2404 case 128: