1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
27 /* Use prototypes in function declarations. */
30 /* The "const" storage-class-modifier is valid. */
33 #else /* ! __cplusplus */
41 #endif /* ! __cplusplus */
60 #define YY_PROTO(proto) proto
62 #define YY_PROTO(proto) ()
65 /* Returned upon end-of-file. */
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
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
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.
79 #define BEGIN yy_start = 1 + 2 *
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
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
94 #define YY_END_OF_BUFFER_CHAR 0
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
102 extern FILE *yyin, *yyout;
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
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:
112 * if ( condition_holds )
115 * do_something_else();
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.
122 /* Return all but the first 'n' matched characters back to the input stream. */
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 */ \
135 #define unput(c) yyunput( c, yytext_ptr )
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).
141 typedef unsigned int yy_size_t;
144 struct yy_buffer_state
148 char *yy_ch_buf; /* input buffer */
149 char *yy_buf_pos; /* current position in input buffer */
151 /* Size of input buffer in bytes, not including room for EOB
154 yy_size_t yy_buf_size;
156 /* Number of characters read into yy_ch_buf, not including EOB
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
165 int yy_is_our_buffer;
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
172 int yy_is_interactive;
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
180 /* Whether to try to fill the input buffer when we reach the
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.
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.
198 #define YY_BUFFER_EOF_PENDING 2
201 static YY_BUFFER_STATE yy_current_buffer = 0;
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
207 #define YY_CURRENT_BUFFER yy_current_buffer
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char;
213 static int yy_n_chars; /* number of characters read into yy_ch_buf */
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 */
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 ...
226 static int yy_did_buffer_switch_on_eof;
228 void yyrestart YY_PROTO(( FILE *input_file ));
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 )
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 ));
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 * ));
246 #define yy_new_buffer yy_create_buffer
248 #define yy_set_interactive(is_interactive) \
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; \
255 #define yy_set_bol(at_bol) \
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; \
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
264 typedef unsigned char YY_CHAR;
265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
266 typedef int yy_state_type;
268 #define yytext_ptr yytext
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[] ));
275 /* Done after the current pattern has been matched and before the
276 * corresponding action - sets up yytext.
278 #define YY_DO_BEFORE_ACTION \
279 yytext_ptr = yy_bp; \
280 yyleng = (int) (yy_cp - yy_bp); \
281 yy_hold_char = *yy_cp; \
285 #define YY_NUM_RULES 36
286 #define YY_END_OF_BUFFER 37
287 static yyconst short int yy_accept[661] =
289 0, 0, 37, 35, 35, 35, 35, 35, 35, 35,
290 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
291 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
292 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
293 35, 35, 35, 35, 35, 35, 0, 0, 0, 0,
294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
295 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
296 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
298 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
300 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
301 0, 14, 0, 0, 0, 0, 0, 0, 0, 0,
302 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
303 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
305 0, 14, 0, 0, 0, 0, 0, 0, 0, 0,
306 0, 0, 0, 0, 0, 0, 34, 28, 27, 0,
307 0, 33, 21, 20, 0, 19, 18, 0, 0, 15,
308 32, 31, 17, 16, 0, 0, 0, 23, 22, 0,
309 0, 0, 26, 0, 0, 25, 24, 0, 0, 0,
311 0, 0, 0, 30, 29, 0, 0, 34, 34, 34,
312 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
313 34, 34, 34, 34, 34, 34, 12, 13, 0, 0,
314 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
315 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
316 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
317 0, 0, 0, 12, 13, 0, 0, 0, 0, 0,
318 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
319 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
320 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
323 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
324 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
325 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
326 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
327 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
328 0, 0, 0, 0, 0, 9, 0, 0, 0, 0,
329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
330 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
331 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
333 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
334 7, 7, 0, 0, 0, 0, 0, 0, 0, 0,
335 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
336 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
337 0, 10, 11, 0, 0, 0, 0, 0, 0, 0,
338 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
339 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
342 0, 0, 0, 7, 0, 0, 0, 0, 0, 0,
344 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
345 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
346 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
347 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
348 0, 0, 0, 0, 0, 0, 0, 0, 6, 6,
349 6, 6, 6, 6, 6, 0, 0, 0, 0, 0,
350 0, 0, 0, 0, 5, 0, 5, 0, 0, 0,
351 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
353 0, 0, 0, 0, 5, 5, 5, 0, 0, 8,
355 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
356 0, 0, 0, 0, 5, 0, 0, 6, 6, 0,
357 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
358 0, 3, 0, 0, 6, 0, 0, 0, 0, 0,
359 0, 6, 6, 0, 2, 4, 1, 1, 0, 6,
360 0, 0, 0, 1, 0, 0, 1, 2, 4, 0
363 static yyconst int yy_ec[256] =
365 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
366 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
367 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
368 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
369 1, 1, 4, 5, 6, 1, 7, 8, 9, 8,
370 8, 8, 8, 8, 8, 8, 8, 10, 1, 1,
371 1, 1, 1, 1, 11, 12, 13, 14, 15, 16,
372 17, 18, 19, 20, 19, 19, 21, 22, 23, 24,
373 19, 19, 25, 26, 27, 19, 28, 19, 29, 19,
374 30, 1, 31, 1, 1, 1, 32, 33, 34, 35,
376 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
377 46, 47, 42, 48, 49, 50, 51, 52, 53, 42,
378 54, 42, 1, 1, 1, 1, 1, 1, 1, 1,
379 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
380 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 static yyconst int yy_meta[55] =
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
399 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
400 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
401 3, 3, 3, 3, 3, 3, 4, 3, 3, 3,
405 static yyconst short int yy_base[665] =
407 0, 0, 1119, 1120, 47, 49, 102, 91, 81, 93,
408 76, 99, 100, 101, 105, 106, 120, 121, 129, 125,
409 133, 119, 82, 130, 113, 143, 150, 137, 1069, 127,
410 1081, 130, 137, 1072, 134, 0, 155, 159, 143, 1081,
411 147, 161, 156, 1064, 1077, 164, 71, 192, 184, 189,
412 0, 196, 197, 202, 201, 203, 204, 205, 206, 210,
413 218, 190, 1063, 198, 0, 199, 1067, 202, 203, 205,
414 1061, 206, 1059, 207, 255, 236, 256, 0, 1082, 1081,
415 1058, 1067, 1078, 1077, 1076, 1067, 1074, 1073, 1065, 1057,
416 1070, 1069, 1068, 1067, 1066, 1046, 135, 1064, 1063, 205,
418 1043, 1061, 1034, 1035, 1058, 1057, 1032, 1034, 1035, 1028,
419 1042, 0, 1042, 1050, 1049, 1042, 1026, 0, 1022, 1023,
420 1020, 1031, 1018, 1017, 1016, 1031, 1014, 1013, 1029, 1021,
421 1010, 1009, 1008, 1012, 1006, 1005, 222, 216, 1004, 1008,
422 1002, 999, 1000, 999, 998, 997, 996, 998, 999, 992,
423 1006, 0, 1006, 990, 989, 241, 252, 90, 1002, 1001,
424 240, 1004, 989, 1000, 997, 275, 1120, 1120, 1120, 266,
425 244, 1120, 1120, 1120, 271, 1120, 1120, 115, 283, 1120,
426 1120, 1120, 1120, 1120, 272, 277, 284, 1120, 1120, 287,
427 1030, 292, 1120, 296, 291, 1120, 1120, 300, 306, 307,
429 309, 311, 317, 1120, 1120, 1000, 999, 301, 308, 313,
430 315, 323, 322, 324, 328, 327, 1027, 331, 332, 333,
431 338, 336, 342, 343, 348, 350, 361, 363, 980, 989,
432 992, 992, 979, 322, 326, 971, 972, 974, 367, 375,
433 385, 977, 970, 974, 966, 396, 1014, 983, 982, 1011,
434 1010, 972, 978, 965, 975, 959, 970, 973, 955, 968,
435 966, 971, 970, 1120, 1120, 344, 337, 388, 352, 381,
436 390, 394, 400, 997, 399, 383, 397, 400, 405, 418,
437 996, 947, 963, 963, 441, 364, 958, 957, 371, 960,
438 945, 956, 953, 934, 939, 984, 931, 951, 947, 947,
440 937, 926, 944, 946, 928, 955, 954, 444, 931, 924,
441 928, 920, 938, 967, 966, 928, 922, 932, 928, 446,
442 449, 454, 961, 434, 960, 925, 912, 462, 957, 910,
443 919, 922, 922, 909, 416, 412, 901, 902, 904, 463,
444 896, 465, 913, 900, 915, 913, 467, 913, 890, 908,
445 898, 897, 466, 471, 938, 889, 905, 905, 888, 933,
446 901, 897, 888, 484, 480, 493, 482, 496, 883, 876,
447 430, 893, 892, 374, 895, 880, 891, 888, 469, 494,
448 496, 498, 508, 510, 511, 514, 921, 513, 512, 515,
449 874, 919, 866, 883, 864, 516, 885, 885, 884, 517,
451 520, 912, 877, 864, 857, 874, 861, 875, 525, 905,
452 522, 534, 904, 903, 856, 865, 868, 868, 855, 495,
453 496, 847, 848, 850, 552, 853, 846, 850, 842, 860,
454 889, 888, 850, 844, 854, 850, 883, 518, 836, 550,
455 829, 1120, 1120, 554, 558, 566, 834, 827, 832, 877,
456 842, 867, 561, 574, 874, 563, 575, 539, 535, 549,
457 555, 571, 551, 576, 579, 873, 580, 585, 586, 589,
458 872, 823, 839, 839, 822, 867, 835, 831, 822, 863,
459 587, 598, 862, 861, 860, 859, 812, 601, 811, 812,
460 564, 575, 821, 599, 626, 813, 806, 810, 802, 820,
462 849, 848, 810, 804, 814, 810, 630, 843, 615, 842,
463 807, 794, 787, 804, 791, 805, 827, 621, 834, 825,
464 794, 788, 782, 786, 779, 793, 793, 632, 634, 825,
465 776, 792, 792, 775, 820, 788, 784, 775, 636, 639,
466 648, 770, 763, 768, 813, 778, 643, 645, 778, 777,
467 760, 775, 761, 759, 762, 653, 656, 804, 769, 756,
468 749, 766, 753, 767, 658, 661, 669, 664, 667, 797,
469 796, 795, 748, 785, 672, 762, 761, 744, 759, 741,
470 754, 752, 680, 675, 683, 739, 732, 737, 782, 747,
471 685, 780, 687, 689, 697, 699, 707, 779, 702, 1120,
473 726, 725, 743, 723, 741, 743, 725, 709, 771, 770,
474 769, 768, 721, 712, 698, 623, 705, 1120, 1120, 736,
475 1120, 735, 712, 725, 722, 715, 688, 676, 717, 725,
476 720, 1120, 605, 583, 1120, 589, 722, 727, 729, 731,
477 733, 1120, 1120, 565, 583, 428, 735, 737, 200, 1120,
478 739, 741, 743, 745, 747, 749, 1120, 1120, 1120, 1120,
482 static yyconst short int yy_def[665] =
484 660, 1, 660, 660, 660, 660, 660, 661, 661, 661,
485 661, 10, 10, 10, 10, 10, 10, 10, 10, 10,
486 10, 661, 661, 661, 661, 10, 660, 662, 662, 662,
487 662, 662, 662, 662, 662, 662, 662, 662, 662, 662,
488 662, 662, 662, 662, 662, 662, 660, 660, 10, 10,
489 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
490 10, 662, 662, 662, 662, 662, 662, 662, 662, 662,
491 662, 662, 662, 662, 660, 660, 660, 663, 663, 663,
492 660, 660, 663, 663, 663, 660, 663, 663, 660, 660,
493 663, 663, 663, 663, 663, 660, 660, 663, 663, 660,
495 660, 663, 660, 660, 663, 663, 660, 660, 660, 660,
496 660, 663, 660, 663, 663, 660, 660, 664, 664, 664,
497 664, 664, 664, 664, 664, 664, 664, 664, 664, 664,
498 664, 664, 664, 664, 664, 664, 664, 664, 664, 664,
499 664, 664, 664, 664, 664, 664, 664, 664, 664, 664,
500 664, 664, 664, 664, 664, 660, 660, 660, 660, 660,
501 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
502 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
503 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
504 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
506 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
507 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
508 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
509 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
510 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
511 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
512 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
513 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
514 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
515 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
517 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
518 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
519 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
520 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
521 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
522 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
523 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
524 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
525 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
526 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
528 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
529 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
530 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
531 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
532 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
533 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
534 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
535 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
536 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
537 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
539 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
540 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
541 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
542 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
543 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
544 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
545 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
546 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
547 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
548 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
550 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
551 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
552 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
553 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
554 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
555 660, 660, 660, 660, 660, 660, 660, 660, 660, 0,
559 static yyconst short int yy_nxt[1175] =
561 4, 4, 4, 5, 4, 6, 4, 7, 7, 4,
562 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
563 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
564 4, 28, 29, 30, 31, 32, 33, 34, 35, 36,
565 37, 36, 36, 38, 39, 40, 41, 36, 42, 43,
566 44, 36, 45, 46, 47, 47, 48, 48, 167, 49,
567 50, 51, 52, 53, 52, 54, 55, 52, 56, 57,
568 58, 52, 59, 52, 52, 60, 52, 61, 156, 156,
569 62, 63, 64, 65, 66, 65, 67, 68, 65, 69,
570 65, 65, 70, 71, 65, 72, 65, 65, 65, 73,
572 65, 65, 74, 75, 79, 83, 84, 76, 76, 77,
573 77, 86, 87, 78, 78, 80, 241, 85, 92, 78,
574 110, 91, 660, 88, 78, 78, 660, 660, 660, 93,
575 78, 660, 111, 94, 98, 89, 229, 81, 78, 660,
576 230, 82, 78, 660, 95, 99, 105, 90, 113, 78,
577 107, 96, 100, 102, 108, 112, 114, 106, 104, 660,
578 116, 124, 245, 660, 127, 660, 101, 115, 132, 109,
579 97, 119, 129, 117, 103, 125, 660, 186, 128, 187,
580 660, 145, 133, 120, 130, 121, 134, 122, 142, 135,
581 138, 143, 147, 139, 150, 146, 148, 79, 154, 157,
583 157, 630, 78, 136, 140, 137, 151, 141, 80, 78,
584 87, 149, 155, 83, 92, 78, 94, 98, 78, 105,
585 78, 88, 91, 78, 119, 93, 78, 95, 99, 102,
586 106, 114, 124, 127, 78, 112, 132, 135, 121, 139,
587 145, 154, 115, 166, 166, 241, 125, 128, 227, 227,
588 133, 136, 190, 141, 146, 155, 75, 75, 191, 228,
589 228, 76, 76, 216, 214, 158, 215, 241, 159, 217,
590 160, 233, 241, 241, 161, 162, 163, 164, 241, 165,
591 239, 239, 240, 240, 246, 241, 158, 247, 241, 159,
592 234, 160, 241, 246, 243, 161, 247, 241, 162, 163,
594 164, 246, 241, 165, 247, 242, 244, 241, 246, 241,
595 246, 247, 246, 247, 241, 247, 241, 248, 246, 251,
596 252, 247, 249, 241, 246, 241, 253, 247, 241, 241,
597 250, 254, 246, 241, 241, 247, 255, 241, 308, 246,
598 242, 258, 247, 246, 246, 308, 247, 247, 244, 246,
599 256, 246, 247, 308, 247, 257, 259, 248, 243, 260,
600 252, 261, 245, 251, 271, 253, 272, 254, 264, 264,
601 265, 265, 249, 273, 278, 279, 258, 250, 255, 274,
602 239, 239, 308, 309, 308, 257, 241, 310, 256, 308,
603 259, 308, 280, 280, 261, 308, 260, 246, 308, 312,
605 308, 308, 334, 285, 285, 419, 286, 320, 320, 287,
606 330, 288, 321, 321, 331, 289, 290, 291, 292, 322,
607 293, 335, 323, 311, 420, 324, 324, 286, 318, 315,
608 287, 313, 288, 316, 317, 322, 289, 652, 323, 290,
609 291, 292, 328, 314, 293, 308, 319, 364, 329, 329,
610 364, 353, 354, 365, 365, 322, 366, 366, 384, 386,
611 385, 367, 368, 328, 246, 387, 246, 247, 246, 247,
612 425, 247, 371, 400, 400, 372, 415, 373, 401, 401,
613 416, 374, 375, 376, 377, 364, 378, 410, 410, 411,
614 411, 409, 409, 371, 364, 425, 372, 425, 373, 425,
616 410, 410, 374, 412, 412, 375, 376, 377, 426, 425,
617 378, 425, 425, 425, 425, 425, 425, 246, 444, 246,
618 247, 444, 247, 454, 445, 445, 455, 446, 446, 456,
619 456, 428, 452, 452, 453, 454, 495, 463, 455, 464,
620 495, 457, 457, 465, 427, 429, 432, 433, 434, 466,
621 495, 246, 495, 425, 247, 444, 495, 435, 430, 470,
622 470, 482, 482, 431, 436, 483, 483, 444, 488, 488,
623 494, 494, 495, 483, 483, 454, 454, 495, 496, 455,
624 495, 495, 494, 494, 498, 497, 495, 495, 246, 489,
625 507, 247, 651, 508, 490, 523, 509, 509, 491, 492,
627 454, 493, 499, 455, 501, 517, 517, 518, 520, 520,
628 489, 502, 503, 525, 524, 504, 507, 490, 650, 508,
629 644, 500, 491, 492, 630, 526, 493, 495, 547, 547,
630 505, 507, 631, 528, 529, 506, 643, 539, 540, 556,
631 556, 557, 557, 565, 565, 566, 567, 567, 566, 541,
632 574, 574, 575, 575, 583, 568, 569, 583, 642, 591,
633 584, 584, 592, 585, 585, 593, 593, 566, 594, 594,
634 591, 596, 596, 592, 597, 597, 595, 595, 566, 600,
635 600, 583, 609, 609, 583, 629, 591, 608, 608, 495,
636 609, 609, 614, 614, 615, 615, 616, 616, 591, 591,
638 591, 592, 592, 592, 615, 615, 593, 593, 591, 617,
639 617, 592, 632, 632, 595, 595, 625, 625, 626, 628,
640 628, 629, 637, 637, 638, 638, 630, 641, 641, 645,
641 645, 626, 639, 640, 646, 646, 647, 647, 648, 648,
642 649, 649, 653, 653, 654, 654, 655, 655, 656, 656,
643 657, 657, 657, 657, 658, 658, 659, 659, 78, 636,
644 78, 118, 118, 167, 167, 635, 634, 633, 627, 495,
645 495, 495, 583, 624, 623, 622, 621, 620, 619, 618,
646 425, 591, 613, 495, 612, 611, 610, 607, 606, 605,
647 604, 603, 602, 601, 599, 598, 425, 425, 425, 590,
649 589, 588, 466, 587, 586, 495, 582, 581, 580, 579,
650 578, 577, 576, 573, 425, 572, 571, 570, 564, 563,
651 562, 495, 561, 560, 559, 558, 495, 555, 554, 553,
652 552, 551, 550, 549, 548, 308, 518, 546, 545, 544,
653 387, 543, 542, 425, 541, 538, 537, 536, 535, 495,
654 495, 534, 533, 532, 531, 530, 527, 522, 521, 519,
655 308, 308, 308, 444, 241, 516, 515, 514, 425, 513,
656 512, 511, 510, 425, 495, 454, 453, 487, 308, 486,
657 485, 484, 481, 480, 241, 479, 478, 477, 476, 425,
658 425, 475, 474, 473, 472, 471, 469, 468, 467, 462,
660 461, 460, 459, 458, 241, 241, 364, 451, 450, 449,
661 274, 448, 447, 308, 443, 442, 441, 440, 439, 438,
662 241, 437, 425, 424, 423, 422, 421, 418, 417, 414,
663 413, 408, 407, 406, 308, 405, 404, 403, 402, 308,
664 399, 398, 397, 396, 395, 394, 393, 392, 391, 191,
665 390, 389, 388, 383, 382, 381, 380, 379, 328, 370,
666 369, 241, 322, 363, 362, 361, 360, 308, 308, 359,
667 358, 357, 356, 355, 352, 351, 350, 349, 348, 347,
668 346, 345, 344, 343, 342, 241, 341, 340, 339, 338,
669 337, 336, 333, 332, 327, 326, 325, 241, 308, 307,
671 306, 305, 304, 303, 302, 301, 300, 299, 298, 297,
672 296, 241, 241, 295, 294, 246, 284, 283, 282, 281,
673 277, 276, 275, 270, 269, 268, 267, 266, 241, 263,
674 262, 241, 238, 237, 236, 235, 232, 231, 205, 204,
675 226, 225, 224, 223, 222, 221, 197, 196, 220, 193,
676 219, 189, 218, 188, 184, 183, 213, 182, 181, 180,
677 212, 211, 177, 176, 210, 174, 173, 172, 209, 169,
678 208, 168, 207, 206, 205, 204, 203, 202, 201, 200,
679 199, 198, 197, 196, 195, 194, 193, 192, 189, 188,
680 185, 184, 183, 182, 181, 180, 179, 178, 177, 176,
682 175, 174, 173, 172, 171, 170, 169, 168, 152, 143,
683 131, 123, 153, 152, 144, 131, 126, 123, 660, 3,
684 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
685 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
686 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
687 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
688 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
692 static yyconst short int yy_chk[1175] =
694 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
695 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
696 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
697 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
698 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
699 1, 1, 1, 1, 5, 5, 6, 6, 663, 6,
700 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
701 6, 6, 6, 6, 6, 6, 6, 6, 47, 47,
702 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
703 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
705 6, 6, 6, 7, 8, 9, 10, 7, 7, 7,
706 7, 11, 12, 13, 14, 8, 178, 10, 15, 16,
707 23, 14, 11, 12, 13, 14, 11, 9, 23, 15,
708 16, 9, 23, 17, 18, 13, 158, 8, 20, 10,
709 158, 8, 19, 10, 17, 18, 21, 13, 25, 20,
710 22, 17, 18, 19, 22, 24, 26, 21, 20, 25,
711 27, 30, 178, 25, 32, 22, 18, 26, 35, 22,
712 17, 28, 33, 27, 19, 30, 24, 97, 32, 97,
713 24, 41, 35, 28, 33, 28, 37, 28, 39, 37,
714 38, 39, 42, 38, 43, 41, 42, 49, 46, 48,
716 48, 649, 50, 37, 38, 37, 43, 38, 49, 52,
717 53, 42, 46, 50, 55, 54, 56, 57, 58, 59,
718 52, 53, 54, 60, 62, 55, 54, 56, 57, 58,
719 59, 61, 64, 66, 60, 60, 68, 69, 62, 70,
720 72, 74, 61, 76, 76, 171, 64, 66, 156, 156,
721 68, 69, 100, 70, 72, 74, 75, 77, 100, 157,
722 157, 77, 77, 138, 137, 75, 137, 170, 75, 138,
723 75, 161, 175, 185, 75, 75, 75, 75, 186, 75,
724 166, 166, 166, 166, 179, 187, 75, 179, 190, 75,
725 161, 75, 195, 192, 171, 75, 192, 194, 75, 75,
727 75, 198, 208, 75, 198, 170, 175, 199, 200, 209,
728 201, 200, 202, 201, 210, 202, 211, 179, 203, 187,
729 190, 203, 185, 213, 212, 214, 192, 212, 216, 215,
730 186, 194, 218, 219, 220, 218, 195, 222, 267, 221,
731 208, 200, 221, 223, 224, 266, 223, 224, 210, 225,
732 198, 226, 225, 269, 226, 199, 201, 212, 209, 202,
733 216, 203, 211, 215, 234, 218, 234, 219, 227, 227,
734 228, 228, 213, 235, 239, 239, 223, 214, 220, 235,
735 240, 240, 270, 266, 276, 222, 241, 267, 221, 268,
736 224, 271, 241, 241, 226, 272, 225, 246, 277, 269,
738 275, 273, 289, 246, 246, 374, 246, 278, 278, 246,
739 286, 246, 279, 279, 286, 246, 246, 246, 246, 280,
740 246, 289, 280, 268, 374, 280, 280, 246, 276, 272,
741 246, 270, 246, 273, 275, 324, 246, 646, 324, 246,
742 246, 246, 285, 271, 246, 308, 277, 320, 285, 285,
743 321, 308, 308, 320, 320, 322, 321, 321, 335, 336,
744 335, 322, 322, 328, 340, 336, 342, 340, 347, 342,
745 379, 347, 328, 353, 353, 328, 371, 328, 354, 354,
746 371, 328, 328, 328, 328, 364, 328, 365, 365, 367,
747 367, 364, 364, 328, 366, 380, 328, 381, 328, 382,
749 366, 366, 328, 368, 368, 328, 328, 328, 379, 383,
750 328, 384, 385, 389, 388, 386, 390, 396, 400, 438,
751 396, 401, 438, 411, 400, 400, 411, 401, 401, 411,
752 411, 381, 409, 409, 409, 412, 459, 420, 412, 420,
753 458, 412, 412, 421, 380, 382, 385, 386, 388, 421,
754 460, 440, 463, 425, 440, 444, 461, 389, 383, 425,
755 425, 444, 444, 384, 390, 445, 445, 446, 453, 453,
756 456, 456, 462, 446, 446, 454, 457, 464, 458, 457,
757 465, 467, 457, 457, 460, 459, 468, 469, 481, 454,
758 470, 481, 645, 470, 454, 491, 470, 470, 454, 454,
760 494, 454, 461, 494, 463, 482, 482, 482, 488, 488,
761 454, 464, 465, 492, 491, 467, 509, 454, 644, 509,
762 636, 462, 454, 454, 616, 492, 454, 495, 518, 518,
763 468, 507, 616, 495, 495, 469, 634, 507, 507, 528,
764 528, 529, 529, 539, 539, 539, 540, 540, 540, 541,
765 547, 547, 548, 548, 556, 541, 541, 557, 633, 565,
766 556, 556, 565, 557, 557, 565, 565, 565, 566, 566,
767 567, 568, 568, 567, 569, 569, 567, 567, 567, 575,
768 575, 583, 584, 584, 585, 628, 591, 583, 583, 627,
769 585, 585, 591, 591, 593, 593, 594, 594, 595, 615,
771 596, 595, 615, 596, 595, 595, 596, 596, 597, 599,
772 599, 597, 617, 617, 597, 597, 608, 608, 608, 614,
773 614, 614, 626, 626, 629, 629, 630, 631, 631, 637,
774 637, 625, 630, 630, 638, 638, 639, 639, 640, 640,
775 641, 641, 647, 647, 648, 648, 651, 651, 652, 652,
776 653, 653, 654, 654, 655, 655, 656, 656, 661, 624,
777 661, 662, 662, 664, 664, 623, 622, 620, 613, 612,
778 611, 610, 609, 607, 606, 605, 604, 603, 602, 601,
779 598, 592, 590, 589, 588, 587, 586, 582, 581, 580,
780 579, 578, 577, 576, 574, 573, 572, 571, 570, 564,
782 563, 562, 561, 560, 559, 558, 555, 554, 553, 552,
783 551, 550, 549, 546, 545, 544, 543, 542, 538, 537,
784 536, 535, 534, 533, 532, 531, 530, 527, 526, 525,
785 524, 523, 522, 521, 520, 519, 517, 516, 515, 514,
786 513, 512, 511, 510, 508, 506, 505, 504, 503, 502,
787 501, 500, 499, 498, 497, 496, 493, 490, 489, 487,
788 486, 485, 484, 483, 480, 479, 478, 477, 476, 475,
789 474, 473, 472, 471, 466, 455, 452, 451, 450, 449,
790 448, 447, 441, 439, 437, 436, 435, 434, 433, 432,
791 431, 430, 429, 428, 427, 426, 424, 423, 422, 419,
793 418, 417, 416, 415, 414, 413, 410, 408, 407, 406,
794 405, 404, 403, 402, 399, 398, 397, 395, 394, 393,
795 392, 391, 387, 378, 377, 376, 375, 373, 372, 370,
796 369, 363, 362, 361, 360, 359, 358, 357, 356, 355,
797 352, 351, 350, 349, 348, 346, 345, 344, 343, 341,
798 339, 338, 337, 334, 333, 332, 331, 330, 329, 327,
799 326, 325, 323, 319, 318, 317, 316, 315, 314, 313,
800 312, 311, 310, 309, 307, 306, 305, 304, 303, 302,
801 301, 300, 299, 298, 297, 296, 295, 294, 293, 292,
802 291, 290, 288, 287, 284, 283, 282, 281, 274, 263,
804 262, 261, 260, 259, 258, 257, 256, 255, 254, 253,
805 252, 251, 250, 249, 248, 247, 245, 244, 243, 242,
806 238, 237, 236, 233, 232, 231, 230, 229, 217, 207,
807 206, 191, 165, 164, 163, 162, 160, 159, 155, 154,
808 153, 151, 150, 149, 148, 147, 146, 145, 144, 143,
809 142, 141, 140, 139, 136, 135, 134, 133, 132, 131,
810 130, 129, 128, 127, 126, 125, 124, 123, 122, 121,
811 120, 119, 117, 116, 115, 114, 113, 111, 110, 109,
812 108, 107, 106, 105, 104, 103, 102, 101, 99, 98,
813 96, 95, 94, 93, 92, 91, 90, 89, 88, 87,
815 86, 85, 84, 83, 82, 81, 80, 79, 73, 71,
816 67, 63, 45, 44, 40, 34, 31, 29, 3, 660,
817 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
818 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
819 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
820 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
821 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
825 static yy_state_type yy_last_accepting_state;
826 static char *yy_last_accepting_cpos;
828 /* The intent behind this definition is that it'll catch
829 * any uses of REJECT which flex missed.
831 #define REJECT reject_used_but_not_detected
832 #define yymore() yymore_used_but_not_detected
833 #define YY_MORE_ADJ 0
834 #define YY_RESTORE_YY_MORE_OFFSET
842 /* Since we're looking at a string at a time, don't worry about
843 * wrapping to the next buffer.
846 #define YY_SKIP_YYWRAP
850 /* This is the tricky thing that makes this function cool. We
851 * replace the traditional int yylex(void) declaration with our
852 * dparsetime() declaration, essentially piggy-backing off the
853 * utility of the yylex() function and adding what we need to make
854 * the parsing function useful to us.
856 #define YY_DECL struct tws *dparsetime(char *lexstr)
858 /* yyerminate() is called after the input string is matched to
859 * completion (actually, when the lexer reaches an EOF). The only
860 * thing that really needs to be in this macro function is the
861 * return call, which must be substituted inline into dparsetime.
864 #define yyterminate() (void)yy_delete_buffer(lexhandle); \
865 if(!(tw.tw_flags & TW_SUCC)) { \
866 return (struct tws *)NULL; \
868 if(tw.tw_year < 1960) \
869 tw.tw_year += 1900; \
870 if(tw.tw_year < 1960) \
875 * Patchable flag that says how to interpret NN/NN/NN dates. When
876 * true, we do it European style: DD/MM/YY. When false, we do it
877 * American style: MM/DD/YY. Of course, these are all non-RFC822
880 int europeandate = 0;
883 * Table to convert month names to numeric month. We use the
884 * fact that the low order 5 bits of the sum of the 2nd & 3rd
885 * characters of the name is a hash with no collisions for the 12
886 * valid month names. (The mask to 5 bits maps any combination of
887 * upper and lower case into the same hash value).
889 static int month_map[] = {
922 * Lookup table for day-of-week using the same hash trick as for above name-of-
923 * month table, but using the first and second character, not second and third.
925 * Compute index into table using: (day_name[0] & 7) + (day_name[1] & 4)
927 static int day_map[] = {
942 /* The SET* macros will parse for the appropriate field, and leave the
943 * cp pointer at the first character after the desired field. Be
944 * careful with variable-length fields or alpha-num mixes.
946 * The SKIP* macros skip over characters of a particular class and
947 * leave cp at the position of the first character that doesn't match
948 * that class. Correspondingly, SKIPTO* skips until it reaches a
949 * character of a particular class.
952 #define INIT() { cp = yytext;}
953 #define SETWDAY() { tw.tw_wday= day_map[(cp[0] & 7) + (cp[1] & 4)]; \
954 tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP; \
956 #define SETMON() { cp++; \
957 tw.tw_mon = month_map[(cp[0] + cp[1]) & 0x1f]; \
959 #define SETMON_NUM() { tw.tw_mon = atoi(cp)-1; \
961 #define SETYEAR() { tw.tw_year = atoi(cp); \
963 #define SETDAY() { tw.tw_mday = atoi(cp); \
964 tw.tw_flags |= TW_YES; \
966 #define SETTIME() { tw.tw_hour = atoi(cp); \
969 tw.tw_min = atoi(cp); \
972 tw.tw_sec = atoi(++cp); SKIPD(); } }
973 #define SETZONE(x) { tw.tw_zone = ((x)/100)*60+(x)%100; \
974 tw.tw_flags |= TW_SZEXP; \
976 #define SETDST() { tw.tw_flags |= TW_DST; }
977 #define SKIPD() { while ( isdigit(*cp++) ) ; \
979 #define SKIPTOD() { while ( !isdigit(*cp++) ) ; \
981 #define SKIPA() { while ( isalpha(*cp++) ) ; \
983 #define SKIPTOA() { while ( !isalpha(*cp++) ) ; \
985 #define SKIPSP() { while ( isspace(*cp++) ) ; \
987 #define SKIPTOSP() { while ( !isspace(*cp++) ) ; \
990 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
991 # ifdef TIME_WITH_SYS_TIME
992 # include <sys/time.h>
995 # ifdef HAVE_SYS_TIME_H
996 # include <sys/time.h>
1003 zonehack (struct tws *tw)
1005 register struct tm *tm;
1007 if (dmktime (tw) == (time_t) -1)
1010 tm = localtime (&tw->tw_clock);
1012 tw->tw_flags |= TW_DST;
1016 #endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
1017 /* The year can either be 2 digits, or 4. However, after
1018 Y2K, we found that some MUA were reporting the year 100, hence
1019 the middle term here. yyterminate() resolves the actual
1020 issues with 2-digit years.
1023 /* Macros after this point can all be overridden by user definitions in
1027 #ifndef YY_SKIP_YYWRAP
1029 extern "C" int yywrap YY_PROTO(( void ));
1031 extern int yywrap YY_PROTO(( void ));
1036 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
1040 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1043 #ifdef YY_NEED_STRLEN
1044 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1049 static int yyinput YY_PROTO(( void ));
1051 static int input YY_PROTO(( void ));
1056 static int yy_start_stack_ptr = 0;
1057 static int yy_start_stack_depth = 0;
1058 static int *yy_start_stack = 0;
1059 #ifndef YY_NO_PUSH_STATE
1060 static void yy_push_state YY_PROTO(( int new_state ));
1062 #ifndef YY_NO_POP_STATE
1063 static void yy_pop_state YY_PROTO(( void ));
1065 #ifndef YY_NO_TOP_STATE
1066 static int yy_top_state YY_PROTO(( void ));
1070 #define YY_NO_PUSH_STATE 1
1071 #define YY_NO_POP_STATE 1
1072 #define YY_NO_TOP_STATE 1
1075 #ifdef YY_MALLOC_DECL
1083 /* Just try to get by without declaring the routines. This will fail
1084 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1085 * or sizeof(void*) != sizeof(int).
1090 /* Amount of stuff to slurp up with each read. */
1091 #ifndef YY_READ_BUF_SIZE
1092 #define YY_READ_BUF_SIZE 8192
1095 /* Copy whatever the last rule matched to the standard output. */
1098 /* This used to be an fputs(), but since the string might contain NUL's,
1099 * we now use fwrite().
1101 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1104 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1105 * is returned in "result".
1108 #define YY_INPUT(buf,result,max_size) \
1109 if ( yy_current_buffer->yy_is_interactive ) \
1112 for ( n = 0; n < max_size && \
1113 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1114 buf[n] = (char) c; \
1116 buf[n++] = (char) c; \
1117 if ( c == EOF && ferror( yyin ) ) \
1118 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1121 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1122 && ferror( yyin ) ) \
1123 YY_FATAL_ERROR( "input in flex scanner failed" );
1126 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1127 * we don't want an extra ';' after the "return" because that will cause
1128 * some compilers to complain about unreachable statements.
1131 #define yyterminate() return YY_NULL
1134 /* Number of entries by which start-condition stack grows. */
1135 #ifndef YY_START_STACK_INCR
1136 #define YY_START_STACK_INCR 25
1139 /* Report a fatal error. */
1140 #ifndef YY_FATAL_ERROR
1141 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1144 /* Default declaration of generated scanner - a define so the user can
1145 * easily add parameters.
1148 #define YY_DECL int yylex YY_PROTO(( void ))
1151 /* Code executed at the beginning of each rule, after yytext and yyleng
1154 #ifndef YY_USER_ACTION
1155 #define YY_USER_ACTION
1158 /* Code executed at the end of each rule. */
1160 #define YY_BREAK break;
1163 #define YY_RULE_SETUP \
1168 register yy_state_type yy_current_state;
1169 register char *yy_cp = NULL, *yy_bp = NULL;
1170 register int yy_act;
1172 #line 226 "dtimep.lex"
1175 /* This section begins the definition of dparsetime().
1176 Put here any local variable definitions and initializations */
1178 YY_BUFFER_STATE lexhandle;
1181 static struct tws tw;
1183 memset(&tw,0,sizeof(struct tws));
1185 lexhandle = yy_scan_string(lexstr);
1198 yy_start = 1; /* first start state */
1206 if ( ! yy_current_buffer )
1208 yy_create_buffer( yyin, YY_BUF_SIZE );
1210 yy_load_buffer_state();
1213 while ( 1 ) /* loops until end-of-file is reached */
1217 /* Support of yytext. */
1218 *yy_cp = yy_hold_char;
1220 /* yy_bp points to the position in yy_ch_buf of the start of
1225 yy_current_state = yy_start;
1229 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1230 if ( yy_accept[yy_current_state] )
1232 yy_last_accepting_state = yy_current_state;
1233 yy_last_accepting_cpos = yy_cp;
1235 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1237 yy_current_state = (int) yy_def[yy_current_state];
1238 if ( yy_current_state >= 661 )
1239 yy_c = yy_meta[(unsigned int) yy_c];
1241 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1244 while ( yy_base[yy_current_state] != 1120 );
1247 yy_act = yy_accept[yy_current_state];
1249 { /* have to back up */
1250 yy_cp = yy_last_accepting_cpos;
1251 yy_current_state = yy_last_accepting_state;
1252 yy_act = yy_accept[yy_current_state];
1255 YY_DO_BEFORE_ACTION;
1258 do_action: /* This label is used only to access EOF actions. */
1262 { /* beginning of action switch */
1263 case 0: /* must back up */
1264 /* undo the effects of YY_DO_BEFORE_ACTION */
1265 *yy_cp = yy_hold_char;
1266 yy_cp = yy_last_accepting_cpos;
1267 yy_current_state = yy_last_accepting_state;
1268 goto yy_find_action;
1272 #line 241 "dtimep.lex"
1288 #line 254 "dtimep.lex"
1304 #line 266 "dtimep.lex"
1318 #line 276 "dtimep.lex"
1334 #line 288 "dtimep.lex"
1348 #line 298 "dtimep.lex"
1362 #line 308 "dtimep.lex"
1374 #line 316 "dtimep.lex"
1396 #line 334 "dtimep.lex"
1416 #line 351 "dtimep.lex"
1421 #line 352 "dtimep.lex"
1426 #line 354 "dtimep.lex"
1431 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
1433 #endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
1439 #line 363 "dtimep.lex"
1444 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
1446 #endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
1453 #line 373 "dtimep.lex"
1458 #line 374 "dtimep.lex"
1463 #line 375 "dtimep.lex"
1464 INIT(); SETZONE(200);
1468 #line 376 "dtimep.lex"
1469 INIT(); SETDST(); SETZONE(2);
1473 #line 377 "dtimep.lex"
1474 INIT(); SETZONE(-500);
1478 #line 378 "dtimep.lex"
1479 INIT(); SETDST(); SETZONE(-500);
1483 #line 379 "dtimep.lex"
1484 INIT(); SETZONE(-600);
1488 #line 380 "dtimep.lex"
1489 INIT(); SETDST(); SETZONE(-600);
1493 #line 381 "dtimep.lex"
1494 INIT(); SETZONE(-700);
1498 #line 382 "dtimep.lex"
1499 INIT(); SETDST(); SETZONE(-700);
1503 #line 383 "dtimep.lex"
1504 INIT(); SETZONE(-800);
1508 #line 384 "dtimep.lex"
1509 INIT(); SETDST(); SETZONE(-800);
1513 #line 385 "dtimep.lex"
1514 INIT(); SETZONE(-330);
1518 #line 386 "dtimep.lex"
1519 INIT(); SETZONE(-400);
1523 #line 387 "dtimep.lex"
1524 INIT(); SETDST(); SETZONE(-400);
1528 #line 388 "dtimep.lex"
1529 INIT(); SETZONE(-900);
1533 #line 389 "dtimep.lex"
1534 INIT(); SETDST(); SETZONE(-900);
1538 #line 390 "dtimep.lex"
1539 INIT(); SETZONE(-1000);
1543 #line 391 "dtimep.lex"
1544 INIT(); SETDST(); SETZONE(-1000);
1548 #line 392 "dtimep.lex"
1549 INIT(); SETDST(); SETZONE(-100);
1553 #line 393 "dtimep.lex"
1558 #line 394 "dtimep.lex"
1563 #line 395 "dtimep.lex"
1566 case YY_STATE_EOF(INITIAL):
1569 case YY_END_OF_BUFFER:
1571 /* Amount of text matched not including the EOB char. */
1572 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1574 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1575 *yy_cp = yy_hold_char;
1576 YY_RESTORE_YY_MORE_OFFSET
1578 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1580 /* We're scanning a new file or input source. It's
1581 * possible that this happened because the user
1582 * just pointed yyin at a new source and called
1583 * yylex(). If so, then we have to assure
1584 * consistency between yy_current_buffer and our
1585 * globals. Here is the right place to do so, because
1586 * this is the first action (other than possibly a
1587 * back-up) that will match for the new input source.
1589 yy_n_chars = yy_current_buffer->yy_n_chars;
1590 yy_current_buffer->yy_input_file = yyin;
1591 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1594 /* Note that here we test for yy_c_buf_p "<=" to the position
1595 * of the first EOB in the buffer, since yy_c_buf_p will
1596 * already have been incremented past the NUL character
1597 * (since all states make transitions on EOB to the
1598 * end-of-buffer state). Contrast this with the test
1601 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1602 { /* This was really a NUL. */
1603 yy_state_type yy_next_state;
1605 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1607 yy_current_state = yy_get_previous_state();
1609 /* Okay, we're now positioned to make the NUL
1610 * transition. We couldn't have
1611 * yy_get_previous_state() go ahead and do it
1612 * for us because it doesn't know how to deal
1613 * with the possibility of jamming (and we don't
1614 * want to build jamming into it because then it
1615 * will run more slowly).
1618 yy_next_state = yy_try_NUL_trans( yy_current_state );
1620 yy_bp = yytext_ptr + YY_MORE_ADJ;
1622 if ( yy_next_state )
1624 /* Consume the NUL. */
1625 yy_cp = ++yy_c_buf_p;
1626 yy_current_state = yy_next_state;
1633 goto yy_find_action;
1637 else switch ( yy_get_next_buffer() )
1639 case EOB_ACT_END_OF_FILE:
1641 yy_did_buffer_switch_on_eof = 0;
1645 /* Note: because we've taken care in
1646 * yy_get_next_buffer() to have set up
1647 * yytext, we can now set up
1648 * yy_c_buf_p so that if some total
1649 * hoser (like flex itself) wants to
1650 * call the scanner after we return the
1651 * YY_NULL, it'll still work - another
1652 * YY_NULL will get returned.
1654 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1656 yy_act = YY_STATE_EOF(YY_START);
1662 if ( ! yy_did_buffer_switch_on_eof )
1668 case EOB_ACT_CONTINUE_SCAN:
1670 yytext_ptr + yy_amount_of_matched_text;
1672 yy_current_state = yy_get_previous_state();
1675 yy_bp = yytext_ptr + YY_MORE_ADJ;
1678 case EOB_ACT_LAST_MATCH:
1680 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1682 yy_current_state = yy_get_previous_state();
1685 yy_bp = yytext_ptr + YY_MORE_ADJ;
1686 goto yy_find_action;
1693 "fatal flex scanner internal error--no action found" );
1694 } /* end of action switch */
1695 } /* end of scanning one token */
1696 } /* end of yylex */
1699 /* yy_get_next_buffer - try to read in a new buffer
1701 * Returns a code representing an action:
1702 * EOB_ACT_LAST_MATCH -
1703 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1704 * EOB_ACT_END_OF_FILE - end of file
1707 static int yy_get_next_buffer()
1709 register char *dest = yy_current_buffer->yy_ch_buf;
1710 register char *source = yytext_ptr;
1711 register int number_to_move, i;
1714 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1716 "fatal flex scanner internal error--end of buffer missed" );
1718 if ( yy_current_buffer->yy_fill_buffer == 0 )
1719 { /* Don't try to fill the buffer, so this is an EOF. */
1720 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1722 /* We matched a single character, the EOB, so
1723 * treat this as a final EOF.
1725 return EOB_ACT_END_OF_FILE;
1730 /* We matched some text prior to the EOB, first
1733 return EOB_ACT_LAST_MATCH;
1737 /* Try to read more data. */
1739 /* First move last chars to start of buffer. */
1740 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1742 for ( i = 0; i < number_to_move; ++i )
1743 *(dest++) = *(source++);
1745 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1746 /* don't do the read, it's not guaranteed to return an EOF,
1749 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1754 yy_current_buffer->yy_buf_size - number_to_move - 1;
1756 while ( num_to_read <= 0 )
1757 { /* Not enough room in the buffer - grow it. */
1758 #ifdef YY_USES_REJECT
1760 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1763 /* just a shorter name for the current buffer */
1764 YY_BUFFER_STATE b = yy_current_buffer;
1766 int yy_c_buf_p_offset =
1767 (int) (yy_c_buf_p - b->yy_ch_buf);
1769 if ( b->yy_is_our_buffer )
1771 int new_size = b->yy_buf_size * 2;
1773 if ( new_size <= 0 )
1774 b->yy_buf_size += b->yy_buf_size / 8;
1776 b->yy_buf_size *= 2;
1778 b->yy_ch_buf = (char *)
1779 /* Include room in for 2 EOB chars. */
1780 yy_flex_realloc( (void *) b->yy_ch_buf,
1781 b->yy_buf_size + 2 );
1784 /* Can't grow it, we don't own it. */
1787 if ( ! b->yy_ch_buf )
1789 "fatal error - scanner input buffer overflow" );
1791 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1793 num_to_read = yy_current_buffer->yy_buf_size -
1798 if ( num_to_read > YY_READ_BUF_SIZE )
1799 num_to_read = YY_READ_BUF_SIZE;
1801 /* Read in more data. */
1802 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1803 yy_n_chars, num_to_read );
1805 yy_current_buffer->yy_n_chars = yy_n_chars;
1808 if ( yy_n_chars == 0 )
1810 if ( number_to_move == YY_MORE_ADJ )
1812 ret_val = EOB_ACT_END_OF_FILE;
1818 ret_val = EOB_ACT_LAST_MATCH;
1819 yy_current_buffer->yy_buffer_status =
1820 YY_BUFFER_EOF_PENDING;
1825 ret_val = EOB_ACT_CONTINUE_SCAN;
1827 yy_n_chars += number_to_move;
1828 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1829 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1831 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1837 /* yy_get_previous_state - get the state just before the EOB char was reached */
1839 static yy_state_type yy_get_previous_state()
1841 register yy_state_type yy_current_state;
1842 register char *yy_cp;
1844 yy_current_state = yy_start;
1846 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1848 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1849 if ( yy_accept[yy_current_state] )
1851 yy_last_accepting_state = yy_current_state;
1852 yy_last_accepting_cpos = yy_cp;
1854 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1856 yy_current_state = (int) yy_def[yy_current_state];
1857 if ( yy_current_state >= 661 )
1858 yy_c = yy_meta[(unsigned int) yy_c];
1860 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1863 return yy_current_state;
1867 /* yy_try_NUL_trans - try to make a transition on the NUL character
1870 * next_state = yy_try_NUL_trans( current_state );
1873 #ifdef YY_USE_PROTOS
1874 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1876 static yy_state_type yy_try_NUL_trans( yy_current_state )
1877 yy_state_type yy_current_state;
1880 register int yy_is_jam;
1881 register char *yy_cp = yy_c_buf_p;
1883 register YY_CHAR yy_c = 1;
1884 if ( yy_accept[yy_current_state] )
1886 yy_last_accepting_state = yy_current_state;
1887 yy_last_accepting_cpos = yy_cp;
1889 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1891 yy_current_state = (int) yy_def[yy_current_state];
1892 if ( yy_current_state >= 661 )
1893 yy_c = yy_meta[(unsigned int) yy_c];
1895 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1896 yy_is_jam = (yy_current_state == 660);
1898 return yy_is_jam ? 0 : yy_current_state;
1903 #ifdef YY_USE_PROTOS
1904 static void yyunput( int c, register char *yy_bp )
1906 static void yyunput( c, yy_bp )
1908 register char *yy_bp;
1911 register char *yy_cp = yy_c_buf_p;
1913 /* undo effects of setting up yytext */
1914 *yy_cp = yy_hold_char;
1916 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1917 { /* need to shift things up to make room */
1918 /* +2 for EOB chars. */
1919 register int number_to_move = yy_n_chars + 2;
1920 register char *dest = &yy_current_buffer->yy_ch_buf[
1921 yy_current_buffer->yy_buf_size + 2];
1922 register char *source =
1923 &yy_current_buffer->yy_ch_buf[number_to_move];
1925 while ( source > yy_current_buffer->yy_ch_buf )
1926 *--dest = *--source;
1928 yy_cp += (int) (dest - source);
1929 yy_bp += (int) (dest - source);
1930 yy_current_buffer->yy_n_chars =
1931 yy_n_chars = yy_current_buffer->yy_buf_size;
1933 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1934 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1937 *--yy_cp = (char) c;
1941 yy_hold_char = *yy_cp;
1944 #endif /* ifndef YY_NO_UNPUT */
1948 static int yyinput()
1955 *yy_c_buf_p = yy_hold_char;
1957 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1959 /* yy_c_buf_p now points to the character we want to return.
1960 * If this occurs *before* the EOB characters, then it's a
1961 * valid NUL; if not, then we've hit the end of the buffer.
1963 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1964 /* This was really a NUL. */
1968 { /* need more input */
1969 int offset = yy_c_buf_p - yytext_ptr;
1972 switch ( yy_get_next_buffer() )
1974 case EOB_ACT_LAST_MATCH:
1975 /* This happens because yy_g_n_b()
1976 * sees that we've accumulated a
1977 * token and flags that we need to
1978 * try matching the token before
1979 * proceeding. But for input(),
1980 * there's no matching to consider.
1981 * So convert the EOB_ACT_LAST_MATCH
1982 * to EOB_ACT_END_OF_FILE.
1985 /* Reset buffer status. */
1990 case EOB_ACT_END_OF_FILE:
1995 if ( ! yy_did_buffer_switch_on_eof )
2004 case EOB_ACT_CONTINUE_SCAN:
2005 yy_c_buf_p = yytext_ptr + offset;
2011 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2012 *yy_c_buf_p = '\0'; /* preserve yytext */
2013 yy_hold_char = *++yy_c_buf_p;
2020 #ifdef YY_USE_PROTOS
2021 void yyrestart( FILE *input_file )
2023 void yyrestart( input_file )
2027 if ( ! yy_current_buffer )
2028 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2030 yy_init_buffer( yy_current_buffer, input_file );
2031 yy_load_buffer_state();
2035 #ifdef YY_USE_PROTOS
2036 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2038 void yy_switch_to_buffer( new_buffer )
2039 YY_BUFFER_STATE new_buffer;
2042 if ( yy_current_buffer == new_buffer )
2045 if ( yy_current_buffer )
2047 /* Flush out information for old buffer. */
2048 *yy_c_buf_p = yy_hold_char;
2049 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2050 yy_current_buffer->yy_n_chars = yy_n_chars;
2053 yy_current_buffer = new_buffer;
2054 yy_load_buffer_state();
2056 /* We don't actually know whether we did this switch during
2057 * EOF (yywrap()) processing, but the only time this flag
2058 * is looked at is after yywrap() is called, so it's safe
2059 * to go ahead and always set it.
2061 yy_did_buffer_switch_on_eof = 1;
2065 #ifdef YY_USE_PROTOS
2066 void yy_load_buffer_state( void )
2068 void yy_load_buffer_state()
2071 yy_n_chars = yy_current_buffer->yy_n_chars;
2072 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2073 yyin = yy_current_buffer->yy_input_file;
2074 yy_hold_char = *yy_c_buf_p;
2078 #ifdef YY_USE_PROTOS
2079 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2081 YY_BUFFER_STATE yy_create_buffer( file, size )
2088 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2090 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2092 b->yy_buf_size = size;
2094 /* yy_ch_buf has to be 2 characters longer than the size given because
2095 * we need to put in 2 end-of-buffer characters.
2097 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2098 if ( ! b->yy_ch_buf )
2099 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2101 b->yy_is_our_buffer = 1;
2103 yy_init_buffer( b, file );
2109 #ifdef YY_USE_PROTOS
2110 void yy_delete_buffer( YY_BUFFER_STATE b )
2112 void yy_delete_buffer( b )
2119 if ( b == yy_current_buffer )
2120 yy_current_buffer = (YY_BUFFER_STATE) 0;
2122 if ( b->yy_is_our_buffer )
2123 yy_flex_free( (void *) b->yy_ch_buf );
2125 yy_flex_free( (void *) b );
2129 #ifndef YY_ALWAYS_INTERACTIVE
2130 #ifndef YY_NEVER_INTERACTIVE
2131 extern int isatty YY_PROTO(( int ));
2135 #ifdef YY_USE_PROTOS
2136 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2138 void yy_init_buffer( b, file )
2145 yy_flush_buffer( b );
2147 b->yy_input_file = file;
2148 b->yy_fill_buffer = 1;
2150 #if YY_ALWAYS_INTERACTIVE
2151 b->yy_is_interactive = 1;
2153 #if YY_NEVER_INTERACTIVE
2154 b->yy_is_interactive = 0;
2156 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2162 #ifdef YY_USE_PROTOS
2163 void yy_flush_buffer( YY_BUFFER_STATE b )
2165 void yy_flush_buffer( b )
2175 /* We always need two end-of-buffer characters. The first causes
2176 * a transition to the end-of-buffer state. The second causes
2177 * a jam in that state.
2179 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2180 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2182 b->yy_buf_pos = &b->yy_ch_buf[0];
2185 b->yy_buffer_status = YY_BUFFER_NEW;
2187 if ( b == yy_current_buffer )
2188 yy_load_buffer_state();
2192 #ifndef YY_NO_SCAN_BUFFER
2193 #ifdef YY_USE_PROTOS
2194 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2196 YY_BUFFER_STATE yy_scan_buffer( base, size )
2204 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2205 base[size-1] != YY_END_OF_BUFFER_CHAR )
2206 /* They forgot to leave room for the EOB's. */
2209 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2211 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2213 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2214 b->yy_buf_pos = b->yy_ch_buf = base;
2215 b->yy_is_our_buffer = 0;
2216 b->yy_input_file = 0;
2217 b->yy_n_chars = b->yy_buf_size;
2218 b->yy_is_interactive = 0;
2220 b->yy_fill_buffer = 0;
2221 b->yy_buffer_status = YY_BUFFER_NEW;
2223 yy_switch_to_buffer( b );
2230 #ifndef YY_NO_SCAN_STRING
2231 #ifdef YY_USE_PROTOS
2232 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2234 YY_BUFFER_STATE yy_scan_string( yy_str )
2235 yyconst char *yy_str;
2239 for ( len = 0; yy_str[len]; ++len )
2242 return yy_scan_bytes( yy_str, len );
2247 #ifndef YY_NO_SCAN_BYTES
2248 #ifdef YY_USE_PROTOS
2249 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2251 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2252 yyconst char *bytes;
2261 /* Get memory for full buffer, including space for trailing EOB's. */
2263 buf = (char *) yy_flex_alloc( n );
2265 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2267 for ( i = 0; i < len; ++i )
2270 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2272 b = yy_scan_buffer( buf, n );
2274 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2276 /* It's okay to grow etc. this buffer, and we should throw it
2277 * away when we're done.
2279 b->yy_is_our_buffer = 1;
2286 #ifndef YY_NO_PUSH_STATE
2287 #ifdef YY_USE_PROTOS
2288 static void yy_push_state( int new_state )
2290 static void yy_push_state( new_state )
2294 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2298 yy_start_stack_depth += YY_START_STACK_INCR;
2299 new_size = yy_start_stack_depth * sizeof( int );
2301 if ( ! yy_start_stack )
2302 yy_start_stack = (int *) yy_flex_alloc( new_size );
2305 yy_start_stack = (int *) yy_flex_realloc(
2306 (void *) yy_start_stack, new_size );
2308 if ( ! yy_start_stack )
2310 "out of memory expanding start-condition stack" );
2313 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2320 #ifndef YY_NO_POP_STATE
2321 static void yy_pop_state()
2323 if ( --yy_start_stack_ptr < 0 )
2324 YY_FATAL_ERROR( "start-condition stack underflow" );
2326 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2331 #ifndef YY_NO_TOP_STATE
2332 static int yy_top_state()
2334 return yy_start_stack[yy_start_stack_ptr - 1];
2338 #ifndef YY_EXIT_FAILURE
2339 #define YY_EXIT_FAILURE 2
2342 #ifdef YY_USE_PROTOS
2343 static void yy_fatal_error( yyconst char msg[] )
2345 static void yy_fatal_error( msg )
2349 (void) fprintf( stderr, "%s\n", msg );
2350 exit( YY_EXIT_FAILURE );
2355 /* Redefine yyless() so it works in section 3 code. */
2361 /* Undo effects of setting up yytext. */ \
2362 yytext[yyleng] = yy_hold_char; \
2363 yy_c_buf_p = yytext + n; \
2364 yy_hold_char = *yy_c_buf_p; \
2365 *yy_c_buf_p = '\0'; \
2371 /* Internal utility routines. */
2374 #ifdef YY_USE_PROTOS
2375 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2377 static void yy_flex_strncpy( s1, s2, n )
2384 for ( i = 0; i < n; ++i )
2389 #ifdef YY_NEED_STRLEN
2390 #ifdef YY_USE_PROTOS
2391 static int yy_flex_strlen( yyconst char *s )
2393 static int yy_flex_strlen( s )
2398 for ( n = 0; s[n]; ++n )
2406 #ifdef YY_USE_PROTOS
2407 static void *yy_flex_alloc( yy_size_t size )
2409 static void *yy_flex_alloc( size )
2413 return (void *) malloc( size );
2416 #ifdef YY_USE_PROTOS
2417 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2419 static void *yy_flex_realloc( ptr, size )
2424 /* The cast to (char *) in the following accommodates both
2425 * implementations that use char* generic pointers, and those
2426 * that use void* generic pointers. It works with the latter
2427 * because both ANSI C and C++ allow castless assignment from
2428 * any pointer type to void*, and deal with argument conversions
2429 * as though doing an assignment.
2431 return (void *) realloc( (char *) ptr, size );
2434 #ifdef YY_USE_PROTOS
2435 static void yy_flex_free( void *ptr )
2437 static void yy_flex_free( ptr )
2451 #line 395 "dtimep.lex"