Path: blob/main/tools/build/bootstrap-m4/inittokenizer.c
39562 views
#line 1 "tokenizer.c"12#line 3 "tokenizer.c"34#define YY_INT_ALIGNED short int56/* A lexical scanner generated by flex */78#define FLEX_SCANNER9#define YY_FLEX_MAJOR_VERSION 210#define YY_FLEX_MINOR_VERSION 611#define YY_FLEX_SUBMINOR_VERSION 412#if YY_FLEX_SUBMINOR_VERSION > 013#define FLEX_BETA14#endif1516/* First, we deal with platform-specific or compiler-specific issues. */1718/* begin standard C headers. */19#include <stdio.h>20#include <string.h>21#include <errno.h>22#include <stdlib.h>2324/* end standard C headers. */2526/* flex integer type definitions */2728#ifndef FLEXINT_H29#define FLEXINT_H3031/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */3233#if defined(__FreeBSD__) || \34(defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)3536/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,37* if you want the limit (max/min) macros for int types.38*/39#ifndef __STDC_LIMIT_MACROS40#define __STDC_LIMIT_MACROS 141#endif4243#include <inttypes.h>44typedef int8_t flex_int8_t;45typedef uint8_t flex_uint8_t;46typedef int16_t flex_int16_t;47typedef uint16_t flex_uint16_t;48typedef int32_t flex_int32_t;49typedef uint32_t flex_uint32_t;50#else51typedef signed char flex_int8_t;52typedef short int flex_int16_t;53typedef int flex_int32_t;54typedef unsigned char flex_uint8_t;55typedef unsigned short int flex_uint16_t;56typedef unsigned int flex_uint32_t;5758/* Limits of integral types. */59#ifndef INT8_MIN60#define INT8_MIN (-128)61#endif62#ifndef INT16_MIN63#define INT16_MIN (-32767-1)64#endif65#ifndef INT32_MIN66#define INT32_MIN (-2147483647-1)67#endif68#ifndef INT8_MAX69#define INT8_MAX (127)70#endif71#ifndef INT16_MAX72#define INT16_MAX (32767)73#endif74#ifndef INT32_MAX75#define INT32_MAX (2147483647)76#endif77#ifndef UINT8_MAX78#define UINT8_MAX (255U)79#endif80#ifndef UINT16_MAX81#define UINT16_MAX (65535U)82#endif83#ifndef UINT32_MAX84#define UINT32_MAX (4294967295U)85#endif8687#ifndef SIZE_MAX88#define SIZE_MAX (~(size_t)0)89#endif9091#endif /* ! C99 */9293#endif /* ! FLEXINT_H */9495/* begin standard C++ headers. */9697/* TODO: this is always defined, so inline it */98#define yyconst const99100#if defined(__GNUC__) && __GNUC__ >= 3101#define yynoreturn __attribute__((__noreturn__))102#else103#define yynoreturn104#endif105106/* Returned upon end-of-file. */107#define YY_NULL 0108109/* Promotes a possibly negative, possibly signed char to an110* integer in range [0..255] for use as an array index.111*/112#define YY_SC_TO_UI(c) ((YY_CHAR) (c))113114/* Enter a start condition. This macro really ought to take a parameter,115* but we do it the disgusting crufty way forced on us by the ()-less116* definition of BEGIN.117*/118#define BEGIN (yy_start) = 1 + 2 *119/* Translate the current start state into a value that can be later handed120* to BEGIN to return to the state. The YYSTATE alias is for lex121* compatibility.122*/123#define YY_START (((yy_start) - 1) / 2)124#define YYSTATE YY_START125/* Action number for EOF rule of a given start state. */126#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)127/* Special action meaning "start processing a new file". */128#define YY_NEW_FILE yyrestart( yyin )129#define YY_END_OF_BUFFER_CHAR 0130131/* Size of default input buffer. */132#ifndef YY_BUF_SIZE133#ifdef __ia64__134/* On IA-64, the buffer size is 16k, not 8k.135* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.136* Ditto for the __ia64__ case accordingly.137*/138#define YY_BUF_SIZE 32768139#else140#define YY_BUF_SIZE 16384141#endif /* __ia64__ */142#endif143144/* The state buf must be large enough to hold one state per character in the main buffer.145*/146#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))147148#ifndef YY_TYPEDEF_YY_BUFFER_STATE149#define YY_TYPEDEF_YY_BUFFER_STATE150typedef struct yy_buffer_state *YY_BUFFER_STATE;151#endif152153#ifndef YY_TYPEDEF_YY_SIZE_T154#define YY_TYPEDEF_YY_SIZE_T155typedef size_t yy_size_t;156#endif157158extern int yyleng;159160extern FILE *yyin, *yyout;161162#define EOB_ACT_CONTINUE_SCAN 0163#define EOB_ACT_END_OF_FILE 1164#define EOB_ACT_LAST_MATCH 2165166#define YY_LESS_LINENO(n)167#define YY_LINENO_REWIND_TO(ptr)168169/* Return all but the first "n" matched characters back to the input stream. */170#define yyless(n) \171do \172{ \173/* Undo effects of setting up yytext. */ \174int yyless_macro_arg = (n); \175YY_LESS_LINENO(yyless_macro_arg);\176*yy_cp = (yy_hold_char); \177YY_RESTORE_YY_MORE_OFFSET \178(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \179YY_DO_BEFORE_ACTION; /* set up yytext again */ \180} \181while ( 0 )182#define unput(c) yyunput( c, (yytext_ptr) )183184#ifndef YY_STRUCT_YY_BUFFER_STATE185#define YY_STRUCT_YY_BUFFER_STATE186struct yy_buffer_state187{188FILE *yy_input_file;189190char *yy_ch_buf; /* input buffer */191char *yy_buf_pos; /* current position in input buffer */192193/* Size of input buffer in bytes, not including room for EOB194* characters.195*/196int yy_buf_size;197198/* Number of characters read into yy_ch_buf, not including EOB199* characters.200*/201int yy_n_chars;202203/* Whether we "own" the buffer - i.e., we know we created it,204* and can realloc() it to grow it, and should free() it to205* delete it.206*/207int yy_is_our_buffer;208209/* Whether this is an "interactive" input source; if so, and210* if we're using stdio for input, then we want to use getc()211* instead of fread(), to make sure we stop fetching input after212* each newline.213*/214int yy_is_interactive;215216/* Whether we're considered to be at the beginning of a line.217* If so, '^' rules will be active on the next match, otherwise218* not.219*/220int yy_at_bol;221222int yy_bs_lineno; /**< The line count. */223int yy_bs_column; /**< The column count. */224225/* Whether to try to fill the input buffer when we reach the226* end of it.227*/228int yy_fill_buffer;229230int yy_buffer_status;231232#define YY_BUFFER_NEW 0233#define YY_BUFFER_NORMAL 1234/* When an EOF's been seen but there's still some text to process235* then we mark the buffer as YY_EOF_PENDING, to indicate that we236* shouldn't try reading from the input source any more. We might237* still have a bunch of tokens to match, though, because of238* possible backing-up.239*240* When we actually see the EOF, we change the status to "new"241* (via yyrestart()), so that the user can continue scanning by242* just pointing yyin at a new input file.243*/244#define YY_BUFFER_EOF_PENDING 2245246};247#endif /* !YY_STRUCT_YY_BUFFER_STATE */248249/* Stack of input buffers. */250static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */251static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */252static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */253254/* We provide macros for accessing buffer states in case in the255* future we want to put the buffer states in a more general256* "scanner state".257*258* Returns the top of the stack, or NULL.259*/260#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \261? (yy_buffer_stack)[(yy_buffer_stack_top)] \262: NULL)263#define yy_current_buffer YY_CURRENT_BUFFER264/* Same as previous macro, but useful when we know that the buffer stack is not265* NULL or when we need an lvalue. For internal use only.266*/267#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]268269/* yy_hold_char holds the character lost when yytext is formed. */270static char yy_hold_char;271static int yy_n_chars; /* number of characters read into yy_ch_buf */272int yyleng;273274/* Points to current character in buffer. */275static char *yy_c_buf_p = NULL;276static int yy_init = 0; /* whether we need to initialize */277static int yy_start = 0; /* start state number */278279/* Flag which is used to allow yywrap()'s to do buffer switches280* instead of setting up a fresh yyin. A bit of a hack ...281*/282static int yy_did_buffer_switch_on_eof;283284void yyrestart ( FILE *input_file );285void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );286YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );287void yy_delete_buffer ( YY_BUFFER_STATE b );288void yy_flush_buffer ( YY_BUFFER_STATE b );289void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );290void yypop_buffer_state ( void );291292static void yyensure_buffer_stack ( void );293static void yy_load_buffer_state ( void );294static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );295#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )296297YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );298YY_BUFFER_STATE yy_scan_string ( const char *yy_str );299YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );300301void *yyalloc ( yy_size_t );302void *yyrealloc ( void *, yy_size_t );303void yyfree ( void * );304305#define yy_new_buffer yy_create_buffer306#define yy_set_interactive(is_interactive) \307{ \308if ( ! YY_CURRENT_BUFFER ){ \309yyensure_buffer_stack (); \310YY_CURRENT_BUFFER_LVALUE = \311yy_create_buffer( yyin, YY_BUF_SIZE ); \312} \313YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \314}315#define yy_set_bol(at_bol) \316{ \317if ( ! YY_CURRENT_BUFFER ){\318yyensure_buffer_stack (); \319YY_CURRENT_BUFFER_LVALUE = \320yy_create_buffer( yyin, YY_BUF_SIZE ); \321} \322YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \323}324#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)325326/* Begin user sect3 */327328#define yywrap() (/*CONSTCOND*/1)329#define YY_SKIP_YYWRAP330typedef flex_uint8_t YY_CHAR;331332FILE *yyin = NULL, *yyout = NULL;333334typedef int yy_state_type;335336extern int yylineno;337int yylineno = 1;338339extern char *yytext;340#ifdef yytext_ptr341#undef yytext_ptr342#endif343#define yytext_ptr yytext344345static yy_state_type yy_get_previous_state ( void );346static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );347static int yy_get_next_buffer ( void );348static void yynoreturn yy_fatal_error ( const char* msg );349350/* Done after the current pattern has been matched and before the351* corresponding action - sets up yytext.352*/353#define YY_DO_BEFORE_ACTION \354(yytext_ptr) = yy_bp; \355yyleng = (int) (yy_cp - yy_bp); \356(yy_hold_char) = *yy_cp; \357*yy_cp = '\0'; \358(yy_c_buf_p) = yy_cp;359#define YY_NUM_RULES 14360#define YY_END_OF_BUFFER 15361/* This struct is not used in this scanner,362but its presence is necessary. */363struct yy_trans_info364{365flex_int32_t yy_verify;366flex_int32_t yy_nxt;367};368static const flex_int16_t yy_accept[35] =369{ 0,3700, 0, 15, 13, 1, 1, 13, 13, 13, 2,3712, 13, 13, 13, 13, 1, 9, 10, 12, 2,3720, 0, 2, 6, 4, 8, 5, 7, 11, 0,3732, 0, 3, 0374} ;375376static const YY_CHAR yy_ec[256] =377{ 0,3781, 1, 1, 1, 1, 1, 1, 1, 2, 3,3791, 1, 1, 1, 1, 1, 1, 1, 1, 1,3801, 1, 1, 1, 1, 1, 1, 1, 1, 1,3811, 2, 4, 1, 1, 1, 1, 5, 1, 1,3821, 6, 1, 1, 1, 1, 1, 7, 8, 8,3838, 8, 8, 8, 8, 9, 9, 10, 1, 11,38412, 13, 1, 1, 14, 14, 14, 14, 14, 14,38515, 15, 15, 15, 15, 15, 15, 15, 15, 15,38615, 16, 15, 15, 15, 15, 15, 17, 15, 15,3871, 1, 1, 1, 1, 1, 14, 14, 14, 14,38838914, 14, 15, 15, 15, 15, 15, 15, 15, 15,39015, 15, 15, 16, 15, 15, 15, 15, 15, 17,39115, 15, 1, 18, 1, 1, 1, 1, 1, 1,3921, 1, 1, 1, 1, 1, 1, 1, 1, 1,3931, 1, 1, 1, 1, 1, 1, 1, 1, 1,3941, 1, 1, 1, 1, 1, 1, 1, 1, 1,3951, 1, 1, 1, 1, 1, 1, 1, 1, 1,3961, 1, 1, 1, 1, 1, 1, 1, 1, 1,3971, 1, 1, 1, 1, 1, 1, 1, 1, 1,3981, 1, 1, 1, 1, 1, 1, 1, 1, 1,3994001, 1, 1, 1, 1, 1, 1, 1, 1, 1,4011, 1, 1, 1, 1, 1, 1, 1, 1, 1,4021, 1, 1, 1, 1, 1, 1, 1, 1, 1,4031, 1, 1, 1, 1, 1, 1, 1, 1, 1,4041, 1, 1, 1, 1, 1, 1, 1, 1, 1,4051, 1, 1, 1, 1406} ;407408static const YY_CHAR yy_meta[19] =409{ 0,4101, 1, 1, 1, 1, 1, 2, 2, 2, 1,4111, 1, 1, 3, 4, 4, 4, 1412} ;413414static const flex_int16_t yy_base[39] =415{ 0,4160, 0, 48, 49, 17, 19, 35, 41, 39, 16,4170, 14, 32, 15, 25, 27, 49, 49, 49, 27,4180, 0, 0, 49, 49, 49, 49, 49, 49, 32,4190, 0, 0, 49, 39, 29, 34, 36420} ;421422static const flex_int16_t yy_def[39] =423{ 0,42434, 1, 34, 34, 34, 34, 34, 34, 34, 34,42535, 34, 34, 34, 34, 34, 34, 34, 34, 34,42636, 37, 35, 34, 34, 34, 34, 34, 34, 36,42737, 38, 38, 0, 34, 34, 34, 34428} ;429430static const flex_int16_t yy_nxt[68] =431{ 0,4324, 5, 6, 7, 8, 9, 10, 11, 11, 4,43312, 13, 14, 4, 4, 4, 4, 15, 16, 16,43416, 16, 20, 20, 24, 25, 27, 28, 16, 16,43530, 21, 22, 20, 20, 31, 31, 33, 33, 33,43623, 32, 29, 26, 19, 18, 17, 34, 3, 34,43734, 34, 34, 34, 34, 34, 34, 34, 34, 34,43834, 34, 34, 34, 34, 34, 34439} ;440441static const flex_int16_t yy_chk[68] =442{ 0,4431, 1, 1, 1, 1, 1, 1, 1, 1, 1,4441, 1, 1, 1, 1, 1, 1, 1, 5, 5,4456, 6, 10, 10, 12, 12, 14, 14, 16, 16,44636, 10, 10, 20, 20, 37, 37, 38, 38, 38,44735, 30, 15, 13, 9, 8, 7, 3, 34, 34,44834, 34, 34, 34, 34, 34, 34, 34, 34, 34,44934, 34, 34, 34, 34, 34, 34450} ;451452static yy_state_type yy_last_accepting_state;453static char *yy_last_accepting_cpos;454455extern int yy_flex_debug;456int yy_flex_debug = 0;457458/* The intent behind this definition is that it'll catch459* any uses of REJECT which flex missed.460*/461#define REJECT reject_used_but_not_detected462#define yymore() yymore_used_but_not_detected463#define YY_MORE_ADJ 0464#define YY_RESTORE_YY_MORE_OFFSET465char *yytext;466#line 1 "tokenizer.l"467#define YY_NO_INPUT 1468#line 3 "tokenizer.l"469/* $OpenBSD: tokenizer.l,v 1.9 2017/06/15 13:48:42 bcallah Exp $ */470/*471* Copyright (c) 2004 Marc Espie <[email protected]>472*473* Permission to use, copy, modify, and distribute this software for any474* purpose with or without fee is hereby granted, provided that the above475* copyright notice and this permission notice appear in all copies.476*477* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES478* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF479* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR480* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES481* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN482* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF483* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.484*/485#include "parser.h"486#include <assert.h>487#include <stdlib.h>488#include <errno.h>489#include <stdint.h>490#include <limits.h>491492extern void m4_warnx(const char *, ...);493extern int mimic_gnu;494extern int32_t yylval;495496int32_t number(void);497int32_t parse_radix(void);498extern int yylex(void);499500#define YY_DECL int yylex(void)501#line 504 "tokenizer.c"502#line 505 "tokenizer.c"503504#define INITIAL 0505506#ifndef YY_NO_UNISTD_H507/* Special case for "unistd.h", since it is non-ANSI. We include it way508* down here because we want the user's section 1 to have been scanned first.509* The user has a chance to override it with an option.510*/511#include <unistd.h>512#endif513514#ifndef YY_EXTRA_TYPE515#define YY_EXTRA_TYPE void *516#endif517518static int yy_init_globals ( void );519520/* Accessor methods to globals.521These are made visible to non-reentrant scanners for convenience. */522523int yylex_destroy ( void );524525int yyget_debug ( void );526527void yyset_debug ( int debug_flag );528529YY_EXTRA_TYPE yyget_extra ( void );530531void yyset_extra ( YY_EXTRA_TYPE user_defined );532533FILE *yyget_in ( void );534535void yyset_in ( FILE * _in_str );536537FILE *yyget_out ( void );538539void yyset_out ( FILE * _out_str );540541int yyget_leng ( void );542543char *yyget_text ( void );544545int yyget_lineno ( void );546547void yyset_lineno ( int _line_number );548549/* Macros after this point can all be overridden by user definitions in550* section 1.551*/552553#ifndef YY_SKIP_YYWRAP554#ifdef __cplusplus555extern "C" int yywrap ( void );556#else557extern int yywrap ( void );558#endif559#endif560561#ifndef YY_NO_UNPUT562563#endif564565#ifndef yytext_ptr566static void yy_flex_strncpy ( char *, const char *, int );567#endif568569#ifdef YY_NEED_STRLEN570static int yy_flex_strlen ( const char * );571#endif572573#ifndef YY_NO_INPUT574#ifdef __cplusplus575static int yyinput ( void );576#else577static int input ( void );578#endif579580#endif581582/* Amount of stuff to slurp up with each read. */583#ifndef YY_READ_BUF_SIZE584#ifdef __ia64__585/* On IA-64, the buffer size is 16k, not 8k */586#define YY_READ_BUF_SIZE 16384587#else588#define YY_READ_BUF_SIZE 8192589#endif /* __ia64__ */590#endif591592/* Copy whatever the last rule matched to the standard output. */593#ifndef ECHO594/* This used to be an fputs(), but since the string might contain NUL's,595* we now use fwrite().596*/597#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)598#endif599600/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,601* is returned in "result".602*/603#ifndef YY_INPUT604#define YY_INPUT(buf,result,max_size) \605if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \606{ \607int c = '*'; \608int n; \609for ( n = 0; n < max_size && \610(c = getc( yyin )) != EOF && c != '\n'; ++n ) \611buf[n] = (char) c; \612if ( c == '\n' ) \613buf[n++] = (char) c; \614if ( c == EOF && ferror( yyin ) ) \615YY_FATAL_ERROR( "input in flex scanner failed" ); \616result = n; \617} \618else \619{ \620errno=0; \621while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \622{ \623if( errno != EINTR) \624{ \625YY_FATAL_ERROR( "input in flex scanner failed" ); \626break; \627} \628errno=0; \629clearerr(yyin); \630} \631}\632\633634#endif635636/* No semi-colon after return; correct usage is to write "yyterminate();" -637* we don't want an extra ';' after the "return" because that will cause638* some compilers to complain about unreachable statements.639*/640#ifndef yyterminate641#define yyterminate() return YY_NULL642#endif643644/* Number of entries by which start-condition stack grows. */645#ifndef YY_START_STACK_INCR646#define YY_START_STACK_INCR 25647#endif648649/* Report a fatal error. */650#ifndef YY_FATAL_ERROR651#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )652#endif653654/* end tables serialization structures and prototypes */655656/* Default declaration of generated scanner - a define so the user can657* easily add parameters.658*/659#ifndef YY_DECL660#define YY_DECL_IS_OURS 1661662extern int yylex (void);663664#define YY_DECL int yylex (void)665#endif /* !YY_DECL */666667/* Code executed at the beginning of each rule, after yytext and yyleng668* have been set up.669*/670#ifndef YY_USER_ACTION671#define YY_USER_ACTION672#endif673674/* Code executed at the end of each rule. */675#ifndef YY_BREAK676#define YY_BREAK /*LINTED*/break;677#endif678679#define YY_RULE_SETUP \680YY_USER_ACTION681682/** The main scanner function which does all the work.683*/684YY_DECL685{686yy_state_type yy_current_state;687char *yy_cp, *yy_bp;688int yy_act;689690if ( !(yy_init) )691{692(yy_init) = 1;693694#ifdef YY_USER_INIT695YY_USER_INIT;696#endif697698if ( ! (yy_start) )699(yy_start) = 1; /* first start state */700701if ( ! yyin )702yyin = stdin;703704if ( ! yyout )705yyout = stdout;706707if ( ! YY_CURRENT_BUFFER ) {708yyensure_buffer_stack ();709YY_CURRENT_BUFFER_LVALUE =710yy_create_buffer( yyin, YY_BUF_SIZE );711}712713yy_load_buffer_state( );714}715716{717#line 48 "tokenizer.l"718719#line 722 "tokenizer.c"720721while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */722{723yy_cp = (yy_c_buf_p);724725/* Support of yytext. */726*yy_cp = (yy_hold_char);727728/* yy_bp points to the position in yy_ch_buf of the start of729* the current run.730*/731yy_bp = yy_cp;732733yy_current_state = (yy_start);734yy_match:735do736{737YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;738if ( yy_accept[yy_current_state] )739{740(yy_last_accepting_state) = yy_current_state;741(yy_last_accepting_cpos) = yy_cp;742}743while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )744{745yy_current_state = (int) yy_def[yy_current_state];746if ( yy_current_state >= 35 )747yy_c = yy_meta[yy_c];748}749yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];750++yy_cp;751}752while ( yy_base[yy_current_state] != 49 );753754yy_find_action:755yy_act = yy_accept[yy_current_state];756if ( yy_act == 0 )757{ /* have to back up */758yy_cp = (yy_last_accepting_cpos);759yy_current_state = (yy_last_accepting_state);760yy_act = yy_accept[yy_current_state];761}762763YY_DO_BEFORE_ACTION;764765do_action: /* This label is used only to access EOF actions. */766767switch ( yy_act )768{ /* beginning of action switch */769case 0: /* must back up */770/* undo the effects of YY_DO_BEFORE_ACTION */771*yy_cp = (yy_hold_char);772yy_cp = (yy_last_accepting_cpos);773yy_current_state = (yy_last_accepting_state);774goto yy_find_action;775776case 1:777/* rule 1 can match eol */778YY_RULE_SETUP779#line 49 "tokenizer.l"780{/* just skip it */}781YY_BREAK782case 2:783YY_RULE_SETUP784#line 50 "tokenizer.l"785{ yylval = number(); return(NUMBER); }786YY_BREAK787case 3:788YY_RULE_SETUP789#line 51 "tokenizer.l"790{ if (mimic_gnu) {791yylval = parse_radix(); return(NUMBER);792} else {793return(ERROR);794}795}796YY_BREAK797case 4:798YY_RULE_SETUP799#line 57 "tokenizer.l"800{ return(LE); }801YY_BREAK802case 5:803YY_RULE_SETUP804#line 58 "tokenizer.l"805{ return(GE); }806YY_BREAK807case 6:808YY_RULE_SETUP809#line 59 "tokenizer.l"810{ return(LSHIFT); }811YY_BREAK812case 7:813YY_RULE_SETUP814#line 60 "tokenizer.l"815{ return(RSHIFT); }816YY_BREAK817case 8:818YY_RULE_SETUP819#line 61 "tokenizer.l"820{ return(EQ); }821YY_BREAK822case 9:823YY_RULE_SETUP824#line 62 "tokenizer.l"825{ return(NE); }826YY_BREAK827case 10:828YY_RULE_SETUP829#line 63 "tokenizer.l"830{ return(LAND); }831YY_BREAK832case 11:833YY_RULE_SETUP834#line 64 "tokenizer.l"835{ return(LOR); }836YY_BREAK837case 12:838YY_RULE_SETUP839#line 65 "tokenizer.l"840{ if (mimic_gnu) { return (EXPONENT); } }841YY_BREAK842case 13:843YY_RULE_SETUP844#line 66 "tokenizer.l"845{ return yytext[0]; }846YY_BREAK847case 14:848YY_RULE_SETUP849#line 67 "tokenizer.l"850ECHO;851YY_BREAK852#line 855 "tokenizer.c"853case YY_STATE_EOF(INITIAL):854yyterminate();855856case YY_END_OF_BUFFER:857{858/* Amount of text matched not including the EOB char. */859int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;860861/* Undo the effects of YY_DO_BEFORE_ACTION. */862*yy_cp = (yy_hold_char);863YY_RESTORE_YY_MORE_OFFSET864865if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )866{867/* We're scanning a new file or input source. It's868* possible that this happened because the user869* just pointed yyin at a new source and called870* yylex(). If so, then we have to assure871* consistency between YY_CURRENT_BUFFER and our872* globals. Here is the right place to do so, because873* this is the first action (other than possibly a874* back-up) that will match for the new input source.875*/876(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;877YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;878YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;879}880881/* Note that here we test for yy_c_buf_p "<=" to the position882* of the first EOB in the buffer, since yy_c_buf_p will883* already have been incremented past the NUL character884* (since all states make transitions on EOB to the885* end-of-buffer state). Contrast this with the test886* in input().887*/888if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )889{ /* This was really a NUL. */890yy_state_type yy_next_state;891892(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;893894yy_current_state = yy_get_previous_state( );895896/* Okay, we're now positioned to make the NUL897* transition. We couldn't have898* yy_get_previous_state() go ahead and do it899* for us because it doesn't know how to deal900* with the possibility of jamming (and we don't901* want to build jamming into it because then it902* will run more slowly).903*/904905yy_next_state = yy_try_NUL_trans( yy_current_state );906907yy_bp = (yytext_ptr) + YY_MORE_ADJ;908909if ( yy_next_state )910{911/* Consume the NUL. */912yy_cp = ++(yy_c_buf_p);913yy_current_state = yy_next_state;914goto yy_match;915}916917else918{919yy_cp = (yy_c_buf_p);920goto yy_find_action;921}922}923924else switch ( yy_get_next_buffer( ) )925{926case EOB_ACT_END_OF_FILE:927{928(yy_did_buffer_switch_on_eof) = 0;929930if ( yywrap( ) )931{932/* Note: because we've taken care in933* yy_get_next_buffer() to have set up934* yytext, we can now set up935* yy_c_buf_p so that if some total936* hoser (like flex itself) wants to937* call the scanner after we return the938* YY_NULL, it'll still work - another939* YY_NULL will get returned.940*/941(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;942943yy_act = YY_STATE_EOF(YY_START);944goto do_action;945}946947else948{949if ( ! (yy_did_buffer_switch_on_eof) )950YY_NEW_FILE;951}952break;953}954955case EOB_ACT_CONTINUE_SCAN:956(yy_c_buf_p) =957(yytext_ptr) + yy_amount_of_matched_text;958959yy_current_state = yy_get_previous_state( );960961yy_cp = (yy_c_buf_p);962yy_bp = (yytext_ptr) + YY_MORE_ADJ;963goto yy_match;964965case EOB_ACT_LAST_MATCH:966(yy_c_buf_p) =967&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];968969yy_current_state = yy_get_previous_state( );970971yy_cp = (yy_c_buf_p);972yy_bp = (yytext_ptr) + YY_MORE_ADJ;973goto yy_find_action;974}975break;976}977978default:979YY_FATAL_ERROR(980"fatal flex scanner internal error--no action found" );981} /* end of action switch */982} /* end of scanning one token */983} /* end of user's declarations */984} /* end of yylex */985986/* yy_get_next_buffer - try to read in a new buffer987*988* Returns a code representing an action:989* EOB_ACT_LAST_MATCH -990* EOB_ACT_CONTINUE_SCAN - continue scanning from current position991* EOB_ACT_END_OF_FILE - end of file992*/993static int yy_get_next_buffer (void)994{995char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;996char *source = (yytext_ptr);997int number_to_move, i;998int ret_val;9991000if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )1001YY_FATAL_ERROR(1002"fatal flex scanner internal error--end of buffer missed" );10031004if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )1005{ /* Don't try to fill the buffer, so this is an EOF. */1006if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )1007{1008/* We matched a single character, the EOB, so1009* treat this as a final EOF.1010*/1011return EOB_ACT_END_OF_FILE;1012}10131014else1015{1016/* We matched some text prior to the EOB, first1017* process it.1018*/1019return EOB_ACT_LAST_MATCH;1020}1021}10221023/* Try to read more data. */10241025/* First move last chars to start of buffer. */1026number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);10271028for ( i = 0; i < number_to_move; ++i )1029*(dest++) = *(source++);10301031if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )1032/* don't do the read, it's not guaranteed to return an EOF,1033* just force an EOF1034*/1035YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;10361037else1038{1039int num_to_read =1040YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;10411042while ( num_to_read <= 0 )1043{ /* Not enough room in the buffer - grow it. */10441045/* just a shorter name for the current buffer */1046YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;10471048int yy_c_buf_p_offset =1049(int) ((yy_c_buf_p) - b->yy_ch_buf);10501051if ( b->yy_is_our_buffer )1052{1053int new_size = b->yy_buf_size * 2;10541055if ( new_size <= 0 )1056b->yy_buf_size += b->yy_buf_size / 8;1057else1058b->yy_buf_size *= 2;10591060b->yy_ch_buf = (char *)1061/* Include room in for 2 EOB chars. */1062yyrealloc( (void *) b->yy_ch_buf,1063(yy_size_t) (b->yy_buf_size + 2) );1064}1065else1066/* Can't grow it, we don't own it. */1067b->yy_ch_buf = NULL;10681069if ( ! b->yy_ch_buf )1070YY_FATAL_ERROR(1071"fatal error - scanner input buffer overflow" );10721073(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];10741075num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -1076number_to_move - 1;10771078}10791080if ( num_to_read > YY_READ_BUF_SIZE )1081num_to_read = YY_READ_BUF_SIZE;10821083/* Read in more data. */1084YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),1085(yy_n_chars), num_to_read );10861087YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);1088}10891090if ( (yy_n_chars) == 0 )1091{1092if ( number_to_move == YY_MORE_ADJ )1093{1094ret_val = EOB_ACT_END_OF_FILE;1095yyrestart( yyin );1096}10971098else1099{1100ret_val = EOB_ACT_LAST_MATCH;1101YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =1102YY_BUFFER_EOF_PENDING;1103}1104}11051106else1107ret_val = EOB_ACT_CONTINUE_SCAN;11081109if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {1110/* Extend the array by 50%, plus the number we really need. */1111int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);1112YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(1113(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );1114if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )1115YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );1116/* "- 2" to take care of EOB's */1117YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);1118}11191120(yy_n_chars) += number_to_move;1121YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;1122YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;11231124(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];11251126return ret_val;1127}11281129/* yy_get_previous_state - get the state just before the EOB char was reached */11301131static yy_state_type yy_get_previous_state (void)1132{1133yy_state_type yy_current_state;1134char *yy_cp;11351136yy_current_state = (yy_start);11371138for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )1139{1140YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);1141if ( yy_accept[yy_current_state] )1142{1143(yy_last_accepting_state) = yy_current_state;1144(yy_last_accepting_cpos) = yy_cp;1145}1146while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )1147{1148yy_current_state = (int) yy_def[yy_current_state];1149if ( yy_current_state >= 35 )1150yy_c = yy_meta[yy_c];1151}1152yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];1153}11541155return yy_current_state;1156}11571158/* yy_try_NUL_trans - try to make a transition on the NUL character1159*1160* synopsis1161* next_state = yy_try_NUL_trans( current_state );1162*/1163static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )1164{1165int yy_is_jam;1166char *yy_cp = (yy_c_buf_p);11671168YY_CHAR yy_c = 1;1169if ( yy_accept[yy_current_state] )1170{1171(yy_last_accepting_state) = yy_current_state;1172(yy_last_accepting_cpos) = yy_cp;1173}1174while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )1175{1176yy_current_state = (int) yy_def[yy_current_state];1177if ( yy_current_state >= 35 )1178yy_c = yy_meta[yy_c];1179}1180yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];1181yy_is_jam = (yy_current_state == 34);11821183return yy_is_jam ? 0 : yy_current_state;1184}11851186#ifndef YY_NO_UNPUT11871188#endif11891190#ifndef YY_NO_INPUT1191#ifdef __cplusplus1192static int yyinput (void)1193#else1194static int input (void)1195#endif11961197{1198int c;11991200*(yy_c_buf_p) = (yy_hold_char);12011202if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )1203{1204/* yy_c_buf_p now points to the character we want to return.1205* If this occurs *before* the EOB characters, then it's a1206* valid NUL; if not, then we've hit the end of the buffer.1207*/1208if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )1209/* This was really a NUL. */1210*(yy_c_buf_p) = '\0';12111212else1213{ /* need more input */1214int offset = (int) ((yy_c_buf_p) - (yytext_ptr));1215++(yy_c_buf_p);12161217switch ( yy_get_next_buffer( ) )1218{1219case EOB_ACT_LAST_MATCH:1220/* This happens because yy_g_n_b()1221* sees that we've accumulated a1222* token and flags that we need to1223* try matching the token before1224* proceeding. But for input(),1225* there's no matching to consider.1226* So convert the EOB_ACT_LAST_MATCH1227* to EOB_ACT_END_OF_FILE.1228*/12291230/* Reset buffer status. */1231yyrestart( yyin );12321233/*FALLTHROUGH*/12341235case EOB_ACT_END_OF_FILE:1236{1237if ( yywrap( ) )1238return 0;12391240if ( ! (yy_did_buffer_switch_on_eof) )1241YY_NEW_FILE;1242#ifdef __cplusplus1243return yyinput();1244#else1245return input();1246#endif1247}12481249case EOB_ACT_CONTINUE_SCAN:1250(yy_c_buf_p) = (yytext_ptr) + offset;1251break;1252}1253}1254}12551256c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */1257*(yy_c_buf_p) = '\0'; /* preserve yytext */1258(yy_hold_char) = *++(yy_c_buf_p);12591260return c;1261}1262#endif /* ifndef YY_NO_INPUT */12631264/** Immediately switch to a different input stream.1265* @param input_file A readable stream.1266*1267* @note This function does not reset the start condition to @c INITIAL .1268*/1269void yyrestart (FILE * input_file )1270{12711272if ( ! YY_CURRENT_BUFFER ){1273yyensure_buffer_stack ();1274YY_CURRENT_BUFFER_LVALUE =1275yy_create_buffer( yyin, YY_BUF_SIZE );1276}12771278yy_init_buffer( YY_CURRENT_BUFFER, input_file );1279yy_load_buffer_state( );1280}12811282/** Switch to a different input buffer.1283* @param new_buffer The new input buffer.1284*1285*/1286void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )1287{12881289/* TODO. We should be able to replace this entire function body1290* with1291* yypop_buffer_state();1292* yypush_buffer_state(new_buffer);1293*/1294yyensure_buffer_stack ();1295if ( YY_CURRENT_BUFFER == new_buffer )1296return;12971298if ( YY_CURRENT_BUFFER )1299{1300/* Flush out information for old buffer. */1301*(yy_c_buf_p) = (yy_hold_char);1302YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);1303YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);1304}13051306YY_CURRENT_BUFFER_LVALUE = new_buffer;1307yy_load_buffer_state( );13081309/* We don't actually know whether we did this switch during1310* EOF (yywrap()) processing, but the only time this flag1311* is looked at is after yywrap() is called, so it's safe1312* to go ahead and always set it.1313*/1314(yy_did_buffer_switch_on_eof) = 1;1315}13161317static void yy_load_buffer_state (void)1318{1319(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;1320(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;1321yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;1322(yy_hold_char) = *(yy_c_buf_p);1323}13241325/** Allocate and initialize an input buffer state.1326* @param file A readable stream.1327* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.1328*1329* @return the allocated buffer state.1330*/1331YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )1332{1333YY_BUFFER_STATE b;13341335b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );1336if ( ! b )1337YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );13381339b->yy_buf_size = size;13401341/* yy_ch_buf has to be 2 characters longer than the size given because1342* we need to put in 2 end-of-buffer characters.1343*/1344b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );1345if ( ! b->yy_ch_buf )1346YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );13471348b->yy_is_our_buffer = 1;13491350yy_init_buffer( b, file );13511352return b;1353}13541355/** Destroy the buffer.1356* @param b a buffer created with yy_create_buffer()1357*1358*/1359void yy_delete_buffer (YY_BUFFER_STATE b )1360{13611362if ( ! b )1363return;13641365if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */1366YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;13671368if ( b->yy_is_our_buffer )1369yyfree( (void *) b->yy_ch_buf );13701371yyfree( (void *) b );1372}13731374/* Initializes or reinitializes a buffer.1375* This function is sometimes called more than once on the same buffer,1376* such as during a yyrestart() or at EOF.1377*/1378static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )13791380{1381int oerrno = errno;13821383yy_flush_buffer( b );13841385b->yy_input_file = file;1386b->yy_fill_buffer = 1;13871388/* If b is the current buffer, then yy_init_buffer was _probably_1389* called from yyrestart() or through yy_get_next_buffer.1390* In that case, we don't want to reset the lineno or column.1391*/1392if (b != YY_CURRENT_BUFFER){1393b->yy_bs_lineno = 1;1394b->yy_bs_column = 0;1395}13961397b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;13981399errno = oerrno;1400}14011402/** Discard all buffered characters. On the next scan, YY_INPUT will be called.1403* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.1404*1405*/1406void yy_flush_buffer (YY_BUFFER_STATE b )1407{1408if ( ! b )1409return;14101411b->yy_n_chars = 0;14121413/* We always need two end-of-buffer characters. The first causes1414* a transition to the end-of-buffer state. The second causes1415* a jam in that state.1416*/1417b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;1418b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;14191420b->yy_buf_pos = &b->yy_ch_buf[0];14211422b->yy_at_bol = 1;1423b->yy_buffer_status = YY_BUFFER_NEW;14241425if ( b == YY_CURRENT_BUFFER )1426yy_load_buffer_state( );1427}14281429/** Pushes the new state onto the stack. The new state becomes1430* the current state. This function will allocate the stack1431* if necessary.1432* @param new_buffer The new state.1433*1434*/1435void yypush_buffer_state (YY_BUFFER_STATE new_buffer )1436{1437if (new_buffer == NULL)1438return;14391440yyensure_buffer_stack();14411442/* This block is copied from yy_switch_to_buffer. */1443if ( YY_CURRENT_BUFFER )1444{1445/* Flush out information for old buffer. */1446*(yy_c_buf_p) = (yy_hold_char);1447YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);1448YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);1449}14501451/* Only push if top exists. Otherwise, replace top. */1452if (YY_CURRENT_BUFFER)1453(yy_buffer_stack_top)++;1454YY_CURRENT_BUFFER_LVALUE = new_buffer;14551456/* copied from yy_switch_to_buffer. */1457yy_load_buffer_state( );1458(yy_did_buffer_switch_on_eof) = 1;1459}14601461/** Removes and deletes the top of the stack, if present.1462* The next element becomes the new top.1463*1464*/1465void yypop_buffer_state (void)1466{1467if (!YY_CURRENT_BUFFER)1468return;14691470yy_delete_buffer(YY_CURRENT_BUFFER );1471YY_CURRENT_BUFFER_LVALUE = NULL;1472if ((yy_buffer_stack_top) > 0)1473--(yy_buffer_stack_top);14741475if (YY_CURRENT_BUFFER) {1476yy_load_buffer_state( );1477(yy_did_buffer_switch_on_eof) = 1;1478}1479}14801481/* Allocates the stack if it does not exist.1482* Guarantees space for at least one push.1483*/1484static void yyensure_buffer_stack (void)1485{1486yy_size_t num_to_alloc;14871488if (!(yy_buffer_stack)) {14891490/* First allocation is just for 2 elements, since we don't know if this1491* scanner will even need a stack. We use 2 instead of 1 to avoid an1492* immediate realloc on the next call.1493*/1494num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */1495(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc1496(num_to_alloc * sizeof(struct yy_buffer_state*)1497);1498if ( ! (yy_buffer_stack) )1499YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );15001501memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));15021503(yy_buffer_stack_max) = num_to_alloc;1504(yy_buffer_stack_top) = 0;1505return;1506}15071508if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){15091510/* Increase the buffer to prepare for a possible push. */1511yy_size_t grow_size = 8 /* arbitrary grow size */;15121513num_to_alloc = (yy_buffer_stack_max) + grow_size;1514(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc1515((yy_buffer_stack),1516num_to_alloc * sizeof(struct yy_buffer_state*)1517);1518if ( ! (yy_buffer_stack) )1519YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );15201521/* zero only the new slots.*/1522memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));1523(yy_buffer_stack_max) = num_to_alloc;1524}1525}15261527/** Setup the input buffer state to scan directly from a user-specified character buffer.1528* @param base the character buffer1529* @param size the size in bytes of the character buffer1530*1531* @return the newly allocated buffer state object.1532*/1533YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )1534{1535YY_BUFFER_STATE b;15361537if ( size < 2 ||1538base[size-2] != YY_END_OF_BUFFER_CHAR ||1539base[size-1] != YY_END_OF_BUFFER_CHAR )1540/* They forgot to leave room for the EOB's. */1541return NULL;15421543b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );1544if ( ! b )1545YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );15461547b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */1548b->yy_buf_pos = b->yy_ch_buf = base;1549b->yy_is_our_buffer = 0;1550b->yy_input_file = NULL;1551b->yy_n_chars = b->yy_buf_size;1552b->yy_is_interactive = 0;1553b->yy_at_bol = 1;1554b->yy_fill_buffer = 0;1555b->yy_buffer_status = YY_BUFFER_NEW;15561557yy_switch_to_buffer( b );15581559return b;1560}15611562/** Setup the input buffer state to scan a string. The next call to yylex() will1563* scan from a @e copy of @a str.1564* @param yystr a NUL-terminated string to scan1565*1566* @return the newly allocated buffer state object.1567* @note If you want to scan bytes that may contain NUL values, then use1568* yy_scan_bytes() instead.1569*/1570YY_BUFFER_STATE yy_scan_string (const char * yystr )1571{15721573return yy_scan_bytes( yystr, (int) strlen(yystr) );1574}15751576/** Setup the input buffer state to scan the given bytes. The next call to yylex() will1577* scan from a @e copy of @a bytes.1578* @param yybytes the byte buffer to scan1579* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.1580*1581* @return the newly allocated buffer state object.1582*/1583YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )1584{1585YY_BUFFER_STATE b;1586char *buf;1587yy_size_t n;1588int i;15891590/* Get memory for full buffer, including space for trailing EOB's. */1591n = (yy_size_t) (_yybytes_len + 2);1592buf = (char *) yyalloc( n );1593if ( ! buf )1594YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );15951596for ( i = 0; i < _yybytes_len; ++i )1597buf[i] = yybytes[i];15981599buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;16001601b = yy_scan_buffer( buf, n );1602if ( ! b )1603YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );16041605/* It's okay to grow etc. this buffer, and we should throw it1606* away when we're done.1607*/1608b->yy_is_our_buffer = 1;16091610return b;1611}16121613#ifndef YY_EXIT_FAILURE1614#define YY_EXIT_FAILURE 21615#endif16161617static void yynoreturn yy_fatal_error (const char* msg )1618{1619fprintf( stderr, "%s\n", msg );1620exit( YY_EXIT_FAILURE );1621}16221623/* Redefine yyless() so it works in section 3 code. */16241625#undef yyless1626#define yyless(n) \1627do \1628{ \1629/* Undo effects of setting up yytext. */ \1630int yyless_macro_arg = (n); \1631YY_LESS_LINENO(yyless_macro_arg);\1632yytext[yyleng] = (yy_hold_char); \1633(yy_c_buf_p) = yytext + yyless_macro_arg; \1634(yy_hold_char) = *(yy_c_buf_p); \1635*(yy_c_buf_p) = '\0'; \1636yyleng = yyless_macro_arg; \1637} \1638while ( 0 )16391640/* Accessor methods (get/set functions) to struct members. */16411642/** Get the current line number.1643*1644*/1645int yyget_lineno (void)1646{16471648return yylineno;1649}16501651/** Get the input stream.1652*1653*/1654FILE *yyget_in (void)1655{1656return yyin;1657}16581659/** Get the output stream.1660*1661*/1662FILE *yyget_out (void)1663{1664return yyout;1665}16661667/** Get the length of the current token.1668*1669*/1670int yyget_leng (void)1671{1672return yyleng;1673}16741675/** Get the current token.1676*1677*/16781679char *yyget_text (void)1680{1681return yytext;1682}16831684/** Set the current line number.1685* @param _line_number line number1686*1687*/1688void yyset_lineno (int _line_number )1689{16901691yylineno = _line_number;1692}16931694/** Set the input stream. This does not discard the current1695* input buffer.1696* @param _in_str A readable stream.1697*1698* @see yy_switch_to_buffer1699*/1700void yyset_in (FILE * _in_str )1701{1702yyin = _in_str ;1703}17041705void yyset_out (FILE * _out_str )1706{1707yyout = _out_str ;1708}17091710int yyget_debug (void)1711{1712return yy_flex_debug;1713}17141715void yyset_debug (int _bdebug )1716{1717yy_flex_debug = _bdebug ;1718}17191720static int yy_init_globals (void)1721{1722/* Initialization is the same as for the non-reentrant scanner.1723* This function is called from yylex_destroy(), so don't allocate here.1724*/17251726(yy_buffer_stack) = NULL;1727(yy_buffer_stack_top) = 0;1728(yy_buffer_stack_max) = 0;1729(yy_c_buf_p) = NULL;1730(yy_init) = 0;1731(yy_start) = 0;17321733/* Defined in main.c */1734#ifdef YY_STDINIT1735yyin = stdin;1736yyout = stdout;1737#else1738yyin = NULL;1739yyout = NULL;1740#endif17411742/* For future reference: Set errno on error, since we are called by1743* yylex_init()1744*/1745return 0;1746}17471748/* yylex_destroy is for both reentrant and non-reentrant scanners. */1749int yylex_destroy (void)1750{17511752/* Pop the buffer stack, destroying each element. */1753while(YY_CURRENT_BUFFER){1754yy_delete_buffer( YY_CURRENT_BUFFER );1755YY_CURRENT_BUFFER_LVALUE = NULL;1756yypop_buffer_state();1757}17581759/* Destroy the stack itself. */1760yyfree((yy_buffer_stack) );1761(yy_buffer_stack) = NULL;17621763/* Reset the globals. This is important in a non-reentrant scanner so the next time1764* yylex() is called, initialization will occur. */1765yy_init_globals( );17661767return 0;1768}17691770/*1771* Internal utility routines.1772*/17731774#ifndef yytext_ptr1775static void yy_flex_strncpy (char* s1, const char * s2, int n )1776{17771778int i;1779for ( i = 0; i < n; ++i )1780s1[i] = s2[i];1781}1782#endif17831784#ifdef YY_NEED_STRLEN1785static int yy_flex_strlen (const char * s )1786{1787int n;1788for ( n = 0; s[n]; ++n )1789;17901791return n;1792}1793#endif17941795void *yyalloc (yy_size_t size )1796{1797return malloc(size);1798}17991800void *yyrealloc (void * ptr, yy_size_t size )1801{18021803/* The cast to (char *) in the following accommodates both1804* implementations that use char* generic pointers, and those1805* that use void* generic pointers. It works with the latter1806* because both ANSI C and C++ allow castless assignment from1807* any pointer type to void*, and deal with argument conversions1808* as though doing an assignment.1809*/1810return realloc(ptr, size);1811}18121813void yyfree (void * ptr )1814{1815free( (char *) ptr ); /* see yyrealloc() for (char *) cast */1816}18171818#define YYTABLES_NAME "yytables"18191820#line 67 "tokenizer.l"182118221823int32_t1824number(void)1825{1826long l;18271828errno = 0;1829l = strtol(yytext, NULL, 0);1830if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) ||1831l > INT32_MAX || l < INT32_MIN) {1832m4_warnx("numeric overflow in expr: %s", yytext);1833}1834return l;1835}18361837int32_t1838parse_radix(void)1839{1840long base;1841char *next;1842long l;1843int d;18441845l = 0;1846base = strtol(yytext+2, &next, 0);1847if (base > 36 || next == NULL) {1848m4_warnx("error in number %s", yytext);1849} else {1850next++;1851while (*next != 0) {1852if (*next >= '0' && *next <= '9')1853d = *next - '0';1854else if (*next >= 'a' && *next <= 'z')1855d = *next - 'a' + 10;1856else {1857assert(*next >= 'A' && *next <= 'Z');1858d = *next - 'A' + 10;1859}1860if (d >= base) {1861m4_warnx("error in number %s", yytext);1862return 0;1863}1864l = base * l + d;1865next++;1866}1867}1868return l;1869}18701871187218731874