e72ec1f7365fdc79f8bf784a852442671f558fe2
[mmh] / sbr / dtimep.c
1 /* A lexical scanner generated by flex */
2
3 /* Scanner skeleton version:
4  * $Header$
5  */
6
7 #define FLEX_SCANNER
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
10
11 #include <stdio.h>
12
13
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
15 #ifdef c_plusplus
16 #ifndef __cplusplus
17 #define __cplusplus
18 #endif
19 #endif
20
21
22 #ifdef __cplusplus
23
24 #include <stdlib.h>
25 #include <unistd.h>
26
27 /* Use prototypes in function declarations. */
28 #define YY_USE_PROTOS
29
30 /* The "const" storage-class-modifier is valid. */
31 #define YY_USE_CONST
32
33 #else   /* ! __cplusplus */
34
35 #if __STDC__
36
37 #define YY_USE_PROTOS
38 #define YY_USE_CONST
39
40 #endif  /* __STDC__ */
41 #endif  /* ! __cplusplus */
42
43 #ifdef __TURBOC__
44  #pragma warn -rch
45  #pragma warn -use
46 #include <io.h>
47 #include <stdlib.h>
48 #define YY_USE_CONST
49 #define YY_USE_PROTOS
50 #endif
51
52 #ifdef YY_USE_CONST
53 #define yyconst const
54 #else
55 #define yyconst
56 #endif
57
58
59 #ifdef YY_USE_PROTOS
60 #define YY_PROTO(proto) proto
61 #else
62 #define YY_PROTO(proto) ()
63 #endif
64
65 /* Returned upon end-of-file. */
66 #define YY_NULL 0
67
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69  * integer for use as an array index.  If the signed char is negative,
70  * we want to instead treat it as an 8-bit unsigned char, hence the
71  * double cast.
72  */
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
74
75 /* Enter a start condition.  This macro really ought to take a parameter,
76  * but we do it the disgusting crufty way forced on us by the ()-less
77  * definition of BEGIN.
78  */
79 #define BEGIN yy_start = 1 + 2 *
80
81 /* Translate the current start state into a value that can be later handed
82  * to BEGIN to return to the state.  The YYSTATE alias is for lex
83  * compatibility.
84  */
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
87
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
90
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
93
94 #define YY_END_OF_BUFFER_CHAR 0
95
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
98
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
100
101 extern int yyleng;
102 extern FILE *yyin, *yyout;
103
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
107
108 /* The funky do-while in the following #define is used to turn the definition
109  * int a single C statement (which needs a semi-colon terminator).  This
110  * avoids problems with code like:
111  *
112  *      if ( condition_holds )
113  *              yyless( 5 );
114  *      else
115  *              do_something_else();
116  *
117  * Prior to using the do-while the compiler would get upset at the
118  * "else" because it interpreted the "if" statement as being all
119  * done when it reached the ';' after the yyless() call.
120  */
121
122 /* Return all but the first 'n' matched characters back to the input stream. */
123
124 #define yyless(n) \
125         do \
126                 { \
127                 /* Undo effects of setting up yytext. */ \
128                 *yy_cp = yy_hold_char; \
129                 YY_RESTORE_YY_MORE_OFFSET \
130                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
132                 } \
133         while ( 0 )
134
135 #define unput(c) yyunput( c, yytext_ptr )
136
137 /* The following is because we cannot portably get our hands on size_t
138  * (without autoconf's help, which isn't available because we want
139  * flex-generated scanners to compile on their own).
140  */
141 typedef unsigned int yy_size_t;
142
143
144 struct yy_buffer_state
145         {
146         FILE *yy_input_file;
147
148         char *yy_ch_buf;                /* input buffer */
149         char *yy_buf_pos;               /* current position in input buffer */
150
151         /* Size of input buffer in bytes, not including room for EOB
152          * characters.
153          */
154         yy_size_t yy_buf_size;
155
156         /* Number of characters read into yy_ch_buf, not including EOB
157          * characters.
158          */
159         int yy_n_chars;
160
161         /* Whether we "own" the buffer - i.e., we know we created it,
162          * and can realloc() it to grow it, and should free() it to
163          * delete it.
164          */
165         int yy_is_our_buffer;
166
167         /* Whether this is an "interactive" input source; if so, and
168          * if we're using stdio for input, then we want to use getc()
169          * instead of fread(), to make sure we stop fetching input after
170          * each newline.
171          */
172         int yy_is_interactive;
173
174         /* Whether we're considered to be at the beginning of a line.
175          * If so, '^' rules will be active on the next match, otherwise
176          * not.
177          */
178         int yy_at_bol;
179
180         /* Whether to try to fill the input buffer when we reach the
181          * end of it.
182          */
183         int yy_fill_buffer;
184
185         int yy_buffer_status;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188         /* When an EOF's been seen but there's still some text to process
189          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190          * shouldn't try reading from the input source any more.  We might
191          * still have a bunch of tokens to match, though, because of
192          * possible backing-up.
193          *
194          * When we actually see the EOF, we change the status to "new"
195          * (via yyrestart()), so that the user can continue scanning by
196          * just pointing yyin at a new input file.
197          */
198 #define YY_BUFFER_EOF_PENDING 2
199         };
200
201 static YY_BUFFER_STATE yy_current_buffer = 0;
202
203 /* We provide macros for accessing buffer states in case in the
204  * future we want to put the buffer states in a more general
205  * "scanner state".
206  */
207 #define YY_CURRENT_BUFFER yy_current_buffer
208
209
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char;
212
213 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
214
215
216 int yyleng;
217
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p = (char *) 0;
220 static int yy_init = 1;         /* whether we need to initialize */
221 static int yy_start = 0;        /* start state number */
222
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224  * instead of setting up a fresh yyin.  A bit of a hack ...
225  */
226 static int yy_did_buffer_switch_on_eof;
227
228 void yyrestart YY_PROTO(( FILE *input_file ));
229
230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
231 void yy_load_buffer_state YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
237
238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
241
242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
244 static void yy_flex_free YY_PROTO(( void * ));
245
246 #define yy_new_buffer yy_create_buffer
247
248 #define yy_set_interactive(is_interactive) \
249         { \
250         if ( ! yy_current_buffer ) \
251                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252         yy_current_buffer->yy_is_interactive = is_interactive; \
253         }
254
255 #define yy_set_bol(at_bol) \
256         { \
257         if ( ! yy_current_buffer ) \
258                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259         yy_current_buffer->yy_at_bol = at_bol; \
260         }
261
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
263
264 typedef unsigned char YY_CHAR;
265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
266 typedef int yy_state_type;
267 extern char *yytext;
268 #define yytext_ptr yytext
269
270 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
272 static int yy_get_next_buffer YY_PROTO(( void ));
273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
274
275 /* Done after the current pattern has been matched and before the
276  * corresponding action - sets up yytext.
277  */
278 #define YY_DO_BEFORE_ACTION \
279         yytext_ptr = yy_bp; \
280         yyleng = (int) (yy_cp - yy_bp); \
281         yy_hold_char = *yy_cp; \
282         *yy_cp = '\0'; \
283         yy_c_buf_p = yy_cp;
284
285 #define YY_NUM_RULES 30
286 #define YY_END_OF_BUFFER 31
287 static yyconst short int yy_accept[571] =
288     {   0,
289         0,    0,   31,   29,   29,   29,   29,   29,   29,   29,
290        29,   29,   29,   29,   29,   29,   29,   29,   29,    0,
291         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
292         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
293         0,    0,    0,    0,    0,    0,    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,   14,    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,
299
300         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
301         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
302         0,    0,   26,   25,   19,   18,   17,   16,   15,   28,
303        27,   21,   20,   24,   23,   22,   12,   13,    0,    0,
304         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
305         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
306         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
307         0,    0,    0,   12,   13,    0,    0,    0,    0,    0,
308         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
309         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
310
311         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
312         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
313         0,    0,    0,    0,    0,    0,    0,    0,    0,    9,
314         9,    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,    0,    0,    0,    0,    0,    0,    0,
318         0,    0,    0,    0,    0,    9,    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,
321
322         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
323         0,    0,    0,    0,    0,    0,    0,    0,    0,    9,
324         7,    7,    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,   10,   11,    0,    0,    0,    0,    0,    0,    0,
328         0,    0,    0,    0,    0,    0,    7,    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,
332
333         0,    0,    0,    7,    0,    0,    0,    0,    0,    0,
334         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
335         0,    0,    0,    0,    0,    0,    0,    0,    0,    8,
336         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
337         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
338         0,    0,    0,    0,    0,    0,    0,    0,    6,    6,
339         6,    6,    6,    6,    6,    0,    0,    0,    0,    0,
340         0,    0,    0,    0,    5,    0,    5,    0,    0,    0,
341         0,    0,    0,    3,    0,    0,    0,    0,    0,    0,
342         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
343
344         0,    0,    0,    0,    5,    5,    5,    0,    0,    8,
345         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
346         0,    0,    0,    0,    5,    0,    0,    6,    6,    0,
347         6,    0,    0,    0,    0,    0,    0,    0,    0,    0,
348         0,    3,    0,    0,    6,    0,    0,    0,    0,    0,
349         0,    6,    6,    0,    2,    4,    1,    1,    0,    6,
350         0,    0,    0,    1,    0,    0,    1,    2,    4,    0
351     } ;
352
353 static yyconst int yy_ec[256] =
354     {   0,
355         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
356         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
357         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
358         1,    2,    1,    1,    1,    1,    1,    1,    1,    4,
359         4,    1,    5,    6,    7,    1,    8,    9,   10,    9,
360         9,    9,    9,    9,    9,    9,    9,   11,    1,    1,
361         1,    1,    1,    1,   12,    1,   13,   14,   15,   16,
362        17,   18,    1,   19,    1,    1,   20,   21,   22,   23,
363         1,    1,   24,   25,   26,    1,   27,    1,    1,    1,
364        28,    1,   29,    1,    1,    1,   30,   31,   32,   33,
365
366        34,   16,   35,   36,   37,   19,    1,   38,   39,   40,
367        41,   42,    1,   43,   44,   45,   46,   47,   27,    1,
368        48,    1,    1,    1,    1,    1,    1,    1,    1,    1,
369         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
370         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
371         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
372         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
373         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
374         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
375         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
376
377         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
378         1,    1,    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
383     } ;
384
385 static yyconst int yy_meta[49] =
386     {   0,
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
392     } ;
393
394 static yyconst short int yy_base[571] =
395     {   0,
396         0,    0,  907,  908,   37,   52,   55,   78,   24,  872,
397        25,   44,   48,  864,  872,   61,   46,  869,   81,   70,
398        82,   84,  882,   85,   86,  877,   87,  875,   69,   70,
399        72,  860,   79,   82,  854,   84,  852,  109,  111,  127,
400       115,  125,  853,  860,  862,  862,  855,  851,   13,   87,
401       850,  842,  843,  842,  844,  845,  838,  849,  849,  851,
402       838,  854,  853,  852,  851,  850,  849,  848,  847,  846,
403       845,  844,  843,  842,  841,  908,  820,  819,  818,  817,
404       816,  815,  814,  813,  812,  811,  810,  809,  808,  807,
405       127,  135,   92,  817,  816,   51,  819,  807,  815,  812,
406
407       145,  138,  140,  129,  148,  156,  154,  157,  159,  162,
408       843,  163,  168,  170,  171,  174,  176,  177,  178,  186,
409       815,  814,  908,  908,  908,  908,  908,  908,  908,  908,
410       908,  908,  908,  908,  908,  908,  188,  194,  799,  806,
411       808,  808,  798,  147,  147,  790,  791,  793,  197,  205,
412       206,  796,  789,  793,  785,  225,  828,  799,  798,  825,
413       824,  789,  794,  784,  791,  778,  786,  789,  774,  784,
414       782,  787,  786,  908,  908,  199,  172,  197,  208,  179,
415       212,  219,  222,  811,  227,  221,  226,  223,  233,  266,
416       810,  766,  779,  779,  268,  206,  774,  773,  210,  776,
417
418       764,  772,  769,  754,  758,  798,  751,  767,  763,  763,
419       756,  746,  760,  762,  747,  770,  769,  271,  750,  743,
420       747,  739,  754,  781,  780,  745,  741,  748,  744,  277,
421       280,  282,  775,  257,  774,  741,  731,  291,  771,  729,
422       736,  738,  738,  728,  245,  251,  720,  721,  723,  294,
423       716,  295,  729,  719,  731,  729,  296,  729,  710,  724,
424       717,  716,  299,  307,  752,  708,  721,  721,  707,  747,
425       717,  713,  707,  316,  310,  327,  313,  318,  702,  696,
426       292,  709,  708,  258,  711,  699,  707,  704,  304,  228,
427       312,  331,  293,  338,  341,  340,  735,  342,  343,  345,
428
429       693,  733,  686,  699,  684,  346,  701,  701,  700,  347,
430       349,  726,  693,  683,  677,  690,  680,  691,  344,  719,
431       358,  360,  718,  717,  675,  682,  684,  684,  674,  323,
432       330,  666,  667,  669,  378,  672,  665,  669,  661,  676,
433       703,  702,  667,  663,  670,  666,  697,  375,  655,  377,
434       649,  908,  908,  383,  385,  387,  653,  647,  651,  691,
435       658,  680,  389,  398,  688,  392,  401,  369,  363,  348,
436       389,  402,  403,  406,  413,  687,  410,  411,  414,  418,
437       686,  642,  655,  655,  641,  681,  651,  647,  641,  677,
438       415,  420,  676,  675,  674,  673,  631,  424,  630,  631,
439
440       389,  221,  637,  444,  445,  632,  625,  629,  621,  636,
441       663,  662,  627,  623,  630,  626,  447,  657,  456,  656,
442       623,  613,  607,  620,  610,  621,  640,  429,  648,  638,
443       611,  607,  601,  605,  598,  609,  609,  451,  454,  639,
444       595,  608,  608,  594,  634,  604,  600,  594,  456,  459,
445       469,  589,  583,  587,  627,  594,  463,  465,  594,  593,
446       579,  591,  580,  578,  581,  474,  478,  618,  585,  575,
447       569,  582,  572,  583,  480,  483,  492,  486,  490,  611,
448       610,  609,  567,  598,  495,  578,  577,  563,  575,  560,
449       570,  568,  504,  498,  507,  558,  552,  556,  596,  563,
450
451       509,  594,  511,  513,  522,  524,  533,  593,  527,  908,
452       546,  545,  559,  543,  557,  559,  544,  535,  585,  584,
453       583,  525,  482,  538,  475,  527,  531,  908,  908,  485,
454       908,  482,  462,  464,  474,  541,  451,  430,  543,  552,
455       546,  908,  388,  378,  908,  220,  548,  550,  554,  556,
456       558,  908,  908,  190,  111,   64,  560,  562,   54,  908,
457       564,  566,  568,  570,  572,  574,  908,  908,  908,  908
458     } ;
459
460 static yyconst short int yy_def[571] =
461     {   0,
462       570,    1,  570,  570,  570,  570,  570,  570,  570,  570,
463       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
464       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
465       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
466       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
467       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
468       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
469       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
470       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
471       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
472
473       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
474       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
475       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
476       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
477       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
478       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
479       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
480       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
481       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
482       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
483
484       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
485       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
486       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
487       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
488       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
489       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
490       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
491       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
492       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
493       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
494
495       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
496       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
497       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
498       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
499       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
500       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
501       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
502       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
503       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
504       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
505
506       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
507       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
508       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
509       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
510       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
511       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
512       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
513       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
514       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
515       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
516
517       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
518       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
519       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
520       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
521       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
522       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
523       570,  570,  570,  570,  570,  570,  570,  570,  570,    0
524     } ;
525
526 static yyconst short int yy_nxt[957] =
527     {   0,
528         4,    5,    5,    5,    6,    4,    7,    4,    8,    8,
529         4,    9,    4,   10,    4,   11,    4,    4,   12,   13,
530        14,   15,    4,   16,   17,    4,   18,   19,    4,    9,
531         4,    4,   10,    4,    4,    4,    4,    4,   13,   14,
532        15,    4,    4,   16,   17,    4,    4,    4,   20,   21,
533       108,   22,  109,   23,   24,  540,   25,   26,   46,   27,
534        38,   38,   28,   39,   39,   43,   29,   47,   30,   44,
535        31,   32,   33,   48,  562,   34,   35,   50,   36,   40,
536       143,   57,   37,   62,   41,   41,   42,   42,   51,   49,
537        54,   58,   60,   63,   55,   64,  144,   66,   69,   71,
538
539        74,   77,   79,   61,   81,   65,   56,   67,   70,   72,
540        75,   84,   78,   80,   86,   82,   89,   91,   91,   92,
541        92,  561,   85,  101,  101,   87,   40,   90,   40,  110,
542       151,   41,   41,  139,  111,  137,  137,  140,   93,  151,
543        94,  151,   95,  138,  138,   96,   97,   98,   99,  151,
544       100,  149,  149,  150,  150,  151,   93,  156,  151,   94,
545       151,  157,  154,  151,  156,   97,   98,   99,  157,  151,
546       100,  151,  156,  218,  152,  151,  157,  156,  156,  156,
547       218,  157,  157,  157,  181,  153,  182,  156,  158,  183,
548       155,  157,  161,  162,  184,  163,  174,  174,  218,  159,
549
550       218,  164,  175,  175,  160,  188,  189,  151,  168,  218,
551       165,  149,  149,  218,  190,  190,  166,  220,  167,  169,
552       218,  170,  218,  218,  223,  171,  156,  218,  218,  335,
553       221,  230,  230,  195,  195,  219,  196,  560,  197,  244,
554       198,  231,  231,  199,  200,  201,  202,  240,  203,  554,
555       222,  241,  225,  226,  196,  245,  435,  197,  232,  224,
556       227,  228,  233,  200,  201,  202,  436,  232,  203,  238,
557       229,  233,  218,  337,  234,  234,  239,  239,  274,  263,
558       264,  274,  294,  232,  295,  275,  275,  329,  276,  276,
559       277,  278,  238,  296,  335,  156,  156,  156,  297,  157,
560
561       157,  157,  281,  330,  282,  335,  283,  310,  310,  284,
562       285,  286,  287,  335,  288,  311,  311,  274,  320,  320,
563       281,  321,  321,  282,  319,  319,  322,  322,  274,  285,
564       286,  287,  335,  325,  288,  320,  320,  326,  340,  335,
565       336,  335,  335,  335,  335,  338,  335,  156,  354,  405,
566       354,  157,  362,  362,  363,  355,  355,  356,  356,  364,
567       373,  364,  374,  365,  405,  365,  366,  366,  367,  367,
568       405,  343,  375,  339,  342,  344,  156,  376,  156,  335,
569       157,  408,  157,  345,  354,  341,  380,  380,  354,  346,
570       405,  392,  392,  393,  393,  393,  393,  398,  398,  364,
571
572       404,  404,  364,  405,  405,  406,  365,  405,  407,  404,
573       404,  405,  405,  399,  405,  405,  156,  400,  433,  417,
574       157,  401,  402,  418,  403,  553,  419,  419,  427,  427,
575       428,  409,  430,  430,  434,  552,  400,  457,  457,  412,
576       539,  401,  402,  414,  413,  364,  405,  410,  417,  365,
577       411,  415,  405,  438,  439,  449,  450,  417,  416,  466,
578       466,  418,  467,  467,  475,  475,  476,  477,  477,  476,
579       451,  484,  484,  485,  485,  493,  501,  478,  479,  493,
580       502,  501,  494,  494,  536,  502,  495,  495,  503,  503,
581       476,  504,  504,  501,  506,  506,  546,  502,  507,  507,
582
583       505,  505,  476,  510,  510,  493,  519,  519,  493,  545,
584       501,  544,  518,  518,  543,  519,  519,  524,  524,  525,
585       525,  526,  526,  501,  537,  501,  405,  502,  540,  502,
586       525,  525,  503,  503,  501,  527,  527,  541,  502,  542,
587       542,  505,  505,  535,  535,  536,  538,  538,  539,  547,
588       547,  548,  548,  540,  551,  551,  555,  555,  556,  556,
589       549,  550,  557,  557,  558,  558,  559,  559,  563,  563,
590       564,  564,  565,  565,  566,  566,  567,  567,  567,  567,
591       568,  568,  569,  569,  405,  405,  493,  534,  533,  532,
592       531,  530,  529,  528,  335,  501,  523,  405,  522,  521,
593
594       520,  517,  516,  515,  514,  513,  512,  511,  509,  508,
595       335,  335,  335,  500,  499,  498,  376,  497,  496,  405,
596       492,  491,  490,  489,  488,  487,  486,  483,  335,  482,
597       481,  480,  474,  473,  472,  405,  471,  470,  469,  468,
598       405,  465,  464,  463,  462,  461,  460,  459,  458,  218,
599       428,  456,  455,  454,  297,  453,  452,  335,  451,  448,
600       447,  446,  445,  405,  405,  444,  443,  442,  441,  440,
601       437,  432,  431,  429,  218,  218,  218,  354,  151,  426,
602       425,  424,  335,  423,  422,  421,  420,  335,  405,  364,
603       363,  397,  218,  396,  395,  394,  391,  390,  151,  389,
604
605       388,  387,  386,  335,  335,  385,  384,  383,  382,  381,
606       379,  378,  377,  372,  371,  370,  369,  368,  151,  151,
607       274,  361,  360,  359,  184,  358,  357,  218,  353,  352,
608       351,  350,  349,  348,  151,  347,  335,  334,  333,  332,
609       331,  328,  327,  324,  323,  318,  317,  316,  218,  315,
610       314,  313,  312,  218,  309,  308,  307,  306,  305,  304,
611       303,  302,  301,  111,  300,  299,  298,  293,  292,  291,
612       290,  289,  238,  280,  279,  151,  232,  273,  272,  271,
613       270,  218,  218,  269,  268,  267,  266,  265,  262,  261,
614       260,  259,  258,  257,  256,  255,  254,  253,  252,  151,
615
616       251,  250,  249,  248,  247,  246,  243,  242,  237,  236,
617       235,  151,  218,  217,  216,  215,  214,  213,  212,  211,
618       210,  209,  208,  207,  206,  151,  151,  205,  204,  156,
619       194,  193,  192,  191,  187,  186,  185,  180,  179,  178,
620       177,  176,  173,  172,  151,  148,  147,  146,  145,  142,
621       141,  136,  135,  134,  133,  132,  131,  130,  129,  128,
622       127,  126,  125,  124,  123,  136,  135,  134,  133,  132,
623       131,  130,  129,  128,  127,  126,  125,  124,  123,  122,
624       121,  120,  119,  118,  117,  116,  115,  114,  113,  112,
625       107,  106,  105,  104,  103,  102,   76,   88,   83,   76,
626
627        73,   68,   59,   53,   52,   45,  570,    3,  570,  570,
628       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
629       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
630       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
631       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
632       570,  570,  570,  570,  570,  570
633     } ;
634
635 static yyconst short int yy_chk[957] =
636     {   0,
637         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
638         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
639         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
640         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
641         1,    1,    1,    1,    1,    1,    1,    1,    5,    5,
642        49,    5,   49,    5,    5,  559,    5,    5,   11,    5,
643         6,    6,    5,    7,    7,    9,    5,   11,    5,    9,
644         5,    5,    5,   12,  556,    5,    5,   13,    5,    8,
645        96,   17,    5,   20,    8,    8,    8,    8,   13,   12,
646        16,   17,   19,   20,   16,   21,   96,   22,   24,   25,
647
648        27,   29,   30,   19,   31,   21,   16,   22,   24,   25,
649        27,   33,   29,   30,   34,   31,   36,   38,   38,   39,
650        39,  555,   33,   41,   41,   34,   42,   36,   40,   50,
651       104,   42,   42,   93,   50,   91,   91,   93,   40,  102,
652        40,  103,   40,   92,   92,   40,   40,   40,   40,  105,
653        40,  101,  101,  101,  101,  107,   40,  106,  108,   40,
654       109,  106,  104,  110,  112,   40,   40,   40,  112,  113,
655        40,  114,  115,  177,  102,  116,  115,  117,  118,  119,
656       180,  117,  118,  119,  144,  103,  144,  120,  106,  145,
657       105,  120,  109,  110,  145,  112,  137,  137,  178,  107,
658
659       176,  113,  138,  138,  108,  149,  149,  151,  117,  179,
660       114,  150,  150,  181,  151,  151,  115,  177,  116,  118,
661       182,  119,  186,  183,  180,  120,  156,  187,  185,  290,
662       178,  188,  188,  156,  156,  176,  156,  554,  156,  199,
663       156,  189,  189,  156,  156,  156,  156,  196,  156,  546,
664       179,  196,  182,  183,  156,  199,  402,  156,  234,  181,
665       185,  186,  234,  156,  156,  156,  402,  190,  156,  195,
666       187,  190,  218,  290,  190,  190,  195,  195,  230,  218,
667       218,  231,  245,  232,  245,  230,  230,  284,  231,  231,
668       232,  232,  238,  246,  293,  250,  252,  257,  246,  250,
669
670       252,  257,  238,  284,  238,  289,  238,  263,  263,  238,
671       238,  238,  238,  291,  238,  264,  264,  274,  275,  275,
672       238,  277,  277,  238,  274,  274,  278,  278,  276,  238,
673       238,  238,  292,  281,  238,  276,  276,  281,  293,  294,
674       289,  296,  295,  298,  299,  291,  300,  306,  310,  370,
675       311,  306,  319,  319,  319,  310,  310,  311,  311,  321,
676       330,  322,  330,  321,  369,  322,  321,  321,  322,  322,
677       368,  296,  331,  292,  295,  298,  348,  331,  350,  335,
678       348,  370,  350,  299,  354,  294,  335,  335,  356,  300,
679       371,  354,  354,  355,  355,  356,  356,  363,  363,  364,
680
681       366,  366,  367,  372,  373,  368,  367,  374,  369,  367,
682       367,  377,  378,  364,  375,  379,  391,  364,  401,  380,
683       391,  364,  364,  380,  364,  544,  380,  380,  392,  392,
684       392,  371,  398,  398,  401,  543,  364,  428,  428,  374,
685       538,  364,  364,  377,  375,  404,  405,  372,  417,  404,
686       373,  378,  537,  405,  405,  417,  417,  419,  379,  438,
687       438,  419,  439,  439,  449,  449,  449,  450,  450,  450,
688       451,  457,  457,  458,  458,  466,  525,  451,  451,  467,
689       525,  475,  466,  466,  535,  475,  467,  467,  475,  475,
690       475,  476,  476,  477,  478,  478,  534,  477,  479,  479,
691
692       477,  477,  477,  485,  485,  493,  494,  494,  495,  533,
693       501,  532,  493,  493,  530,  495,  495,  501,  501,  503,
694       503,  504,  504,  505,  523,  506,  522,  505,  526,  506,
695       505,  505,  506,  506,  507,  509,  509,  526,  507,  527,
696       527,  507,  507,  518,  518,  518,  524,  524,  524,  536,
697       536,  539,  539,  540,  541,  541,  547,  547,  548,  548,
698       540,  540,  549,  549,  550,  550,  551,  551,  557,  557,
699       558,  558,  561,  561,  562,  562,  563,  563,  564,  564,
700       565,  565,  566,  566,  521,  520,  519,  517,  516,  515,
701       514,  513,  512,  511,  508,  502,  500,  499,  498,  497,
702
703       496,  492,  491,  490,  489,  488,  487,  486,  484,  483,
704       482,  481,  480,  474,  473,  472,  471,  470,  469,  468,
705       465,  464,  463,  462,  461,  460,  459,  456,  455,  454,
706       453,  452,  448,  447,  446,  445,  444,  443,  442,  441,
707       440,  437,  436,  435,  434,  433,  432,  431,  430,  429,
708       427,  426,  425,  424,  423,  422,  421,  420,  418,  416,
709       415,  414,  413,  412,  411,  410,  409,  408,  407,  406,
710       403,  400,  399,  397,  396,  395,  394,  393,  390,  389,
711       388,  387,  386,  385,  384,  383,  382,  381,  376,  365,
712       362,  361,  360,  359,  358,  357,  351,  349,  347,  346,
713
714       345,  344,  343,  342,  341,  340,  339,  338,  337,  336,
715       334,  333,  332,  329,  328,  327,  326,  325,  324,  323,
716       320,  318,  317,  316,  315,  314,  313,  312,  309,  308,
717       307,  305,  304,  303,  302,  301,  297,  288,  287,  286,
718       285,  283,  282,  280,  279,  273,  272,  271,  270,  269,
719       268,  267,  266,  265,  262,  261,  260,  259,  258,  256,
720       255,  254,  253,  251,  249,  248,  247,  244,  243,  242,
721       241,  240,  239,  237,  236,  235,  233,  229,  228,  227,
722       226,  225,  224,  223,  222,  221,  220,  219,  217,  216,
723       215,  214,  213,  212,  211,  210,  209,  208,  207,  206,
724
725       205,  204,  203,  202,  201,  200,  198,  197,  194,  193,
726       192,  191,  184,  173,  172,  171,  170,  169,  168,  167,
727       166,  165,  164,  163,  162,  161,  160,  159,  158,  157,
728       155,  154,  153,  152,  148,  147,  146,  143,  142,  141,
729       140,  139,  122,  121,  111,  100,   99,   98,   97,   95,
730        94,   90,   89,   88,   87,   86,   85,   84,   83,   82,
731        81,   80,   79,   78,   77,   75,   74,   73,   72,   71,
732        70,   69,   68,   67,   66,   65,   64,   63,   62,   61,
733        60,   59,   58,   57,   56,   55,   54,   53,   52,   51,
734        48,   47,   46,   45,   44,   43,   37,   35,   32,   28,
735
736        26,   23,   18,   15,   14,   10,    3,  570,  570,  570,
737       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
738       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
739       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
740       570,  570,  570,  570,  570,  570,  570,  570,  570,  570,
741       570,  570,  570,  570,  570,  570
742     } ;
743
744 static yy_state_type yy_last_accepting_state;
745 static char *yy_last_accepting_cpos;
746
747 /* The intent behind this definition is that it'll catch
748  * any uses of REJECT which flex missed.
749  */
750 #define REJECT reject_used_but_not_detected
751 #define yymore() yymore_used_but_not_detected
752 #define YY_MORE_ADJ 0
753 #define YY_RESTORE_YY_MORE_OFFSET
754 char *yytext;
755 #line 1 "dtimep.lex"
756 #define INITIAL 0
757 #line 2 "dtimep.lex"
758 #include <h/nmh.h>
759 #include <h/tws.h>
760
761   /* Since we're looking at a string at a time, don't worry about
762    *  wrapping to the next buffer.
763    */
764 #define yywrap() 1
765 #define YY_SKIP_YYWRAP
766
767 #define YY_NO_UNPUT
768
769   /* This is the tricky thing that makes this function cool.  We
770    *  replace the traditional int yylex(void) declaration with our
771    *  dparsetime() declaration, essentially piggy-backing off the
772    *  utility of the yylex() function and adding what we need to make
773    *  the parsing function useful to us.
774    */
775 #define YY_DECL struct tws *dparsetime(char *lexstr)
776
777   /* yyerminate() is called after the input string is matched to
778    * completion (actually, when the lexer reaches an EOF).  The only
779    * thing that really needs to be in this macro function is the
780    * return call, which must be substituted inline into dparsetime.
781    */
782
783 #define yyterminate() (void)yy_delete_buffer(lexhandle); \
784   if(!(tw.tw_flags & TW_SUCC)) { \
785     return (struct tws *)NULL; \
786   } \
787   if(tw.tw_year < 1970) \
788     tw.tw_year += 1900; \
789   if(tw.tw_year < 1970) \
790     tw.tw_year += 100; \
791   return(&tw)
792
793 /*
794  * Patchable flag that says how to interpret NN/NN/NN dates. When
795  * true, we do it European style: DD/MM/YY. When false, we do it
796  * American style: MM/DD/YY.  Of course, these are all non-RFC822
797  * compliant.
798  */
799 int europeandate = 0;
800
801 /*
802  * Table to convert month names to numeric month.  We use the
803  * fact that the low order 5 bits of the sum of the 2nd & 3rd
804  * characters of the name is a hash with no collisions for the 12
805  * valid month names.  (The mask to 5 bits maps any combination of
806  * upper and lower case into the same hash value).
807  */
808 static int month_map[] = {
809         0,
810         6,      /* 1 - Jul */
811         3,      /* 2 - Apr */
812         5,      /* 3 - Jun */
813         0,
814         10,     /* 5 - Nov */
815         0,
816         1,      /* 7 - Feb */
817         11,     /* 8 - Dec */
818         0,
819         0,
820         0,
821         0,
822         0,
823         0,
824         0,      /*15 - Jan */
825         0,
826         0,
827         0,
828         2,      /*19 - Mar */
829         0,
830         8,      /*21 - Sep */
831         0,
832         9,      /*23 - Oct */
833         0,
834         0,
835         4,      /*26 - May */
836         0,
837         7       /*28 - Aug */
838 };
839
840 /*
841  * Lookup table for day-of-week using the same hash trick as for above name-of-
842  * month table, but using the first and second character, not second and third.
843  *
844  * Compute index into table using: (day_name[0] & 7) + (day_name[1] & 4)
845  */
846 static int day_map[] = {
847         0,
848         0,
849         0,
850         6,      /* 3 - Sat */
851         4,      /* 4 - Thu */
852         0,
853         5,      /* 6 - Fri */
854         0,      /* 7 - Sun */
855         2,      /* 8 - Tue */
856         1       /* 9 - Mon */,
857         0,
858         3       /*11 - Wed */
859 };
860
861 /* The SET* macros will parse for the appropriate field, and leave the
862  * cp pointer at the first character after the desired field. Be
863  * careful with variable-length fields or alpha-num mixes.
864
865  * The SKIP* macros skip over characters of a particular class and
866  * leave cp at the position of the first character that doesn't match
867  * that class. Correspondingly, SKIPTO* skips until it reaches a
868  * character of a particular class.
869  */
870
871 #define INIT()       { cp = yytext;} 
872 #define SETWDAY()    { tw.tw_wday= day_map[(cp[0] & 7) + (cp[1] & 4)]; \
873                        tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP; \
874                        SKIPA(); }
875 #define SETMON()     { cp++; \
876                        tw.tw_mon = month_map[(cp[0] + cp[1]) & 0x1f]; \
877                        SKIPA(); }
878 #define SETMON_NUM() { tw.tw_mon = atoi(cp)-1; \
879                        SKIPD(); }
880 #define SETYEAR()    { tw.tw_year = atoi(cp); \
881                        SKIPD(); }
882 #define SETDAY()     { tw.tw_mday = atoi(cp); \
883                        tw.tw_flags |= TW_YES; \
884                        SKIPD(); }
885 #define SETTIME()    { tw.tw_hour = atoi(cp); \
886                        cp += 2; \
887                        SKIPTOD(); \
888                        tw.tw_min = atoi(cp); \
889                        cp += 2; \
890                        if(*cp == ':') { \
891                           tw.tw_sec = atoi(++cp); SKIPD(); } }
892 #define SETZONE(x)   { tw.tw_zone = ((x)/100)*60+(x)%100; \
893                        tw.tw_flags |= TW_SZEXP; \
894                        SKIPD(); }
895 #define SETDST()     { tw.tw_flags |= TW_DST; }
896 #define SKIPD()      { while ( isdigit(*cp++) ) ; \
897                        --cp; }
898 #define SKIPTOD()    { while ( !isdigit(*cp++) ) ; \
899                        --cp; }
900 #define SKIPA()      { while ( isalpha(*cp++) ) ; \
901                        --cp; }
902 #define SKIPTOA()    { while ( !isalpha(*cp++) ) ; \
903                        --cp; }
904 #define SKIPSP()     { while ( isspace(*cp++) ) ; \
905                        --cp; }
906 #define SKIPTOSP()   { while ( !isspace(*cp++) ) ; \
907                        --cp; }
908
909 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
910 # ifdef TIME_WITH_SYS_TIME
911 #  include <sys/time.h>
912 #  include <time.h>
913 # else
914 #  ifdef HAVE_SYS_TIME_H
915 #   include <sys/time.h>
916 #  else
917 #   include <time.h>
918 #  endif
919 # endif
920
921 static void
922 zonehack (struct tws *tw)
923 {
924     register struct tm *tm;
925
926     if (dmktime (tw) == (time_t) -1)
927         return;
928
929     tm = localtime (&tw->tw_clock);
930     if (tm->tm_isdst) {
931         tw->tw_flags |= TW_DST;
932         tw->tw_zone -= 60;
933     }
934 }
935 #endif  /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
936 /* The year can either be 2 digits, or 4. However, after
937 Y2K, we found that some MUA were reporting the year 100, hence
938 the middle term here. yyterminate() resolves the actual
939 issues with 2-digit years.
940 */
941
942 /* Macros after this point can all be overridden by user definitions in
943  * section 1.
944  */
945
946 #ifndef YY_SKIP_YYWRAP
947 #ifdef __cplusplus
948 extern "C" int yywrap YY_PROTO(( void ));
949 #else
950 extern int yywrap YY_PROTO(( void ));
951 #endif
952 #endif
953
954 #ifndef YY_NO_UNPUT
955 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
956 #endif
957
958 #ifndef yytext_ptr
959 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
960 #endif
961
962 #ifdef YY_NEED_STRLEN
963 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
964 #endif
965
966 #ifndef YY_NO_INPUT
967 #ifdef __cplusplus
968 static int yyinput YY_PROTO(( void ));
969 #else
970 static int input YY_PROTO(( void ));
971 #endif
972 #endif
973
974 #if YY_STACK_USED
975 static int yy_start_stack_ptr = 0;
976 static int yy_start_stack_depth = 0;
977 static int *yy_start_stack = 0;
978 #ifndef YY_NO_PUSH_STATE
979 static void yy_push_state YY_PROTO(( int new_state ));
980 #endif
981 #ifndef YY_NO_POP_STATE
982 static void yy_pop_state YY_PROTO(( void ));
983 #endif
984 #ifndef YY_NO_TOP_STATE
985 static int yy_top_state YY_PROTO(( void ));
986 #endif
987
988 #else
989 #define YY_NO_PUSH_STATE 1
990 #define YY_NO_POP_STATE 1
991 #define YY_NO_TOP_STATE 1
992 #endif
993
994 #ifdef YY_MALLOC_DECL
995 YY_MALLOC_DECL
996 #else
997 #if __STDC__
998 #ifndef __cplusplus
999 #include <stdlib.h>
1000 #endif
1001 #else
1002 /* Just try to get by without declaring the routines.  This will fail
1003  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1004  * or sizeof(void*) != sizeof(int).
1005  */
1006 #endif
1007 #endif
1008
1009 /* Amount of stuff to slurp up with each read. */
1010 #ifndef YY_READ_BUF_SIZE
1011 #define YY_READ_BUF_SIZE 8192
1012 #endif
1013
1014 /* Copy whatever the last rule matched to the standard output. */
1015
1016 #ifndef ECHO
1017 /* This used to be an fputs(), but since the string might contain NUL's,
1018  * we now use fwrite().
1019  */
1020 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1021 #endif
1022
1023 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1024  * is returned in "result".
1025  */
1026 #ifndef YY_INPUT
1027 #define YY_INPUT(buf,result,max_size) \
1028         if ( yy_current_buffer->yy_is_interactive ) \
1029                 { \
1030                 int c = '*', n; \
1031                 for ( n = 0; n < max_size && \
1032                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1033                         buf[n] = (char) c; \
1034                 if ( c == '\n' ) \
1035                         buf[n++] = (char) c; \
1036                 if ( c == EOF && ferror( yyin ) ) \
1037                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
1038                 result = n; \
1039                 } \
1040         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1041                   && ferror( yyin ) ) \
1042                 YY_FATAL_ERROR( "input in flex scanner failed" );
1043 #endif
1044
1045 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1046  * we don't want an extra ';' after the "return" because that will cause
1047  * some compilers to complain about unreachable statements.
1048  */
1049 #ifndef yyterminate
1050 #define yyterminate() return YY_NULL
1051 #endif
1052
1053 /* Number of entries by which start-condition stack grows. */
1054 #ifndef YY_START_STACK_INCR
1055 #define YY_START_STACK_INCR 25
1056 #endif
1057
1058 /* Report a fatal error. */
1059 #ifndef YY_FATAL_ERROR
1060 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1061 #endif
1062
1063 /* Default declaration of generated scanner - a define so the user can
1064  * easily add parameters.
1065  */
1066 #ifndef YY_DECL
1067 #define YY_DECL int yylex YY_PROTO(( void ))
1068 #endif
1069
1070 /* Code executed at the beginning of each rule, after yytext and yyleng
1071  * have been set up.
1072  */
1073 #ifndef YY_USER_ACTION
1074 #define YY_USER_ACTION
1075 #endif
1076
1077 /* Code executed at the end of each rule. */
1078 #ifndef YY_BREAK
1079 #define YY_BREAK break;
1080 #endif
1081
1082 #define YY_RULE_SETUP \
1083         YY_USER_ACTION
1084
1085 YY_DECL
1086         {
1087         register yy_state_type yy_current_state;
1088         register char *yy_cp = NULL, *yy_bp = NULL;
1089         register int yy_act;
1090
1091 #line 223 "dtimep.lex"
1092
1093
1094   /* This section begins the definition of dparsetime().
1095      Put here any local variable definitions and initializations */
1096   
1097   YY_BUFFER_STATE lexhandle;
1098
1099   register char *cp;
1100   static struct tws tw; 
1101
1102   memset(&tw,0,sizeof(struct tws));
1103
1104   lexhandle = yy_scan_string(lexstr);
1105
1106
1107
1108         if ( yy_init )
1109                 {
1110                 yy_init = 0;
1111
1112 #ifdef YY_USER_INIT
1113                 YY_USER_INIT;
1114 #endif
1115
1116                 if ( ! yy_start )
1117                         yy_start = 1;   /* first start state */
1118
1119                 if ( ! yyin )
1120                         yyin = stdin;
1121
1122                 if ( ! yyout )
1123                         yyout = stdout;
1124
1125                 if ( ! yy_current_buffer )
1126                         yy_current_buffer =
1127                                 yy_create_buffer( yyin, YY_BUF_SIZE );
1128
1129                 yy_load_buffer_state();
1130                 }
1131
1132         while ( 1 )             /* loops until end-of-file is reached */
1133                 {
1134                 yy_cp = yy_c_buf_p;
1135
1136                 /* Support of yytext. */
1137                 *yy_cp = yy_hold_char;
1138
1139                 /* yy_bp points to the position in yy_ch_buf of the start of
1140                  * the current run.
1141                  */
1142                 yy_bp = yy_cp;
1143
1144                 yy_current_state = yy_start;
1145 yy_match:
1146                 do
1147                         {
1148                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1149                         if ( yy_accept[yy_current_state] )
1150                                 {
1151                                 yy_last_accepting_state = yy_current_state;
1152                                 yy_last_accepting_cpos = yy_cp;
1153                                 }
1154                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1155                                 {
1156                                 yy_current_state = (int) yy_def[yy_current_state];
1157                                 if ( yy_current_state >= 571 )
1158                                         yy_c = yy_meta[(unsigned int) yy_c];
1159                                 }
1160                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1161                         ++yy_cp;
1162                         }
1163                 while ( yy_base[yy_current_state] != 908 );
1164
1165 yy_find_action:
1166                 yy_act = yy_accept[yy_current_state];
1167                 if ( yy_act == 0 )
1168                         { /* have to back up */
1169                         yy_cp = yy_last_accepting_cpos;
1170                         yy_current_state = yy_last_accepting_state;
1171                         yy_act = yy_accept[yy_current_state];
1172                         }
1173
1174                 YY_DO_BEFORE_ACTION;
1175
1176
1177 do_action:      /* This label is used only to access EOF actions. */
1178
1179
1180                 switch ( yy_act )
1181         { /* beginning of action switch */
1182                         case 0: /* must back up */
1183                         /* undo the effects of YY_DO_BEFORE_ACTION */
1184                         *yy_cp = yy_hold_char;
1185                         yy_cp = yy_last_accepting_cpos;
1186                         yy_current_state = yy_last_accepting_state;
1187                         goto yy_find_action;
1188
1189 case 1:
1190 YY_RULE_SETUP
1191 #line 238 "dtimep.lex"
1192 {
1193                                      INIT();
1194                                      SETWDAY();
1195                                      SKIPTOA();
1196                                      SETMON();
1197                                      SKIPTOD();
1198                                      SETDAY();
1199                                      SKIPTOD();
1200                                      SETTIME();
1201                                      SKIPTOD();
1202                                      SETYEAR();
1203                                      }
1204         YY_BREAK
1205 case 2:
1206 YY_RULE_SETUP
1207 #line 251 "dtimep.lex"
1208 {
1209                                      INIT();
1210                                      SETWDAY();
1211                                      SKIPTOD();
1212                                      SETDAY();
1213                                      SKIPTOA();
1214                                      SETMON();
1215                                      SKIPTOD();
1216                                      SETYEAR();
1217                                      SKIPTOD();
1218                                      SETTIME();
1219                                      }
1220         YY_BREAK
1221 case 3:
1222 YY_RULE_SETUP
1223 #line 263 "dtimep.lex"
1224 {
1225                                      INIT();
1226                                      SETDAY();
1227                                      SKIPTOA();
1228                                      SETMON();
1229                                      SKIPTOD();
1230                                      SETYEAR();
1231                                      SKIPTOD();
1232                                      SETTIME();
1233                                      }
1234         YY_BREAK
1235 case 4:
1236 YY_RULE_SETUP
1237 #line 273 "dtimep.lex"
1238 {
1239                                      INIT();
1240                                      SETWDAY();
1241                                      SKIPTOA();
1242                                      SETMON();
1243                                      SKIPTOD();
1244                                      SETDAY();
1245                                      SKIPTOD();
1246                                      SETYEAR();
1247                                      SKIPTOD();
1248                                      SETTIME();
1249                                      }
1250         YY_BREAK
1251 case 5:
1252 YY_RULE_SETUP
1253 #line 285 "dtimep.lex"
1254 {
1255                                      INIT();
1256                                      SETWDAY();
1257                                      SKIPTOA();
1258                                      SETMON();
1259                                      SKIPTOD();
1260                                      SETDAY();
1261                                      SKIPTOD();
1262                                      SETYEAR();
1263                                      }
1264         YY_BREAK
1265 case 6:
1266 YY_RULE_SETUP
1267 #line 295 "dtimep.lex"
1268 {
1269                                      INIT();
1270                                      SETMON();
1271                                      SKIPTOD();
1272                                      SETDAY();
1273                                      SKIPTOD();
1274                                      SETYEAR();
1275                                      SKIPTOA();
1276                                      SETWDAY();
1277                                      }
1278         YY_BREAK
1279 case 7:
1280 YY_RULE_SETUP
1281 #line 305 "dtimep.lex"
1282 {
1283                                      INIT();
1284                                      SETMON();
1285                                      SKIPTOD();
1286                                      SETDAY();
1287                                      SKIPTOD();
1288                                      SETYEAR();
1289                                      }
1290         YY_BREAK
1291 case 8:
1292 YY_RULE_SETUP
1293 #line 313 "dtimep.lex"
1294 {
1295                                      INIT();
1296                                      if(europeandate) {
1297                                        /* DD/MM/YY */
1298                                      SETDAY();
1299                                      SKIPTOD();
1300                                      SETMON_NUM();
1301                                      } else {
1302                                        /* MM/DD/YY */
1303                                      SETMON_NUM();
1304                                      SKIPTOD();
1305                                      SETDAY();
1306                                      }
1307                                      SKIPTOD();
1308                                      SETYEAR();
1309                                      SKIPTOD();
1310                                      SETTIME();
1311                                      }
1312         YY_BREAK
1313 case 9:
1314 YY_RULE_SETUP
1315 #line 331 "dtimep.lex"
1316 {
1317                                      INIT();
1318                                      if(europeandate) {
1319                                        /* DD/MM/YY */
1320                                      SETDAY();
1321                                      SKIPTOD();
1322                                      SETMON_NUM();
1323                                      } else {
1324                                        /* MM/DD/YY */
1325                                      SETMON_NUM();
1326                                      SKIPTOD();
1327                                      SETDAY();
1328                                      }
1329                                      SKIPTOD();
1330                                      SETYEAR();
1331                                      }
1332         YY_BREAK
1333 case 10:
1334 YY_RULE_SETUP
1335 #line 348 "dtimep.lex"
1336
1337         YY_BREAK
1338 case 11:
1339 YY_RULE_SETUP
1340 #line 349 "dtimep.lex"
1341 tw.tw_hour += 12;
1342         YY_BREAK
1343 case 12:
1344 YY_RULE_SETUP
1345 #line 351 "dtimep.lex"
1346 {
1347                                     INIT();
1348                                     SKIPTOD();
1349                                     SETZONE(atoi(cp));
1350 #ifdef  ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
1351                                     zonehack (&tw);
1352 #endif  /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
1353                                     yyterminate();
1354                                     }
1355         YY_BREAK
1356 case 13:
1357 YY_RULE_SETUP
1358 #line 360 "dtimep.lex"
1359 {
1360                                     INIT();
1361                                     SKIPTOD();
1362                                     SETZONE(-atoi(cp));
1363 #ifdef  ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
1364                                     zonehack (&tw);
1365 #endif  /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
1366                                     yyterminate();
1367                                     
1368                                     }
1369         YY_BREAK
1370 case 14:
1371 YY_RULE_SETUP
1372 #line 370 "dtimep.lex"
1373 INIT(); SETZONE(0); yyterminate();
1374         YY_BREAK
1375 case 15:
1376 YY_RULE_SETUP
1377 #line 371 "dtimep.lex"
1378 INIT(); SETZONE(0); yyterminate();
1379         YY_BREAK
1380 case 16:
1381 YY_RULE_SETUP
1382 #line 372 "dtimep.lex"
1383 INIT(); SETZONE(-500); yyterminate();
1384         YY_BREAK
1385 case 17:
1386 YY_RULE_SETUP
1387 #line 373 "dtimep.lex"
1388 { INIT(); SETDST(); SETZONE(-500);
1389                                       yyterminate(); }
1390         YY_BREAK
1391 case 18:
1392 YY_RULE_SETUP
1393 #line 375 "dtimep.lex"
1394 INIT(); SETZONE(-600); yyterminate();
1395         YY_BREAK
1396 case 19:
1397 YY_RULE_SETUP
1398 #line 376 "dtimep.lex"
1399 { INIT(); SETDST(); SETZONE(-600);
1400                                       yyterminate(); }
1401         YY_BREAK
1402 case 20:
1403 YY_RULE_SETUP
1404 #line 378 "dtimep.lex"
1405 INIT(); SETZONE(-700); yyterminate();
1406         YY_BREAK
1407 case 21:
1408 YY_RULE_SETUP
1409 #line 379 "dtimep.lex"
1410 { INIT(); SETDST(); SETZONE(-700);
1411                                       yyterminate(); }
1412         YY_BREAK
1413 case 22:
1414 YY_RULE_SETUP
1415 #line 381 "dtimep.lex"
1416 INIT(); SETZONE(-800); yyterminate();
1417         YY_BREAK
1418 case 23:
1419 YY_RULE_SETUP
1420 #line 382 "dtimep.lex"
1421 { INIT(); SETDST(); SETZONE(-800);
1422                                       yyterminate(); }
1423         YY_BREAK
1424 case 24:
1425 YY_RULE_SETUP
1426 #line 384 "dtimep.lex"
1427 INIT(); SETZONE(-330); yyterminate();
1428         YY_BREAK
1429 case 25:
1430 YY_RULE_SETUP
1431 #line 385 "dtimep.lex"
1432 INIT(); SETZONE(-400); yyterminate();
1433         YY_BREAK
1434 case 26:
1435 YY_RULE_SETUP
1436 #line 386 "dtimep.lex"
1437 { INIT(); SETDST(); SETZONE(-400);
1438                                       yyterminate(); }
1439         YY_BREAK
1440 case 27:
1441 YY_RULE_SETUP
1442 #line 388 "dtimep.lex"
1443 INIT(); SETZONE(-1000); yyterminate();
1444         YY_BREAK
1445 case 28:
1446 YY_RULE_SETUP
1447 #line 389 "dtimep.lex"
1448 { INIT(); SETDST(); SETZONE(-1000);
1449                                       yyterminate(); }
1450         YY_BREAK
1451 case 29:
1452 YY_RULE_SETUP
1453 #line 391 "dtimep.lex"
1454
1455         YY_BREAK
1456 case 30:
1457 YY_RULE_SETUP
1458 #line 392 "dtimep.lex"
1459 ECHO;
1460         YY_BREAK
1461 case YY_STATE_EOF(INITIAL):
1462         yyterminate();
1463
1464         case YY_END_OF_BUFFER:
1465                 {
1466                 /* Amount of text matched not including the EOB char. */
1467                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1468
1469                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1470                 *yy_cp = yy_hold_char;
1471                 YY_RESTORE_YY_MORE_OFFSET
1472
1473                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1474                         {
1475                         /* We're scanning a new file or input source.  It's
1476                          * possible that this happened because the user
1477                          * just pointed yyin at a new source and called
1478                          * yylex().  If so, then we have to assure
1479                          * consistency between yy_current_buffer and our
1480                          * globals.  Here is the right place to do so, because
1481                          * this is the first action (other than possibly a
1482                          * back-up) that will match for the new input source.
1483                          */
1484                         yy_n_chars = yy_current_buffer->yy_n_chars;
1485                         yy_current_buffer->yy_input_file = yyin;
1486                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1487                         }
1488
1489                 /* Note that here we test for yy_c_buf_p "<=" to the position
1490                  * of the first EOB in the buffer, since yy_c_buf_p will
1491                  * already have been incremented past the NUL character
1492                  * (since all states make transitions on EOB to the
1493                  * end-of-buffer state).  Contrast this with the test
1494                  * in input().
1495                  */
1496                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1497                         { /* This was really a NUL. */
1498                         yy_state_type yy_next_state;
1499
1500                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1501
1502                         yy_current_state = yy_get_previous_state();
1503
1504                         /* Okay, we're now positioned to make the NUL
1505                          * transition.  We couldn't have
1506                          * yy_get_previous_state() go ahead and do it
1507                          * for us because it doesn't know how to deal
1508                          * with the possibility of jamming (and we don't
1509                          * want to build jamming into it because then it
1510                          * will run more slowly).
1511                          */
1512
1513                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1514
1515                         yy_bp = yytext_ptr + YY_MORE_ADJ;
1516
1517                         if ( yy_next_state )
1518                                 {
1519                                 /* Consume the NUL. */
1520                                 yy_cp = ++yy_c_buf_p;
1521                                 yy_current_state = yy_next_state;
1522                                 goto yy_match;
1523                                 }
1524
1525                         else
1526                                 {
1527                                 yy_cp = yy_c_buf_p;
1528                                 goto yy_find_action;
1529                                 }
1530                         }
1531
1532                 else switch ( yy_get_next_buffer() )
1533                         {
1534                         case EOB_ACT_END_OF_FILE:
1535                                 {
1536                                 yy_did_buffer_switch_on_eof = 0;
1537
1538                                 if ( yywrap() )
1539                                         {
1540                                         /* Note: because we've taken care in
1541                                          * yy_get_next_buffer() to have set up
1542                                          * yytext, we can now set up
1543                                          * yy_c_buf_p so that if some total
1544                                          * hoser (like flex itself) wants to
1545                                          * call the scanner after we return the
1546                                          * YY_NULL, it'll still work - another
1547                                          * YY_NULL will get returned.
1548                                          */
1549                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1550
1551                                         yy_act = YY_STATE_EOF(YY_START);
1552                                         goto do_action;
1553                                         }
1554
1555                                 else
1556                                         {
1557                                         if ( ! yy_did_buffer_switch_on_eof )
1558                                                 YY_NEW_FILE;
1559                                         }
1560                                 break;
1561                                 }
1562
1563                         case EOB_ACT_CONTINUE_SCAN:
1564                                 yy_c_buf_p =
1565                                         yytext_ptr + yy_amount_of_matched_text;
1566
1567                                 yy_current_state = yy_get_previous_state();
1568
1569                                 yy_cp = yy_c_buf_p;
1570                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1571                                 goto yy_match;
1572
1573                         case EOB_ACT_LAST_MATCH:
1574                                 yy_c_buf_p =
1575                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1576
1577                                 yy_current_state = yy_get_previous_state();
1578
1579                                 yy_cp = yy_c_buf_p;
1580                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1581                                 goto yy_find_action;
1582                         }
1583                 break;
1584                 }
1585
1586         default:
1587                 YY_FATAL_ERROR(
1588                         "fatal flex scanner internal error--no action found" );
1589         } /* end of action switch */
1590                 } /* end of scanning one token */
1591         } /* end of yylex */
1592
1593
1594 /* yy_get_next_buffer - try to read in a new buffer
1595  *
1596  * Returns a code representing an action:
1597  *      EOB_ACT_LAST_MATCH -
1598  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1599  *      EOB_ACT_END_OF_FILE - end of file
1600  */
1601
1602 static int yy_get_next_buffer()
1603         {
1604         register char *dest = yy_current_buffer->yy_ch_buf;
1605         register char *source = yytext_ptr;
1606         register int number_to_move, i;
1607         int ret_val;
1608
1609         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1610                 YY_FATAL_ERROR(
1611                 "fatal flex scanner internal error--end of buffer missed" );
1612
1613         if ( yy_current_buffer->yy_fill_buffer == 0 )
1614                 { /* Don't try to fill the buffer, so this is an EOF. */
1615                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1616                         {
1617                         /* We matched a single character, the EOB, so
1618                          * treat this as a final EOF.
1619                          */
1620                         return EOB_ACT_END_OF_FILE;
1621                         }
1622
1623                 else
1624                         {
1625                         /* We matched some text prior to the EOB, first
1626                          * process it.
1627                          */
1628                         return EOB_ACT_LAST_MATCH;
1629                         }
1630                 }
1631
1632         /* Try to read more data. */
1633
1634         /* First move last chars to start of buffer. */
1635         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1636
1637         for ( i = 0; i < number_to_move; ++i )
1638                 *(dest++) = *(source++);
1639
1640         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1641                 /* don't do the read, it's not guaranteed to return an EOF,
1642                  * just force an EOF
1643                  */
1644                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1645
1646         else
1647                 {
1648                 int num_to_read =
1649                         yy_current_buffer->yy_buf_size - number_to_move - 1;
1650
1651                 while ( num_to_read <= 0 )
1652                         { /* Not enough room in the buffer - grow it. */
1653 #ifdef YY_USES_REJECT
1654                         YY_FATAL_ERROR(
1655 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1656 #else
1657
1658                         /* just a shorter name for the current buffer */
1659                         YY_BUFFER_STATE b = yy_current_buffer;
1660
1661                         int yy_c_buf_p_offset =
1662                                 (int) (yy_c_buf_p - b->yy_ch_buf);
1663
1664                         if ( b->yy_is_our_buffer )
1665                                 {
1666                                 int new_size = b->yy_buf_size * 2;
1667
1668                                 if ( new_size <= 0 )
1669                                         b->yy_buf_size += b->yy_buf_size / 8;
1670                                 else
1671                                         b->yy_buf_size *= 2;
1672
1673                                 b->yy_ch_buf = (char *)
1674                                         /* Include room in for 2 EOB chars. */
1675                                         yy_flex_realloc( (void *) b->yy_ch_buf,
1676                                                          b->yy_buf_size + 2 );
1677                                 }
1678                         else
1679                                 /* Can't grow it, we don't own it. */
1680                                 b->yy_ch_buf = 0;
1681
1682                         if ( ! b->yy_ch_buf )
1683                                 YY_FATAL_ERROR(
1684                                 "fatal error - scanner input buffer overflow" );
1685
1686                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1687
1688                         num_to_read = yy_current_buffer->yy_buf_size -
1689                                                 number_to_move - 1;
1690 #endif
1691                         }
1692
1693                 if ( num_to_read > YY_READ_BUF_SIZE )
1694                         num_to_read = YY_READ_BUF_SIZE;
1695
1696                 /* Read in more data. */
1697                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1698                         yy_n_chars, num_to_read );
1699
1700                 yy_current_buffer->yy_n_chars = yy_n_chars;
1701                 }
1702
1703         if ( yy_n_chars == 0 )
1704                 {
1705                 if ( number_to_move == YY_MORE_ADJ )
1706                         {
1707                         ret_val = EOB_ACT_END_OF_FILE;
1708                         yyrestart( yyin );
1709                         }
1710
1711                 else
1712                         {
1713                         ret_val = EOB_ACT_LAST_MATCH;
1714                         yy_current_buffer->yy_buffer_status =
1715                                 YY_BUFFER_EOF_PENDING;
1716                         }
1717                 }
1718
1719         else
1720                 ret_val = EOB_ACT_CONTINUE_SCAN;
1721
1722         yy_n_chars += number_to_move;
1723         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1724         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1725
1726         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1727
1728         return ret_val;
1729         }
1730
1731
1732 /* yy_get_previous_state - get the state just before the EOB char was reached */
1733
1734 static yy_state_type yy_get_previous_state()
1735         {
1736         register yy_state_type yy_current_state;
1737         register char *yy_cp;
1738
1739         yy_current_state = yy_start;
1740
1741         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1742                 {
1743                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1744                 if ( yy_accept[yy_current_state] )
1745                         {
1746                         yy_last_accepting_state = yy_current_state;
1747                         yy_last_accepting_cpos = yy_cp;
1748                         }
1749                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1750                         {
1751                         yy_current_state = (int) yy_def[yy_current_state];
1752                         if ( yy_current_state >= 571 )
1753                                 yy_c = yy_meta[(unsigned int) yy_c];
1754                         }
1755                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1756                 }
1757
1758         return yy_current_state;
1759         }
1760
1761
1762 /* yy_try_NUL_trans - try to make a transition on the NUL character
1763  *
1764  * synopsis
1765  *      next_state = yy_try_NUL_trans( current_state );
1766  */
1767
1768 #ifdef YY_USE_PROTOS
1769 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1770 #else
1771 static yy_state_type yy_try_NUL_trans( yy_current_state )
1772 yy_state_type yy_current_state;
1773 #endif
1774         {
1775         register int yy_is_jam;
1776         register char *yy_cp = yy_c_buf_p;
1777
1778         register YY_CHAR yy_c = 1;
1779         if ( yy_accept[yy_current_state] )
1780                 {
1781                 yy_last_accepting_state = yy_current_state;
1782                 yy_last_accepting_cpos = yy_cp;
1783                 }
1784         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1785                 {
1786                 yy_current_state = (int) yy_def[yy_current_state];
1787                 if ( yy_current_state >= 571 )
1788                         yy_c = yy_meta[(unsigned int) yy_c];
1789                 }
1790         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1791         yy_is_jam = (yy_current_state == 570);
1792
1793         return yy_is_jam ? 0 : yy_current_state;
1794         }
1795
1796
1797 #ifndef YY_NO_UNPUT
1798 #ifdef YY_USE_PROTOS
1799 static void yyunput( int c, register char *yy_bp )
1800 #else
1801 static void yyunput( c, yy_bp )
1802 int c;
1803 register char *yy_bp;
1804 #endif
1805         {
1806         register char *yy_cp = yy_c_buf_p;
1807
1808         /* undo effects of setting up yytext */
1809         *yy_cp = yy_hold_char;
1810
1811         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1812                 { /* need to shift things up to make room */
1813                 /* +2 for EOB chars. */
1814                 register int number_to_move = yy_n_chars + 2;
1815                 register char *dest = &yy_current_buffer->yy_ch_buf[
1816                                         yy_current_buffer->yy_buf_size + 2];
1817                 register char *source =
1818                                 &yy_current_buffer->yy_ch_buf[number_to_move];
1819
1820                 while ( source > yy_current_buffer->yy_ch_buf )
1821                         *--dest = *--source;
1822
1823                 yy_cp += (int) (dest - source);
1824                 yy_bp += (int) (dest - source);
1825                 yy_current_buffer->yy_n_chars =
1826                         yy_n_chars = yy_current_buffer->yy_buf_size;
1827
1828                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1829                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1830                 }
1831
1832         *--yy_cp = (char) c;
1833
1834
1835         yytext_ptr = yy_bp;
1836         yy_hold_char = *yy_cp;
1837         yy_c_buf_p = yy_cp;
1838         }
1839 #endif  /* ifndef YY_NO_UNPUT */
1840
1841
1842 #ifdef __cplusplus
1843 static int yyinput()
1844 #else
1845 static int input()
1846 #endif
1847         {
1848         int c;
1849
1850         *yy_c_buf_p = yy_hold_char;
1851
1852         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1853                 {
1854                 /* yy_c_buf_p now points to the character we want to return.
1855                  * If this occurs *before* the EOB characters, then it's a
1856                  * valid NUL; if not, then we've hit the end of the buffer.
1857                  */
1858                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1859                         /* This was really a NUL. */
1860                         *yy_c_buf_p = '\0';
1861
1862                 else
1863                         { /* need more input */
1864                         int offset = yy_c_buf_p - yytext_ptr;
1865                         ++yy_c_buf_p;
1866
1867                         switch ( yy_get_next_buffer() )
1868                                 {
1869                                 case EOB_ACT_LAST_MATCH:
1870                                         /* This happens because yy_g_n_b()
1871                                          * sees that we've accumulated a
1872                                          * token and flags that we need to
1873                                          * try matching the token before
1874                                          * proceeding.  But for input(),
1875                                          * there's no matching to consider.
1876                                          * So convert the EOB_ACT_LAST_MATCH
1877                                          * to EOB_ACT_END_OF_FILE.
1878                                          */
1879
1880                                         /* Reset buffer status. */
1881                                         yyrestart( yyin );
1882
1883                                         /* fall through */
1884
1885                                 case EOB_ACT_END_OF_FILE:
1886                                         {
1887                                         if ( yywrap() )
1888                                                 return EOF;
1889
1890                                         if ( ! yy_did_buffer_switch_on_eof )
1891                                                 YY_NEW_FILE;
1892 #ifdef __cplusplus
1893                                         return yyinput();
1894 #else
1895                                         return input();
1896 #endif
1897                                         }
1898
1899                                 case EOB_ACT_CONTINUE_SCAN:
1900                                         yy_c_buf_p = yytext_ptr + offset;
1901                                         break;
1902                                 }
1903                         }
1904                 }
1905
1906         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1907         *yy_c_buf_p = '\0';     /* preserve yytext */
1908         yy_hold_char = *++yy_c_buf_p;
1909
1910
1911         return c;
1912         }
1913
1914
1915 #ifdef YY_USE_PROTOS
1916 void yyrestart( FILE *input_file )
1917 #else
1918 void yyrestart( input_file )
1919 FILE *input_file;
1920 #endif
1921         {
1922         if ( ! yy_current_buffer )
1923                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1924
1925         yy_init_buffer( yy_current_buffer, input_file );
1926         yy_load_buffer_state();
1927         }
1928
1929
1930 #ifdef YY_USE_PROTOS
1931 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1932 #else
1933 void yy_switch_to_buffer( new_buffer )
1934 YY_BUFFER_STATE new_buffer;
1935 #endif
1936         {
1937         if ( yy_current_buffer == new_buffer )
1938                 return;
1939
1940         if ( yy_current_buffer )
1941                 {
1942                 /* Flush out information for old buffer. */
1943                 *yy_c_buf_p = yy_hold_char;
1944                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1945                 yy_current_buffer->yy_n_chars = yy_n_chars;
1946                 }
1947
1948         yy_current_buffer = new_buffer;
1949         yy_load_buffer_state();
1950
1951         /* We don't actually know whether we did this switch during
1952          * EOF (yywrap()) processing, but the only time this flag
1953          * is looked at is after yywrap() is called, so it's safe
1954          * to go ahead and always set it.
1955          */
1956         yy_did_buffer_switch_on_eof = 1;
1957         }
1958
1959
1960 #ifdef YY_USE_PROTOS
1961 void yy_load_buffer_state( void )
1962 #else
1963 void yy_load_buffer_state()
1964 #endif
1965         {
1966         yy_n_chars = yy_current_buffer->yy_n_chars;
1967         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1968         yyin = yy_current_buffer->yy_input_file;
1969         yy_hold_char = *yy_c_buf_p;
1970         }
1971
1972
1973 #ifdef YY_USE_PROTOS
1974 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1975 #else
1976 YY_BUFFER_STATE yy_create_buffer( file, size )
1977 FILE *file;
1978 int size;
1979 #endif
1980         {
1981         YY_BUFFER_STATE b;
1982
1983         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1984         if ( ! b )
1985                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1986
1987         b->yy_buf_size = size;
1988
1989         /* yy_ch_buf has to be 2 characters longer than the size given because
1990          * we need to put in 2 end-of-buffer characters.
1991          */
1992         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1993         if ( ! b->yy_ch_buf )
1994                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1995
1996         b->yy_is_our_buffer = 1;
1997
1998         yy_init_buffer( b, file );
1999
2000         return b;
2001         }
2002
2003
2004 #ifdef YY_USE_PROTOS
2005 void yy_delete_buffer( YY_BUFFER_STATE b )
2006 #else
2007 void yy_delete_buffer( b )
2008 YY_BUFFER_STATE b;
2009 #endif
2010         {
2011         if ( ! b )
2012                 return;
2013
2014         if ( b == yy_current_buffer )
2015                 yy_current_buffer = (YY_BUFFER_STATE) 0;
2016
2017         if ( b->yy_is_our_buffer )
2018                 yy_flex_free( (void *) b->yy_ch_buf );
2019
2020         yy_flex_free( (void *) b );
2021         }
2022
2023
2024 #ifndef YY_ALWAYS_INTERACTIVE
2025 #ifndef YY_NEVER_INTERACTIVE
2026 extern int isatty YY_PROTO(( int ));
2027 #endif
2028 #endif
2029
2030 #ifdef YY_USE_PROTOS
2031 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2032 #else
2033 void yy_init_buffer( b, file )
2034 YY_BUFFER_STATE b;
2035 FILE *file;
2036 #endif
2037
2038
2039         {
2040         yy_flush_buffer( b );
2041
2042         b->yy_input_file = file;
2043         b->yy_fill_buffer = 1;
2044
2045 #if YY_ALWAYS_INTERACTIVE
2046         b->yy_is_interactive = 1;
2047 #else
2048 #if YY_NEVER_INTERACTIVE
2049         b->yy_is_interactive = 0;
2050 #else
2051         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2052 #endif
2053 #endif
2054         }
2055
2056
2057 #ifdef YY_USE_PROTOS
2058 void yy_flush_buffer( YY_BUFFER_STATE b )
2059 #else
2060 void yy_flush_buffer( b )
2061 YY_BUFFER_STATE b;
2062 #endif
2063
2064         {
2065         if ( ! b )
2066                 return;
2067
2068         b->yy_n_chars = 0;
2069
2070         /* We always need two end-of-buffer characters.  The first causes
2071          * a transition to the end-of-buffer state.  The second causes
2072          * a jam in that state.
2073          */
2074         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2075         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2076
2077         b->yy_buf_pos = &b->yy_ch_buf[0];
2078
2079         b->yy_at_bol = 1;
2080         b->yy_buffer_status = YY_BUFFER_NEW;
2081
2082         if ( b == yy_current_buffer )
2083                 yy_load_buffer_state();
2084         }
2085
2086
2087 #ifndef YY_NO_SCAN_BUFFER
2088 #ifdef YY_USE_PROTOS
2089 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2090 #else
2091 YY_BUFFER_STATE yy_scan_buffer( base, size )
2092 char *base;
2093 yy_size_t size;
2094 #endif
2095         {
2096         YY_BUFFER_STATE b;
2097
2098         if ( size < 2 ||
2099              base[size-2] != YY_END_OF_BUFFER_CHAR ||
2100              base[size-1] != YY_END_OF_BUFFER_CHAR )
2101                 /* They forgot to leave room for the EOB's. */
2102                 return 0;
2103
2104         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2105         if ( ! b )
2106                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2107
2108         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
2109         b->yy_buf_pos = b->yy_ch_buf = base;
2110         b->yy_is_our_buffer = 0;
2111         b->yy_input_file = 0;
2112         b->yy_n_chars = b->yy_buf_size;
2113         b->yy_is_interactive = 0;
2114         b->yy_at_bol = 1;
2115         b->yy_fill_buffer = 0;
2116         b->yy_buffer_status = YY_BUFFER_NEW;
2117
2118         yy_switch_to_buffer( b );
2119
2120         return b;
2121         }
2122 #endif
2123
2124
2125 #ifndef YY_NO_SCAN_STRING
2126 #ifdef YY_USE_PROTOS
2127 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2128 #else
2129 YY_BUFFER_STATE yy_scan_string( yy_str )
2130 yyconst char *yy_str;
2131 #endif
2132         {
2133         int len;
2134         for ( len = 0; yy_str[len]; ++len )
2135                 ;
2136
2137         return yy_scan_bytes( yy_str, len );
2138         }
2139 #endif
2140
2141
2142 #ifndef YY_NO_SCAN_BYTES
2143 #ifdef YY_USE_PROTOS
2144 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2145 #else
2146 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2147 yyconst char *bytes;
2148 int len;
2149 #endif
2150         {
2151         YY_BUFFER_STATE b;
2152         char *buf;
2153         yy_size_t n;
2154         int i;
2155
2156         /* Get memory for full buffer, including space for trailing EOB's. */
2157         n = len + 2;
2158         buf = (char *) yy_flex_alloc( n );
2159         if ( ! buf )
2160                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2161
2162         for ( i = 0; i < len; ++i )
2163                 buf[i] = bytes[i];
2164
2165         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2166
2167         b = yy_scan_buffer( buf, n );
2168         if ( ! b )
2169                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2170
2171         /* It's okay to grow etc. this buffer, and we should throw it
2172          * away when we're done.
2173          */
2174         b->yy_is_our_buffer = 1;
2175
2176         return b;
2177         }
2178 #endif
2179
2180
2181 #ifndef YY_NO_PUSH_STATE
2182 #ifdef YY_USE_PROTOS
2183 static void yy_push_state( int new_state )
2184 #else
2185 static void yy_push_state( new_state )
2186 int new_state;
2187 #endif
2188         {
2189         if ( yy_start_stack_ptr >= yy_start_stack_depth )
2190                 {
2191                 yy_size_t new_size;
2192
2193                 yy_start_stack_depth += YY_START_STACK_INCR;
2194                 new_size = yy_start_stack_depth * sizeof( int );
2195
2196                 if ( ! yy_start_stack )
2197                         yy_start_stack = (int *) yy_flex_alloc( new_size );
2198
2199                 else
2200                         yy_start_stack = (int *) yy_flex_realloc(
2201                                         (void *) yy_start_stack, new_size );
2202
2203                 if ( ! yy_start_stack )
2204                         YY_FATAL_ERROR(
2205                         "out of memory expanding start-condition stack" );
2206                 }
2207
2208         yy_start_stack[yy_start_stack_ptr++] = YY_START;
2209
2210         BEGIN(new_state);
2211         }
2212 #endif
2213
2214
2215 #ifndef YY_NO_POP_STATE
2216 static void yy_pop_state()
2217         {
2218         if ( --yy_start_stack_ptr < 0 )
2219                 YY_FATAL_ERROR( "start-condition stack underflow" );
2220
2221         BEGIN(yy_start_stack[yy_start_stack_ptr]);
2222         }
2223 #endif
2224
2225
2226 #ifndef YY_NO_TOP_STATE
2227 static int yy_top_state()
2228         {
2229         return yy_start_stack[yy_start_stack_ptr - 1];
2230         }
2231 #endif
2232
2233 #ifndef YY_EXIT_FAILURE
2234 #define YY_EXIT_FAILURE 2
2235 #endif
2236
2237 #ifdef YY_USE_PROTOS
2238 static void yy_fatal_error( yyconst char msg[] )
2239 #else
2240 static void yy_fatal_error( msg )
2241 char msg[];
2242 #endif
2243         {
2244         (void) fprintf( stderr, "%s\n", msg );
2245         exit( YY_EXIT_FAILURE );
2246         }
2247
2248
2249
2250 /* Redefine yyless() so it works in section 3 code. */
2251
2252 #undef yyless
2253 #define yyless(n) \
2254         do \
2255                 { \
2256                 /* Undo effects of setting up yytext. */ \
2257                 yytext[yyleng] = yy_hold_char; \
2258                 yy_c_buf_p = yytext + n; \
2259                 yy_hold_char = *yy_c_buf_p; \
2260                 *yy_c_buf_p = '\0'; \
2261                 yyleng = n; \
2262                 } \
2263         while ( 0 )
2264
2265
2266 /* Internal utility routines. */
2267
2268 #ifndef yytext_ptr
2269 #ifdef YY_USE_PROTOS
2270 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2271 #else
2272 static void yy_flex_strncpy( s1, s2, n )
2273 char *s1;
2274 yyconst char *s2;
2275 int n;
2276 #endif
2277         {
2278         register int i;
2279         for ( i = 0; i < n; ++i )
2280                 s1[i] = s2[i];
2281         }
2282 #endif
2283
2284 #ifdef YY_NEED_STRLEN
2285 #ifdef YY_USE_PROTOS
2286 static int yy_flex_strlen( yyconst char *s )
2287 #else
2288 static int yy_flex_strlen( s )
2289 yyconst char *s;
2290 #endif
2291         {
2292         register int n;
2293         for ( n = 0; s[n]; ++n )
2294                 ;
2295
2296         return n;
2297         }
2298 #endif
2299
2300
2301 #ifdef YY_USE_PROTOS
2302 static void *yy_flex_alloc( yy_size_t size )
2303 #else
2304 static void *yy_flex_alloc( size )
2305 yy_size_t size;
2306 #endif
2307         {
2308         return (void *) malloc( size );
2309         }
2310
2311 #ifdef YY_USE_PROTOS
2312 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2313 #else
2314 static void *yy_flex_realloc( ptr, size )
2315 void *ptr;
2316 yy_size_t size;
2317 #endif
2318         {
2319         /* The cast to (char *) in the following accommodates both
2320          * implementations that use char* generic pointers, and those
2321          * that use void* generic pointers.  It works with the latter
2322          * because both ANSI C and C++ allow castless assignment from
2323          * any pointer type to void*, and deal with argument conversions
2324          * as though doing an assignment.
2325          */
2326         return (void *) realloc( (char *) ptr, size );
2327         }
2328
2329 #ifdef YY_USE_PROTOS
2330 static void yy_flex_free( void *ptr )
2331 #else
2332 static void yy_flex_free( ptr )
2333 void *ptr;
2334 #endif
2335         {
2336         free( ptr );
2337         }
2338
2339 #if YY_MAIN
2340 int main()
2341         {
2342         yylex();
2343         return 0;
2344         }
2345 #endif
2346 #line 392 "dtimep.lex"