1 /* A lexical scanner generated by flex */
2
3 /* Scanner skeleton version:
4 * $Header: /home/cvs/src/gnu/usr.bin/binutils/binutils/deflex.c,v 1.3 2014/08/31 13:40:02 tobiasu Exp $
5 */
6
7 #define FLEX_SCANNER
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
10
11 #include <stdio.h>
12 #include <errno.h>
13
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
15 #ifdef c_plusplus
16 #ifndef __cplusplus
17 #define __cplusplus
18 #endif
19 #endif
20
21
22 #ifdef __cplusplus
23
24 #include <stdlib.h>
25 #ifndef _WIN32
26 #include <unistd.h>
27 #endif
28
29 /* Use prototypes in function declarations. */
30 #define YY_USE_PROTOS
31
32 /* The "const" storage-class-modifier is valid. */
33 #define YY_USE_CONST
34
35 #else /* ! __cplusplus */
36
37 #if __STDC__
38
39 #define YY_USE_PROTOS
40 #define YY_USE_CONST
41
42 #endif /* __STDC__ */
43 #endif /* ! __cplusplus */
44
45 #ifdef __TURBOC__
46 #pragma warn -rch
47 #pragma warn -use
48 #include <io.h>
49 #include <stdlib.h>
50 #define YY_USE_CONST
51 #define YY_USE_PROTOS
52 #endif
53
54 #ifdef YY_USE_CONST
55 #define yyconst const
56 #else
57 #define yyconst
58 #endif
59
60
61 #ifdef YY_USE_PROTOS
62 #define YY_PROTO(proto) proto
63 #else
64 #define YY_PROTO(proto) ()
65 #endif
66
67
68 /* Returned upon end-of-file. */
69 #define YY_NULL 0
70
71 /* Promotes a possibly negative, possibly signed char to an unsigned
72 * integer for use as an array index. If the signed char is negative,
73 * we want to instead treat it as an 8-bit unsigned char, hence the
74 * double cast.
75 */
76 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
77
78 /* Enter a start condition. This macro really ought to take a parameter,
79 * but we do it the disgusting crufty way forced on us by the ()-less
80 * definition of BEGIN.
81 */
82 #define BEGIN yy_start = 1 + 2 *
83
84 /* Translate the current start state into a value that can be later handed
85 * to BEGIN to return to the state. The YYSTATE alias is for lex
86 * compatibility.
87 */
88 #define YY_START ((yy_start - 1) / 2)
89 #define YYSTATE YY_START
90
91 /* Action number for EOF rule of a given start state. */
92 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
93
94 /* Special action meaning "start processing a new file". */
95 #define YY_NEW_FILE yyrestart( yyin )
96
97 #define YY_END_OF_BUFFER_CHAR 0
98
99 /* Size of default input buffer. */
100 #define YY_BUF_SIZE 16384
101
102 typedef struct yy_buffer_state *YY_BUFFER_STATE;
103
104 extern int yyleng;
105 extern FILE *yyin, *yyout;
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_RESTORE_YY_MORE_OFFSET \
133 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
134 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
135 } \
136 while ( 0 )
137
138 #define unput(c) yyunput( c, yytext_ptr )
139
140 /* The following is because we cannot portably get our hands on size_t
141 * (without autoconf's help, which isn't available because we want
142 * flex-generated scanners to compile on their own).
143 */
144 typedef unsigned int yy_size_t;
145
146
147 struct yy_buffer_state
148 {
149 FILE *yy_input_file;
150
151 char *yy_ch_buf; /* input buffer */
152 char *yy_buf_pos; /* current position in input buffer */
153
154 /* Size of input buffer in bytes, not including room for EOB
155 * characters.
156 */
157 yy_size_t yy_buf_size;
158
159 /* Number of characters read into yy_ch_buf, not including EOB
160 * characters.
161 */
162 int yy_n_chars;
163
164 /* Whether we "own" the buffer - i.e., we know we created it,
165 * and can realloc() it to grow it, and should free() it to
166 * delete it.
167 */
168 int yy_is_our_buffer;
169
170 /* Whether this is an "interactive" input source; if so, and
171 * if we're using stdio for input, then we want to use getc()
172 * instead of fread(), to make sure we stop fetching input after
173 * each newline.
174 */
175 int yy_is_interactive;
176
177 /* Whether we're considered to be at the beginning of a line.
178 * If so, '^' rules will be active on the next match, otherwise
179 * not.
180 */
181 int yy_at_bol;
182
183 /* Whether to try to fill the input buffer when we reach the
184 * end of it.
185 */
186 int yy_fill_buffer;
187
188 int yy_buffer_status;
189 #define YY_BUFFER_NEW 0
190 #define YY_BUFFER_NORMAL 1
191 /* When an EOF's been seen but there's still some text to process
192 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
193 * shouldn't try reading from the input source any more. We might
194 * still have a bunch of tokens to match, though, because of
195 * possible backing-up.
196 *
197 * When we actually see the EOF, we change the status to "new"
198 * (via yyrestart()), so that the user can continue scanning by
199 * just pointing yyin at a new input file.
200 */
201 #define YY_BUFFER_EOF_PENDING 2
202 };
203
204 static YY_BUFFER_STATE yy_current_buffer = 0;
205
206 /* We provide macros for accessing buffer states in case in the
207 * future we want to put the buffer states in a more general
208 * "scanner state".
209 */
210 #define YY_CURRENT_BUFFER yy_current_buffer
211
212
213 /* yy_hold_char holds the character lost when yytext is formed. */
214 static char yy_hold_char;
215
216 static int yy_n_chars; /* number of characters read into yy_ch_buf */
217
218
219 int yyleng;
220
221 /* Points to current character in buffer. */
222 static char *yy_c_buf_p = (char *) 0;
223 static int yy_init = 1; /* whether we need to initialize */
224 static int yy_start = 0; /* start state number */
225
226 /* Flag which is used to allow yywrap()'s to do buffer switches
227 * instead of setting up a fresh yyin. A bit of a hack ...
228 */
229 static int yy_did_buffer_switch_on_eof;
230
231 void yyrestart YY_PROTO(( FILE *input_file ));
232
233 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
234 void yy_load_buffer_state YY_PROTO(( void ));
235 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
236 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
237 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
238 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
239 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
240
241 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
242 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
243 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
244
245 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
246 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
247 static void yy_flex_free YY_PROTO(( void * ));
248
249 #define yy_new_buffer yy_create_buffer
250
251 #define yy_set_interactive(is_interactive) \
252 { \
253 if ( ! yy_current_buffer ) \
254 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
255 yy_current_buffer->yy_is_interactive = is_interactive; \
256 }
257
258 #define yy_set_bol(at_bol) \
259 { \
260 if ( ! yy_current_buffer ) \
261 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
262 yy_current_buffer->yy_at_bol = at_bol; \
263 }
264
265 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
266
267 typedef unsigned char YY_CHAR;
268 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
269 typedef int yy_state_type;
270 extern char *yytext;
271 #define yytext_ptr yytext
272
273 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
274 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
275 static int yy_get_next_buffer YY_PROTO(( void ));
276 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
277
278 /* Done after the current pattern has been matched and before the
279 * corresponding action - sets up yytext.
280 */
281 #define YY_DO_BEFORE_ACTION \
282 yytext_ptr = yy_bp; \
283 yyleng = (int) (yy_cp - yy_bp); \
284 yy_hold_char = *yy_cp; \
285 *yy_cp = '\0'; \
286 yy_c_buf_p = yy_cp;
287
288 #define YY_NUM_RULES 40
289 #define YY_END_OF_BUFFER 41
290 static yyconst short int yy_accept[197] =
291 { 0,
292 0, 0, 41, 40, 34, 35, 33, 40, 28, 40,
293 31, 39, 37, 27, 32, 36, 38, 28, 28, 28,
294 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
295 28, 28, 0, 29, 28, 0, 30, 31, 27, 32,
296 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
297 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
298 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
299 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
300 28, 28, 28, 28, 28, 12, 6, 28, 7, 28,
301 28, 28, 28, 28, 28, 28, 28, 1, 28, 28,
302
303 28, 16, 28, 28, 28, 28, 28, 28, 28, 28,
304 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
305 28, 28, 28, 28, 28, 28, 28, 28, 28, 17,
306 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
307 14, 28, 28, 28, 19, 21, 28, 28, 28, 28,
308 28, 28, 18, 9, 28, 10, 28, 28, 2, 28,
309 28, 15, 28, 28, 28, 28, 11, 13, 28, 5,
310 28, 28, 22, 28, 8, 28, 28, 28, 28, 28,
311 28, 20, 4, 28, 28, 28, 24, 28, 26, 28,
312 3, 28, 28, 23, 25, 0
313
314 } ;
315
316 static yyconst int yy_ec[256] =
317 { 0,
318 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
321 1, 4, 1, 5, 1, 6, 1, 1, 7, 1,
322 1, 8, 1, 9, 6, 10, 11, 12, 12, 12,
323 12, 12, 12, 12, 12, 12, 12, 6, 13, 1,
324 14, 1, 6, 15, 16, 17, 18, 19, 20, 21,
325 22, 23, 24, 6, 25, 26, 27, 28, 29, 30,
326 6, 31, 32, 33, 34, 35, 36, 37, 38, 39,
327 1, 1, 1, 1, 6, 1, 21, 21, 21, 21,
328
329 21, 21, 6, 6, 6, 6, 6, 6, 6, 6,
330 6, 6, 6, 6, 6, 6, 6, 6, 6, 21,
331 6, 6, 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
336 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
339
340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
341 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
342 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
343 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
344 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
345 1, 1, 1, 1, 1
346 } ;
347
348 static yyconst int yy_meta[40] =
349 { 0,
350 1, 1, 2, 1, 1, 3, 1, 1, 1, 1,
351 4, 5, 1, 1, 4, 6, 6, 6, 6, 6,
352 6, 3, 3, 3, 3, 3, 3, 3, 3, 3,
353 3, 3, 3, 3, 3, 3, 3, 3, 3
354 } ;
355
356 static yyconst short int yy_base[204] =
357 { 0,
358 0, 0, 228, 229, 229, 229, 229, 222, 0, 219,
359 0, 229, 229, 0, 0, 229, 0, 209, 195, 24,
360 186, 202, 14, 197, 186, 27, 188, 198, 25, 197,
361 196, 184, 209, 229, 0, 206, 229, 0, 0, 0,
362 0, 180, 27, 178, 178, 27, 193, 178, 183, 189,
363 179, 177, 175, 178, 185, 182, 183, 170, 181, 165,
364 164, 170, 173, 172, 159, 174, 171, 170, 158, 156,
365 156, 151, 152, 149, 161, 34, 145, 160, 145, 146,
366 154, 157, 147, 141, 139, 0, 0, 138, 0, 139,
367 135, 137, 135, 135, 29, 149, 140, 0, 136, 139,
368
369 145, 0, 136, 139, 132, 132, 30, 132, 135, 138,
370 129, 119, 118, 126, 116, 122, 119, 115, 115, 124,
371 127, 109, 112, 121, 119, 106, 111, 108, 106, 0,
372 106, 103, 112, 99, 91, 97, 99, 95, 88, 99,
373 0, 93, 103, 94, 0, 0, 97, 91, 87, 90,
374 84, 83, 0, 0, 95, 0, 97, 80, 0, 92,
375 91, 0, 78, 70, 91, 74, 0, 0, 82, 0,
376 89, 88, 0, 84, 0, 82, 85, 83, 69, 66,
377 56, 0, 0, 39, 36, 35, 0, 44, 0, 43,
378 0, 40, 39, 0, 0, 229, 66, 70, 76, 82,
379
380 84, 90, 94
381 } ;
382
383 static yyconst short int yy_def[204] =
384 { 0,
385 196, 1, 196, 196, 196, 196, 196, 197, 198, 199,
386 200, 196, 196, 201, 202, 196, 203, 198, 198, 198,
387 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
388 198, 198, 197, 196, 198, 199, 196, 200, 201, 202,
389 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
390 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
391 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
392 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
393 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
394 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
395
396 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
397 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
398 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
399 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
400 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
401 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
402 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
403 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
404 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
405 198, 198, 198, 198, 198, 0, 196, 196, 196, 196,
406
407 196, 196, 196
408 } ;
409
410 static yyconst short int yy_nxt[269] =
411 { 0,
412 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
413 4, 14, 15, 16, 17, 9, 18, 19, 20, 21,
414 9, 9, 22, 23, 9, 24, 25, 26, 9, 27,
415 28, 29, 30, 9, 31, 32, 9, 9, 9, 44,
416 48, 49, 52, 45, 56, 64, 68, 57, 58, 99,
417 116, 127, 117, 128, 65, 53, 69, 59, 195, 194,
418 193, 192, 191, 190, 189, 100, 33, 33, 33, 33,
419 33, 33, 35, 35, 35, 35, 36, 36, 36, 36,
420 36, 36, 38, 188, 38, 38, 38, 38, 39, 39,
421 40, 187, 40, 40, 40, 40, 41, 186, 185, 41,
422
423 184, 183, 182, 181, 180, 179, 178, 177, 176, 175,
424 174, 173, 172, 171, 170, 169, 168, 167, 166, 165,
425 164, 163, 162, 161, 160, 159, 158, 157, 156, 155,
426 154, 153, 152, 151, 150, 149, 148, 147, 146, 145,
427 144, 143, 142, 141, 140, 139, 138, 137, 136, 135,
428 134, 133, 132, 131, 130, 129, 126, 125, 124, 123,
429 122, 121, 120, 119, 118, 115, 114, 113, 112, 111,
430 110, 109, 108, 107, 106, 105, 104, 103, 102, 101,
431 98, 97, 96, 95, 94, 93, 92, 91, 90, 89,
432 88, 87, 86, 85, 84, 83, 82, 81, 80, 79,
433
434 78, 77, 76, 75, 74, 73, 72, 71, 70, 67,
435 66, 63, 37, 34, 62, 61, 60, 55, 54, 51,
436 50, 47, 46, 43, 42, 37, 34, 196, 3, 196,
437 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
438 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
439 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
440 196, 196, 196, 196, 196, 196, 196, 196
441 } ;
442
443 static yyconst short int yy_chk[269] =
444 { 0,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 20,
449 23, 23, 26, 20, 29, 43, 46, 29, 29, 76,
450 95, 107, 95, 107, 43, 26, 46, 29, 193, 192,
451 190, 188, 186, 185, 184, 76, 197, 197, 197, 197,
452 197, 197, 198, 198, 198, 198, 199, 199, 199, 199,
453 199, 199, 200, 181, 200, 200, 200, 200, 201, 201,
454 202, 180, 202, 202, 202, 202, 203, 179, 178, 203,
455
456 177, 176, 174, 172, 171, 169, 166, 165, 164, 163,
457 161, 160, 158, 157, 155, 152, 151, 150, 149, 148,
458 147, 144, 143, 142, 140, 139, 138, 137, 136, 135,
459 134, 133, 132, 131, 129, 128, 127, 126, 125, 124,
460 123, 122, 121, 120, 119, 118, 117, 116, 115, 114,
461 113, 112, 111, 110, 109, 108, 106, 105, 104, 103,
462 101, 100, 99, 97, 96, 94, 93, 92, 91, 90,
463 88, 85, 84, 83, 82, 81, 80, 79, 78, 77,
464 75, 74, 73, 72, 71, 70, 69, 68, 67, 66,
465 65, 64, 63, 62, 61, 60, 59, 58, 57, 56,
466
467 55, 54, 53, 52, 51, 50, 49, 48, 47, 45,
468 44, 42, 36, 33, 32, 31, 30, 28, 27, 25,
469 24, 22, 21, 19, 18, 10, 8, 3, 196, 196,
470 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
471 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
472 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
473 196, 196, 196, 196, 196, 196, 196, 196
474 } ;
475
476 static yy_state_type yy_last_accepting_state;
477 static char *yy_last_accepting_cpos;
478
479 /* The intent behind this definition is that it'll catch
480 * any uses of REJECT which flex missed.
481 */
482 #define REJECT reject_used_but_not_detected
483 #define yymore() yymore_used_but_not_detected
484 #define YY_MORE_ADJ 0
485 #define YY_RESTORE_YY_MORE_OFFSET
486 char *yytext;
487 #line 1 "deflex.l"
488 #define INITIAL 0
489 #line 2 "deflex.l"
490
491 /* Copyright 1995, 1997, 1998, 1999, 2002, 2003, 2004
492 Free Software Foundation, Inc.
493
494 This file is part of GNU Binutils.
495
496 This program is free software; you can redistribute it and/or modify
497 it under the terms of the GNU General Public License as published by
498 the Free Software Foundation; either version 2 of the License, or
499 (at your option) any later version.
500
501 This program is distributed in the hope that it will be useful,
502 but WITHOUT ANY WARRANTY; without even the implied warranty of
503 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
504 GNU General Public License for more details.
505
506 You should have received a copy of the GNU General Public License
507 along with this program; if not, write to the Free Software
508 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
509
510
511 /* Contributed by Steve Chamberlain: sac@cygnus.com */
512
513 #define DONTDECLARE_MALLOC
514 #include "libiberty.h"
515 #include "defparse.h"
516 #include "dlltool.h"
517
518 int linenumber;
519
520 #line 521 "lex.yy.c"
521
522 /* Macros after this point can all be overridden by user definitions in
523 * section 1.
524 */
525
526 #ifndef YY_SKIP_YYWRAP
527 #ifdef __cplusplus
528 extern "C" int yywrap YY_PROTO(( void ));
529 #else
530 extern int yywrap YY_PROTO(( void ));
531 #endif
532 #endif
533
534 #ifndef YY_NO_UNPUT
535 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
536 #endif
537
538 #ifndef yytext_ptr
539 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
540 #endif
541
542 #ifdef YY_NEED_STRLEN
543 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
544 #endif
545
546 #ifndef YY_NO_INPUT
547 #ifdef __cplusplus
548 static int yyinput YY_PROTO(( void ));
549 #else
550 static int input YY_PROTO(( void ));
551 #endif
552 #endif
553
554 #if YY_STACK_USED
555 static int yy_start_stack_ptr = 0;
556 static int yy_start_stack_depth = 0;
557 static int *yy_start_stack = 0;
558 #ifndef YY_NO_PUSH_STATE
559 static void yy_push_state YY_PROTO(( int new_state ));
560 #endif
561 #ifndef YY_NO_POP_STATE
562 static void yy_pop_state YY_PROTO(( void ));
563 #endif
564 #ifndef YY_NO_TOP_STATE
565 static int yy_top_state YY_PROTO(( void ));
566 #endif
567
568 #else
569 #define YY_NO_PUSH_STATE 1
570 #define YY_NO_POP_STATE 1
571 #define YY_NO_TOP_STATE 1
572 #endif
573
574 #ifdef YY_MALLOC_DECL
575 YY_MALLOC_DECL
576 #else
577 #if __STDC__
578 #ifndef __cplusplus
579 #include <stdlib.h>
580 #endif
581 #else
582 /* Just try to get by without declaring the routines. This will fail
583 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
584 * or sizeof(void*) != sizeof(int).
585 */
586 #endif
587 #endif
588
589 /* Amount of stuff to slurp up with each read. */
590 #ifndef YY_READ_BUF_SIZE
591 #define YY_READ_BUF_SIZE 8192
592 #endif
593
594 /* Copy whatever the last rule matched to the standard output. */
595
596 #ifndef ECHO
597 /* This used to be an fputs(), but since the string might contain NUL's,
598 * we now use fwrite().
599 */
600 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
601 #endif
602
603 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
604 * is returned in "result".
605 */
606 #ifndef YY_INPUT
607 #define YY_INPUT(buf,result,max_size) \
608 if ( yy_current_buffer->yy_is_interactive ) \
609 { \
610 int c = '*', n; \
611 for ( n = 0; n < max_size && \
612 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
613 buf[n] = (char) c; \
614 if ( c == '\n' ) \
615 buf[n++] = (char) c; \
616 if ( c == EOF && ferror( yyin ) ) \
617 YY_FATAL_ERROR( "input in flex scanner failed" ); \
618 result = n; \
619 } \
620 else \
621 { \
622 errno=0; \
623 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
624 { \
625 if( errno != EINTR) \
626 { \
627 YY_FATAL_ERROR( "input in flex scanner failed" ); \
628 break; \
629 } \
630 errno=0; \
631 clearerr(yyin); \
632 } \
633 }
634 #endif
635
636 /* No semi-colon after return; correct usage is to write "yyterminate();" -
637 * we don't want an extra ';' after the "return" because that will cause
638 * some compilers to complain about unreachable statements.
639 */
640 #ifndef yyterminate
641 #define yyterminate() return YY_NULL
642 #endif
643
644 /* Number of entries by which start-condition stack grows. */
645 #ifndef YY_START_STACK_INCR
646 #define YY_START_STACK_INCR 25
647 #endif
648
649 /* Report a fatal error. */
650 #ifndef YY_FATAL_ERROR
651 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
652 #endif
653
654 /* Default declaration of generated scanner - a define so the user can
655 * easily add parameters.
656 */
657 #ifndef YY_DECL
658 #define YY_DECL int yylex YY_PROTO(( void ))
659 #endif
660
661 /* Code executed at the beginning of each rule, after yytext and yyleng
662 * have been set up.
663 */
664 #ifndef YY_USER_ACTION
665 #define YY_USER_ACTION
666 #endif
667
668 /* Code executed at the end of each rule. */
669 #ifndef YY_BREAK
670 #define YY_BREAK break;
671 #endif
672
673 #define YY_RULE_SETUP \
674 YY_USER_ACTION
675
676 YY_DECL
677 {
678 register yy_state_type yy_current_state;
679 register char *yy_cp, *yy_bp;
680 register int yy_act;
681
682 #line 33 "deflex.l"
683
684 #line 685 "lex.yy.c"
685
686 if ( yy_init )
687 {
688 yy_init = 0;
689
690 #ifdef YY_USER_INIT
691 YY_USER_INIT;
692 #endif
693
694 if ( ! yy_start )
695 yy_start = 1; /* first start state */
696
697 if ( ! yyin )
698 yyin = stdin;
699
700 if ( ! yyout )
701 yyout = stdout;
702
703 if ( ! yy_current_buffer )
704 yy_current_buffer =
705 yy_create_buffer( yyin, YY_BUF_SIZE );
706
707 yy_load_buffer_state();
708 }
709
710 while ( 1 ) /* loops until end-of-file is reached */
711 {
712 yy_cp = yy_c_buf_p;
713
714 /* Support of yytext. */
715 *yy_cp = yy_hold_char;
716
717 /* yy_bp points to the position in yy_ch_buf of the start of
718 * the current run.
719 */
720 yy_bp = yy_cp;
721
722 yy_current_state = yy_start;
723 yy_match:
724 do
725 {
726 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
727 if ( yy_accept[yy_current_state] )
728 {
729 yy_last_accepting_state = yy_current_state;
730 yy_last_accepting_cpos = yy_cp;
731 }
732 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
733 {
734 yy_current_state = (int) yy_def[yy_current_state];
735 if ( yy_current_state >= 197 )
736 yy_c = yy_meta[(unsigned int) yy_c];
737 }
738 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
739 ++yy_cp;
740 }
741 while ( yy_base[yy_current_state] != 229 );
742
743 yy_find_action:
744 yy_act = yy_accept[yy_current_state];
745 if ( yy_act == 0 )
746 { /* have to back up */
747 yy_cp = yy_last_accepting_cpos;
748 yy_current_state = yy_last_accepting_state;
749 yy_act = yy_accept[yy_current_state];
750 }
751
752 YY_DO_BEFORE_ACTION;
753
754
755 do_action: /* This label is used only to access EOF actions. */
756
757
758 switch ( yy_act )
759 { /* beginning of action switch */
760 case 0: /* must back up */
761 /* undo the effects of YY_DO_BEFORE_ACTION */
762 *yy_cp = yy_hold_char;
763 yy_cp = yy_last_accepting_cpos;
764 yy_current_state = yy_last_accepting_state;
765 goto yy_find_action;
766
767 case 1:
768 YY_RULE_SETUP
769 #line 34 "deflex.l"
770 { return NAME;}
771 YY_BREAK
772 case 2:
773 YY_RULE_SETUP
774 #line 35 "deflex.l"
775 { return LIBRARY;}
776 YY_BREAK
777 case 3:
778 YY_RULE_SETUP
779 #line 36 "deflex.l"
780 { return DESCRIPTION;}
781 YY_BREAK
782 case 4:
783 YY_RULE_SETUP
784 #line 37 "deflex.l"
785 { return STACKSIZE;}
786 YY_BREAK
787 case 5:
788 YY_RULE_SETUP
789 #line 38 "deflex.l"
790 { return HEAPSIZE;}
791 YY_BREAK
792 case 6:
793 YY_RULE_SETUP
794 #line 39 "deflex.l"
795 { return CODE;}
796 YY_BREAK
797 case 7:
798 YY_RULE_SETUP
799 #line 40 "deflex.l"
800 { return DATA;}
801 YY_BREAK
802 case 8:
803 YY_RULE_SETUP
804 #line 41 "deflex.l"
805 { return SECTIONS;}
806 YY_BREAK
807 case 9:
808 YY_RULE_SETUP
809 #line 42 "deflex.l"
810 { return EXPORTS;}
811 YY_BREAK
812 case 10:
813 YY_RULE_SETUP
814 #line 43 "deflex.l"
815 { return IMPORTS;}
816 YY_BREAK
817 case 11:
818 YY_RULE_SETUP
819 #line 44 "deflex.l"
820 { return VERSIONK;}
821 YY_BREAK
822 case 12:
823 YY_RULE_SETUP
824 #line 45 "deflex.l"
825 { return BASE;}
826 YY_BREAK
827 case 13:
828 YY_RULE_SETUP
829 #line 46 "deflex.l"
830 { return CONSTANT; }
831 YY_BREAK
832 case 14:
833 YY_RULE_SETUP
834 #line 47 "deflex.l"
835 { return NONAME; }
836 YY_BREAK
837 case 15:
838 YY_RULE_SETUP
839 #line 48 "deflex.l"
840 { return PRIVATE; }
841 YY_BREAK
842 case 16:
843 YY_RULE_SETUP
844 #line 49 "deflex.l"
845 { return READ;}
846 YY_BREAK
847 case 17:
848 YY_RULE_SETUP
849 #line 50 "deflex.l"
850 { return WRITE;}
851 YY_BREAK
852 case 18:
853 YY_RULE_SETUP
854 #line 51 "deflex.l"
855 { return EXECUTE;}
856 YY_BREAK
857 case 19:
858 YY_RULE_SETUP
859 #line 52 "deflex.l"
860 { return SHARED;}
861 YY_BREAK
862 case 20:
863 YY_RULE_SETUP
864 #line 53 "deflex.l"
865 { return NONSHARED;}
866 YY_BREAK
867 case 21:
868 YY_RULE_SETUP
869 #line 54 "deflex.l"
870 { return SINGLE;}
871 YY_BREAK
872 case 22:
873 YY_RULE_SETUP
874 #line 55 "deflex.l"
875 { return MULTIPLE;}
876 YY_BREAK
877 case 23:
878 YY_RULE_SETUP
879 #line 56 "deflex.l"
880 { return INITINSTANCE;}
881 YY_BREAK
882 case 24:
883 YY_RULE_SETUP
884 #line 57 "deflex.l"
885 { return INITGLOBAL;}
886 YY_BREAK
887 case 25:
888 YY_RULE_SETUP
889 #line 58 "deflex.l"
890 { return TERMINSTANCE;}
891 YY_BREAK
892 case 26:
893 YY_RULE_SETUP
894 #line 59 "deflex.l"
895 { return TERMGLOBAL;}
896 YY_BREAK
897 case 27:
898 YY_RULE_SETUP
899 #line 61 "deflex.l"
900 { yylval.number = strtol (yytext,0,0);
901 return NUMBER; }
902 YY_BREAK
903 case 28:
904 YY_RULE_SETUP
905 #line 64 "deflex.l"
906 {
907 yylval.id = xstrdup (yytext);
908 return ID;
909 }
910 YY_BREAK
911 case 29:
912 YY_RULE_SETUP
913 #line 69 "deflex.l"
914 {
915 yylval.id = xstrdup (yytext+1);
916 yylval.id[yyleng-2] = 0;
917 return ID;
918 }
919 YY_BREAK
920 case 30:
921 YY_RULE_SETUP
922 #line 75 "deflex.l"
923 {
924 yylval.id = xstrdup (yytext+1);
925 yylval.id[yyleng-2] = 0;
926 return ID;
927 }
928 YY_BREAK
929 case 31:
930 YY_RULE_SETUP
931 #line 80 "deflex.l"
932 { }
933 YY_BREAK
934 case 32:
935 YY_RULE_SETUP
936 #line 81 "deflex.l"
937 { }
938 YY_BREAK
939 case 33:
940 YY_RULE_SETUP
941 #line 82 "deflex.l"
942 { }
943 YY_BREAK
944 case 34:
945 YY_RULE_SETUP
946 #line 83 "deflex.l"
947 { }
948 YY_BREAK
949 case 35:
950 YY_RULE_SETUP
951 #line 84 "deflex.l"
952 { linenumber ++ ;}
953 YY_BREAK
954 case 36:
955 YY_RULE_SETUP
956 #line 85 "deflex.l"
957 { return '=';}
958 YY_BREAK
959 case 37:
960 YY_RULE_SETUP
961 #line 86 "deflex.l"
962 { return '.';}
963 YY_BREAK
964 case 38:
965 YY_RULE_SETUP
966 #line 87 "deflex.l"
967 { return '@';}
968 YY_BREAK
969 case 39:
970 YY_RULE_SETUP
971 #line 88 "deflex.l"
972 { return ',';}
973 YY_BREAK
974 case 40:
975 YY_RULE_SETUP
976 #line 89 "deflex.l"
977 ECHO;
978 YY_BREAK
979 #line 980 "lex.yy.c"
980 case YY_STATE_EOF(INITIAL):
981 yyterminate();
982
983 case YY_END_OF_BUFFER:
984 {
985 /* Amount of text matched not including the EOB char. */
986 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
987
988 /* Undo the effects of YY_DO_BEFORE_ACTION. */
989 *yy_cp = yy_hold_char;
990 YY_RESTORE_YY_MORE_OFFSET
991
992 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
993 {
994 /* We're scanning a new file or input source. It's
995 * possible that this happened because the user
996 * just pointed yyin at a new source and called
997 * yylex(). If so, then we have to assure
998 * consistency between yy_current_buffer and our
999 * globals. Here is the right place to do so, because
1000 * this is the first action (other than possibly a
1001 * back-up) that will match for the new input source.
1002 */
1003 yy_n_chars = yy_current_buffer->yy_n_chars;
1004 yy_current_buffer->yy_input_file = yyin;
1005 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1006 }
1007
1008 /* Note that here we test for yy_c_buf_p "<=" to the position
1009 * of the first EOB in the buffer, since yy_c_buf_p will
1010 * already have been incremented past the NUL character
1011 * (since all states make transitions on EOB to the
1012 * end-of-buffer state). Contrast this with the test
1013 * in input().
1014 */
1015 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1016 { /* This was really a NUL. */
1017 yy_state_type yy_next_state;
1018
1019 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1020
1021 yy_current_state = yy_get_previous_state();
1022
1023 /* Okay, we're now positioned to make the NUL
1024 * transition. We couldn't have
1025 * yy_get_previous_state() go ahead and do it
1026 * for us because it doesn't know how to deal
1027 * with the possibility of jamming (and we don't
1028 * want to build jamming into it because then it
1029 * will run more slowly).
1030 */
1031
1032 yy_next_state = yy_try_NUL_trans( yy_current_state );
1033
1034 yy_bp = yytext_ptr + YY_MORE_ADJ;
1035
1036 if ( yy_next_state )
1037 {
1038 /* Consume the NUL. */
1039 yy_cp = ++yy_c_buf_p;
1040 yy_current_state = yy_next_state;
1041 goto yy_match;
1042 }
1043
1044 else
1045 {
1046 yy_cp = yy_c_buf_p;
1047 goto yy_find_action;
1048 }
1049 }
1050
1051 else switch ( yy_get_next_buffer() )
1052 {
1053 case EOB_ACT_END_OF_FILE:
1054 {
1055 yy_did_buffer_switch_on_eof = 0;
1056
1057 if ( yywrap() )
1058 {
1059 /* Note: because we've taken care in
1060 * yy_get_next_buffer() to have set up
1061 * yytext, we can now set up
1062 * yy_c_buf_p so that if some total
1063 * hoser (like flex itself) wants to
1064 * call the scanner after we return the
1065 * YY_NULL, it'll still work - another
1066 * YY_NULL will get returned.
1067 */
1068 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1069
1070 yy_act = YY_STATE_EOF(YY_START);
1071 goto do_action;
1072 }
1073
1074 else
1075 {
1076 if ( ! yy_did_buffer_switch_on_eof )
1077 YY_NEW_FILE;
1078 }
1079 break;
1080 }
1081
1082 case EOB_ACT_CONTINUE_SCAN:
1083 yy_c_buf_p =
1084 yytext_ptr + yy_amount_of_matched_text;
1085
1086 yy_current_state = yy_get_previous_state();
1087
1088 yy_cp = yy_c_buf_p;
1089 yy_bp = yytext_ptr + YY_MORE_ADJ;
1090 goto yy_match;
1091
1092 case EOB_ACT_LAST_MATCH:
1093 yy_c_buf_p =
1094 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1095
1096 yy_current_state = yy_get_previous_state();
1097
1098 yy_cp = yy_c_buf_p;
1099 yy_bp = yytext_ptr + YY_MORE_ADJ;
1100 goto yy_find_action;
1101 }
1102 break;
1103 }
1104
1105 default:
1106 YY_FATAL_ERROR(
1107 "fatal flex scanner internal error--no action found" );
1108 } /* end of action switch */
1109 } /* end of scanning one token */
1110 } /* end of yylex */
1111
1112
1113 /* yy_get_next_buffer - try to read in a new buffer
1114 *
1115 * Returns a code representing an action:
1116 * EOB_ACT_LAST_MATCH -
1117 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1118 * EOB_ACT_END_OF_FILE - end of file
1119 */
1120
yy_get_next_buffer()1121 static int yy_get_next_buffer()
1122 {
1123 register char *dest = yy_current_buffer->yy_ch_buf;
1124 register char *source = yytext_ptr;
1125 register int number_to_move, i;
1126 int ret_val;
1127
1128 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1129 YY_FATAL_ERROR(
1130 "fatal flex scanner internal error--end of buffer missed" );
1131
1132 if ( yy_current_buffer->yy_fill_buffer == 0 )
1133 { /* Don't try to fill the buffer, so this is an EOF. */
1134 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1135 {
1136 /* We matched a single character, the EOB, so
1137 * treat this as a final EOF.
1138 */
1139 return EOB_ACT_END_OF_FILE;
1140 }
1141
1142 else
1143 {
1144 /* We matched some text prior to the EOB, first
1145 * process it.
1146 */
1147 return EOB_ACT_LAST_MATCH;
1148 }
1149 }
1150
1151 /* Try to read more data. */
1152
1153 /* First move last chars to start of buffer. */
1154 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1155
1156 for ( i = 0; i < number_to_move; ++i )
1157 *(dest++) = *(source++);
1158
1159 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1160 /* don't do the read, it's not guaranteed to return an EOF,
1161 * just force an EOF
1162 */
1163 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1164
1165 else
1166 {
1167 int num_to_read =
1168 yy_current_buffer->yy_buf_size - number_to_move - 1;
1169
1170 while ( num_to_read <= 0 )
1171 { /* Not enough room in the buffer - grow it. */
1172 #ifdef YY_USES_REJECT
1173 YY_FATAL_ERROR(
1174 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1175 #else
1176
1177 /* just a shorter name for the current buffer */
1178 YY_BUFFER_STATE b = yy_current_buffer;
1179
1180 int yy_c_buf_p_offset =
1181 (int) (yy_c_buf_p - b->yy_ch_buf);
1182
1183 if ( b->yy_is_our_buffer )
1184 {
1185 int new_size = b->yy_buf_size * 2;
1186
1187 if ( new_size <= 0 )
1188 b->yy_buf_size += b->yy_buf_size / 8;
1189 else
1190 b->yy_buf_size *= 2;
1191
1192 b->yy_ch_buf = (char *)
1193 /* Include room in for 2 EOB chars. */
1194 yy_flex_realloc( (void *) b->yy_ch_buf,
1195 b->yy_buf_size + 2 );
1196 }
1197 else
1198 /* Can't grow it, we don't own it. */
1199 b->yy_ch_buf = 0;
1200
1201 if ( ! b->yy_ch_buf )
1202 YY_FATAL_ERROR(
1203 "fatal error - scanner input buffer overflow" );
1204
1205 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1206
1207 num_to_read = yy_current_buffer->yy_buf_size -
1208 number_to_move - 1;
1209 #endif
1210 }
1211
1212 if ( num_to_read > YY_READ_BUF_SIZE )
1213 num_to_read = YY_READ_BUF_SIZE;
1214
1215 /* Read in more data. */
1216 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1217 yy_n_chars, num_to_read );
1218
1219 yy_current_buffer->yy_n_chars = yy_n_chars;
1220 }
1221
1222 if ( yy_n_chars == 0 )
1223 {
1224 if ( number_to_move == YY_MORE_ADJ )
1225 {
1226 ret_val = EOB_ACT_END_OF_FILE;
1227 yyrestart( yyin );
1228 }
1229
1230 else
1231 {
1232 ret_val = EOB_ACT_LAST_MATCH;
1233 yy_current_buffer->yy_buffer_status =
1234 YY_BUFFER_EOF_PENDING;
1235 }
1236 }
1237
1238 else
1239 ret_val = EOB_ACT_CONTINUE_SCAN;
1240
1241 yy_n_chars += number_to_move;
1242 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1243 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1244
1245 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1246
1247 return ret_val;
1248 }
1249
1250
1251 /* yy_get_previous_state - get the state just before the EOB char was reached */
1252
yy_get_previous_state()1253 static yy_state_type yy_get_previous_state()
1254 {
1255 register yy_state_type yy_current_state;
1256 register char *yy_cp;
1257
1258 yy_current_state = yy_start;
1259
1260 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1261 {
1262 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1263 if ( yy_accept[yy_current_state] )
1264 {
1265 yy_last_accepting_state = yy_current_state;
1266 yy_last_accepting_cpos = yy_cp;
1267 }
1268 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1269 {
1270 yy_current_state = (int) yy_def[yy_current_state];
1271 if ( yy_current_state >= 197 )
1272 yy_c = yy_meta[(unsigned int) yy_c];
1273 }
1274 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1275 }
1276
1277 return yy_current_state;
1278 }
1279
1280
1281 /* yy_try_NUL_trans - try to make a transition on the NUL character
1282 *
1283 * synopsis
1284 * next_state = yy_try_NUL_trans( current_state );
1285 */
1286
1287 #ifdef YY_USE_PROTOS
yy_try_NUL_trans(yy_state_type yy_current_state)1288 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1289 #else
1290 static yy_state_type yy_try_NUL_trans( yy_current_state )
1291 yy_state_type yy_current_state;
1292 #endif
1293 {
1294 register int yy_is_jam;
1295 register char *yy_cp = yy_c_buf_p;
1296
1297 register YY_CHAR yy_c = 1;
1298 if ( yy_accept[yy_current_state] )
1299 {
1300 yy_last_accepting_state = yy_current_state;
1301 yy_last_accepting_cpos = yy_cp;
1302 }
1303 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1304 {
1305 yy_current_state = (int) yy_def[yy_current_state];
1306 if ( yy_current_state >= 197 )
1307 yy_c = yy_meta[(unsigned int) yy_c];
1308 }
1309 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1310 yy_is_jam = (yy_current_state == 196);
1311
1312 return yy_is_jam ? 0 : yy_current_state;
1313 }
1314
1315
1316 #ifndef YY_NO_UNPUT
1317 #ifdef YY_USE_PROTOS
yyunput(int c,register char * yy_bp)1318 static void yyunput( int c, register char *yy_bp )
1319 #else
1320 static void yyunput( c, yy_bp )
1321 int c;
1322 register char *yy_bp;
1323 #endif
1324 {
1325 register char *yy_cp = yy_c_buf_p;
1326
1327 /* undo effects of setting up yytext */
1328 *yy_cp = yy_hold_char;
1329
1330 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1331 { /* need to shift things up to make room */
1332 /* +2 for EOB chars. */
1333 register int number_to_move = yy_n_chars + 2;
1334 register char *dest = &yy_current_buffer->yy_ch_buf[
1335 yy_current_buffer->yy_buf_size + 2];
1336 register char *source =
1337 &yy_current_buffer->yy_ch_buf[number_to_move];
1338
1339 while ( source > yy_current_buffer->yy_ch_buf )
1340 *--dest = *--source;
1341
1342 yy_cp += (int) (dest - source);
1343 yy_bp += (int) (dest - source);
1344 yy_current_buffer->yy_n_chars =
1345 yy_n_chars = yy_current_buffer->yy_buf_size;
1346
1347 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1348 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1349 }
1350
1351 *--yy_cp = (char) c;
1352
1353
1354 yytext_ptr = yy_bp;
1355 yy_hold_char = *yy_cp;
1356 yy_c_buf_p = yy_cp;
1357 }
1358 #endif /* ifndef YY_NO_UNPUT */
1359
1360
1361 #ifdef __cplusplus
yyinput()1362 static int yyinput()
1363 #else
1364 static int input()
1365 #endif
1366 {
1367 int c;
1368
1369 *yy_c_buf_p = yy_hold_char;
1370
1371 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1372 {
1373 /* yy_c_buf_p now points to the character we want to return.
1374 * If this occurs *before* the EOB characters, then it's a
1375 * valid NUL; if not, then we've hit the end of the buffer.
1376 */
1377 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1378 /* This was really a NUL. */
1379 *yy_c_buf_p = '\0';
1380
1381 else
1382 { /* need more input */
1383 int offset = yy_c_buf_p - yytext_ptr;
1384 ++yy_c_buf_p;
1385
1386 switch ( yy_get_next_buffer() )
1387 {
1388 case EOB_ACT_LAST_MATCH:
1389 /* This happens because yy_g_n_b()
1390 * sees that we've accumulated a
1391 * token and flags that we need to
1392 * try matching the token before
1393 * proceeding. But for input(),
1394 * there's no matching to consider.
1395 * So convert the EOB_ACT_LAST_MATCH
1396 * to EOB_ACT_END_OF_FILE.
1397 */
1398
1399 /* Reset buffer status. */
1400 yyrestart( yyin );
1401
1402 /* fall through */
1403
1404 case EOB_ACT_END_OF_FILE:
1405 {
1406 if ( yywrap() )
1407 return EOF;
1408
1409 if ( ! yy_did_buffer_switch_on_eof )
1410 YY_NEW_FILE;
1411 #ifdef __cplusplus
1412 return yyinput();
1413 #else
1414 return input();
1415 #endif
1416 }
1417
1418 case EOB_ACT_CONTINUE_SCAN:
1419 yy_c_buf_p = yytext_ptr + offset;
1420 break;
1421 }
1422 }
1423 }
1424
1425 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1426 *yy_c_buf_p = '\0'; /* preserve yytext */
1427 yy_hold_char = *++yy_c_buf_p;
1428
1429
1430 return c;
1431 }
1432
1433
1434 #ifdef YY_USE_PROTOS
yyrestart(FILE * input_file)1435 void yyrestart( FILE *input_file )
1436 #else
1437 void yyrestart( input_file )
1438 FILE *input_file;
1439 #endif
1440 {
1441 if ( ! yy_current_buffer )
1442 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1443
1444 yy_init_buffer( yy_current_buffer, input_file );
1445 yy_load_buffer_state();
1446 }
1447
1448
1449 #ifdef YY_USE_PROTOS
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1450 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1451 #else
1452 void yy_switch_to_buffer( new_buffer )
1453 YY_BUFFER_STATE new_buffer;
1454 #endif
1455 {
1456 if ( yy_current_buffer == new_buffer )
1457 return;
1458
1459 if ( yy_current_buffer )
1460 {
1461 /* Flush out information for old buffer. */
1462 *yy_c_buf_p = yy_hold_char;
1463 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1464 yy_current_buffer->yy_n_chars = yy_n_chars;
1465 }
1466
1467 yy_current_buffer = new_buffer;
1468 yy_load_buffer_state();
1469
1470 /* We don't actually know whether we did this switch during
1471 * EOF (yywrap()) processing, but the only time this flag
1472 * is looked at is after yywrap() is called, so it's safe
1473 * to go ahead and always set it.
1474 */
1475 yy_did_buffer_switch_on_eof = 1;
1476 }
1477
1478
1479 #ifdef YY_USE_PROTOS
yy_load_buffer_state(void)1480 void yy_load_buffer_state( void )
1481 #else
1482 void yy_load_buffer_state()
1483 #endif
1484 {
1485 yy_n_chars = yy_current_buffer->yy_n_chars;
1486 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1487 yyin = yy_current_buffer->yy_input_file;
1488 yy_hold_char = *yy_c_buf_p;
1489 }
1490
1491
1492 #ifdef YY_USE_PROTOS
yy_create_buffer(FILE * file,int size)1493 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1494 #else
1495 YY_BUFFER_STATE yy_create_buffer( file, size )
1496 FILE *file;
1497 int size;
1498 #endif
1499 {
1500 YY_BUFFER_STATE b;
1501
1502 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1503 if ( ! b )
1504 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1505
1506 b->yy_buf_size = size;
1507
1508 /* yy_ch_buf has to be 2 characters longer than the size given because
1509 * we need to put in 2 end-of-buffer characters.
1510 */
1511 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1512 if ( ! b->yy_ch_buf )
1513 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1514
1515 b->yy_is_our_buffer = 1;
1516
1517 yy_init_buffer( b, file );
1518
1519 return b;
1520 }
1521
1522
1523 #ifdef YY_USE_PROTOS
yy_delete_buffer(YY_BUFFER_STATE b)1524 void yy_delete_buffer( YY_BUFFER_STATE b )
1525 #else
1526 void yy_delete_buffer( b )
1527 YY_BUFFER_STATE b;
1528 #endif
1529 {
1530 if ( ! b )
1531 return;
1532
1533 if ( b == yy_current_buffer )
1534 yy_current_buffer = (YY_BUFFER_STATE) 0;
1535
1536 if ( b->yy_is_our_buffer )
1537 yy_flex_free( (void *) b->yy_ch_buf );
1538
1539 yy_flex_free( (void *) b );
1540 }
1541
1542
1543 #ifndef _WIN32
1544 #include <unistd.h>
1545 #else
1546 #ifndef YY_ALWAYS_INTERACTIVE
1547 #ifndef YY_NEVER_INTERACTIVE
1548 extern int isatty YY_PROTO(( int ));
1549 #endif
1550 #endif
1551 #endif
1552
1553 #ifdef YY_USE_PROTOS
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1554 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1555 #else
1556 void yy_init_buffer( b, file )
1557 YY_BUFFER_STATE b;
1558 FILE *file;
1559 #endif
1560
1561
1562 {
1563 yy_flush_buffer( b );
1564
1565 b->yy_input_file = file;
1566 b->yy_fill_buffer = 1;
1567
1568 #if YY_ALWAYS_INTERACTIVE
1569 b->yy_is_interactive = 1;
1570 #else
1571 #if YY_NEVER_INTERACTIVE
1572 b->yy_is_interactive = 0;
1573 #else
1574 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1575 #endif
1576 #endif
1577 }
1578
1579
1580 #ifdef YY_USE_PROTOS
yy_flush_buffer(YY_BUFFER_STATE b)1581 void yy_flush_buffer( YY_BUFFER_STATE b )
1582 #else
1583 void yy_flush_buffer( b )
1584 YY_BUFFER_STATE b;
1585 #endif
1586
1587 {
1588 if ( ! b )
1589 return;
1590
1591 b->yy_n_chars = 0;
1592
1593 /* We always need two end-of-buffer characters. The first causes
1594 * a transition to the end-of-buffer state. The second causes
1595 * a jam in that state.
1596 */
1597 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1598 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1599
1600 b->yy_buf_pos = &b->yy_ch_buf[0];
1601
1602 b->yy_at_bol = 1;
1603 b->yy_buffer_status = YY_BUFFER_NEW;
1604
1605 if ( b == yy_current_buffer )
1606 yy_load_buffer_state();
1607 }
1608
1609
1610 #ifndef YY_NO_SCAN_BUFFER
1611 #ifdef YY_USE_PROTOS
yy_scan_buffer(char * base,yy_size_t size)1612 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1613 #else
1614 YY_BUFFER_STATE yy_scan_buffer( base, size )
1615 char *base;
1616 yy_size_t size;
1617 #endif
1618 {
1619 YY_BUFFER_STATE b;
1620
1621 if ( size < 2 ||
1622 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1623 base[size-1] != YY_END_OF_BUFFER_CHAR )
1624 /* They forgot to leave room for the EOB's. */
1625 return 0;
1626
1627 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1628 if ( ! b )
1629 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1630
1631 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1632 b->yy_buf_pos = b->yy_ch_buf = base;
1633 b->yy_is_our_buffer = 0;
1634 b->yy_input_file = 0;
1635 b->yy_n_chars = b->yy_buf_size;
1636 b->yy_is_interactive = 0;
1637 b->yy_at_bol = 1;
1638 b->yy_fill_buffer = 0;
1639 b->yy_buffer_status = YY_BUFFER_NEW;
1640
1641 yy_switch_to_buffer( b );
1642
1643 return b;
1644 }
1645 #endif
1646
1647
1648 #ifndef YY_NO_SCAN_STRING
1649 #ifdef YY_USE_PROTOS
yy_scan_string(yyconst char * yy_str)1650 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1651 #else
1652 YY_BUFFER_STATE yy_scan_string( yy_str )
1653 yyconst char *yy_str;
1654 #endif
1655 {
1656 int len;
1657 for ( len = 0; yy_str[len]; ++len )
1658 ;
1659
1660 return yy_scan_bytes( yy_str, len );
1661 }
1662 #endif
1663
1664
1665 #ifndef YY_NO_SCAN_BYTES
1666 #ifdef YY_USE_PROTOS
yy_scan_bytes(yyconst char * bytes,int len)1667 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1668 #else
1669 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1670 yyconst char *bytes;
1671 int len;
1672 #endif
1673 {
1674 YY_BUFFER_STATE b;
1675 char *buf;
1676 yy_size_t n;
1677 int i;
1678
1679 /* Get memory for full buffer, including space for trailing EOB's. */
1680 n = len + 2;
1681 buf = (char *) yy_flex_alloc( n );
1682 if ( ! buf )
1683 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1684
1685 for ( i = 0; i < len; ++i )
1686 buf[i] = bytes[i];
1687
1688 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1689
1690 b = yy_scan_buffer( buf, n );
1691 if ( ! b )
1692 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1693
1694 /* It's okay to grow etc. this buffer, and we should throw it
1695 * away when we're done.
1696 */
1697 b->yy_is_our_buffer = 1;
1698
1699 return b;
1700 }
1701 #endif
1702
1703
1704 #ifndef YY_NO_PUSH_STATE
1705 #ifdef YY_USE_PROTOS
yy_push_state(int new_state)1706 static void yy_push_state( int new_state )
1707 #else
1708 static void yy_push_state( new_state )
1709 int new_state;
1710 #endif
1711 {
1712 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1713 {
1714 yy_size_t new_size;
1715
1716 yy_start_stack_depth += YY_START_STACK_INCR;
1717 new_size = yy_start_stack_depth * sizeof( int );
1718
1719 if ( ! yy_start_stack )
1720 yy_start_stack = (int *) yy_flex_alloc( new_size );
1721
1722 else
1723 yy_start_stack = (int *) yy_flex_realloc(
1724 (void *) yy_start_stack, new_size );
1725
1726 if ( ! yy_start_stack )
1727 YY_FATAL_ERROR(
1728 "out of memory expanding start-condition stack" );
1729 }
1730
1731 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1732
1733 BEGIN(new_state);
1734 }
1735 #endif
1736
1737
1738 #ifndef YY_NO_POP_STATE
yy_pop_state()1739 static void yy_pop_state()
1740 {
1741 if ( --yy_start_stack_ptr < 0 )
1742 YY_FATAL_ERROR( "start-condition stack underflow" );
1743
1744 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1745 }
1746 #endif
1747
1748
1749 #ifndef YY_NO_TOP_STATE
yy_top_state()1750 static int yy_top_state()
1751 {
1752 return yy_start_stack[yy_start_stack_ptr - 1];
1753 }
1754 #endif
1755
1756 #ifndef YY_EXIT_FAILURE
1757 #define YY_EXIT_FAILURE 2
1758 #endif
1759
1760 #ifdef YY_USE_PROTOS
yy_fatal_error(yyconst char msg[])1761 static void yy_fatal_error( yyconst char msg[] )
1762 #else
1763 static void yy_fatal_error( msg )
1764 char msg[];
1765 #endif
1766 {
1767 (void) fprintf( stderr, "%s\n", msg );
1768 exit( YY_EXIT_FAILURE );
1769 }
1770
1771
1772
1773 /* Redefine yyless() so it works in section 3 code. */
1774
1775 #undef yyless
1776 #define yyless(n) \
1777 do \
1778 { \
1779 /* Undo effects of setting up yytext. */ \
1780 yytext[yyleng] = yy_hold_char; \
1781 yy_c_buf_p = yytext + n; \
1782 yy_hold_char = *yy_c_buf_p; \
1783 *yy_c_buf_p = '\0'; \
1784 yyleng = n; \
1785 } \
1786 while ( 0 )
1787
1788
1789 /* Internal utility routines. */
1790
1791 #ifndef yytext_ptr
1792 #ifdef YY_USE_PROTOS
yy_flex_strncpy(char * s1,yyconst char * s2,int n)1793 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1794 #else
1795 static void yy_flex_strncpy( s1, s2, n )
1796 char *s1;
1797 yyconst char *s2;
1798 int n;
1799 #endif
1800 {
1801 register int i;
1802 for ( i = 0; i < n; ++i )
1803 s1[i] = s2[i];
1804 }
1805 #endif
1806
1807 #ifdef YY_NEED_STRLEN
1808 #ifdef YY_USE_PROTOS
yy_flex_strlen(yyconst char * s)1809 static int yy_flex_strlen( yyconst char *s )
1810 #else
1811 static int yy_flex_strlen( s )
1812 yyconst char *s;
1813 #endif
1814 {
1815 register int n;
1816 for ( n = 0; s[n]; ++n )
1817 ;
1818
1819 return n;
1820 }
1821 #endif
1822
1823
1824 #ifdef YY_USE_PROTOS
yy_flex_alloc(yy_size_t size)1825 static void *yy_flex_alloc( yy_size_t size )
1826 #else
1827 static void *yy_flex_alloc( size )
1828 yy_size_t size;
1829 #endif
1830 {
1831 return (void *) malloc( size );
1832 }
1833
1834 #ifdef YY_USE_PROTOS
yy_flex_realloc(void * ptr,yy_size_t size)1835 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1836 #else
1837 static void *yy_flex_realloc( ptr, size )
1838 void *ptr;
1839 yy_size_t size;
1840 #endif
1841 {
1842 /* The cast to (char *) in the following accommodates both
1843 * implementations that use char* generic pointers, and those
1844 * that use void* generic pointers. It works with the latter
1845 * because both ANSI C and C++ allow castless assignment from
1846 * any pointer type to void*, and deal with argument conversions
1847 * as though doing an assignment.
1848 */
1849 return (void *) realloc( (char *) ptr, size );
1850 }
1851
1852 #ifdef YY_USE_PROTOS
yy_flex_free(void * ptr)1853 static void yy_flex_free( void *ptr )
1854 #else
1855 static void yy_flex_free( ptr )
1856 void *ptr;
1857 #endif
1858 {
1859 free( ptr );
1860 }
1861
1862 #if YY_MAIN
main()1863 int main()
1864 {
1865 yylex();
1866 return 0;
1867 }
1868 #endif
1869 #line 89 "deflex.l"
1870
1871 #ifndef yywrap
1872 /* Needed for lex, though not flex. */
yywrap(void)1873 int yywrap(void) { return 1; }
1874 #endif
1875