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