xref: /netbsd-src/tools/m4/bootstrap/tokenizer.c (revision 912aaddf6cfee99a171d4adc0cca4ec8569f4fda)
141ebfbe2Schristos #if HAVE_NBTOOL_CONFIG_H
241ebfbe2Schristos #include "nbtool_config.h"
341ebfbe2Schristos #endif
441ebfbe2Schristos #line 2 "tokenizer.c"
541ebfbe2Schristos 
641ebfbe2Schristos #line 4 "tokenizer.c"
741ebfbe2Schristos 
841ebfbe2Schristos #define  YY_INT_ALIGNED short int
941ebfbe2Schristos 
1041ebfbe2Schristos /* A lexical scanner generated by flex */
1141ebfbe2Schristos 
1241ebfbe2Schristos #define FLEX_SCANNER
1341ebfbe2Schristos #define YY_FLEX_MAJOR_VERSION 2
1441ebfbe2Schristos #define YY_FLEX_MINOR_VERSION 5
1541ebfbe2Schristos #define YY_FLEX_SUBMINOR_VERSION 35
1641ebfbe2Schristos #if YY_FLEX_SUBMINOR_VERSION > 0
1741ebfbe2Schristos #define FLEX_BETA
1841ebfbe2Schristos #endif
1941ebfbe2Schristos 
2041ebfbe2Schristos /* First, we deal with  platform-specific or compiler-specific issues. */
2141ebfbe2Schristos 
2241ebfbe2Schristos /* begin standard C headers. */
2341ebfbe2Schristos #include <stdio.h>
2441ebfbe2Schristos #include <string.h>
2541ebfbe2Schristos #include <errno.h>
2641ebfbe2Schristos #include <stdlib.h>
2741ebfbe2Schristos 
2841ebfbe2Schristos /* end standard C headers. */
2941ebfbe2Schristos 
3041ebfbe2Schristos /*	NetBSD: flexint.h,v 1.1.1.1 2009/10/26 00:26:19 christos Exp 	*/
3141ebfbe2Schristos 
3241ebfbe2Schristos /* flex integer type definitions */
3341ebfbe2Schristos 
3441ebfbe2Schristos #ifndef FLEXINT_H
3541ebfbe2Schristos #define FLEXINT_H
3641ebfbe2Schristos 
3741ebfbe2Schristos /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
3841ebfbe2Schristos 
3941ebfbe2Schristos #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
4041ebfbe2Schristos 
4141ebfbe2Schristos /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
4241ebfbe2Schristos  * if you want the limit (max/min) macros for int types.
4341ebfbe2Schristos  */
4441ebfbe2Schristos #ifndef __STDC_LIMIT_MACROS
4541ebfbe2Schristos #define __STDC_LIMIT_MACROS 1
4641ebfbe2Schristos #endif
4741ebfbe2Schristos 
4841ebfbe2Schristos #include <inttypes.h>
4941ebfbe2Schristos typedef int8_t flex_int8_t;
5041ebfbe2Schristos typedef uint8_t flex_uint8_t;
5141ebfbe2Schristos typedef int16_t flex_int16_t;
5241ebfbe2Schristos typedef uint16_t flex_uint16_t;
5341ebfbe2Schristos typedef int32_t flex_int32_t;
5441ebfbe2Schristos typedef uint32_t flex_uint32_t;
5541ebfbe2Schristos #else
5641ebfbe2Schristos typedef signed char flex_int8_t;
5741ebfbe2Schristos typedef short int flex_int16_t;
5841ebfbe2Schristos typedef int flex_int32_t;
5941ebfbe2Schristos typedef unsigned char flex_uint8_t;
6041ebfbe2Schristos typedef unsigned short int flex_uint16_t;
6141ebfbe2Schristos typedef unsigned int flex_uint32_t;
6241ebfbe2Schristos #endif /* ! C99 */
6341ebfbe2Schristos 
6441ebfbe2Schristos /* Limits of integral types. */
6541ebfbe2Schristos #ifndef INT8_MIN
6641ebfbe2Schristos #define INT8_MIN               (-128)
6741ebfbe2Schristos #endif
6841ebfbe2Schristos #ifndef INT16_MIN
6941ebfbe2Schristos #define INT16_MIN              (-32767-1)
7041ebfbe2Schristos #endif
7141ebfbe2Schristos #ifndef INT32_MIN
7241ebfbe2Schristos #define INT32_MIN              (-2147483647-1)
7341ebfbe2Schristos #endif
7441ebfbe2Schristos #ifndef INT8_MAX
7541ebfbe2Schristos #define INT8_MAX               (127)
7641ebfbe2Schristos #endif
7741ebfbe2Schristos #ifndef INT16_MAX
7841ebfbe2Schristos #define INT16_MAX              (32767)
7941ebfbe2Schristos #endif
8041ebfbe2Schristos #ifndef INT32_MAX
8141ebfbe2Schristos #define INT32_MAX              (2147483647)
8241ebfbe2Schristos #endif
8341ebfbe2Schristos #ifndef UINT8_MAX
8441ebfbe2Schristos #define UINT8_MAX              (255U)
8541ebfbe2Schristos #endif
8641ebfbe2Schristos #ifndef UINT16_MAX
8741ebfbe2Schristos #define UINT16_MAX             (65535U)
8841ebfbe2Schristos #endif
8941ebfbe2Schristos #ifndef UINT32_MAX
9041ebfbe2Schristos #define UINT32_MAX             (4294967295U)
9141ebfbe2Schristos #endif
9241ebfbe2Schristos 
9341ebfbe2Schristos #endif /* ! FLEXINT_H */
9441ebfbe2Schristos 
9541ebfbe2Schristos #ifdef __cplusplus
9641ebfbe2Schristos 
9741ebfbe2Schristos /* The "const" storage-class-modifier is valid. */
9841ebfbe2Schristos #define YY_USE_CONST
9941ebfbe2Schristos 
10041ebfbe2Schristos #else	/* ! __cplusplus */
10141ebfbe2Schristos 
10241ebfbe2Schristos /* C99 requires __STDC__ to be defined as 1. */
10341ebfbe2Schristos #if defined (__STDC__)
10441ebfbe2Schristos 
10541ebfbe2Schristos #define YY_USE_CONST
10641ebfbe2Schristos 
10741ebfbe2Schristos #endif	/* defined (__STDC__) */
10841ebfbe2Schristos #endif	/* ! __cplusplus */
10941ebfbe2Schristos 
11041ebfbe2Schristos #ifdef YY_USE_CONST
11141ebfbe2Schristos #define yyconst const
11241ebfbe2Schristos #else
11341ebfbe2Schristos #define yyconst
11441ebfbe2Schristos #endif
11541ebfbe2Schristos 
11641ebfbe2Schristos /* Returned upon end-of-file. */
11741ebfbe2Schristos #define YY_NULL 0
11841ebfbe2Schristos 
11941ebfbe2Schristos /* Promotes a possibly negative, possibly signed char to an unsigned
12041ebfbe2Schristos  * integer for use as an array index.  If the signed char is negative,
12141ebfbe2Schristos  * we want to instead treat it as an 8-bit unsigned char, hence the
12241ebfbe2Schristos  * double cast.
12341ebfbe2Schristos  */
12441ebfbe2Schristos #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
12541ebfbe2Schristos 
12641ebfbe2Schristos /* Enter a start condition.  This macro really ought to take a parameter,
12741ebfbe2Schristos  * but we do it the disgusting crufty way forced on us by the ()-less
12841ebfbe2Schristos  * definition of BEGIN.
12941ebfbe2Schristos  */
13041ebfbe2Schristos #define BEGIN (yy_start) = 1 + 2 *
13141ebfbe2Schristos 
13241ebfbe2Schristos /* Translate the current start state into a value that can be later handed
13341ebfbe2Schristos  * to BEGIN to return to the state.  The YYSTATE alias is for lex
13441ebfbe2Schristos  * compatibility.
13541ebfbe2Schristos  */
13641ebfbe2Schristos #define YY_START (((yy_start) - 1) / 2)
13741ebfbe2Schristos #define YYSTATE YY_START
13841ebfbe2Schristos 
13941ebfbe2Schristos /* Action number for EOF rule of a given start state. */
14041ebfbe2Schristos #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
14141ebfbe2Schristos 
14241ebfbe2Schristos /* Special action meaning "start processing a new file". */
14341ebfbe2Schristos #define YY_NEW_FILE yyrestart(yyin  )
14441ebfbe2Schristos 
14541ebfbe2Schristos #define YY_END_OF_BUFFER_CHAR 0
14641ebfbe2Schristos 
14741ebfbe2Schristos /* Size of default input buffer. */
14841ebfbe2Schristos #ifndef YY_BUF_SIZE
14941ebfbe2Schristos #define YY_BUF_SIZE 16384
15041ebfbe2Schristos #endif
15141ebfbe2Schristos 
15241ebfbe2Schristos /* The state buf must be large enough to hold one state per character in the main buffer.
15341ebfbe2Schristos  */
15441ebfbe2Schristos #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
15541ebfbe2Schristos 
15641ebfbe2Schristos #ifndef YY_TYPEDEF_YY_BUFFER_STATE
15741ebfbe2Schristos #define YY_TYPEDEF_YY_BUFFER_STATE
15841ebfbe2Schristos typedef struct yy_buffer_state *YY_BUFFER_STATE;
15941ebfbe2Schristos #endif
16041ebfbe2Schristos 
16141ebfbe2Schristos extern int yyleng;
16241ebfbe2Schristos 
16341ebfbe2Schristos extern FILE *yyin, *yyout;
16441ebfbe2Schristos 
16541ebfbe2Schristos #define EOB_ACT_CONTINUE_SCAN 0
16641ebfbe2Schristos #define EOB_ACT_END_OF_FILE 1
16741ebfbe2Schristos #define EOB_ACT_LAST_MATCH 2
16841ebfbe2Schristos 
16941ebfbe2Schristos     #define YY_LESS_LINENO(n)
17041ebfbe2Schristos 
17141ebfbe2Schristos /* Return all but the first "n" matched characters back to the input stream. */
17241ebfbe2Schristos #define yyless(n) \
17341ebfbe2Schristos 	do \
17441ebfbe2Schristos 		{ \
17541ebfbe2Schristos 		/* Undo effects of setting up yytext. */ \
17641ebfbe2Schristos         int yyless_macro_arg = (n); \
17741ebfbe2Schristos         YY_LESS_LINENO(yyless_macro_arg);\
17841ebfbe2Schristos 		*yy_cp = (yy_hold_char); \
17941ebfbe2Schristos 		YY_RESTORE_YY_MORE_OFFSET \
18041ebfbe2Schristos 		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
18141ebfbe2Schristos 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
18241ebfbe2Schristos 		} \
18341ebfbe2Schristos 	while ( 0 )
18441ebfbe2Schristos 
18541ebfbe2Schristos #define unput(c) yyunput( c, (yytext_ptr)  )
18641ebfbe2Schristos 
18741ebfbe2Schristos #ifndef YY_TYPEDEF_YY_SIZE_T
18841ebfbe2Schristos #define YY_TYPEDEF_YY_SIZE_T
18941ebfbe2Schristos typedef size_t yy_size_t;
19041ebfbe2Schristos #endif
19141ebfbe2Schristos 
19241ebfbe2Schristos #ifndef YY_STRUCT_YY_BUFFER_STATE
19341ebfbe2Schristos #define YY_STRUCT_YY_BUFFER_STATE
19441ebfbe2Schristos struct yy_buffer_state
19541ebfbe2Schristos 	{
19641ebfbe2Schristos 	FILE *yy_input_file;
19741ebfbe2Schristos 
19841ebfbe2Schristos 	char *yy_ch_buf;		/* input buffer */
19941ebfbe2Schristos 	char *yy_buf_pos;		/* current position in input buffer */
20041ebfbe2Schristos 
20141ebfbe2Schristos 	/* Size of input buffer in bytes, not including room for EOB
20241ebfbe2Schristos 	 * characters.
20341ebfbe2Schristos 	 */
20441ebfbe2Schristos 	yy_size_t yy_buf_size;
20541ebfbe2Schristos 
20641ebfbe2Schristos 	/* Number of characters read into yy_ch_buf, not including EOB
20741ebfbe2Schristos 	 * characters.
20841ebfbe2Schristos 	 */
20941ebfbe2Schristos 	int yy_n_chars;
21041ebfbe2Schristos 
21141ebfbe2Schristos 	/* Whether we "own" the buffer - i.e., we know we created it,
21241ebfbe2Schristos 	 * and can realloc() it to grow it, and should free() it to
21341ebfbe2Schristos 	 * delete it.
21441ebfbe2Schristos 	 */
21541ebfbe2Schristos 	int yy_is_our_buffer;
21641ebfbe2Schristos 
21741ebfbe2Schristos 	/* Whether this is an "interactive" input source; if so, and
21841ebfbe2Schristos 	 * if we're using stdio for input, then we want to use getc()
21941ebfbe2Schristos 	 * instead of fread(), to make sure we stop fetching input after
22041ebfbe2Schristos 	 * each newline.
22141ebfbe2Schristos 	 */
22241ebfbe2Schristos 	int yy_is_interactive;
22341ebfbe2Schristos 
22441ebfbe2Schristos 	/* Whether we're considered to be at the beginning of a line.
22541ebfbe2Schristos 	 * If so, '^' rules will be active on the next match, otherwise
22641ebfbe2Schristos 	 * not.
22741ebfbe2Schristos 	 */
22841ebfbe2Schristos 	int yy_at_bol;
22941ebfbe2Schristos 
23041ebfbe2Schristos     int yy_bs_lineno; /**< The line count. */
23141ebfbe2Schristos     int yy_bs_column; /**< The column count. */
23241ebfbe2Schristos 
23341ebfbe2Schristos 	/* Whether to try to fill the input buffer when we reach the
23441ebfbe2Schristos 	 * end of it.
23541ebfbe2Schristos 	 */
23641ebfbe2Schristos 	int yy_fill_buffer;
23741ebfbe2Schristos 
23841ebfbe2Schristos 	int yy_buffer_status;
23941ebfbe2Schristos 
24041ebfbe2Schristos #define YY_BUFFER_NEW 0
24141ebfbe2Schristos #define YY_BUFFER_NORMAL 1
24241ebfbe2Schristos 	/* When an EOF's been seen but there's still some text to process
24341ebfbe2Schristos 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
24441ebfbe2Schristos 	 * shouldn't try reading from the input source any more.  We might
24541ebfbe2Schristos 	 * still have a bunch of tokens to match, though, because of
24641ebfbe2Schristos 	 * possible backing-up.
24741ebfbe2Schristos 	 *
24841ebfbe2Schristos 	 * When we actually see the EOF, we change the status to "new"
24941ebfbe2Schristos 	 * (via yyrestart()), so that the user can continue scanning by
25041ebfbe2Schristos 	 * just pointing yyin at a new input file.
25141ebfbe2Schristos 	 */
25241ebfbe2Schristos #define YY_BUFFER_EOF_PENDING 2
25341ebfbe2Schristos 
25441ebfbe2Schristos 	};
25541ebfbe2Schristos #endif /* !YY_STRUCT_YY_BUFFER_STATE */
25641ebfbe2Schristos 
25741ebfbe2Schristos /* Stack of input buffers. */
25841ebfbe2Schristos static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
25941ebfbe2Schristos static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
26041ebfbe2Schristos static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
26141ebfbe2Schristos 
26241ebfbe2Schristos /* We provide macros for accessing buffer states in case in the
26341ebfbe2Schristos  * future we want to put the buffer states in a more general
26441ebfbe2Schristos  * "scanner state".
26541ebfbe2Schristos  *
26641ebfbe2Schristos  * Returns the top of the stack, or NULL.
26741ebfbe2Schristos  */
26841ebfbe2Schristos #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
26941ebfbe2Schristos                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
27041ebfbe2Schristos                           : NULL)
27141ebfbe2Schristos 
27241ebfbe2Schristos /* Same as previous macro, but useful when we know that the buffer stack is not
27341ebfbe2Schristos  * NULL or when we need an lvalue. For internal use only.
27441ebfbe2Schristos  */
27541ebfbe2Schristos #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
27641ebfbe2Schristos 
27741ebfbe2Schristos /* yy_hold_char holds the character lost when yytext is formed. */
27841ebfbe2Schristos static char yy_hold_char;
27941ebfbe2Schristos static int yy_n_chars;		/* number of characters read into yy_ch_buf */
28041ebfbe2Schristos int yyleng;
28141ebfbe2Schristos 
28241ebfbe2Schristos /* Points to current character in buffer. */
28341ebfbe2Schristos static char *yy_c_buf_p = (char *) 0;
28441ebfbe2Schristos static int yy_init = 0;		/* whether we need to initialize */
28541ebfbe2Schristos static int yy_start = 0;	/* start state number */
28641ebfbe2Schristos 
28741ebfbe2Schristos /* Flag which is used to allow yywrap()'s to do buffer switches
28841ebfbe2Schristos  * instead of setting up a fresh yyin.  A bit of a hack ...
28941ebfbe2Schristos  */
29041ebfbe2Schristos static int yy_did_buffer_switch_on_eof;
29141ebfbe2Schristos 
29241ebfbe2Schristos void yyrestart (FILE *input_file  );
29341ebfbe2Schristos void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
29441ebfbe2Schristos YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
29541ebfbe2Schristos void yy_delete_buffer (YY_BUFFER_STATE b  );
29641ebfbe2Schristos void yy_flush_buffer (YY_BUFFER_STATE b  );
29741ebfbe2Schristos void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
29841ebfbe2Schristos void yypop_buffer_state (void );
29941ebfbe2Schristos 
30041ebfbe2Schristos static void yyensure_buffer_stack (void );
30141ebfbe2Schristos static void yy_load_buffer_state (void );
30241ebfbe2Schristos static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
30341ebfbe2Schristos 
30441ebfbe2Schristos #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
30541ebfbe2Schristos 
30641ebfbe2Schristos YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
30741ebfbe2Schristos YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
30841ebfbe2Schristos YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
30941ebfbe2Schristos 
31041ebfbe2Schristos void *yyalloc (yy_size_t  );
31141ebfbe2Schristos void *yyrealloc (void *,yy_size_t  );
31241ebfbe2Schristos void yyfree (void *  );
31341ebfbe2Schristos 
31441ebfbe2Schristos #define yy_new_buffer yy_create_buffer
31541ebfbe2Schristos 
31641ebfbe2Schristos #define yy_set_interactive(is_interactive) \
31741ebfbe2Schristos 	{ \
31841ebfbe2Schristos 	if ( ! YY_CURRENT_BUFFER ){ \
31941ebfbe2Schristos         yyensure_buffer_stack (); \
32041ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE =    \
32141ebfbe2Schristos             yy_create_buffer(yyin,YY_BUF_SIZE ); \
32241ebfbe2Schristos 	} \
32341ebfbe2Schristos 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
32441ebfbe2Schristos 	}
32541ebfbe2Schristos 
32641ebfbe2Schristos #define yy_set_bol(at_bol) \
32741ebfbe2Schristos 	{ \
32841ebfbe2Schristos 	if ( ! YY_CURRENT_BUFFER ){\
32941ebfbe2Schristos         yyensure_buffer_stack (); \
33041ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE =    \
33141ebfbe2Schristos             yy_create_buffer(yyin,YY_BUF_SIZE ); \
33241ebfbe2Schristos 	} \
33341ebfbe2Schristos 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
33441ebfbe2Schristos 	}
33541ebfbe2Schristos 
33641ebfbe2Schristos #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
33741ebfbe2Schristos 
33841ebfbe2Schristos /* Begin user sect3 */
33941ebfbe2Schristos 
34041ebfbe2Schristos typedef unsigned char YY_CHAR;
34141ebfbe2Schristos 
34241ebfbe2Schristos FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
34341ebfbe2Schristos 
34441ebfbe2Schristos typedef int yy_state_type;
34541ebfbe2Schristos 
34641ebfbe2Schristos extern int yylineno;
34741ebfbe2Schristos 
34841ebfbe2Schristos int yylineno = 1;
34941ebfbe2Schristos 
35041ebfbe2Schristos extern char *yytext;
35141ebfbe2Schristos #define yytext_ptr yytext
35241ebfbe2Schristos 
35341ebfbe2Schristos static yy_state_type yy_get_previous_state (void );
35441ebfbe2Schristos static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
35541ebfbe2Schristos static int yy_get_next_buffer (void );
35641ebfbe2Schristos static void yy_fatal_error (yyconst char msg[]  );
35741ebfbe2Schristos 
35841ebfbe2Schristos /* Done after the current pattern has been matched and before the
35941ebfbe2Schristos  * corresponding action - sets up yytext.
36041ebfbe2Schristos  */
36141ebfbe2Schristos #define YY_DO_BEFORE_ACTION \
36241ebfbe2Schristos 	(yytext_ptr) = yy_bp; \
36341ebfbe2Schristos 	yyleng = (size_t) (yy_cp - yy_bp); \
36441ebfbe2Schristos 	(yy_hold_char) = *yy_cp; \
36541ebfbe2Schristos 	*yy_cp = '\0'; \
36641ebfbe2Schristos 	(yy_c_buf_p) = yy_cp;
36741ebfbe2Schristos 
36841ebfbe2Schristos #define YY_NUM_RULES 13
36941ebfbe2Schristos #define YY_END_OF_BUFFER 14
37041ebfbe2Schristos /* This struct is not used in this scanner,
37141ebfbe2Schristos    but its presence is necessary. */
37241ebfbe2Schristos struct yy_trans_info
37341ebfbe2Schristos 	{
37441ebfbe2Schristos 	flex_int32_t yy_verify;
37541ebfbe2Schristos 	flex_int32_t yy_nxt;
37641ebfbe2Schristos 	};
37741ebfbe2Schristos static yyconst flex_int16_t yy_accept[33] =
37841ebfbe2Schristos     {   0,
37941ebfbe2Schristos         0,    0,   14,   12,    1,    1,   12,   12,    2,    2,
38041ebfbe2Schristos        12,   12,   12,   12,    1,    9,   10,    2,    0,    0,
38141ebfbe2Schristos         2,    6,    4,    8,    5,    7,   11,    0,    2,    0,
38241ebfbe2Schristos         3,    0
38341ebfbe2Schristos     } ;
38441ebfbe2Schristos 
38541ebfbe2Schristos static yyconst flex_int32_t yy_ec[256] =
38641ebfbe2Schristos     {   0,
38741ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
38841ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
38941ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
39041ebfbe2Schristos         1,    2,    4,    1,    1,    1,    1,    5,    1,    1,
39141ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    6,    7,    7,
39241ebfbe2Schristos         7,    7,    7,    7,    7,    8,    8,    9,    1,   10,
39341ebfbe2Schristos        11,   12,    1,    1,   13,   13,   13,   13,   13,   13,
39441ebfbe2Schristos        14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
39541ebfbe2Schristos        14,   15,   14,   14,   14,   14,   14,   16,   14,   14,
39641ebfbe2Schristos         1,    1,    1,    1,    1,    1,   13,   13,   13,   13,
39741ebfbe2Schristos 
39841ebfbe2Schristos        13,   13,   14,   14,   14,   14,   14,   14,   14,   14,
39941ebfbe2Schristos        14,   14,   14,   15,   14,   14,   14,   14,   14,   16,
40041ebfbe2Schristos        14,   14,    1,   17,    1,    1,    1,    1,    1,    1,
40141ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
40241ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
40341ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
40441ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
40541ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
40641ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
40741ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
40841ebfbe2Schristos 
40941ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
41041ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
41141ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
41241ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
41341ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
41441ebfbe2Schristos         1,    1,    1,    1,    1
41541ebfbe2Schristos     } ;
41641ebfbe2Schristos 
41741ebfbe2Schristos static yyconst flex_int32_t yy_meta[18] =
41841ebfbe2Schristos     {   0,
41941ebfbe2Schristos         1,    1,    1,    1,    1,    2,    2,    2,    1,    1,
42041ebfbe2Schristos         1,    1,    3,    4,    4,    4,    1
42141ebfbe2Schristos     } ;
42241ebfbe2Schristos 
42341ebfbe2Schristos static yyconst flex_int16_t yy_base[37] =
42441ebfbe2Schristos     {   0,
42541ebfbe2Schristos         0,    0,   46,   47,   16,   18,   34,   39,   16,    0,
42641ebfbe2Schristos        14,   32,   15,   25,   26,   47,   47,   27,    0,    0,
42741ebfbe2Schristos         0,   47,   47,   47,   47,   47,   47,   32,    0,    0,
42841ebfbe2Schristos         0,   47,   38,   28,   33,   35
42941ebfbe2Schristos     } ;
43041ebfbe2Schristos 
43141ebfbe2Schristos static yyconst flex_int16_t yy_def[37] =
43241ebfbe2Schristos     {   0,
43341ebfbe2Schristos        32,    1,   32,   32,   32,   32,   32,   32,   32,   33,
43441ebfbe2Schristos        32,   32,   32,   32,   32,   32,   32,   32,   34,   35,
43541ebfbe2Schristos        33,   32,   32,   32,   32,   32,   32,   34,   35,   36,
43641ebfbe2Schristos        36,    0,   32,   32,   32,   32
43741ebfbe2Schristos     } ;
43841ebfbe2Schristos 
43941ebfbe2Schristos static yyconst flex_int16_t yy_nxt[65] =
44041ebfbe2Schristos     {   0,
44141ebfbe2Schristos         4,    5,    6,    7,    8,    9,   10,   10,    4,   11,
44241ebfbe2Schristos        12,   13,    4,    4,    4,    4,   14,   15,   15,   15,
44341ebfbe2Schristos        15,   18,   18,   22,   23,   25,   26,   15,   15,   28,
44441ebfbe2Schristos        19,   20,   18,   18,   29,   29,   31,   31,   31,   21,
44541ebfbe2Schristos        30,   27,   24,   17,   16,   32,    3,   32,   32,   32,
44641ebfbe2Schristos        32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
44741ebfbe2Schristos        32,   32,   32,   32
44841ebfbe2Schristos     } ;
44941ebfbe2Schristos 
45041ebfbe2Schristos static yyconst flex_int16_t yy_chk[65] =
45141ebfbe2Schristos     {   0,
45241ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
45341ebfbe2Schristos         1,    1,    1,    1,    1,    1,    1,    5,    5,    6,
45441ebfbe2Schristos         6,    9,    9,   11,   11,   13,   13,   15,   15,   34,
45541ebfbe2Schristos         9,    9,   18,   18,   35,   35,   36,   36,   36,   33,
45641ebfbe2Schristos        28,   14,   12,    8,    7,    3,   32,   32,   32,   32,
45741ebfbe2Schristos        32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
45841ebfbe2Schristos        32,   32,   32,   32
45941ebfbe2Schristos     } ;
46041ebfbe2Schristos 
46141ebfbe2Schristos static yy_state_type yy_last_accepting_state;
46241ebfbe2Schristos static char *yy_last_accepting_cpos;
46341ebfbe2Schristos 
46441ebfbe2Schristos extern int yy_flex_debug;
46541ebfbe2Schristos int yy_flex_debug = 0;
46641ebfbe2Schristos 
46741ebfbe2Schristos /* The intent behind this definition is that it'll catch
46841ebfbe2Schristos  * any uses of REJECT which flex missed.
46941ebfbe2Schristos  */
47041ebfbe2Schristos #define REJECT reject_used_but_not_detected
47141ebfbe2Schristos #define yymore() yymore_used_but_not_detected
47241ebfbe2Schristos #define YY_MORE_ADJ 0
47341ebfbe2Schristos #define YY_RESTORE_YY_MORE_OFFSET
47441ebfbe2Schristos char *yytext;
475*912aaddfSuebayasi #line 1 "../../../usr.bin/m4/tokenizer.l"
476*912aaddfSuebayasi #line 2 "../../../usr.bin/m4/tokenizer.l"
47741ebfbe2Schristos /* NetBSD: tokenizer.l,v 1.2 2009/10/26 21:11:28 christos Exp  */
47841ebfbe2Schristos /* $OpenBSD: tokenizer.l,v 1.6 2008/08/21 21:00:14 espie Exp $ */
47941ebfbe2Schristos /*
48041ebfbe2Schristos  * Copyright (c) 2004 Marc Espie <espie@cvs.openbsd.org>
48141ebfbe2Schristos  *
48241ebfbe2Schristos  * Permission to use, copy, modify, and distribute this software for any
48341ebfbe2Schristos  * purpose with or without fee is hereby granted, provided that the above
48441ebfbe2Schristos  * copyright notice and this permission notice appear in all copies.
48541ebfbe2Schristos  *
48641ebfbe2Schristos  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
48741ebfbe2Schristos  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
48841ebfbe2Schristos  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
48941ebfbe2Schristos  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
49041ebfbe2Schristos  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
49141ebfbe2Schristos  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
49241ebfbe2Schristos  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
49341ebfbe2Schristos  */
49441ebfbe2Schristos #if HAVE_NBTOOL_CONFIG_H
49541ebfbe2Schristos #include "nbtool_config.h"
49641ebfbe2Schristos #endif
49741ebfbe2Schristos #include "parser.h"
49841ebfbe2Schristos __RCSID("NetBSD: tokenizer.l,v 1.2 2009/10/26 21:11:28 christos Exp ");
49941ebfbe2Schristos #include <stdlib.h>
50041ebfbe2Schristos #include <errno.h>
50141ebfbe2Schristos #include <stdint.h>
50241ebfbe2Schristos #include <limits.h>
50341ebfbe2Schristos 
50441ebfbe2Schristos extern int mimic_gnu;
50541ebfbe2Schristos extern int32_t yylval;
50641ebfbe2Schristos extern int yylex(void);
50741ebfbe2Schristos extern int yywrap(void);
50841ebfbe2Schristos 
50941ebfbe2Schristos int32_t number(void);
51041ebfbe2Schristos int32_t parse_radix(void);
51141ebfbe2Schristos #line 509 "tokenizer.c"
51241ebfbe2Schristos 
51341ebfbe2Schristos #define INITIAL 0
51441ebfbe2Schristos 
51541ebfbe2Schristos #ifndef YY_NO_UNISTD_H
51641ebfbe2Schristos /* Special case for "unistd.h", since it is non-ANSI. We include it way
51741ebfbe2Schristos  * down here because we want the user's section 1 to have been scanned first.
51841ebfbe2Schristos  * The user has a chance to override it with an option.
51941ebfbe2Schristos  */
52041ebfbe2Schristos #include <unistd.h>
52141ebfbe2Schristos #endif
52241ebfbe2Schristos 
52341ebfbe2Schristos #ifndef YY_EXTRA_TYPE
52441ebfbe2Schristos #define YY_EXTRA_TYPE void *
52541ebfbe2Schristos #endif
52641ebfbe2Schristos 
52741ebfbe2Schristos static int yy_init_globals (void );
52841ebfbe2Schristos 
52941ebfbe2Schristos /* Accessor methods to globals.
53041ebfbe2Schristos    These are made visible to non-reentrant scanners for convenience. */
53141ebfbe2Schristos 
53241ebfbe2Schristos int yylex_destroy (void );
53341ebfbe2Schristos 
53441ebfbe2Schristos int yyget_debug (void );
53541ebfbe2Schristos 
53641ebfbe2Schristos void yyset_debug (int debug_flag  );
53741ebfbe2Schristos 
53841ebfbe2Schristos YY_EXTRA_TYPE yyget_extra (void );
53941ebfbe2Schristos 
54041ebfbe2Schristos void yyset_extra (YY_EXTRA_TYPE user_defined  );
54141ebfbe2Schristos 
54241ebfbe2Schristos FILE *yyget_in (void );
54341ebfbe2Schristos 
54441ebfbe2Schristos void yyset_in  (FILE * in_str  );
54541ebfbe2Schristos 
54641ebfbe2Schristos FILE *yyget_out (void );
54741ebfbe2Schristos 
54841ebfbe2Schristos void yyset_out  (FILE * out_str  );
54941ebfbe2Schristos 
55041ebfbe2Schristos int yyget_leng (void );
55141ebfbe2Schristos 
55241ebfbe2Schristos char *yyget_text (void );
55341ebfbe2Schristos 
55441ebfbe2Schristos int yyget_lineno (void );
55541ebfbe2Schristos 
55641ebfbe2Schristos void yyset_lineno (int line_number  );
55741ebfbe2Schristos 
55841ebfbe2Schristos /* Macros after this point can all be overridden by user definitions in
55941ebfbe2Schristos  * section 1.
56041ebfbe2Schristos  */
56141ebfbe2Schristos 
56241ebfbe2Schristos #ifndef YY_SKIP_YYWRAP
56341ebfbe2Schristos #ifdef __cplusplus
56441ebfbe2Schristos extern "C" int yywrap (void );
56541ebfbe2Schristos #else
56641ebfbe2Schristos extern int yywrap (void );
56741ebfbe2Schristos #endif
56841ebfbe2Schristos #endif
56941ebfbe2Schristos 
57041ebfbe2Schristos #ifndef YY_NO_UNPUT
57141ebfbe2Schristos 
57241ebfbe2Schristos     static void yyunput (int c,char *buf_ptr  );
57341ebfbe2Schristos 
57441ebfbe2Schristos #endif
57541ebfbe2Schristos 
57641ebfbe2Schristos #ifndef yytext_ptr
57741ebfbe2Schristos static void yy_flex_strncpy (char *,yyconst char *,int );
57841ebfbe2Schristos #endif
57941ebfbe2Schristos 
58041ebfbe2Schristos #ifdef YY_NEED_STRLEN
58141ebfbe2Schristos static int yy_flex_strlen (yyconst char * );
58241ebfbe2Schristos #endif
58341ebfbe2Schristos 
58441ebfbe2Schristos #ifndef YY_NO_INPUT
58541ebfbe2Schristos 
58641ebfbe2Schristos #ifdef __cplusplus
58741ebfbe2Schristos static int yyinput (void );
58841ebfbe2Schristos #else
58941ebfbe2Schristos static int input (void );
59041ebfbe2Schristos #endif
59141ebfbe2Schristos 
59241ebfbe2Schristos #endif
59341ebfbe2Schristos 
59441ebfbe2Schristos /* Amount of stuff to slurp up with each read. */
59541ebfbe2Schristos #ifndef YY_READ_BUF_SIZE
59641ebfbe2Schristos #define YY_READ_BUF_SIZE 8192
59741ebfbe2Schristos #endif
59841ebfbe2Schristos 
59941ebfbe2Schristos /* Copy whatever the last rule matched to the standard output. */
60041ebfbe2Schristos #ifndef ECHO
60141ebfbe2Schristos /* This used to be an fputs(), but since the string might contain NUL's,
60241ebfbe2Schristos  * we now use fwrite().
60341ebfbe2Schristos  */
60441ebfbe2Schristos #define ECHO fwrite( yytext, yyleng, 1, yyout )
60541ebfbe2Schristos #endif
60641ebfbe2Schristos 
60741ebfbe2Schristos /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
60841ebfbe2Schristos  * is returned in "result".
60941ebfbe2Schristos  */
61041ebfbe2Schristos #ifndef YY_INPUT
61141ebfbe2Schristos #define YY_INPUT(buf,result,max_size) \
61241ebfbe2Schristos 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
61341ebfbe2Schristos 		{ \
61441ebfbe2Schristos 		int c = '*'; \
61541ebfbe2Schristos 		size_t n; \
61641ebfbe2Schristos 		for ( n = 0; n < max_size && \
61741ebfbe2Schristos 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
61841ebfbe2Schristos 			buf[n] = (char) c; \
61941ebfbe2Schristos 		if ( c == '\n' ) \
62041ebfbe2Schristos 			buf[n++] = (char) c; \
62141ebfbe2Schristos 		if ( c == EOF && ferror( yyin ) ) \
62241ebfbe2Schristos 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
62341ebfbe2Schristos 		result = n; \
62441ebfbe2Schristos 		} \
62541ebfbe2Schristos 	else \
62641ebfbe2Schristos 		{ \
62741ebfbe2Schristos 		errno=0; \
62841ebfbe2Schristos 		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
62941ebfbe2Schristos 			{ \
63041ebfbe2Schristos 			if( errno != EINTR) \
63141ebfbe2Schristos 				{ \
63241ebfbe2Schristos 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
63341ebfbe2Schristos 				break; \
63441ebfbe2Schristos 				} \
63541ebfbe2Schristos 			errno=0; \
63641ebfbe2Schristos 			clearerr(yyin); \
63741ebfbe2Schristos 			} \
63841ebfbe2Schristos 		}\
63941ebfbe2Schristos \
64041ebfbe2Schristos 
64141ebfbe2Schristos #endif
64241ebfbe2Schristos 
64341ebfbe2Schristos /* No semi-colon after return; correct usage is to write "yyterminate();" -
64441ebfbe2Schristos  * we don't want an extra ';' after the "return" because that will cause
64541ebfbe2Schristos  * some compilers to complain about unreachable statements.
64641ebfbe2Schristos  */
64741ebfbe2Schristos #ifndef yyterminate
64841ebfbe2Schristos #define yyterminate() return YY_NULL
64941ebfbe2Schristos #endif
65041ebfbe2Schristos 
65141ebfbe2Schristos /* Number of entries by which start-condition stack grows. */
65241ebfbe2Schristos #ifndef YY_START_STACK_INCR
65341ebfbe2Schristos #define YY_START_STACK_INCR 25
65441ebfbe2Schristos #endif
65541ebfbe2Schristos 
65641ebfbe2Schristos /* Report a fatal error. */
65741ebfbe2Schristos #ifndef YY_FATAL_ERROR
65841ebfbe2Schristos #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
65941ebfbe2Schristos #endif
66041ebfbe2Schristos 
66141ebfbe2Schristos /* end tables serialization structures and prototypes */
66241ebfbe2Schristos 
66341ebfbe2Schristos /* Default declaration of generated scanner - a define so the user can
66441ebfbe2Schristos  * easily add parameters.
66541ebfbe2Schristos  */
66641ebfbe2Schristos #ifndef YY_DECL
66741ebfbe2Schristos #define YY_DECL_IS_OURS 1
66841ebfbe2Schristos 
66941ebfbe2Schristos extern int yylex (void);
67041ebfbe2Schristos 
67141ebfbe2Schristos #define YY_DECL int yylex (void)
67241ebfbe2Schristos #endif /* !YY_DECL */
67341ebfbe2Schristos 
67441ebfbe2Schristos /* Code executed at the beginning of each rule, after yytext and yyleng
67541ebfbe2Schristos  * have been set up.
67641ebfbe2Schristos  */
67741ebfbe2Schristos #ifndef YY_USER_ACTION
67841ebfbe2Schristos #define YY_USER_ACTION
67941ebfbe2Schristos #endif
68041ebfbe2Schristos 
68141ebfbe2Schristos /* Code executed at the end of each rule. */
68241ebfbe2Schristos #ifndef YY_BREAK
68341ebfbe2Schristos #define YY_BREAK break;
68441ebfbe2Schristos #endif
68541ebfbe2Schristos 
68641ebfbe2Schristos #define YY_RULE_SETUP \
68741ebfbe2Schristos 	YY_USER_ACTION
68841ebfbe2Schristos 
68941ebfbe2Schristos /** The main scanner function which does all the work.
69041ebfbe2Schristos  */
69141ebfbe2Schristos YY_DECL
69241ebfbe2Schristos {
69341ebfbe2Schristos 	register yy_state_type yy_current_state;
69441ebfbe2Schristos 	register char *yy_cp, *yy_bp;
69541ebfbe2Schristos 	register int yy_act;
69641ebfbe2Schristos 
697*912aaddfSuebayasi #line 45 "../../../usr.bin/m4/tokenizer.l"
69841ebfbe2Schristos 
69941ebfbe2Schristos #line 697 "tokenizer.c"
70041ebfbe2Schristos 
70141ebfbe2Schristos 	if ( !(yy_init) )
70241ebfbe2Schristos 		{
70341ebfbe2Schristos 		(yy_init) = 1;
70441ebfbe2Schristos 
70541ebfbe2Schristos #ifdef YY_USER_INIT
70641ebfbe2Schristos 		YY_USER_INIT;
70741ebfbe2Schristos #endif
70841ebfbe2Schristos 
70941ebfbe2Schristos 		if ( ! (yy_start) )
71041ebfbe2Schristos 			(yy_start) = 1;	/* first start state */
71141ebfbe2Schristos 
71241ebfbe2Schristos 		if ( ! yyin )
71341ebfbe2Schristos 			yyin = stdin;
71441ebfbe2Schristos 
71541ebfbe2Schristos 		if ( ! yyout )
71641ebfbe2Schristos 			yyout = stdout;
71741ebfbe2Schristos 
71841ebfbe2Schristos 		if ( ! YY_CURRENT_BUFFER ) {
71941ebfbe2Schristos 			yyensure_buffer_stack ();
72041ebfbe2Schristos 			YY_CURRENT_BUFFER_LVALUE =
72141ebfbe2Schristos 				yy_create_buffer(yyin,YY_BUF_SIZE );
72241ebfbe2Schristos 		}
72341ebfbe2Schristos 
72441ebfbe2Schristos 		yy_load_buffer_state( );
72541ebfbe2Schristos 		}
72641ebfbe2Schristos 
72741ebfbe2Schristos 	while ( 1 )		/* loops until end-of-file is reached */
72841ebfbe2Schristos 		{
72941ebfbe2Schristos 		yy_cp = (yy_c_buf_p);
73041ebfbe2Schristos 
73141ebfbe2Schristos 		/* Support of yytext. */
73241ebfbe2Schristos 		*yy_cp = (yy_hold_char);
73341ebfbe2Schristos 
73441ebfbe2Schristos 		/* yy_bp points to the position in yy_ch_buf of the start of
73541ebfbe2Schristos 		 * the current run.
73641ebfbe2Schristos 		 */
73741ebfbe2Schristos 		yy_bp = yy_cp;
73841ebfbe2Schristos 
73941ebfbe2Schristos 		yy_current_state = (yy_start);
74041ebfbe2Schristos yy_match:
74141ebfbe2Schristos 		do
74241ebfbe2Schristos 			{
74341ebfbe2Schristos 			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
74441ebfbe2Schristos 			if ( yy_accept[yy_current_state] )
74541ebfbe2Schristos 				{
74641ebfbe2Schristos 				(yy_last_accepting_state) = yy_current_state;
74741ebfbe2Schristos 				(yy_last_accepting_cpos) = yy_cp;
74841ebfbe2Schristos 				}
74941ebfbe2Schristos 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
75041ebfbe2Schristos 				{
75141ebfbe2Schristos 				yy_current_state = (int) yy_def[yy_current_state];
75241ebfbe2Schristos 				if ( yy_current_state >= 33 )
75341ebfbe2Schristos 					yy_c = yy_meta[(unsigned int) yy_c];
75441ebfbe2Schristos 				}
75541ebfbe2Schristos 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
75641ebfbe2Schristos 			++yy_cp;
75741ebfbe2Schristos 			}
75841ebfbe2Schristos 		while ( yy_base[yy_current_state] != 47 );
75941ebfbe2Schristos 
76041ebfbe2Schristos yy_find_action:
76141ebfbe2Schristos 		yy_act = yy_accept[yy_current_state];
76241ebfbe2Schristos 		if ( yy_act == 0 )
76341ebfbe2Schristos 			{ /* have to back up */
76441ebfbe2Schristos 			yy_cp = (yy_last_accepting_cpos);
76541ebfbe2Schristos 			yy_current_state = (yy_last_accepting_state);
76641ebfbe2Schristos 			yy_act = yy_accept[yy_current_state];
76741ebfbe2Schristos 			}
76841ebfbe2Schristos 
76941ebfbe2Schristos 		YY_DO_BEFORE_ACTION;
77041ebfbe2Schristos 
77141ebfbe2Schristos do_action:	/* This label is used only to access EOF actions. */
77241ebfbe2Schristos 
77341ebfbe2Schristos 		switch ( yy_act )
77441ebfbe2Schristos 	{ /* beginning of action switch */
77541ebfbe2Schristos 			case 0: /* must back up */
77641ebfbe2Schristos 			/* undo the effects of YY_DO_BEFORE_ACTION */
77741ebfbe2Schristos 			*yy_cp = (yy_hold_char);
77841ebfbe2Schristos 			yy_cp = (yy_last_accepting_cpos);
77941ebfbe2Schristos 			yy_current_state = (yy_last_accepting_state);
78041ebfbe2Schristos 			goto yy_find_action;
78141ebfbe2Schristos 
78241ebfbe2Schristos case 1:
78341ebfbe2Schristos /* rule 1 can match eol */
78441ebfbe2Schristos YY_RULE_SETUP
785*912aaddfSuebayasi #line 46 "../../../usr.bin/m4/tokenizer.l"
78641ebfbe2Schristos {/* just skip it */}
78741ebfbe2Schristos 	YY_BREAK
78841ebfbe2Schristos case 2:
78941ebfbe2Schristos YY_RULE_SETUP
790*912aaddfSuebayasi #line 47 "../../../usr.bin/m4/tokenizer.l"
79141ebfbe2Schristos { yylval = number(); return(NUMBER); }
79241ebfbe2Schristos 	YY_BREAK
79341ebfbe2Schristos case 3:
79441ebfbe2Schristos YY_RULE_SETUP
795*912aaddfSuebayasi #line 48 "../../../usr.bin/m4/tokenizer.l"
79641ebfbe2Schristos { if (mimic_gnu) {
79741ebfbe2Schristos 				yylval = parse_radix(); return(NUMBER);
79841ebfbe2Schristos 			  } else {
79941ebfbe2Schristos 			  	return(ERROR);
80041ebfbe2Schristos 			  }
80141ebfbe2Schristos 			}
80241ebfbe2Schristos 	YY_BREAK
80341ebfbe2Schristos case 4:
80441ebfbe2Schristos YY_RULE_SETUP
805*912aaddfSuebayasi #line 54 "../../../usr.bin/m4/tokenizer.l"
80641ebfbe2Schristos { return(LE); }
80741ebfbe2Schristos 	YY_BREAK
80841ebfbe2Schristos case 5:
80941ebfbe2Schristos YY_RULE_SETUP
810*912aaddfSuebayasi #line 55 "../../../usr.bin/m4/tokenizer.l"
81141ebfbe2Schristos { return(GE); }
81241ebfbe2Schristos 	YY_BREAK
81341ebfbe2Schristos case 6:
81441ebfbe2Schristos YY_RULE_SETUP
815*912aaddfSuebayasi #line 56 "../../../usr.bin/m4/tokenizer.l"
81641ebfbe2Schristos { return(LSHIFT); }
81741ebfbe2Schristos 	YY_BREAK
81841ebfbe2Schristos case 7:
81941ebfbe2Schristos YY_RULE_SETUP
820*912aaddfSuebayasi #line 57 "../../../usr.bin/m4/tokenizer.l"
82141ebfbe2Schristos { return(RSHIFT); }
82241ebfbe2Schristos 	YY_BREAK
82341ebfbe2Schristos case 8:
82441ebfbe2Schristos YY_RULE_SETUP
825*912aaddfSuebayasi #line 58 "../../../usr.bin/m4/tokenizer.l"
82641ebfbe2Schristos { return(EQ); }
82741ebfbe2Schristos 	YY_BREAK
82841ebfbe2Schristos case 9:
82941ebfbe2Schristos YY_RULE_SETUP
830*912aaddfSuebayasi #line 59 "../../../usr.bin/m4/tokenizer.l"
83141ebfbe2Schristos { return(NE); }
83241ebfbe2Schristos 	YY_BREAK
83341ebfbe2Schristos case 10:
83441ebfbe2Schristos YY_RULE_SETUP
835*912aaddfSuebayasi #line 60 "../../../usr.bin/m4/tokenizer.l"
83641ebfbe2Schristos { return(LAND); }
83741ebfbe2Schristos 	YY_BREAK
83841ebfbe2Schristos case 11:
83941ebfbe2Schristos YY_RULE_SETUP
840*912aaddfSuebayasi #line 61 "../../../usr.bin/m4/tokenizer.l"
84141ebfbe2Schristos { return(LOR); }
84241ebfbe2Schristos 	YY_BREAK
84341ebfbe2Schristos case 12:
84441ebfbe2Schristos YY_RULE_SETUP
845*912aaddfSuebayasi #line 62 "../../../usr.bin/m4/tokenizer.l"
84641ebfbe2Schristos { return yytext[0]; }
84741ebfbe2Schristos 	YY_BREAK
84841ebfbe2Schristos case 13:
84941ebfbe2Schristos YY_RULE_SETUP
850*912aaddfSuebayasi #line 63 "../../../usr.bin/m4/tokenizer.l"
85141ebfbe2Schristos ECHO;
85241ebfbe2Schristos 	YY_BREAK
85341ebfbe2Schristos #line 851 "tokenizer.c"
85441ebfbe2Schristos case YY_STATE_EOF(INITIAL):
85541ebfbe2Schristos 	yyterminate();
85641ebfbe2Schristos 
85741ebfbe2Schristos 	case YY_END_OF_BUFFER:
85841ebfbe2Schristos 		{
85941ebfbe2Schristos 		/* Amount of text matched not including the EOB char. */
86041ebfbe2Schristos 		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
86141ebfbe2Schristos 
86241ebfbe2Schristos 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
86341ebfbe2Schristos 		*yy_cp = (yy_hold_char);
86441ebfbe2Schristos 		YY_RESTORE_YY_MORE_OFFSET
86541ebfbe2Schristos 
86641ebfbe2Schristos 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
86741ebfbe2Schristos 			{
86841ebfbe2Schristos 			/* We're scanning a new file or input source.  It's
86941ebfbe2Schristos 			 * possible that this happened because the user
87041ebfbe2Schristos 			 * just pointed yyin at a new source and called
87141ebfbe2Schristos 			 * yylex().  If so, then we have to assure
87241ebfbe2Schristos 			 * consistency between YY_CURRENT_BUFFER and our
87341ebfbe2Schristos 			 * globals.  Here is the right place to do so, because
87441ebfbe2Schristos 			 * this is the first action (other than possibly a
87541ebfbe2Schristos 			 * back-up) that will match for the new input source.
87641ebfbe2Schristos 			 */
87741ebfbe2Schristos 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
87841ebfbe2Schristos 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
87941ebfbe2Schristos 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
88041ebfbe2Schristos 			}
88141ebfbe2Schristos 
88241ebfbe2Schristos 		/* Note that here we test for yy_c_buf_p "<=" to the position
88341ebfbe2Schristos 		 * of the first EOB in the buffer, since yy_c_buf_p will
88441ebfbe2Schristos 		 * already have been incremented past the NUL character
88541ebfbe2Schristos 		 * (since all states make transitions on EOB to the
88641ebfbe2Schristos 		 * end-of-buffer state).  Contrast this with the test
88741ebfbe2Schristos 		 * in input().
88841ebfbe2Schristos 		 */
88941ebfbe2Schristos 		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
89041ebfbe2Schristos 			{ /* This was really a NUL. */
89141ebfbe2Schristos 			yy_state_type yy_next_state;
89241ebfbe2Schristos 
89341ebfbe2Schristos 			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
89441ebfbe2Schristos 
89541ebfbe2Schristos 			yy_current_state = yy_get_previous_state(  );
89641ebfbe2Schristos 
89741ebfbe2Schristos 			/* Okay, we're now positioned to make the NUL
89841ebfbe2Schristos 			 * transition.  We couldn't have
89941ebfbe2Schristos 			 * yy_get_previous_state() go ahead and do it
90041ebfbe2Schristos 			 * for us because it doesn't know how to deal
90141ebfbe2Schristos 			 * with the possibility of jamming (and we don't
90241ebfbe2Schristos 			 * want to build jamming into it because then it
90341ebfbe2Schristos 			 * will run more slowly).
90441ebfbe2Schristos 			 */
90541ebfbe2Schristos 
90641ebfbe2Schristos 			yy_next_state = yy_try_NUL_trans( yy_current_state );
90741ebfbe2Schristos 
90841ebfbe2Schristos 			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
90941ebfbe2Schristos 
91041ebfbe2Schristos 			if ( yy_next_state )
91141ebfbe2Schristos 				{
91241ebfbe2Schristos 				/* Consume the NUL. */
91341ebfbe2Schristos 				yy_cp = ++(yy_c_buf_p);
91441ebfbe2Schristos 				yy_current_state = yy_next_state;
91541ebfbe2Schristos 				goto yy_match;
91641ebfbe2Schristos 				}
91741ebfbe2Schristos 
91841ebfbe2Schristos 			else
91941ebfbe2Schristos 				{
92041ebfbe2Schristos 				yy_cp = (yy_c_buf_p);
92141ebfbe2Schristos 				goto yy_find_action;
92241ebfbe2Schristos 				}
92341ebfbe2Schristos 			}
92441ebfbe2Schristos 
92541ebfbe2Schristos 		else switch ( yy_get_next_buffer(  ) )
92641ebfbe2Schristos 			{
92741ebfbe2Schristos 			case EOB_ACT_END_OF_FILE:
92841ebfbe2Schristos 				{
92941ebfbe2Schristos 				(yy_did_buffer_switch_on_eof) = 0;
93041ebfbe2Schristos 
93141ebfbe2Schristos 				if ( yywrap( ) )
93241ebfbe2Schristos 					{
93341ebfbe2Schristos 					/* Note: because we've taken care in
93441ebfbe2Schristos 					 * yy_get_next_buffer() to have set up
93541ebfbe2Schristos 					 * yytext, we can now set up
93641ebfbe2Schristos 					 * yy_c_buf_p so that if some total
93741ebfbe2Schristos 					 * hoser (like flex itself) wants to
93841ebfbe2Schristos 					 * call the scanner after we return the
93941ebfbe2Schristos 					 * YY_NULL, it'll still work - another
94041ebfbe2Schristos 					 * YY_NULL will get returned.
94141ebfbe2Schristos 					 */
94241ebfbe2Schristos 					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
94341ebfbe2Schristos 
94441ebfbe2Schristos 					yy_act = YY_STATE_EOF(YY_START);
94541ebfbe2Schristos 					goto do_action;
94641ebfbe2Schristos 					}
94741ebfbe2Schristos 
94841ebfbe2Schristos 				else
94941ebfbe2Schristos 					{
95041ebfbe2Schristos 					if ( ! (yy_did_buffer_switch_on_eof) )
95141ebfbe2Schristos 						YY_NEW_FILE;
95241ebfbe2Schristos 					}
95341ebfbe2Schristos 				break;
95441ebfbe2Schristos 				}
95541ebfbe2Schristos 
95641ebfbe2Schristos 			case EOB_ACT_CONTINUE_SCAN:
95741ebfbe2Schristos 				(yy_c_buf_p) =
95841ebfbe2Schristos 					(yytext_ptr) + yy_amount_of_matched_text;
95941ebfbe2Schristos 
96041ebfbe2Schristos 				yy_current_state = yy_get_previous_state(  );
96141ebfbe2Schristos 
96241ebfbe2Schristos 				yy_cp = (yy_c_buf_p);
96341ebfbe2Schristos 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
96441ebfbe2Schristos 				goto yy_match;
96541ebfbe2Schristos 
96641ebfbe2Schristos 			case EOB_ACT_LAST_MATCH:
96741ebfbe2Schristos 				(yy_c_buf_p) =
96841ebfbe2Schristos 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
96941ebfbe2Schristos 
97041ebfbe2Schristos 				yy_current_state = yy_get_previous_state(  );
97141ebfbe2Schristos 
97241ebfbe2Schristos 				yy_cp = (yy_c_buf_p);
97341ebfbe2Schristos 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
97441ebfbe2Schristos 				goto yy_find_action;
97541ebfbe2Schristos 			}
97641ebfbe2Schristos 		break;
97741ebfbe2Schristos 		}
97841ebfbe2Schristos 
97941ebfbe2Schristos 	default:
98041ebfbe2Schristos 		YY_FATAL_ERROR(
98141ebfbe2Schristos 			"fatal flex scanner internal error--no action found" );
98241ebfbe2Schristos 	} /* end of action switch */
98341ebfbe2Schristos 		} /* end of scanning one token */
98441ebfbe2Schristos } /* end of yylex */
98541ebfbe2Schristos 
98641ebfbe2Schristos /* yy_get_next_buffer - try to read in a new buffer
98741ebfbe2Schristos  *
98841ebfbe2Schristos  * Returns a code representing an action:
98941ebfbe2Schristos  *	EOB_ACT_LAST_MATCH -
99041ebfbe2Schristos  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
99141ebfbe2Schristos  *	EOB_ACT_END_OF_FILE - end of file
99241ebfbe2Schristos  */
yy_get_next_buffer(void)99341ebfbe2Schristos static int yy_get_next_buffer (void)
99441ebfbe2Schristos {
99541ebfbe2Schristos     	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
99641ebfbe2Schristos 	register char *source = (yytext_ptr);
99741ebfbe2Schristos 	register int number_to_move, i;
99841ebfbe2Schristos 	int ret_val;
99941ebfbe2Schristos 
100041ebfbe2Schristos 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
100141ebfbe2Schristos 		YY_FATAL_ERROR(
100241ebfbe2Schristos 		"fatal flex scanner internal error--end of buffer missed" );
100341ebfbe2Schristos 
100441ebfbe2Schristos 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
100541ebfbe2Schristos 		{ /* Don't try to fill the buffer, so this is an EOF. */
100641ebfbe2Schristos 		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
100741ebfbe2Schristos 			{
100841ebfbe2Schristos 			/* We matched a single character, the EOB, so
100941ebfbe2Schristos 			 * treat this as a final EOF.
101041ebfbe2Schristos 			 */
101141ebfbe2Schristos 			return EOB_ACT_END_OF_FILE;
101241ebfbe2Schristos 			}
101341ebfbe2Schristos 
101441ebfbe2Schristos 		else
101541ebfbe2Schristos 			{
101641ebfbe2Schristos 			/* We matched some text prior to the EOB, first
101741ebfbe2Schristos 			 * process it.
101841ebfbe2Schristos 			 */
101941ebfbe2Schristos 			return EOB_ACT_LAST_MATCH;
102041ebfbe2Schristos 			}
102141ebfbe2Schristos 		}
102241ebfbe2Schristos 
102341ebfbe2Schristos 	/* Try to read more data. */
102441ebfbe2Schristos 
102541ebfbe2Schristos 	/* First move last chars to start of buffer. */
102641ebfbe2Schristos 	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
102741ebfbe2Schristos 
102841ebfbe2Schristos 	for ( i = 0; i < number_to_move; ++i )
102941ebfbe2Schristos 		*(dest++) = *(source++);
103041ebfbe2Schristos 
103141ebfbe2Schristos 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
103241ebfbe2Schristos 		/* don't do the read, it's not guaranteed to return an EOF,
103341ebfbe2Schristos 		 * just force an EOF
103441ebfbe2Schristos 		 */
103541ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
103641ebfbe2Schristos 
103741ebfbe2Schristos 	else
103841ebfbe2Schristos 		{
103941ebfbe2Schristos 			int num_to_read =
104041ebfbe2Schristos 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
104141ebfbe2Schristos 
104241ebfbe2Schristos 		while ( num_to_read <= 0 )
104341ebfbe2Schristos 			{ /* Not enough room in the buffer - grow it. */
104441ebfbe2Schristos 
104541ebfbe2Schristos 			/* just a shorter name for the current buffer */
104641ebfbe2Schristos 			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
104741ebfbe2Schristos 
104841ebfbe2Schristos 			int yy_c_buf_p_offset =
104941ebfbe2Schristos 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
105041ebfbe2Schristos 
105141ebfbe2Schristos 			if ( b->yy_is_our_buffer )
105241ebfbe2Schristos 				{
105341ebfbe2Schristos 				int new_size = b->yy_buf_size * 2;
105441ebfbe2Schristos 
105541ebfbe2Schristos 				if ( new_size <= 0 )
105641ebfbe2Schristos 					b->yy_buf_size += b->yy_buf_size / 8;
105741ebfbe2Schristos 				else
105841ebfbe2Schristos 					b->yy_buf_size *= 2;
105941ebfbe2Schristos 
106041ebfbe2Schristos 				b->yy_ch_buf = (char *)
106141ebfbe2Schristos 					/* Include room in for 2 EOB chars. */
106241ebfbe2Schristos 					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
106341ebfbe2Schristos 				}
106441ebfbe2Schristos 			else
106541ebfbe2Schristos 				/* Can't grow it, we don't own it. */
106641ebfbe2Schristos 				b->yy_ch_buf = 0;
106741ebfbe2Schristos 
106841ebfbe2Schristos 			if ( ! b->yy_ch_buf )
106941ebfbe2Schristos 				YY_FATAL_ERROR(
107041ebfbe2Schristos 				"fatal error - scanner input buffer overflow" );
107141ebfbe2Schristos 
107241ebfbe2Schristos 			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
107341ebfbe2Schristos 
107441ebfbe2Schristos 			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
107541ebfbe2Schristos 						number_to_move - 1;
107641ebfbe2Schristos 
107741ebfbe2Schristos 			}
107841ebfbe2Schristos 
107941ebfbe2Schristos 		if ( num_to_read > YY_READ_BUF_SIZE )
108041ebfbe2Schristos 			num_to_read = YY_READ_BUF_SIZE;
108141ebfbe2Schristos 
108241ebfbe2Schristos 		/* Read in more data. */
108341ebfbe2Schristos 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
108441ebfbe2Schristos 			(yy_n_chars), (size_t) num_to_read );
108541ebfbe2Schristos 
108641ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
108741ebfbe2Schristos 		}
108841ebfbe2Schristos 
108941ebfbe2Schristos 	if ( (yy_n_chars) == 0 )
109041ebfbe2Schristos 		{
109141ebfbe2Schristos 		if ( number_to_move == YY_MORE_ADJ )
109241ebfbe2Schristos 			{
109341ebfbe2Schristos 			ret_val = EOB_ACT_END_OF_FILE;
109441ebfbe2Schristos 			yyrestart(yyin  );
109541ebfbe2Schristos 			}
109641ebfbe2Schristos 
109741ebfbe2Schristos 		else
109841ebfbe2Schristos 			{
109941ebfbe2Schristos 			ret_val = EOB_ACT_LAST_MATCH;
110041ebfbe2Schristos 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
110141ebfbe2Schristos 				YY_BUFFER_EOF_PENDING;
110241ebfbe2Schristos 			}
110341ebfbe2Schristos 		}
110441ebfbe2Schristos 
110541ebfbe2Schristos 	else
110641ebfbe2Schristos 		ret_val = EOB_ACT_CONTINUE_SCAN;
110741ebfbe2Schristos 
110841ebfbe2Schristos 	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
110941ebfbe2Schristos 		/* Extend the array by 50%, plus the number we really need. */
111041ebfbe2Schristos 		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
111141ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
111241ebfbe2Schristos 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
111341ebfbe2Schristos 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
111441ebfbe2Schristos 	}
111541ebfbe2Schristos 
111641ebfbe2Schristos 	(yy_n_chars) += number_to_move;
111741ebfbe2Schristos 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
111841ebfbe2Schristos 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
111941ebfbe2Schristos 
112041ebfbe2Schristos 	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
112141ebfbe2Schristos 
112241ebfbe2Schristos 	return ret_val;
112341ebfbe2Schristos }
112441ebfbe2Schristos 
112541ebfbe2Schristos /* yy_get_previous_state - get the state just before the EOB char was reached */
112641ebfbe2Schristos 
yy_get_previous_state(void)112741ebfbe2Schristos     static yy_state_type yy_get_previous_state (void)
112841ebfbe2Schristos {
112941ebfbe2Schristos 	register yy_state_type yy_current_state;
113041ebfbe2Schristos 	register char *yy_cp;
113141ebfbe2Schristos 
113241ebfbe2Schristos 	yy_current_state = (yy_start);
113341ebfbe2Schristos 
113441ebfbe2Schristos 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
113541ebfbe2Schristos 		{
113641ebfbe2Schristos 		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
113741ebfbe2Schristos 		if ( yy_accept[yy_current_state] )
113841ebfbe2Schristos 			{
113941ebfbe2Schristos 			(yy_last_accepting_state) = yy_current_state;
114041ebfbe2Schristos 			(yy_last_accepting_cpos) = yy_cp;
114141ebfbe2Schristos 			}
114241ebfbe2Schristos 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
114341ebfbe2Schristos 			{
114441ebfbe2Schristos 			yy_current_state = (int) yy_def[yy_current_state];
114541ebfbe2Schristos 			if ( yy_current_state >= 33 )
114641ebfbe2Schristos 				yy_c = yy_meta[(unsigned int) yy_c];
114741ebfbe2Schristos 			}
114841ebfbe2Schristos 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
114941ebfbe2Schristos 		}
115041ebfbe2Schristos 
115141ebfbe2Schristos 	return yy_current_state;
115241ebfbe2Schristos }
115341ebfbe2Schristos 
115441ebfbe2Schristos /* yy_try_NUL_trans - try to make a transition on the NUL character
115541ebfbe2Schristos  *
115641ebfbe2Schristos  * synopsis
115741ebfbe2Schristos  *	next_state = yy_try_NUL_trans( current_state );
115841ebfbe2Schristos  */
yy_try_NUL_trans(yy_state_type yy_current_state)115941ebfbe2Schristos     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
116041ebfbe2Schristos {
116141ebfbe2Schristos 	register int yy_is_jam;
116241ebfbe2Schristos     	register char *yy_cp = (yy_c_buf_p);
116341ebfbe2Schristos 
116441ebfbe2Schristos 	register YY_CHAR yy_c = 1;
116541ebfbe2Schristos 	if ( yy_accept[yy_current_state] )
116641ebfbe2Schristos 		{
116741ebfbe2Schristos 		(yy_last_accepting_state) = yy_current_state;
116841ebfbe2Schristos 		(yy_last_accepting_cpos) = yy_cp;
116941ebfbe2Schristos 		}
117041ebfbe2Schristos 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
117141ebfbe2Schristos 		{
117241ebfbe2Schristos 		yy_current_state = (int) yy_def[yy_current_state];
117341ebfbe2Schristos 		if ( yy_current_state >= 33 )
117441ebfbe2Schristos 			yy_c = yy_meta[(unsigned int) yy_c];
117541ebfbe2Schristos 		}
117641ebfbe2Schristos 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
117741ebfbe2Schristos 	yy_is_jam = (yy_current_state == 32);
117841ebfbe2Schristos 
117941ebfbe2Schristos 	return yy_is_jam ? 0 : yy_current_state;
118041ebfbe2Schristos }
118141ebfbe2Schristos 
118241ebfbe2Schristos #ifndef YY_NO_UNPUT
118341ebfbe2Schristos 
yyunput(int c,register char * yy_bp)118441ebfbe2Schristos     static void yyunput (int c, register char * yy_bp )
118541ebfbe2Schristos {
118641ebfbe2Schristos 	register char *yy_cp;
118741ebfbe2Schristos 
118841ebfbe2Schristos     yy_cp = (yy_c_buf_p);
118941ebfbe2Schristos 
119041ebfbe2Schristos 	/* undo effects of setting up yytext */
119141ebfbe2Schristos 	*yy_cp = (yy_hold_char);
119241ebfbe2Schristos 
119341ebfbe2Schristos 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
119441ebfbe2Schristos 		{ /* need to shift things up to make room */
119541ebfbe2Schristos 		/* +2 for EOB chars. */
119641ebfbe2Schristos 		register int number_to_move = (yy_n_chars) + 2;
119741ebfbe2Schristos 		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
119841ebfbe2Schristos 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
119941ebfbe2Schristos 		register char *source =
120041ebfbe2Schristos 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
120141ebfbe2Schristos 
120241ebfbe2Schristos 		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
120341ebfbe2Schristos 			*--dest = *--source;
120441ebfbe2Schristos 
120541ebfbe2Schristos 		yy_cp += (int) (dest - source);
120641ebfbe2Schristos 		yy_bp += (int) (dest - source);
120741ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
120841ebfbe2Schristos 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
120941ebfbe2Schristos 
121041ebfbe2Schristos 		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
121141ebfbe2Schristos 			YY_FATAL_ERROR( "flex scanner push-back overflow" );
121241ebfbe2Schristos 		}
121341ebfbe2Schristos 
121441ebfbe2Schristos 	*--yy_cp = (char) c;
121541ebfbe2Schristos 
121641ebfbe2Schristos 	(yytext_ptr) = yy_bp;
121741ebfbe2Schristos 	(yy_hold_char) = *yy_cp;
121841ebfbe2Schristos 	(yy_c_buf_p) = yy_cp;
121941ebfbe2Schristos }
122041ebfbe2Schristos 
122141ebfbe2Schristos #endif
122241ebfbe2Schristos 
122341ebfbe2Schristos #ifndef YY_NO_INPUT
122441ebfbe2Schristos #ifdef __cplusplus
yyinput(void)122541ebfbe2Schristos     static int yyinput (void)
122641ebfbe2Schristos #else
122741ebfbe2Schristos     static int input  (void)
122841ebfbe2Schristos #endif
122941ebfbe2Schristos 
123041ebfbe2Schristos {
123141ebfbe2Schristos 	int c;
123241ebfbe2Schristos 
123341ebfbe2Schristos 	*(yy_c_buf_p) = (yy_hold_char);
123441ebfbe2Schristos 
123541ebfbe2Schristos 	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
123641ebfbe2Schristos 		{
123741ebfbe2Schristos 		/* yy_c_buf_p now points to the character we want to return.
123841ebfbe2Schristos 		 * If this occurs *before* the EOB characters, then it's a
123941ebfbe2Schristos 		 * valid NUL; if not, then we've hit the end of the buffer.
124041ebfbe2Schristos 		 */
124141ebfbe2Schristos 		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
124241ebfbe2Schristos 			/* This was really a NUL. */
124341ebfbe2Schristos 			*(yy_c_buf_p) = '\0';
124441ebfbe2Schristos 
124541ebfbe2Schristos 		else
124641ebfbe2Schristos 			{ /* need more input */
124741ebfbe2Schristos 			int offset = (yy_c_buf_p) - (yytext_ptr);
124841ebfbe2Schristos 			++(yy_c_buf_p);
124941ebfbe2Schristos 
125041ebfbe2Schristos 			switch ( yy_get_next_buffer(  ) )
125141ebfbe2Schristos 				{
125241ebfbe2Schristos 				case EOB_ACT_LAST_MATCH:
125341ebfbe2Schristos 					/* This happens because yy_g_n_b()
125441ebfbe2Schristos 					 * sees that we've accumulated a
125541ebfbe2Schristos 					 * token and flags that we need to
125641ebfbe2Schristos 					 * try matching the token before
125741ebfbe2Schristos 					 * proceeding.  But for input(),
125841ebfbe2Schristos 					 * there's no matching to consider.
125941ebfbe2Schristos 					 * So convert the EOB_ACT_LAST_MATCH
126041ebfbe2Schristos 					 * to EOB_ACT_END_OF_FILE.
126141ebfbe2Schristos 					 */
126241ebfbe2Schristos 
126341ebfbe2Schristos 					/* Reset buffer status. */
126441ebfbe2Schristos 					yyrestart(yyin );
126541ebfbe2Schristos 
126641ebfbe2Schristos 					/*FALLTHROUGH*/
126741ebfbe2Schristos 
126841ebfbe2Schristos 				case EOB_ACT_END_OF_FILE:
126941ebfbe2Schristos 					{
127041ebfbe2Schristos 					if ( yywrap( ) )
127141ebfbe2Schristos 						return EOF;
127241ebfbe2Schristos 
127341ebfbe2Schristos 					if ( ! (yy_did_buffer_switch_on_eof) )
127441ebfbe2Schristos 						YY_NEW_FILE;
127541ebfbe2Schristos #ifdef __cplusplus
127641ebfbe2Schristos 					return yyinput();
127741ebfbe2Schristos #else
127841ebfbe2Schristos 					return input();
127941ebfbe2Schristos #endif
128041ebfbe2Schristos 					}
128141ebfbe2Schristos 
128241ebfbe2Schristos 				case EOB_ACT_CONTINUE_SCAN:
128341ebfbe2Schristos 					(yy_c_buf_p) = (yytext_ptr) + offset;
128441ebfbe2Schristos 					break;
128541ebfbe2Schristos 				}
128641ebfbe2Schristos 			}
128741ebfbe2Schristos 		}
128841ebfbe2Schristos 
128941ebfbe2Schristos 	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
129041ebfbe2Schristos 	*(yy_c_buf_p) = '\0';	/* preserve yytext */
129141ebfbe2Schristos 	(yy_hold_char) = *++(yy_c_buf_p);
129241ebfbe2Schristos 
129341ebfbe2Schristos 	return c;
129441ebfbe2Schristos }
129541ebfbe2Schristos #endif	/* ifndef YY_NO_INPUT */
129641ebfbe2Schristos 
129741ebfbe2Schristos /** Immediately switch to a different input stream.
129841ebfbe2Schristos  * @param input_file A readable stream.
129941ebfbe2Schristos  *
130041ebfbe2Schristos  * @note This function does not reset the start condition to @c INITIAL .
130141ebfbe2Schristos  */
yyrestart(FILE * input_file)130241ebfbe2Schristos     void yyrestart  (FILE * input_file )
130341ebfbe2Schristos {
130441ebfbe2Schristos 
130541ebfbe2Schristos 	if ( ! YY_CURRENT_BUFFER ){
130641ebfbe2Schristos         yyensure_buffer_stack ();
130741ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE =
130841ebfbe2Schristos             yy_create_buffer(yyin,YY_BUF_SIZE );
130941ebfbe2Schristos 	}
131041ebfbe2Schristos 
131141ebfbe2Schristos 	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
131241ebfbe2Schristos 	yy_load_buffer_state( );
131341ebfbe2Schristos }
131441ebfbe2Schristos 
131541ebfbe2Schristos /** Switch to a different input buffer.
131641ebfbe2Schristos  * @param new_buffer The new input buffer.
131741ebfbe2Schristos  *
131841ebfbe2Schristos  */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)131941ebfbe2Schristos     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
132041ebfbe2Schristos {
132141ebfbe2Schristos 
132241ebfbe2Schristos 	/* TODO. We should be able to replace this entire function body
132341ebfbe2Schristos 	 * with
132441ebfbe2Schristos 	 *		yypop_buffer_state();
132541ebfbe2Schristos 	 *		yypush_buffer_state(new_buffer);
132641ebfbe2Schristos      */
132741ebfbe2Schristos 	yyensure_buffer_stack ();
132841ebfbe2Schristos 	if ( YY_CURRENT_BUFFER == new_buffer )
132941ebfbe2Schristos 		return;
133041ebfbe2Schristos 
133141ebfbe2Schristos 	if ( YY_CURRENT_BUFFER )
133241ebfbe2Schristos 		{
133341ebfbe2Schristos 		/* Flush out information for old buffer. */
133441ebfbe2Schristos 		*(yy_c_buf_p) = (yy_hold_char);
133541ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
133641ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
133741ebfbe2Schristos 		}
133841ebfbe2Schristos 
133941ebfbe2Schristos 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
134041ebfbe2Schristos 	yy_load_buffer_state( );
134141ebfbe2Schristos 
134241ebfbe2Schristos 	/* We don't actually know whether we did this switch during
134341ebfbe2Schristos 	 * EOF (yywrap()) processing, but the only time this flag
134441ebfbe2Schristos 	 * is looked at is after yywrap() is called, so it's safe
134541ebfbe2Schristos 	 * to go ahead and always set it.
134641ebfbe2Schristos 	 */
134741ebfbe2Schristos 	(yy_did_buffer_switch_on_eof) = 1;
134841ebfbe2Schristos }
134941ebfbe2Schristos 
yy_load_buffer_state(void)135041ebfbe2Schristos static void yy_load_buffer_state  (void)
135141ebfbe2Schristos {
135241ebfbe2Schristos     	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
135341ebfbe2Schristos 	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
135441ebfbe2Schristos 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
135541ebfbe2Schristos 	(yy_hold_char) = *(yy_c_buf_p);
135641ebfbe2Schristos }
135741ebfbe2Schristos 
135841ebfbe2Schristos /** Allocate and initialize an input buffer state.
135941ebfbe2Schristos  * @param file A readable stream.
136041ebfbe2Schristos  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
136141ebfbe2Schristos  *
136241ebfbe2Schristos  * @return the allocated buffer state.
136341ebfbe2Schristos  */
yy_create_buffer(FILE * file,int size)136441ebfbe2Schristos     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
136541ebfbe2Schristos {
136641ebfbe2Schristos 	YY_BUFFER_STATE b;
136741ebfbe2Schristos 
136841ebfbe2Schristos 	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
136941ebfbe2Schristos 	if ( ! b )
137041ebfbe2Schristos 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
137141ebfbe2Schristos 
137241ebfbe2Schristos 	b->yy_buf_size = size;
137341ebfbe2Schristos 
137441ebfbe2Schristos 	/* yy_ch_buf has to be 2 characters longer than the size given because
137541ebfbe2Schristos 	 * we need to put in 2 end-of-buffer characters.
137641ebfbe2Schristos 	 */
137741ebfbe2Schristos 	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
137841ebfbe2Schristos 	if ( ! b->yy_ch_buf )
137941ebfbe2Schristos 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
138041ebfbe2Schristos 
138141ebfbe2Schristos 	b->yy_is_our_buffer = 1;
138241ebfbe2Schristos 
138341ebfbe2Schristos 	yy_init_buffer(b,file );
138441ebfbe2Schristos 
138541ebfbe2Schristos 	return b;
138641ebfbe2Schristos }
138741ebfbe2Schristos 
138841ebfbe2Schristos /** Destroy the buffer.
138941ebfbe2Schristos  * @param b a buffer created with yy_create_buffer()
139041ebfbe2Schristos  *
139141ebfbe2Schristos  */
yy_delete_buffer(YY_BUFFER_STATE b)139241ebfbe2Schristos     void yy_delete_buffer (YY_BUFFER_STATE  b )
139341ebfbe2Schristos {
139441ebfbe2Schristos 
139541ebfbe2Schristos 	if ( ! b )
139641ebfbe2Schristos 		return;
139741ebfbe2Schristos 
139841ebfbe2Schristos 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
139941ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
140041ebfbe2Schristos 
140141ebfbe2Schristos 	if ( b->yy_is_our_buffer )
140241ebfbe2Schristos 		yyfree((void *) b->yy_ch_buf  );
140341ebfbe2Schristos 
140441ebfbe2Schristos 	yyfree((void *) b  );
140541ebfbe2Schristos }
140641ebfbe2Schristos 
140741ebfbe2Schristos #ifndef __cplusplus
140841ebfbe2Schristos extern int isatty (int );
140941ebfbe2Schristos #endif /* __cplusplus */
141041ebfbe2Schristos 
141141ebfbe2Schristos /* Initializes or reinitializes a buffer.
141241ebfbe2Schristos  * This function is sometimes called more than once on the same buffer,
141341ebfbe2Schristos  * such as during a yyrestart() or at EOF.
141441ebfbe2Schristos  */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)141541ebfbe2Schristos     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
141641ebfbe2Schristos 
141741ebfbe2Schristos {
141841ebfbe2Schristos 	int oerrno = errno;
141941ebfbe2Schristos 
142041ebfbe2Schristos 	yy_flush_buffer(b );
142141ebfbe2Schristos 
142241ebfbe2Schristos 	b->yy_input_file = file;
142341ebfbe2Schristos 	b->yy_fill_buffer = 1;
142441ebfbe2Schristos 
142541ebfbe2Schristos     /* If b is the current buffer, then yy_init_buffer was _probably_
142641ebfbe2Schristos      * called from yyrestart() or through yy_get_next_buffer.
142741ebfbe2Schristos      * In that case, we don't want to reset the lineno or column.
142841ebfbe2Schristos      */
142941ebfbe2Schristos     if (b != YY_CURRENT_BUFFER){
143041ebfbe2Schristos         b->yy_bs_lineno = 1;
143141ebfbe2Schristos         b->yy_bs_column = 0;
143241ebfbe2Schristos     }
143341ebfbe2Schristos 
143441ebfbe2Schristos         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
143541ebfbe2Schristos 
143641ebfbe2Schristos 	errno = oerrno;
143741ebfbe2Schristos }
143841ebfbe2Schristos 
143941ebfbe2Schristos /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
144041ebfbe2Schristos  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
144141ebfbe2Schristos  *
144241ebfbe2Schristos  */
yy_flush_buffer(YY_BUFFER_STATE b)144341ebfbe2Schristos     void yy_flush_buffer (YY_BUFFER_STATE  b )
144441ebfbe2Schristos {
144541ebfbe2Schristos     	if ( ! b )
144641ebfbe2Schristos 		return;
144741ebfbe2Schristos 
144841ebfbe2Schristos 	b->yy_n_chars = 0;
144941ebfbe2Schristos 
145041ebfbe2Schristos 	/* We always need two end-of-buffer characters.  The first causes
145141ebfbe2Schristos 	 * a transition to the end-of-buffer state.  The second causes
145241ebfbe2Schristos 	 * a jam in that state.
145341ebfbe2Schristos 	 */
145441ebfbe2Schristos 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
145541ebfbe2Schristos 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
145641ebfbe2Schristos 
145741ebfbe2Schristos 	b->yy_buf_pos = &b->yy_ch_buf[0];
145841ebfbe2Schristos 
145941ebfbe2Schristos 	b->yy_at_bol = 1;
146041ebfbe2Schristos 	b->yy_buffer_status = YY_BUFFER_NEW;
146141ebfbe2Schristos 
146241ebfbe2Schristos 	if ( b == YY_CURRENT_BUFFER )
146341ebfbe2Schristos 		yy_load_buffer_state( );
146441ebfbe2Schristos }
146541ebfbe2Schristos 
146641ebfbe2Schristos /** Pushes the new state onto the stack. The new state becomes
146741ebfbe2Schristos  *  the current state. This function will allocate the stack
146841ebfbe2Schristos  *  if necessary.
146941ebfbe2Schristos  *  @param new_buffer The new state.
147041ebfbe2Schristos  *
147141ebfbe2Schristos  */
yypush_buffer_state(YY_BUFFER_STATE new_buffer)147241ebfbe2Schristos void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
147341ebfbe2Schristos {
147441ebfbe2Schristos     	if (new_buffer == NULL)
147541ebfbe2Schristos 		return;
147641ebfbe2Schristos 
147741ebfbe2Schristos 	yyensure_buffer_stack();
147841ebfbe2Schristos 
147941ebfbe2Schristos 	/* This block is copied from yy_switch_to_buffer. */
148041ebfbe2Schristos 	if ( YY_CURRENT_BUFFER )
148141ebfbe2Schristos 		{
148241ebfbe2Schristos 		/* Flush out information for old buffer. */
148341ebfbe2Schristos 		*(yy_c_buf_p) = (yy_hold_char);
148441ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
148541ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
148641ebfbe2Schristos 		}
148741ebfbe2Schristos 
148841ebfbe2Schristos 	/* Only push if top exists. Otherwise, replace top. */
148941ebfbe2Schristos 	if (YY_CURRENT_BUFFER)
149041ebfbe2Schristos 		(yy_buffer_stack_top)++;
149141ebfbe2Schristos 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
149241ebfbe2Schristos 
149341ebfbe2Schristos 	/* copied from yy_switch_to_buffer. */
149441ebfbe2Schristos 	yy_load_buffer_state( );
149541ebfbe2Schristos 	(yy_did_buffer_switch_on_eof) = 1;
149641ebfbe2Schristos }
149741ebfbe2Schristos 
149841ebfbe2Schristos /** Removes and deletes the top of the stack, if present.
149941ebfbe2Schristos  *  The next element becomes the new top.
150041ebfbe2Schristos  *
150141ebfbe2Schristos  */
yypop_buffer_state(void)150241ebfbe2Schristos void yypop_buffer_state (void)
150341ebfbe2Schristos {
150441ebfbe2Schristos     	if (!YY_CURRENT_BUFFER)
150541ebfbe2Schristos 		return;
150641ebfbe2Schristos 
150741ebfbe2Schristos 	yy_delete_buffer(YY_CURRENT_BUFFER );
150841ebfbe2Schristos 	YY_CURRENT_BUFFER_LVALUE = NULL;
150941ebfbe2Schristos 	if ((yy_buffer_stack_top) > 0)
151041ebfbe2Schristos 		--(yy_buffer_stack_top);
151141ebfbe2Schristos 
151241ebfbe2Schristos 	if (YY_CURRENT_BUFFER) {
151341ebfbe2Schristos 		yy_load_buffer_state( );
151441ebfbe2Schristos 		(yy_did_buffer_switch_on_eof) = 1;
151541ebfbe2Schristos 	}
151641ebfbe2Schristos }
151741ebfbe2Schristos 
151841ebfbe2Schristos /* Allocates the stack if it does not exist.
151941ebfbe2Schristos  *  Guarantees space for at least one push.
152041ebfbe2Schristos  */
yyensure_buffer_stack(void)152141ebfbe2Schristos static void yyensure_buffer_stack (void)
152241ebfbe2Schristos {
152341ebfbe2Schristos 	int num_to_alloc;
152441ebfbe2Schristos 
152541ebfbe2Schristos 	if (!(yy_buffer_stack)) {
152641ebfbe2Schristos 
152741ebfbe2Schristos 		/* First allocation is just for 2 elements, since we don't know if this
152841ebfbe2Schristos 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
152941ebfbe2Schristos 		 * immediate realloc on the next call.
153041ebfbe2Schristos          */
153141ebfbe2Schristos 		num_to_alloc = 1;
153241ebfbe2Schristos 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
153341ebfbe2Schristos 								(num_to_alloc * sizeof(struct yy_buffer_state*)
153441ebfbe2Schristos 								);
153541ebfbe2Schristos 		if ( ! (yy_buffer_stack) )
153641ebfbe2Schristos 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
153741ebfbe2Schristos 
153841ebfbe2Schristos 		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
153941ebfbe2Schristos 
154041ebfbe2Schristos 		(yy_buffer_stack_max) = num_to_alloc;
154141ebfbe2Schristos 		(yy_buffer_stack_top) = 0;
154241ebfbe2Schristos 		return;
154341ebfbe2Schristos 	}
154441ebfbe2Schristos 
154541ebfbe2Schristos 	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
154641ebfbe2Schristos 
154741ebfbe2Schristos 		/* Increase the buffer to prepare for a possible push. */
154841ebfbe2Schristos 		int grow_size = 8 /* arbitrary grow size */;
154941ebfbe2Schristos 
155041ebfbe2Schristos 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
155141ebfbe2Schristos 		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
155241ebfbe2Schristos 								((yy_buffer_stack),
155341ebfbe2Schristos 								num_to_alloc * sizeof(struct yy_buffer_state*)
155441ebfbe2Schristos 								);
155541ebfbe2Schristos 		if ( ! (yy_buffer_stack) )
155641ebfbe2Schristos 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
155741ebfbe2Schristos 
155841ebfbe2Schristos 		/* zero only the new slots.*/
155941ebfbe2Schristos 		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
156041ebfbe2Schristos 		(yy_buffer_stack_max) = num_to_alloc;
156141ebfbe2Schristos 	}
156241ebfbe2Schristos }
156341ebfbe2Schristos 
156441ebfbe2Schristos /** Setup the input buffer state to scan directly from a user-specified character buffer.
156541ebfbe2Schristos  * @param base the character buffer
156641ebfbe2Schristos  * @param size the size in bytes of the character buffer
156741ebfbe2Schristos  *
156841ebfbe2Schristos  * @return the newly allocated buffer state object.
156941ebfbe2Schristos  */
yy_scan_buffer(char * base,yy_size_t size)157041ebfbe2Schristos YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
157141ebfbe2Schristos {
157241ebfbe2Schristos 	YY_BUFFER_STATE b;
157341ebfbe2Schristos 
157441ebfbe2Schristos 	if ( size < 2 ||
157541ebfbe2Schristos 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
157641ebfbe2Schristos 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
157741ebfbe2Schristos 		/* They forgot to leave room for the EOB's. */
157841ebfbe2Schristos 		return 0;
157941ebfbe2Schristos 
158041ebfbe2Schristos 	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
158141ebfbe2Schristos 	if ( ! b )
158241ebfbe2Schristos 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
158341ebfbe2Schristos 
158441ebfbe2Schristos 	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
158541ebfbe2Schristos 	b->yy_buf_pos = b->yy_ch_buf = base;
158641ebfbe2Schristos 	b->yy_is_our_buffer = 0;
158741ebfbe2Schristos 	b->yy_input_file = 0;
158841ebfbe2Schristos 	b->yy_n_chars = b->yy_buf_size;
158941ebfbe2Schristos 	b->yy_is_interactive = 0;
159041ebfbe2Schristos 	b->yy_at_bol = 1;
159141ebfbe2Schristos 	b->yy_fill_buffer = 0;
159241ebfbe2Schristos 	b->yy_buffer_status = YY_BUFFER_NEW;
159341ebfbe2Schristos 
159441ebfbe2Schristos 	yy_switch_to_buffer(b  );
159541ebfbe2Schristos 
159641ebfbe2Schristos 	return b;
159741ebfbe2Schristos }
159841ebfbe2Schristos 
159941ebfbe2Schristos /** Setup the input buffer state to scan a string. The next call to yylex() will
160041ebfbe2Schristos  * scan from a @e copy of @a str.
160141ebfbe2Schristos  * @param yystr a NUL-terminated string to scan
160241ebfbe2Schristos  *
160341ebfbe2Schristos  * @return the newly allocated buffer state object.
160441ebfbe2Schristos  * @note If you want to scan bytes that may contain NUL values, then use
160541ebfbe2Schristos  *       yy_scan_bytes() instead.
160641ebfbe2Schristos  */
yy_scan_string(yyconst char * yystr)160741ebfbe2Schristos YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
160841ebfbe2Schristos {
160941ebfbe2Schristos 
161041ebfbe2Schristos 	return yy_scan_bytes(yystr,strlen(yystr) );
161141ebfbe2Schristos }
161241ebfbe2Schristos 
161341ebfbe2Schristos /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
161441ebfbe2Schristos  * scan from a @e copy of @a bytes.
161541ebfbe2Schristos  * @param bytes the byte buffer to scan
161641ebfbe2Schristos  * @param len the number of bytes in the buffer pointed to by @a bytes.
161741ebfbe2Schristos  *
161841ebfbe2Schristos  * @return the newly allocated buffer state object.
161941ebfbe2Schristos  */
yy_scan_bytes(yyconst char * yybytes,int _yybytes_len)162041ebfbe2Schristos YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
162141ebfbe2Schristos {
162241ebfbe2Schristos 	YY_BUFFER_STATE b;
162341ebfbe2Schristos 	char *buf;
162441ebfbe2Schristos 	yy_size_t n;
162541ebfbe2Schristos 	int i;
162641ebfbe2Schristos 
162741ebfbe2Schristos 	/* Get memory for full buffer, including space for trailing EOB's. */
162841ebfbe2Schristos 	n = _yybytes_len + 2;
162941ebfbe2Schristos 	buf = (char *) yyalloc(n  );
163041ebfbe2Schristos 	if ( ! buf )
163141ebfbe2Schristos 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
163241ebfbe2Schristos 
163341ebfbe2Schristos 	for ( i = 0; i < _yybytes_len; ++i )
163441ebfbe2Schristos 		buf[i] = yybytes[i];
163541ebfbe2Schristos 
163641ebfbe2Schristos 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
163741ebfbe2Schristos 
163841ebfbe2Schristos 	b = yy_scan_buffer(buf,n );
163941ebfbe2Schristos 	if ( ! b )
164041ebfbe2Schristos 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
164141ebfbe2Schristos 
164241ebfbe2Schristos 	/* It's okay to grow etc. this buffer, and we should throw it
164341ebfbe2Schristos 	 * away when we're done.
164441ebfbe2Schristos 	 */
164541ebfbe2Schristos 	b->yy_is_our_buffer = 1;
164641ebfbe2Schristos 
164741ebfbe2Schristos 	return b;
164841ebfbe2Schristos }
164941ebfbe2Schristos 
165041ebfbe2Schristos #ifndef YY_EXIT_FAILURE
165141ebfbe2Schristos #define YY_EXIT_FAILURE 2
165241ebfbe2Schristos #endif
165341ebfbe2Schristos 
yy_fatal_error(yyconst char * msg)165441ebfbe2Schristos static void yy_fatal_error (yyconst char* msg )
165541ebfbe2Schristos {
165641ebfbe2Schristos     	(void) fprintf( stderr, "%s\n", msg );
165741ebfbe2Schristos 	exit( YY_EXIT_FAILURE );
165841ebfbe2Schristos }
165941ebfbe2Schristos 
166041ebfbe2Schristos /* Redefine yyless() so it works in section 3 code. */
166141ebfbe2Schristos 
166241ebfbe2Schristos #undef yyless
166341ebfbe2Schristos #define yyless(n) \
166441ebfbe2Schristos 	do \
166541ebfbe2Schristos 		{ \
166641ebfbe2Schristos 		/* Undo effects of setting up yytext. */ \
166741ebfbe2Schristos         int yyless_macro_arg = (n); \
166841ebfbe2Schristos         YY_LESS_LINENO(yyless_macro_arg);\
166941ebfbe2Schristos 		yytext[yyleng] = (yy_hold_char); \
167041ebfbe2Schristos 		(yy_c_buf_p) = yytext + yyless_macro_arg; \
167141ebfbe2Schristos 		(yy_hold_char) = *(yy_c_buf_p); \
167241ebfbe2Schristos 		*(yy_c_buf_p) = '\0'; \
167341ebfbe2Schristos 		yyleng = yyless_macro_arg; \
167441ebfbe2Schristos 		} \
167541ebfbe2Schristos 	while ( 0 )
167641ebfbe2Schristos 
167741ebfbe2Schristos /* Accessor  methods (get/set functions) to struct members. */
167841ebfbe2Schristos 
167941ebfbe2Schristos /** Get the current line number.
168041ebfbe2Schristos  *
168141ebfbe2Schristos  */
yyget_lineno(void)168241ebfbe2Schristos int yyget_lineno  (void)
168341ebfbe2Schristos {
168441ebfbe2Schristos 
168541ebfbe2Schristos     return yylineno;
168641ebfbe2Schristos }
168741ebfbe2Schristos 
168841ebfbe2Schristos /** Get the input stream.
168941ebfbe2Schristos  *
169041ebfbe2Schristos  */
yyget_in(void)169141ebfbe2Schristos FILE *yyget_in  (void)
169241ebfbe2Schristos {
169341ebfbe2Schristos         return yyin;
169441ebfbe2Schristos }
169541ebfbe2Schristos 
169641ebfbe2Schristos /** Get the output stream.
169741ebfbe2Schristos  *
169841ebfbe2Schristos  */
yyget_out(void)169941ebfbe2Schristos FILE *yyget_out  (void)
170041ebfbe2Schristos {
170141ebfbe2Schristos         return yyout;
170241ebfbe2Schristos }
170341ebfbe2Schristos 
170441ebfbe2Schristos /** Get the length of the current token.
170541ebfbe2Schristos  *
170641ebfbe2Schristos  */
yyget_leng(void)170741ebfbe2Schristos int yyget_leng  (void)
170841ebfbe2Schristos {
170941ebfbe2Schristos         return yyleng;
171041ebfbe2Schristos }
171141ebfbe2Schristos 
171241ebfbe2Schristos /** Get the current token.
171341ebfbe2Schristos  *
171441ebfbe2Schristos  */
171541ebfbe2Schristos 
yyget_text(void)171641ebfbe2Schristos char *yyget_text  (void)
171741ebfbe2Schristos {
171841ebfbe2Schristos         return yytext;
171941ebfbe2Schristos }
172041ebfbe2Schristos 
172141ebfbe2Schristos /** Set the current line number.
172241ebfbe2Schristos  * @param line_number
172341ebfbe2Schristos  *
172441ebfbe2Schristos  */
yyset_lineno(int line_number)172541ebfbe2Schristos void yyset_lineno (int  line_number )
172641ebfbe2Schristos {
172741ebfbe2Schristos 
172841ebfbe2Schristos     yylineno = line_number;
172941ebfbe2Schristos }
173041ebfbe2Schristos 
173141ebfbe2Schristos /** Set the input stream. This does not discard the current
173241ebfbe2Schristos  * input buffer.
173341ebfbe2Schristos  * @param in_str A readable stream.
173441ebfbe2Schristos  *
173541ebfbe2Schristos  * @see yy_switch_to_buffer
173641ebfbe2Schristos  */
yyset_in(FILE * in_str)173741ebfbe2Schristos void yyset_in (FILE *  in_str )
173841ebfbe2Schristos {
173941ebfbe2Schristos         yyin = in_str ;
174041ebfbe2Schristos }
174141ebfbe2Schristos 
yyset_out(FILE * out_str)174241ebfbe2Schristos void yyset_out (FILE *  out_str )
174341ebfbe2Schristos {
174441ebfbe2Schristos         yyout = out_str ;
174541ebfbe2Schristos }
174641ebfbe2Schristos 
yyget_debug(void)174741ebfbe2Schristos int yyget_debug  (void)
174841ebfbe2Schristos {
174941ebfbe2Schristos         return yy_flex_debug;
175041ebfbe2Schristos }
175141ebfbe2Schristos 
yyset_debug(int bdebug)175241ebfbe2Schristos void yyset_debug (int  bdebug )
175341ebfbe2Schristos {
175441ebfbe2Schristos         yy_flex_debug = bdebug ;
175541ebfbe2Schristos }
175641ebfbe2Schristos 
yy_init_globals(void)175741ebfbe2Schristos static int yy_init_globals (void)
175841ebfbe2Schristos {
175941ebfbe2Schristos         /* Initialization is the same as for the non-reentrant scanner.
176041ebfbe2Schristos      * This function is called from yylex_destroy(), so don't allocate here.
176141ebfbe2Schristos      */
176241ebfbe2Schristos 
176341ebfbe2Schristos     (yy_buffer_stack) = 0;
176441ebfbe2Schristos     (yy_buffer_stack_top) = 0;
176541ebfbe2Schristos     (yy_buffer_stack_max) = 0;
176641ebfbe2Schristos     (yy_c_buf_p) = (char *) 0;
176741ebfbe2Schristos     (yy_init) = 0;
176841ebfbe2Schristos     (yy_start) = 0;
176941ebfbe2Schristos 
177041ebfbe2Schristos /* Defined in main.c */
177141ebfbe2Schristos #ifdef YY_STDINIT
177241ebfbe2Schristos     yyin = stdin;
177341ebfbe2Schristos     yyout = stdout;
177441ebfbe2Schristos #else
177541ebfbe2Schristos     yyin = (FILE *) 0;
177641ebfbe2Schristos     yyout = (FILE *) 0;
177741ebfbe2Schristos #endif
177841ebfbe2Schristos 
177941ebfbe2Schristos     /* For future reference: Set errno on error, since we are called by
178041ebfbe2Schristos      * yylex_init()
178141ebfbe2Schristos      */
178241ebfbe2Schristos     return 0;
178341ebfbe2Schristos }
178441ebfbe2Schristos 
178541ebfbe2Schristos /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(void)178641ebfbe2Schristos int yylex_destroy  (void)
178741ebfbe2Schristos {
178841ebfbe2Schristos 
178941ebfbe2Schristos     /* Pop the buffer stack, destroying each element. */
179041ebfbe2Schristos 	while(YY_CURRENT_BUFFER){
179141ebfbe2Schristos 		yy_delete_buffer(YY_CURRENT_BUFFER  );
179241ebfbe2Schristos 		YY_CURRENT_BUFFER_LVALUE = NULL;
179341ebfbe2Schristos 		yypop_buffer_state();
179441ebfbe2Schristos 	}
179541ebfbe2Schristos 
179641ebfbe2Schristos 	/* Destroy the stack itself. */
179741ebfbe2Schristos 	yyfree((yy_buffer_stack) );
179841ebfbe2Schristos 	(yy_buffer_stack) = NULL;
179941ebfbe2Schristos 
180041ebfbe2Schristos     /* Reset the globals. This is important in a non-reentrant scanner so the next time
180141ebfbe2Schristos      * yylex() is called, initialization will occur. */
180241ebfbe2Schristos     yy_init_globals( );
180341ebfbe2Schristos 
180441ebfbe2Schristos     return 0;
180541ebfbe2Schristos }
180641ebfbe2Schristos 
180741ebfbe2Schristos /*
180841ebfbe2Schristos  * Internal utility routines.
180941ebfbe2Schristos  */
181041ebfbe2Schristos 
181141ebfbe2Schristos #ifndef yytext_ptr
yy_flex_strncpy(char * s1,yyconst char * s2,int n)181241ebfbe2Schristos static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
181341ebfbe2Schristos {
181441ebfbe2Schristos 	register int i;
181541ebfbe2Schristos 	for ( i = 0; i < n; ++i )
181641ebfbe2Schristos 		s1[i] = s2[i];
181741ebfbe2Schristos }
181841ebfbe2Schristos #endif
181941ebfbe2Schristos 
182041ebfbe2Schristos #ifdef YY_NEED_STRLEN
yy_flex_strlen(yyconst char * s)182141ebfbe2Schristos static int yy_flex_strlen (yyconst char * s )
182241ebfbe2Schristos {
182341ebfbe2Schristos 	register int n;
182441ebfbe2Schristos 	for ( n = 0; s[n]; ++n )
182541ebfbe2Schristos 		;
182641ebfbe2Schristos 
182741ebfbe2Schristos 	return n;
182841ebfbe2Schristos }
182941ebfbe2Schristos #endif
183041ebfbe2Schristos 
yyalloc(yy_size_t size)183141ebfbe2Schristos void *yyalloc (yy_size_t  size )
183241ebfbe2Schristos {
183341ebfbe2Schristos 	return (void *) malloc( size );
183441ebfbe2Schristos }
183541ebfbe2Schristos 
yyrealloc(void * ptr,yy_size_t size)183641ebfbe2Schristos void *yyrealloc  (void * ptr, yy_size_t  size )
183741ebfbe2Schristos {
183841ebfbe2Schristos 	/* The cast to (char *) in the following accommodates both
183941ebfbe2Schristos 	 * implementations that use char* generic pointers, and those
184041ebfbe2Schristos 	 * that use void* generic pointers.  It works with the latter
184141ebfbe2Schristos 	 * because both ANSI C and C++ allow castless assignment from
184241ebfbe2Schristos 	 * any pointer type to void*, and deal with argument conversions
184341ebfbe2Schristos 	 * as though doing an assignment.
184441ebfbe2Schristos 	 */
184541ebfbe2Schristos 	return (void *) realloc( (char *) ptr, size );
184641ebfbe2Schristos }
184741ebfbe2Schristos 
yyfree(void * ptr)184841ebfbe2Schristos void yyfree (void * ptr )
184941ebfbe2Schristos {
185041ebfbe2Schristos 	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
185141ebfbe2Schristos }
185241ebfbe2Schristos 
185341ebfbe2Schristos #define YYTABLES_NAME "yytables"
185441ebfbe2Schristos 
1855*912aaddfSuebayasi #line 63 "../../../usr.bin/m4/tokenizer.l"
185641ebfbe2Schristos 
185741ebfbe2Schristos 
185841ebfbe2Schristos 
185941ebfbe2Schristos int32_t
number()186041ebfbe2Schristos number()
186141ebfbe2Schristos {
186241ebfbe2Schristos 	long l;
186341ebfbe2Schristos 
186441ebfbe2Schristos 	errno = 0;
186541ebfbe2Schristos 	l = strtol(yytext, NULL, 0);
186641ebfbe2Schristos 	if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) ||
186741ebfbe2Schristos 	    l > INT32_MAX || l < INT32_MIN) {
186841ebfbe2Schristos 		fprintf(stderr, "m4: numeric overflow in expr: %s\n", yytext);
186941ebfbe2Schristos 	}
187041ebfbe2Schristos 	return l;
187141ebfbe2Schristos }
187241ebfbe2Schristos 
187341ebfbe2Schristos int32_t
parse_radix()187441ebfbe2Schristos parse_radix()
187541ebfbe2Schristos {
187641ebfbe2Schristos 	long base;
187741ebfbe2Schristos 	char *next;
187841ebfbe2Schristos 	long l;
187941ebfbe2Schristos 
188041ebfbe2Schristos 	l = 0;
188141ebfbe2Schristos 	base = strtol(yytext+2, &next, 0);
188241ebfbe2Schristos 	if (base > 36 || next == NULL) {
188341ebfbe2Schristos 		fprintf(stderr, "m4: error in number %s\n", yytext);
188441ebfbe2Schristos 	} else {
188541ebfbe2Schristos 		next++;
188641ebfbe2Schristos 		while (*next != 0) {
188741ebfbe2Schristos 			if (*next >= '0' && *next <= '9')
188841ebfbe2Schristos 				l = base * l + *next - '0';
188941ebfbe2Schristos 			else if (*next >= 'a' && *next <= 'z')
189041ebfbe2Schristos 				l = base * l + *next - 'a' + 10;
189141ebfbe2Schristos 			else if (*next >= 'A' && *next <= 'Z')
189241ebfbe2Schristos 				l = base * l + *next - 'A' + 10;
189341ebfbe2Schristos 			next++;
189441ebfbe2Schristos 		}
189541ebfbe2Schristos 	}
189641ebfbe2Schristos 	return l;
189741ebfbe2Schristos }
189841ebfbe2Schristos 
189941ebfbe2Schristos 
1900