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