亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? vtc.c

?? 使用BorlandC++4.5編譯的一個MUD客戶端程序
?? C
?? 第 1 頁 / 共 4 頁
字號:
# line 2 "vtc.y"/* vtc.y: VTC compiler and lexical analyzer */#include "vt.h"String ptext;int debug = 0;extern int iwidth[];#define ERR_PRMTNAME	"Primitive name used as function name"#define ERR_RESERVED	"Reserved word used as identifier"#define ERR_DUPGOTO	"Duplicate goto label"#define ERR_MISBREAK	"Misplaced break statement"#define ERR_MISCONT	"Misplaced continue statement"#define ERR_DUPTAG	"Duplicate parameter or local variable name"#define ERR_UDGOTO	"One or more goto labels not defined"#define ERR_TOOMANY	"Too many parameters or local variables"#define ERR_UNTERMCHAR	"Unterminated character constant"#define ERR_UNTERMSTR	"Unterminated string constant"#define ERR_BADBRACE	"Illegal placement of right brace"#define ERR_ILLFUNC	"Illegal placement of reserved word func"/* The intermediate program */#define INIT_CODE 256static Instr *icode;static int loc = 0, codesize;#define Check_code(n) Check(icode, Instr, codesize, loc + (n))#define Hexdigitvalue(a) (isdigit(a) ? a - '0' : ucase(a) - 'A' + 10)#define Code(t) if (1) { Check_code(1); icode[loc++].type = t; } else#define Code2(t, elem, val) if (1) { Check_code(2); icode[loc++].type = t; \				     icode[loc++].elem = val; } else#define Code_iconst(val) Code2(I_ICONST, iconst, val)#define Code_pcall(pn, ac) if (1) { Check_code(2); \				    icode[loc++].type = I_PCALL; \				    icode[loc].pc.pnum = pn; \				    icode[loc++].pc.argc = ac; } else#define Code_fcall(id, ac) if (1) { Check_code(2); \				    icode[loc++].type = I_FCALL; \				    icode[loc++].argc = ac; \				    icode[loc++].ident = id; } elsetypedef struct label {	char *name;	int offset;	struct label *next;} Label;#define MAXILEN 32static Label *lhead = NULL;#ifdef PROTOTYPESstatic void code_var(char *);static void code_goto(char *, int);static void free_labels(void);static void add_tag(char **, int *, char *);static int find_tag(char **, int, char *);static char *parse_token(char *);static int read_char(char **);static int enter_sconst(Cstr);static char *read_string(char *);static char *read_comment(char *);static void compile(void);static void scan(void);static void cleanup_parse();static void lexerror(char *);static void yyerror(char *);static int yylex(void);#elsestatic void compile(), scan(), cleanup_parse(), lexerror(), yyerror();static void code_var(), free_labels(), add_tag(), code_goto();static char *parse_token(), *read_string(), *read_comment();#endif#define INIT_JMP 64#define INIT_COND 16int *jmptab, jmpsize, jmppos;int *condstack, condsize, condpos;int *loopstack, loopsize, looppos;#define Incjmp(n)	Check(jmptab, int, jmpsize, jmppos += (n))#define Pushcond(x)	Push(condstack, int, condsize, condpos, x)#define Pushloop(x)	Push(loopstack, int, loopsize, looppos, x)#define Peekloop	(loopstack[looppos - 1])#define Incloop(n)	if (1) { Pushloop(jmppos); Incjmp(n); } else#define Decloop		looppos--#define Ljmp(l, t)	Code2(t, offset, Peekloop + (l))#define Ldest(l)	(jmptab[Peekloop + (l)] = loc)#define Break		if (looppos) Code2(I_JMP, offset, Peekloop + 1); \			else yyerror(ERR_MISBREAK)#define Continue	if (looppos) Code2(I_JMP, offset, Peekloop); \			else yyerror(ERR_MISCONT)#define Jmp(t)		if (1) { Pushcond(jmppos); Code2(t, offset, jmppos); \				 Incjmp(1); } else#define Dest		(jmptab[condstack[--condpos]] = loc)#define Destnext	(jmptab[condstack[--condpos]] = loc + 2)#define Return		Code2(I_JMP, offset, 0)/* Local vars and array vars */#define MAX_TAGS 32static char *lvars[MAX_TAGS], *avars[MAX_TAGS];static int lvarc = 0, avarc = 0, reqargs = 0;static int lexline = -1;		/* Line being analyzed	     */static int parseline = -1;		/* Line being parsed	     */static int errflag;			/* Error flag		     */static char *curfunc = "";		/* Name of current function  */static char *curfile = "";		/* Name of current file	     */extern Prmt prmtab[];#define OP_BOR	     0#define OP_BXOR	     1#define OP_BAND	     2#define OP_EQ	     3#define OP_NE	     4#define OP_LT	     5#define OP_LE	     6#define OP_GT	     7#define OP_GE	     8#define OP_SL	     9#define OP_SR	    10#define OP_ADD	    11#define OP_SUB	    12#define OP_MULT	    13#define OP_DIV	    14#define OP_MOD	    15#define OP_POSTINC  16#define OP_POSTDEC  17#define OP_PREINC   18#define OP_PREDEC   19#define OP_NOT	    20#define OP_COMPL    21#define OP_NEG	    22#define OP_ASN	    23#define PR_LOOKUP   102# line 136 "vtc.y"typedef union  {	int num;	int index;	void (*bobj)();	int str;	char *s;} YYSTYPE;#ifdef __cplusplus#  include <stdio.h>#  include <yacc.h>#endif	/* __cplusplus */ # define ICONST 257# define SCONST 258# define BOBJ 259# define IDENT 260# define FUNC 261# define FASSIGN 262# define DO 263# define WHILE 264# define IF 265# define ELSE 266# define FOR 267# define GOTO 268# define BREAK 269# define CONTINUE 270# define RETURN 271# define TA 272# define DA 273# define MA 274# define AA 275# define SA 276# define SLA 277# define SRA 278# define BAA 279# define BXA 280# define BOA 281# define CONDA 282# define DEREF 283# define OR 284# define AND 285# define EQ 286# define NE 287# define LE 288# define GE 289# define SL 290# define SR 291# define INC 292# define DEC 293#define yyclearin yychar = -1#define yyerrok yyerrflag = 0extern int yychar;#ifndef YYMAXDEPTH#define YYMAXDEPTH 150#endif/* __YYSCLASS defines the scoping/storage class for global objects * that are NOT renamed by the -p option.  By default these names * are going to be 'static' so that multi-definition errors * will not occur with multiple parsers. * If you want (unsupported) access to internal names you need * to define this to be null so it implies 'extern' scope. * This should not be used in conjunction with -p. */#ifndef __YYSCLASS# define __YYSCLASS static#endifYYSTYPE yylval;__YYSCLASS YYSTYPE yyval;typedef int yytabelem;# define YYERRCODE 256# line 361 "vtc.y"/* Auxiliary compiler functions */static void code_var(ident)	char *ident;{	int tag;	if ((tag = find_tag(avars, avarc, ident)) != -1)		Code2(I_AVAR, tnum, tag);	else if ((tag = find_tag(lvars, lvarc, ident)) != -1)		Code2(I_LVAR, tnum, tag);	else		Code2(I_GVAR, ident, ident);}static void code_goto(name, to)	char *name;	int to;{	Label *label;	for (label = lhead; label; label = label->next) {		if (streq(label->name, name)) {			if (to)				Code2(I_JMP, offset, label->offset);			else if (jmptab[label->offset] == -1)				jmptab[label->offset] = loc;			else				yyerror(ERR_DUPGOTO);			return;		}	}	label = New(Label);	label->name = name;	label->offset = jmppos;	Push(jmptab, int, jmpsize, jmppos, to ? -1 : loc);	if (to)		Code2(I_JMP, offset, label->offset);	label->next = lhead;	lhead = label;}static void free_labels(){	Label *label = lhead, *next;	for (label = lhead; label; label = next) {		next = label->next;		if (jmptab[label->offset] == -1)			yyerror(ERR_UDGOTO);		Discard(label, Label);	}	lhead = NULL;}static void add_tag(table, pos, tag)	char *table[], *tag;	int *pos;{	int i;	for (i = 0; i < *pos; i++) {		if (!strcmp(table[i], tag)) {			yyerror(ERR_DUPTAG);			return;		}	}	if (*pos == MAX_TAGS)		yyerror(ERR_TOOMANY);	else		table[(*pos)++] = tag;}static int find_tag(table, num, ident)	char *table[], *ident;	int num;{	int i;	for (i = 0; i < num; i++) {		if (streq(table[i], ident))			return i;	}	return -1;}/* The lexical analyzer */typedef struct token {	int type;	YYSTYPE val;} Token;Token *tokbuf;int tokpos = 0, toksize;#define INIT_TOKENS 128#define Textend Checkinc(tokbuf, Token, toksize, tokpos)#define Add_vtoken(t, elem, v) if (1) { Textend; tokbuf[tokpos].type = (t); \					tokbuf[tokpos++].val.elem = (v); } else#define Add_ntoken(t) if (1) { Textend; tokbuf[tokpos++].type = (t); } else#define INIT_SCONST 32#define INIT_IDENTS 64static Cstr *sconsts;			/* Allocated string constants */static char **idents;			/* Allocated identifiers */static int sconstpos = 0, identpos = 0, sconstsize, identsize;static int braces = 0, incomment = 0, instring = 0, infunc = 0, tokindex;static String sbuf;static char *ecodes = "ntvbrf\\'\"";static char *results = "\n\t\v\b\r\f\\'\"";static int begin[128], end[128];	/* Lookup table for words */static char transtab[128];		/* Table for escape codes *//* Table of reserved words and compound operators *//* These do not need to be in alphabetical order, but words with the** same first character must be adjacent.  Among compound operators** with the same first character, longer operators should come first. */static struct word {	char *s;	int val;} words[] = {	{ ""		, 0		},	{ "do"		, DO		},	{ "while"	, WHILE		},	{ "if"		, IF		},	{ "else"	, ELSE		},	{ "for"		, FOR		},	{ "func"	, FUNC		},	{ "goto"	, GOTO		},	{ "break"	, BREAK		},	{ "continue"	, CONTINUE	},	{ "return"	, RETURN	},	{ "^="		, BXA		},	{ "*="		, TA		},	{ "/="		, DA		},	{ "%="		, MA		},	{ "+="		, AA		},	{ "++"		, INC		},	{ "-="		, SA		},	{ "-->"		, FASSIGN	},	{ "--"		, DEC		},	{ "->"		, DEREF		},	{ "<<="		, SLA		},	{ "<<"		, SL		},	{ "<="		, LE		},	{ ">>="		, SRA		},	{ ">>"		, SR		},	{ ">="		, GE		},	{ "&="		, BAA		},	{ "&&"		, AND		},	{ "|="		, BOA		},	{ "||"		, OR		},	{ "=="		, EQ		},	{ "!="		, NE		},	{ "?:="		, CONDA		},	{ ""		, 0		}};#define NWORDS (sizeof(words) / sizeof(struct word) - 1)/* Set up data */void init_compile(){	int i;	bzero(begin, sizeof(begin));	bzero(end, sizeof(end));	for (i = 0; i < NWORDS; i++) {		begin[*words[i].s] = i;		while (*words[i + 1].s == *words[i].s)			i++;		end[*words[i].s] = i;	}	bzero(transtab, sizeof(transtab));	for (i = 0; ecodes[i]; i++)		transtab[ecodes[i]] = results[i];	tokbuf = Newarray(Token, toksize = INIT_TOKENS);	icode = Newarray(Instr, codesize = INIT_CODE);	sconsts = Newarray(Cstr, sconstsize = INIT_SCONST);	idents = Newarray(char *, identsize = INIT_IDENTS);	jmptab = Newarray(int, jmpsize = INIT_JMP);	condstack = Newarray(int, condsize = INIT_COND);	loopstack = Newarray(int, loopsize = INIT_COND);	sbuf = empty_string;}/* Analyze text and place tokens in buffer */void parse(text)	char *text;{	while (*text) {		text = parse_token(text);		if (!text)			return;	}	if (!infunc && !braces && !incomment && !instring && tokpos)		compile();}static char *parse_token(s)	char *s;{	char *ptr, buf[MAXILEN + 1];	int i;	void (*bobj)();	Const *cp;	if (incomment)		return read_comment(s);	if (instring)		return read_string(s);	for (; isspace(*s); s++);	if (!*s || *s == '/' && s[1] == '/')		return "";	if (*s == '/' && s[1] == '*')		return read_comment(s + 2);	if (*s == '"') {		s_term(&sbuf, 0);		return read_string(s + 1);	}	if (*s == '\'') {		s++;		Add_vtoken(ICONST, num, read_char(&s));		if (*s++ != '\'')			lexerror(ERR_UNTERMCHAR);		return s;	}	if (isdigit(*s)) {		i = 0;		if (*s == '0' && lcase(s[1]) == 'x' && isxdigit(s[2])) {			s++;			while (isxdigit(*++s))				i = i * 0x10 + Hexdigitvalue(*s);			Add_vtoken(ICONST, num, i);			return s;		}		if (*s == '0' && s[1] >= '0' && s[1] <= '8') {			while (*++s >= '0' && *s <= '8')				i = i * 010 + *s - '0';			Add_vtoken(ICONST, num, i);			return s;		}		Add_vtoken(ICONST, num, atoi(s));		while (isdigit(*++s));		return s;	}	if (*s == '\\' && !s[1])		return NULL;	if (isalpha(*s) || *s == '_') {		for (ptr = s; isalnum(*ptr) || *ptr == '_'; ptr++);		strncpy(buf, s, min(ptr - s, MAXILEN));		buf[min(ptr - s, MAXILEN)] = '\0';		if (!(*buf & ~0x7f) && begin[*buf]) {			for (i = begin[*buf]; i <= end[*buf]; i++) {				if (streq(buf + 1, words[i].s + 1))					break;			}			if (i <= end[*buf]) {				if (words[i].val == FUNC) {					if (tokpos) {						lexerror(ERR_ILLFUNC);						braces = 0;					}					infunc = 1;				}				Add_ntoken(words[i].val);				return ptr;			}		}		bobj = find_bobj(buf);		if (bobj) {			Add_vtoken(BOBJ, bobj, bobj);			return ptr;		}		cp = find_const(buf);		if (cp) {			Add_vtoken(ICONST, num, cp->val);			return ptr;		}		Push(idents, char *, identsize, identpos, vtstrdup(buf));		Add_vtoken(IDENT, s, idents[identpos - 1]);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品中文字幕在线不卡尤物| 琪琪一区二区三区| av电影在线不卡| 亚洲欧美日韩在线| 色八戒一区二区三区| 亚洲综合激情网| 日韩一区二区在线看| 国产一区中文字幕| 国产精品你懂的在线欣赏| 91亚洲午夜精品久久久久久| 亚洲女女做受ⅹxx高潮| 欧美三级一区二区| 精品在线免费视频| 亚洲色图视频网站| 欧美精品视频www在线观看| 蜜桃视频在线观看一区| 国产欧美视频在线观看| 色综合久久88色综合天天| 日韩激情av在线| 中文字幕高清一区| 欧美色老头old∨ideo| 久久99精品久久久久久久久久久久| 久久久精品一品道一区| 在线观看成人小视频| 久草中文综合在线| 亚洲蜜臀av乱码久久精品蜜桃| 欧美酷刑日本凌虐凌虐| 国产精品66部| 午夜欧美大尺度福利影院在线看 | 91亚洲大成网污www| 亚洲妇女屁股眼交7| 精品区一区二区| 91同城在线观看| 蜜臀国产一区二区三区在线播放| 国产色产综合产在线视频| 欧美日韩激情在线| 成人午夜碰碰视频| 六月丁香婷婷色狠狠久久| 亚洲日本一区二区| 久久综合av免费| 欧美在线一二三四区| 国产乱码一区二区三区| 一区二区三区日韩| 国产拍揄自揄精品视频麻豆 | 欧美一区二区精美| 99久精品国产| 国产成人精品免费看| 亚洲va国产天堂va久久en| 日本一区二区免费在线观看视频| 欧美丰满少妇xxxxx高潮对白| 成人黄页毛片网站| 国产一二精品视频| 蜜桃视频一区二区三区| 亚洲国产综合色| 亚洲欧美区自拍先锋| 中文字幕欧美国产| 欧美电影精品一区二区| 欧美乱妇23p| 欧美日韩一区高清| 欧美这里有精品| 一本大道久久a久久精二百| av在线这里只有精品| 国产一区二区h| 激情文学综合网| 麻豆国产精品777777在线| 午夜视频一区二区| 亚洲国产一区二区在线播放| 亚洲三级电影网站| 国产精品久久久久久久裸模| 久久精品人人做人人爽97| 精品日韩av一区二区| 日韩欧美在线影院| 欧美一区二区三区白人| 制服丝袜一区二区三区| 欧美精品aⅴ在线视频| 在线观看日韩国产| 欧美亚洲丝袜传媒另类| 欧美日韩综合在线免费观看| 欧美性生活一区| 欧美巨大另类极品videosbest | 国产精品色噜噜| 国产欧美日韩综合精品一区二区| 国产女人aaa级久久久级| 国产欧美日韩一区二区三区在线观看| 精品福利一区二区三区| 精品国免费一区二区三区| 精品不卡在线视频| 国产欧美日本一区二区三区| 国产精品私房写真福利视频| 成人免费一区二区三区视频 | 欧美伦理视频网站| 欧美一区二区精品| 久久亚洲精精品中文字幕早川悠里| 欧美精品一区二区三区一线天视频 | 欧美一区二区成人| 精品国产乱码久久久久久蜜臀| 精品国产免费一区二区三区香蕉| 国产午夜一区二区三区| 亚洲精品日日夜夜| 免费欧美在线视频| 东方欧美亚洲色图在线| 在线亚洲免费视频| 日韩精品一区二区三区中文不卡| 久久久久久亚洲综合| 国产精品初高中害羞小美女文| 亚洲精品videosex极品| 免费高清视频精品| 不卡电影免费在线播放一区| 在线观看免费视频综合| 精品国产凹凸成av人导航| 中文字幕在线观看一区| 亚洲1区2区3区4区| 粉嫩在线一区二区三区视频| 日本韩国一区二区| www国产成人免费观看视频 深夜成人网| 国产日韩精品久久久| 亚洲国产sm捆绑调教视频| 久久精品免费看| 91网站视频在线观看| 日韩亚洲电影在线| 亚洲视频中文字幕| 激情综合五月婷婷| 欧洲av在线精品| 久久精品一区二区三区不卡牛牛| 夜夜精品视频一区二区| 国产一区二区三区四区五区入口| 91在线精品一区二区| 精品电影一区二区三区| 一区二区三区在线视频观看58| 奇米一区二区三区av| 91国产丝袜在线播放| 久久久久久夜精品精品免费| 亚洲成人资源在线| www.亚洲色图| 久久久久久久免费视频了| 天使萌一区二区三区免费观看| 国产成人免费高清| 欧美一激情一区二区三区| 亚洲精品乱码久久久久久久久 | 亚洲sss视频在线视频| 成人免费观看av| 欧美va天堂va视频va在线| 一区二区三区中文字幕精品精品 | 欧美一区二区在线免费观看| 国产精品夫妻自拍| 国产乱子轮精品视频| 欧美精品v日韩精品v韩国精品v| 国产精品丝袜91| 国产久卡久卡久卡久卡视频精品| 7777精品伊人久久久大香线蕉经典版下载 | 8v天堂国产在线一区二区| 最好看的中文字幕久久| 国产精品性做久久久久久| 日韩欧美不卡一区| 裸体一区二区三区| 欧美一级日韩一级| 日本视频在线一区| 欧美一区二区视频在线观看2022| 亚洲chinese男男1069| 欧美三级中文字| 亚洲高清免费视频| 欧美视频三区在线播放| 亚洲综合久久久| 欧美视频一区二区三区在线观看| 亚洲自拍偷拍图区| 欧美三电影在线| 日本va欧美va精品| 日韩一本二本av| 国产综合色精品一区二区三区| 91精品国产乱码久久蜜臀| 日韩电影在线看| 日韩欧美国产麻豆| 精品一区二区三区的国产在线播放| 欧美一区二区三区的| 久久精品噜噜噜成人av农村| 精品国产一区久久| 久久国产福利国产秒拍| 国产视频一区在线观看| 成人午夜电影久久影院| 中文字幕一区不卡| 欧洲人成人精品| 日韩高清在线观看| 精品1区2区在线观看| 成人综合在线网站| 亚洲裸体在线观看| 欧美日本国产视频| 精品一区二区综合| 中文字幕永久在线不卡| 欧美日韩在线精品一区二区三区激情 | 色婷婷亚洲婷婷| 日韩中文字幕麻豆| 久久午夜老司机| 99国产麻豆精品| 午夜精品福利在线| 精品播放一区二区| 色婷婷国产精品| 久久er99热精品一区二区| 国产精品无圣光一区二区| 欧美亚洲高清一区二区三区不卡| 日本sm残虐另类|