source: rtems-libbsd/ipsec-tools/src/setkey/token.c @ b376ae1

55-freebsd-126-freebsd-12
Last change on this file since b376ae1 was b376ae1, checked in by Christian Mauderer <christian.mauderer@…>, on 05/03/18 at 12:15:11

ipsec-tools: Port libipsec, setkey and racoon.

Note that this replaces the libipsec from FreeBSD with the one provided
by ipsec-tools.

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