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