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