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