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