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