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

📄 shell.c

📁 VXWORKS源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
/********************************************************************************* convDouble - convert value to double*/LOCAL void convDouble (pValue)    FAST VALUE *pValue;    {    double value;    if ((int)pValue->type < (int)T_DOUBLE)	{	convFloat (pValue);	value = pValue->value.fp;	pValue->value.dp = value;	pValue->type = T_DOUBLE;	}    }#endif	/* _WRS_NO_TGT_SHELL_FP */static const yytabelem yyexca[] ={-1, 1,	0, -1,	-2, 0,	};# define YYNPROD 63# define YYLAST 810static const yytabelem yyact[]={    29,    32,   106,    21,    21,    27,    25,    20,    26,   108,    28,   105,   104,   115,   111,   107,    69,     1,    66,    11,    68,     2,     0,    42,    55,    41,    22,    29,    32,     0,    21,     0,    27,    25,     0,    26,     0,    28,    67,     0,     0,     0,     0,     0,     0,     0,     0,     0,   109,     0,    42,    55,    41,    22,    23,    23,   110,    33,     0,     0,     0,     0,     0,     0,     0,    29,    32,     0,    21,   103,    27,    25,     0,    26,     0,    28,     0,     0,     0,     0,     0,    23,     0,     0,    33,     0,     0,    34,    42,    55,    41,    22,    29,    32,     0,    21,     0,    27,    25,     0,    26,     0,    28,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,    34,    42,    55,    41,    22,    23,     0,     0,    33,     0,     0,     0,     0,     0,    29,    32,     0,    21,     0,    27,    25,     0,    26,     0,    28,     0,     0,     0,     0,     0,     0,     0,    23,     0,     0,    33,     0,    42,    34,    41,    22,    29,    32,     0,    21,     0,    27,    25,     0,    26,     0,    28,    29,    32,     0,    21,     0,    27,    25,     0,    26,     0,    28,     0,    42,    34,    41,     0,    23,     0,     0,    33,     0,    29,     0,    42,    21,    41,    27,    25,     0,    26,     0,    28,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,    23,     0,     0,    33,     0,     0,    34,     0,     0,     0,     0,    23,     0,     0,    33,     0,     0,     0,     0,    36,    35,    37,    38,    39,    40,    43,    44,    31,    30,     0,    24,    24,    23,    34,    51,    52,    49,    45,    46,    53,    54,    47,    48,    50,    34,     0,    36,    35,    37,    38,    39,    40,    43,    44,    31,    30,     0,    24,    21,     0,     0,    51,    52,    49,    45,    46,    53,    54,    47,    48,    50,    29,    32,     0,    21,     0,    27,    25,     0,    26,     0,    28,     0,     0,    36,    35,    37,    38,    39,    40,    43,    44,    31,    30,    42,    24,    41,     0,     0,    51,    52,    49,    45,    46,    53,    54,    47,    48,    50,    23,     0,    36,    35,    37,    38,    39,    40,    43,    44,    31,    30,     0,    24,     0,     0,    23,    51,    52,    49,    45,    46,    53,    54,    47,    48,    50,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,    36,    35,    37,    38,    39,    40,    43,    44,    31,    30,     0,    24,     0,     0,    29,    32,     0,    21,     0,    27,    25,     0,    26,     0,    28,     0,     0,     0,    35,    37,    38,    39,    40,    43,    44,    31,    30,    42,    24,    41,    37,    38,    39,    40,    43,    44,    31,    30,     0,    24,    29,     0,     0,    21,     0,    27,    25,     0,    26,     0,    28,     0,     0,     0,     0,    43,    44,     0,    23,    15,    24,    33,     0,    42,    13,    41,    10,     0,    12,     0,     0,    14,    29,     0,     0,    21,     0,    27,    25,     0,    26,    29,    28,     0,    21,     0,    27,    25,     0,    26,     0,    28,     0,     0,    23,    42,    15,    41,     0,     0,     0,    13,     0,    10,    29,    12,     0,    21,    14,    27,     0,     0,     0,     0,    28,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,    23,     0,     0,     0,     0,     0,    43,    44,     0,    23,     0,    24,     0,     0,     0,     0,     0,     0,    37,    38,    39,    40,    43,    44,    31,    30,    16,    24,     0,     0,     0,     0,    23,     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,    16,     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,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,    37,    38,    39,    40,    43,    44,    31,    30,     0,    24,     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,    37,    38,    39,    40,    43,    44,    31,    30,     0,    24,     0,     0,     0,     0,     5,     4,    19,     8,     7,     6,     9,     0,     0,     0,     0,     0,     0,    17,    18,     0,     0,     0,     0,    57,    39,    40,    43,    44,    31,    30,     0,    24,     0,     0,     0,    43,    44,    31,    30,     0,    24,     5,     4,    19,     8,     7,     6,     9,     0,     0,     0,     0,     0,     3,    17,    18,     0,     0,    43,    44,     0,     0,     0,    24,    56,    58,    59,    60,    61,    62,    63,    64,    65,     0,     0,    70,    71,    72,    73,    74,    75,    76,    77,    78,    79,    80,    81,    82,    83,    84,    85,    86,    87,    88,    89,    90,    91,     0,     0,    92,    93,    94,    95,    96,    97,    98,    99,   100,   101,   102,     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,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,   112,     0,   113,   114 };static const yytabelem yypact[]={   429,-10000000,   -52,    55,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,   392,   429,   429,   429,   429,   429,   429,   429,   429,-10000000,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,-10000000,-10000000,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,   429,    28,   -29,-10000000,   -36,   -36,   -36,   -36,   -36,   -36,   -36,   -59,-10000000,   -26,   -35,    55,   -10,   -37,-10000000,   433,   433,   227,   227,   227,   150,   150,   369,   243,   333,   129,   118,   401,   401,   410,   410,   410,   410,    91,    91,    91,    91,    91,    91,    91,    91,    91,    91,    91,-10000000,-10000000,   -27,   429,-10000000,   429,   429,-10000000,   -28,    91,    55,    91,-10000000 };static const yytabelem yypgo[]={     0,    17,    21,   699,    20,    19,    18,    16 };static const yytabelem yyr1[]={     0,     1,     1,     2,     2,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,     6,     3,     4,     4,     7,     7,     5,     5 };static const yytabelem yyr2[]={     0,     2,     6,     0,     3,     2,     3,     3,     2,     2,     2,     7,     9,     5,     5,     5,     5,     5,     5,    11,     9,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     5,     5,     5,     5,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,     1,     9,     1,     2,     3,     7,     7,    11 };static const yytabelem yychk[]={-10000000,    -1,    -2,    -3,   259,   258,   263,   262,   261,   264,    40,    -5,    42,    38,    45,    33,   126,   271,   272,   260,    59,    40,    63,    91,   276,    43,    45,    42,    47,    37,   274,   273,    38,    94,   124,   266,   265,   267,   268,   269,   270,    62,    60,   271,   272,   283,   284,   287,   288,   282,   289,   280,   281,   285,   286,    61,    -3,   277,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -6,    -1,    -4,    -7,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    -3,    41,    41,    40,    61,    41,    44,    58,    93,    41,    -3,    -3,    -3,    41 };static const yytabelem yydef[]={     3,    -2,     1,     4,     5,     6,     7,     8,     9,    10,     0,     0,     0,     0,     0,     0,     0,     0,     0,    55,     3,    57,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,    42,    43,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,    13,    14,    15,    16,    17,    18,    40,    41,     0,     2,     0,    58,    59,     0,     0,    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,    36,    37,    38,    39,    44,    45,    46,    47,    48,    49,    50,    51,    52,    53,    54,    11,    61,     0,     0,    12,     0,     0,    20,     0,    56,    60,    19,    62 };typedef struct#ifdef __cplusplus	yytoktype#endif{ char *t_name; int t_val; } yytoktype;#ifndef YYDEBUG#	define YYDEBUG	0	/* don't allow debugging */#endif#if YYDEBUGyytoktype yytoks[] ={	"NL",	0,	"T_SYMBOL",	258,	"D_SYMBOL",	259,	"U_SYMBOL",	260,	"NUMBER",	261,	"CHAR",	262,	"STRING",	263,	"FLOAT",	264,	"OR",	265,	"AND",	266,	"EQ",	267,	"NE",	268,	"GE",	269,	"LE",	270,	"INCR",	271,	"DECR",	272,	"ROT_LEFT",	273,	"ROT_RIGHT",	274,	"UMINUS",	275,	"PTR",	276,	"TYPECAST",	277,	"ENDFILE",	278,	"LEX_ERROR",	279,	"=",	61,	"MULA",	280,	"DIVA",	281,	"MODA",	282,	"ADDA",	283,	"SUBA",	284,	"SHLA",	285,	"SHRA",	286,	"ANDA",	287,	"ORA",	288,	"XORA",	289,	"?",	63,	":",	58,	"|",	124,	"^",	94,	"&",	38,	">",	62,	"<",	60,	"+",	43,	"-",	45,	"*",	42,	"/",	47,	"%",	37,	"UNARY",	290,	"[",	91,	"(",	40,	"-unknown-",	-1	/* ends search */};char * yyreds[] ={	"-no such reduction-",	"line : stmt",	"line : stmt ';' line",	"stmt : /* empty */",	"stmt : expr",	"expr : D_SYMBOL",	"expr : T_SYMBOL",	"expr : STRING",	"expr : CHAR",	"expr : NUMBER",	"expr : FLOAT",	"expr : '(' expr ')'",	"expr : expr '(' arglist ')'",	"expr : typecast expr",	"expr : '*' expr",	"expr : '&' expr",	"expr : '-' expr",	"expr : '!' expr",	"expr : '~' expr",	"expr : expr '?' expr ':' expr",	"expr : expr '[' expr ']'",	"expr : expr PTR expr",	"expr : expr '+' expr",	"expr : expr '-' expr",	"expr : expr '*' expr",	"expr : expr '/' expr",	"expr : expr '%' expr",	"expr : expr ROT_RIGHT expr",	"expr : expr ROT_LEFT expr",	"expr : expr '&' expr",	"expr : expr '^' expr",	"expr : expr '|' expr",	"expr : expr AND expr",	"expr : expr OR expr",	"expr : expr EQ expr",	"expr : expr NE expr",	"expr : expr GE expr",	"expr : expr LE expr",	"expr : expr '>' expr",	"expr : expr '<' expr",	"expr : INCR expr",	"expr : DECR expr",	"expr : expr INCR",	"expr : expr DECR",	"expr : expr ADDA expr",	"expr : expr SUBA expr",	"expr : expr ANDA expr",	"expr : expr ORA expr",	"expr : expr MODA expr",	"expr : expr XORA expr",	"expr : expr MULA expr",	"expr : expr DIVA expr",	"expr : expr SHLA expr",	"expr : expr SHRA expr",	"expr : expr '=' expr",	"expr : U_SYMBOL",	"expr : U_SYMBOL '=' expr",	"arglist : /* empty */",	"arglist : neArglist",	"neArglist : expr",	"neArglist : neArglist ',' expr",	"typecast : '(' TYPECAST ')'",	"typecast : '(' TYPECAST '(' ')' ')'",};#endif /* YYDEBUG */# line	1 "/usr/ccs/bin/yaccpar"/* * Copyright (c) 1993 by Sun Microsystems, Inc. */#pragma ident	"@(#)yaccpar	6.15	97/12/08 SMI"/*** Skeleton parser driver for yacc output*//*** yacc user known macros and defines*/#define YYERROR		goto yyerrlab#define YYACCEPT	return(0)#define YYABORT		return(1)#define YYBACKUP( newtoken, newvalue )\{\	if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\	{\		yyerror( "syntax error - cannot backup" );\		goto yyerrlab;\	}\	yychar = newtoken;\	yystate = *yyps;\	yylval = newvalue;\	goto yynewstate;\}#define YYRECOVERING()	(!!yyerrflag)#define YYNEW(type)	malloc(sizeof(type) * yynewmax)#define YYCOPY(to, from, type) \	(type *) memcpy(to, (char *) from, yymaxdepth * sizeof (type))#define YYENLARGE( from, type) \	(type *) realloc((char *) from, yynewmax * sizeof(type))#ifndef YYDEBUG#	define YYDEBUG	1	/* make debugging available */#endif/*** user known globals*/int yydebug;			/* set to 1 to get debugging *//*** driver internal defines*/#define YYFLAG		(-10000000)/*** global variables used by the parser*/YYSTYPE *yypv;			/* top of value stack */int *yyps;			/* top of state stack */int yystate;			/* current state */int yytmp;			/* extra var (lasts between blocks) */int yynerrs;			/* number of errors */int yyerrflag;			/* error recovery flag */int yychar;			/* current input token number */#ifdef YYNMBCHARS#define YYLEX()		yycvtok(yylex())/*** yycvtok - return a token if i is a wchar_t value that exceeds 255.**	If i<255, i itself is the token.  If i>255 but the neither **	of the 30th or 31st bit is on, i is already a token.*/#if defined(__STDC__) || defined(__cplusplus)int yycvtok(int i)#elseint yycvtok(i) int i;#endif{	int first = 0;	int last = YYNMBCHARS - 1;	int mid;	wchar_t j;	if(i&0x60000000){/*Must convert to a token. */		if( yymbchars[last].character < i ){			return i;/*Giving up*/		}		while ((last>=first)&&(first>=0)) {/*Binary search loop*/			mid = (first+last)/2;			j = yymbchars[mid].character;			if( j==i ){/*Found*/ 				return yymbchars[mid].tvalue;			}else if( j<i ){				first = mid + 1;			}else{				last = mid -1;			}		}		/*No entry in the table.*/		return i;/* Giving up.*/	}else{/* i is already a token. */		return i;	}}#else/*!YYNMBCHARS*/#define YYLEX()		yylex()#endif/*!YYNMBCHARS*//*** yyparse - return 0 if worked, 1 if syntax error not recovered from*/#if defined(__STDC__) || defined(__cplusplus)int yyparse(void)#elseint yyparse()#endif{	register YYSTYPE *yypvt = 0;	/* top of value stack for $vars */#if defined(__cplusplus) || defined(lint)/*	hacks to please C++ and lint - goto's inside switch should never be	executed; yypvt is set to 0 to avoid "used before set" warning.*/	static int __yaccpar_lint_hack__ = 0;	switch (__yaccpar_lint_hack__)	{		case 1: goto yyerrlab;		case 2: goto yynewstate;	}#endif	/*	** Initialize externals - yyparse may be called more than once	*/	yypv = &yyv[-1];	yyps = &yys[-1];	yystate = 0;	yytmp = 0;	yynerrs = 0;	yyerrflag = 0;	yychar = -1;#if YYMAXDEPTH <= 0	if (yymaxdepth <= 0)	{		if ((yymaxdepth = YYEXPAND(0)) <= 0)		{			yyerror("yacc initialization error");			YYABORT;		}	}#endif	{		register YYSTYPE *yy_pv;	/* top of value stack */		register int *yy_ps;		/* top of state stack */		register int yy_state;		/* current state */		register int  yy_n;		/* internal state number info */	goto yystack;	/* moved from 6 lines above to here to please C++ */		/*		** get globals into registers.		** branch to here only if YYBACKUP was called.		*/	yynewstate:		yy_pv = yypv;		yy_ps = yyps;		yy_state = yystate;		goto yy_newstate;		/*		** get globals into registers.		** either we just started, or we just finished a reduction		*/	yystack:		yy_pv = yypv;		yy_ps = yyps;		yy_state = yystate;		/*		** top of for (;;) loop while no reductions done		*/	yy_stack:		/*		** put a state and value onto the stacks		*/#if YYDEBUG		/*		** if debugging, look up token value in list of value vs.		** name pairs.  0 and negative (-1) are special values.		** Note: linear search is used since time is not a real		** consideration while debugging.		*/		if ( yydebug )		{			register int yy_i;			printf( "State %d, token ", yy_state );			if ( yychar == 0 )				printf( "end-of-file\n" );			else if ( yychar < 0 )				printf( "-none-\n" );			else			{				for ( yy_i = 0; yytoks[yy_i].t_val >= 0;					yy_i++ )				{					if ( yytoks[yy_i].t_val == yychar )						break;				}				printf( "%s\n", yytoks[yy_i].t_name );			}		}#endif /* YYDEBUG */		if ( ++yy_ps >= &yys[ yymaxdepth ] )	/* room on stack? */

⌨️ 快捷键说明

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