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