⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initscan.c

📁 早期freebsd实现
💻 C
📖 第 1 页 / 共 5 页
字号:
/* A lexical scanner generated by flex *//* Scanner skeleton version: * $Header: /usr/src/contrib/lex/flex-2.4.6/RCS/flex.skl,v 1.2 1994/01/04 23:36:59 vern Exp $ */#define BSD_LEX_SCANNER#include <stdio.h>/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */#ifdef c_plusplus#ifndef __cplusplus#define __cplusplus#endif#endif#ifdef __cplusplus#include <stdlib.h>#include <unistd.h>/* Use prototypes in function declarations. */#define YY_USE_PROTOS/* The "const" storage-class-modifier is valid. */#define YY_USE_CONST#else	/* ! __cplusplus */#ifdef __STDC__#define YY_USE_PROTOS#define YY_USE_CONST#endif	/* __STDC__ */#endif	/* ! __cplusplus */#ifdef __TURBOC__#define YY_USE_CONST#endif#ifndef YY_USE_CONST#ifndef const#define const#endif#endif#ifdef YY_USE_PROTOS#define YY_PROTO(proto) proto#else#define YY_PROTO(proto) ()#endif/* Returned upon end-of-file. */#define YY_NULL 0/* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index.  If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)/* Enter a start condition.  This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */#define BEGIN yy_start = 1 + 2 */* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. */#define YY_START ((yy_start - 1) / 2)/* Action number for EOF rule of a given start state. */#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)/* Special action meaning "start processing a new file".  Now included * only for backward compatibility with previous versions of flex. */#define YY_NEW_FILE yyrestart( yyin )#define YY_END_OF_BUFFER_CHAR 0/* Size of default input buffer. */#define YY_BUF_SIZE 16384typedef struct yy_buffer_state *YY_BUFFER_STATE;extern int yyleng;extern FILE *yyin, *yyout;#ifdef __cplusplusextern "C" {#endif	extern int yywrap YY_PROTO(( void ));#ifdef __cplusplus	}#endif#define EOB_ACT_CONTINUE_SCAN 0#define EOB_ACT_END_OF_FILE 1#define EOB_ACT_LAST_MATCH 2/* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator).  This * avoids problems with code like: * * 	if ( condition_holds ) *		yyless( 5 ); *	else *		do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. *//* Return all but the first 'n' matched characters back to the input stream. */#define yyless(n) \	do \		{ \		/* Undo effects of setting up yytext. */ \		*yy_cp = yy_hold_char; \		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \		YY_DO_BEFORE_ACTION; /* set up yytext again */ \		} \	while ( 0 )#define unput(c) yyunput( c, yytext_ptr )struct yy_buffer_state	{	FILE *yy_input_file;	char *yy_ch_buf;		/* input buffer */	char *yy_buf_pos;		/* current position in input buffer */	/* Size of input buffer in bytes, not including room for EOB	 * characters.	 */	int yy_buf_size;	/* Number of characters read into yy_ch_buf, not including EOB	 * characters.	 */	int yy_n_chars;	/* Whether this is an "interactive" input source; if so, and	 * if we're using stdio for input, then we want to use getc()	 * instead of fread(), to make sure we stop fetching input after	 * each newline.	 */	int yy_is_interactive;	/* Whether to try to fill the input buffer when we reach the	 * end of it.	 */	int yy_fill_buffer;	/* Whether we've seen an EOF on this buffer. */	int yy_eof_status;#define EOF_NOT_SEEN 0	/* "Pending" happens when the EOF has been seen but there's still	 * some text to process.  Note that when we actually see the EOF,	 * we switch the status back to "not seen" (via yyrestart()), so	 * that the user can continue scanning by just pointing yyin at	 * a new input file.	 */#define EOF_PENDING 1	};static YY_BUFFER_STATE yy_current_buffer = 0;/* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */#define YY_CURRENT_BUFFER yy_current_buffer/* yy_hold_char holds the character lost when yytext is formed. */static char yy_hold_char;static int yy_n_chars;		/* number of characters read into yy_ch_buf */int yyleng;/* Points to current character in buffer. */static char *yy_c_buf_p = (char *) 0;static int yy_init = 1;		/* whether we need to initialize */static int yy_start = 0;	/* start state number *//* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin.  A bit of a hack ... */static int yy_did_buffer_switch_on_eof;static void yyunput YY_PROTO(( int c, char *buf_ptr ));void yyrestart YY_PROTO(( FILE *input_file ));void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));void yy_load_buffer_state YY_PROTO(( void ));YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));static int yy_start_stack_ptr = 0;static int yy_start_stack_depth = 0;static int *yy_start_stack = 0;static void yy_push_state YY_PROTO(( int new_state ));static void yy_pop_state YY_PROTO(( void ));static int yy_top_state YY_PROTO(( void ));#ifndef yytext_ptrstatic void yy_flex_strcpy YY_PROTO(( char *, const char * ));#endifstatic void *yy_flex_alloc YY_PROTO(( unsigned int ));static void *yy_flex_realloc YY_PROTO(( void *ptr, unsigned int ));static void yy_flex_free YY_PROTO(( void * ));#define yy_new_buffer yy_create_buffer#define INITIAL 0#define SECT2 1#define SECT2PROLOG 2#define SECT3 3#define CODEBLOCK 4#define PICKUPDEF 5#define SC 6#define CARETISBOL 7#define NUM 8#define QUOTE 9#define FIRSTCCL 10#define CCL 11#define ACTION 12#define RECOVER 13#define BRACEERROR 14#define C_COMMENT 15#define ACTION_COMMENT 16#define ACTION_STRING 17#define PERCENT_BRACE_ACTION 18#define USED_LIST 19#define CODEBLOCK_2 20typedef unsigned char YY_CHAR;typedef int yy_state_type;FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;extern char *yytext;#define yytext_ptr yytext#ifdef __cplusplusstatic int yyinput YY_PROTO(( void ));#elsestatic int input YY_PROTO(( void ));#endifstatic yy_state_type yy_get_previous_state YY_PROTO(( void ));static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));static int yy_get_next_buffer YY_PROTO(( void ));static void yy_fatal_error YY_PROTO(( const char msg[] ));/* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */#define YY_DO_BEFORE_ACTION \	yytext_ptr = yy_bp; \	yyleng = yy_cp - yy_bp; \	yy_hold_char = *yy_cp; \	*yy_cp = '\0'; \	yy_c_buf_p = yy_cp;#define YY_END_OF_BUFFER 113static const short int yy_accept[408] =    {   0,        0,    0,    0,    0,   41,   41,  110,  110,    0,    0,        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,        0,    0,  113,  111,    6,   17,  111,   15,    1,   16,      111,  111,  111,   14,   60,   53,   54,   60,   47,   60,       59,   60,   60,   60,   60,   44,   43,   60,   60,   45,       46,   41,   42,   41,   40,   39,   40,   40,  110,  110,       26,   27,   26,   26,   26,   26,   26,   26,   29,   28,       30,   29,   65,   61,   62,   64,   66,   80,   81,   80,       78,   77,   79,   67,   69,   67,   68,   67,   72,   72,       72,   74,   76,   74,   74,   74,   75,   92,   97,   92,       96,   98,   98,   93,   93,   93,   90,   91,  111,   31,      111,   83,  111,   82,   20,   22,   20,   21,  101,  102,      101,  100,  103,  105,  103,  106,  107,   88,   88,   89,       88,   88,   88,   88,   88,   88,   36,   33,   32,   36,       36,   36,   88,    6,   17,    0,   17,   15,    1,   16,        0,   16,   13,    7,    0,    0,    0,    3,    0,    4,        0,    2,   14,   53,   54,    0,    0,    0,   54,   50,       50,    0,    0,   57,    0,  108,  108,  108,   49,   48,       49,   44,   43,    0,   43,   56,   44,   41,   42,   40,       39,   39,   37,   38,  110,  110,   26,   27,   26,   26,       26,   26,   29,   28,   30,   63,   64,   81,   77,   69,      109,  109,  109,   70,   71,   76,   73,   92,   97,    0,       95,    0,   94,   93,   93,   93,    0,   31,    0,   31,       31,   83,   20,   22,   18,  101,  102,  101,  102,  102,       99,  103,  105,  104,   88,   88,   88,   89,   85,   88,       88,   88,   36,   33,   32,   36,   36,   84,   13,    7,        0,   12,    0,    0,    0,    0,    3,    0,    0,    4,        0,    5,    0,   51,    0,   52,    0,    0,   57,    0,       57,   57,  108,  108,   49,   49,   58,   56,   37,   38,       26,   26,   26,   23,   26,    0,  109,  109,   93,   93,        0,   19,    0,   85,   85,   88,   88,   36,   36,   12,        0,    0,    0,    3,    0,    0,    4,    5,    5,   52,       52,    0,   57,   57,   57,   57,  108,   26,   26,   23,       23,    0,  109,   93,   93,   19,   19,   88,   88,   36,       36,    0,    0,    0,   10,    0,   57,   57,   57,   57,       26,   26,   93,   93,   88,   88,   36,   36,    0,    0,        0,    0,   57,   57,   24,   25,   86,   87,   86,   87,       34,   35,    0,    9,    0,    0,   11,   55,    9,    9,        0,    0,    8,    0,    8,    8,    0    } ;static const int yy_ec[256] =    {   0,        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    2,    1,    5,    1,    6,    7,    1,    8,    9,        9,   10,    9,   11,   12,    9,   13,   14,   14,   14,       14,   14,   14,   14,   14,   14,   14,    1,    1,   15,        1,   16,    9,    1,   22,   23,   24,   25,   26,   27,       21,   21,   28,   29,   30,   21,   31,   32,   33,   34,       21,   35,   36,   37,   38,   21,   21,   39,   40,   21,       17,   18,   19,   20,   21,    1,   22,   23,   24,   25,       26,   27,   21,   21,   28,   29,   30,   21,   31,   32,       33,   34,   21,   35,   36,   37,   38,   21,   21,   39,       40,   21,   41,   42,   43,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,        1,    1,    1,    1,    1    } ;static const int yy_meta[44] =    {   0,        1,    2,    3,    1,    4,    1,    1,    5,    1,    6,        1,    7,    5,    8,    1,    1,    1,    9,   10,    1,       11,   12,   12,   12,   12,   12,   12,   11,   11,   11,       11,   11,   11,   11,   11,   11,   13,   11,   11,   11,        5,    1,   14    } ;static const short int yy_base[470] =    {   0,        0,   43,   85,  126,   89,  102, 1611, 1610,  168, 1605,      108,  111,  211,    0, 1591, 1590,  252,  254,  116,  119,       98,  122,  144,  146,  297,    0,   93,  104,  338,  340,      149,  151,  257,  266,  268,  274,  383,    0,  425,  428,     1596, 1595, 1607, 1615,  278, 1602, 1602,    0,  281, 1600,     1600,  462, 1592,    0, 1615,  431, 1597, 1597, 1615,  285,     1615, 1584, 1580,  331,  503,  437, 1593, 1593,  110, 1580,     1615,    0, 1590, 1590,    0, 1590, 1588,  221, 1587, 1615,        0, 1585, 1585, 1615,    0, 1561, 1546, 1511,    0, 1551,     1543, 1543, 1615, 1615, 1498,    0, 1615, 1615, 1500, 1487,     1615, 1463, 1615, 1615, 1466, 1460, 1615,  332, 1615,  333,      126, 1615, 1411, 1398,    0,  334, 1615,    0, 1383, 1383,     1615,  341, 1371,    0, 1354, 1336, 1615, 1615,  271, 1371,      287, 1370, 1366, 1615,    0, 1362, 1349, 1331,  290, 1335,      347, 1325,    0, 1323, 1310, 1615,    0,    0,  350, 1306,     1287, 1246, 1615,    0, 1249, 1227,    0, 1264, 1261, 1255,     1225, 1197, 1213,  351, 1213, 1213, 1615,    0,  358, 1198,     1193, 1615,    0,    0,  443,  361,  447,    0,  342,    0,      363, 1615,    0,  451, 1191, 1188, 1149,  365, 1615, 1615,     1185, 1181, 1155, 1135,  423, 1615, 1125,    0,    0, 1615,      546,  588, 1121, 1108, 1615,    0, 1615,    0, 1615,    0,        0, 1095,    0,    0, 1088, 1615,    0, 1615,    0, 1061,     1041,  630,    0, 1069, 1615, 1615,    0, 1615,  838, 1615,     1615,  837,    0, 1615, 1615, 1615, 1615,    0, 1615,  434,     1615,    0, 1615,    0,  821,  817,  373,  843,  376, 1615,      842, 1615,    0, 1615,  463,  467,  834,  471, 1615,  833,     1615,    0, 1615, 1615,    0,  441,  793, 1615,  673,    0,      805,  802,    0,  830, 1615,  795,  792, 1615,    0,    0,      594,  818,  817,  597,  784,  790,    0,  775,  786,    0,      473,  807,  478, 1615,  486,  806,  590,  776,  790,  588,      469,  703,  793,    0,    0,    0, 1615,    0,    0,    0,      780,  772,    0,  800,  800,  730,  788,    0,  775,  767,      600,  795,  602,    0,  773,  772,  764,  770,  762, 1615,      610,  772,  751,    0,  740,  745,    0, 1615,  765, 1615,      764,  740,  488,  803,  601,  817, 1615,  742,  730, 1615,      760,  760, 1615,  738,  726, 1615,  756,  735,  723,  733,      721,  714,  716,  726, 1615,  724,  602,  831,  715,  658,      512,  473,  454,  459,  435,  438,  422,  430,  606,  410,      357,  342,  338,  278,    0,    0,    0,    0,    0,    0,        0,    0,  614,  255,  618,  131, 1615, 1615, 1615,  156,      620,  622,  153,  625, 1615,   95, 1615,  858,  872,  886,      900,  914,  928,  942,  956,  970,  984,  998, 1012, 1026,     1040, 1054, 1062, 1075, 1081, 1094, 1108, 1122, 1136, 1150,     1164, 1178, 1186, 1199, 1207, 1220, 1234, 1248, 1262, 1272,     1280, 1293, 1307, 1321, 1335, 1349, 1363, 1371, 1384, 1398,     1412, 1416, 1419, 1432, 1446, 1460,  710, 1474, 1487, 1501,     1515,  711, 1529, 1537, 1544,  712,  743, 1557, 1571    } ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -