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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ckwart.c

?? C 語言核心協議的 C 語言源代碼
?? C
字號:
char *wartv = "Wart Version 1A(003) 27 May 85";/* W A R T *//* pre-process a lex-like file into a C program. Author:Jeff Damens, Columbia University Center for Computing Activites, 11/84. Copyright (C) 1985, Trustees of Columbia University in the City of New York. Permission is granted to any individual or institution to use, copy, or redistribute this software so long as it is not sold for profit, provided this copyright notice is retained.  * input format is: *  lines to be copied | %state <state names...> *  %% * <state> | <state,state,...> CHAR  { actions } * ... *  %% */#include "ckcdeb.h"			/* Includes */#include <stdio.h>#include <ctype.h>#define C_L 014				/* Formfeed */#define SEP 1	    	    	    	/* Token types */#define LBRACK 2#define RBRACK 3#define WORD 4#define COMMA 5/* Storage sizes */#define MAXSTATES 50			/* max number of states */#define MAXWORD 50			/* max # of chars/word */#define SBYTES ((MAXSTATES+7)/8)	/* # of bytes for state bitmask *//* Name of wart function in generated program */#ifndef FNAME#define FNAME "wart"#endif/* Structure for state information */struct trans { CHAR states[SBYTES];	/* included states */    	       int anyst;		/* true if this good from any state */    	       CHAR inchr;		/* input character */	       int actno;		/* associated action */	       struct trans *nxt; };	/* next transition */typedef struct trans *Trans;char *malloc();				/* Returns pointer (not int) *//* Variables and tables */int lines,nstates,nacts;char tokval[MAXWORD];int tbl[MAXSTATES*128];char *txt1 = "\n#define BEGIN state =\n\nint state = 0;\n\n";char *fname = FNAME;		/* function name goes here *//* rest of program... */char *txt2 = "()\n\{\n\  int c,actno;\n\  extern int tbl[];\n\  while (1) {\n\	c = input();\n\	if ((actno = tbl[c + state*128]) != -1)\n\	  switch(actno) {\n";/* this program's output goes here, followed by final text... */char *txt3 = "\n    }\n  }\n\}\n\n";/* * turn on the bit associated with the given state * */setstate(state,t)int state;Trans t;{  int idx,msk;  idx = state/8;			/* byte associated with state */  msk = 0x80 >> (state % 8);		/* bit mask for state */  t->states[idx] |= msk;}/* * see if the state is involved in the transition * */teststate(state,t)int state;Trans t;{  int idx,msk;  idx = state/8;  msk = 0x80 >> (state % 8);  return(t->states[idx] & msk);}/* * read input from here... * */Transrdinput(infp,outfp)FILE *infp,*outfp;{  Trans x,rdrules();  lines = 1;				/* line counter */  nstates = 0;				/* no states */  nacts = 0;				/* no actions yet */  fprintf(outfp,"\n%c* WARNING -- This C source program generated by ",'/');  fprintf(outfp,"Wart preprocessor. */\n");  fprintf(outfp,"%c* Do not edit this file; edit the Wart-format ",'/');  fprintf(outfp,"source file instead, */\n");  fprintf(outfp,"%c* and then run it through Wart to produce a new ",'/');  fprintf(outfp,"C source file.     */\n\n");  fprintf(outfp,"%c* Wart Version Info: */\n",'/');  fprintf(outfp,"char *wartv = \"%s\";\n\n",wartv);  initial(infp,outfp);			/* read state names, initial defs */  prolog(outfp);			/* write out our initial code */  x = rdrules(infp,outfp);		/* read rules */  epilogue(outfp);			/* write out epilogue code */  return(x);}/* * initial - read initial definitions and state names.  Returns * on EOF or %%. * */initial(infp,outfp)FILE *infp,*outfp;{  int c;  char wordbuf[MAXWORD];  while ((c = getc(infp)) != EOF) {	if (c == '%') {			rdword(infp,wordbuf);			if (strcmp(wordbuf,"states") == 0)			    rdstates(infp,outfp);			else if (strcmp(wordbuf,"%") == 0) return;			else fprintf(outfp,"%%%s",wordbuf);		      }	else putc(c,outfp);	if (c == '\n') lines++;     }}/* * boolean function to tell if the given character can be part of * a word. * */isin(s,c) char *s; int c; {   for (; *s != '\0'; s++)      if (*s == c) return(1);   return(0);}isword(c)int c;{  static char special[] = ".%_-$@";	/* these are allowable */  return(isalnum(c) || isin(special,c));}/* * read the next word into the given buffer. * */rdword(fp,buf)FILE *fp;char *buf;{  int len = 0,c;  while (isword(c = getc(fp)) && ++len < MAXWORD) *buf++ = c;  *buf++ = '\0';			/* tie off word */  ungetc(c,fp);				/* put break char back */}/* * read state names, up to a newline. * */rdstates(fp,ofp)FILE *fp,*ofp;{  int c;  char wordbuf[MAXWORD];  while ((c = getc(fp)) != EOF && c != '\n')  {	if (isspace(c) || c == C_L) continue;	/* skip whitespace */	ungetc(c,fp);			/* put char back */	rdword(fp,wordbuf);		/* read the whole word */	enter(wordbuf,++nstates);	/* put into symbol tbl */	fprintf(ofp,"#define %s %d\n",wordbuf,nstates);  }  lines++;}		/* * allocate a new, empty transition node * */Transnewtrans(){  Trans new;  int i;  new = (Trans) malloc(sizeof (struct trans));  for (i=0; i<SBYTES; i++) new->states[i] = 0;  new->anyst = 0;  new->nxt = NULL;  return(new);}/* * read all the rules. * */Transrdrules(fp,out)FILE *fp,*out;{  Trans head,cur,prev;  int curtok,i;  head = cur = NULL;  while ((curtok = gettoken(fp)) != SEP) 	switch(curtok) {		case LBRACK: if (cur == NULL) cur = newtrans();		    	     else fatal("duplicate state list");			     statelist(fp,cur);/* set states */			     continue;	/* prepare to read char */		case WORD:   if (strlen(tokval) != 1)					fatal("multiple chars in state");			     if (cur == NULL) {				cur = newtrans();				cur->anyst = 1;				}			     cur->actno = ++nacts;			     cur->inchr = tokval[0];			     if (head == NULL) head = cur;			     else prev->nxt = cur;			     prev = cur;			     cur = NULL;			     copyact(fp,out,nacts);			     break; 		 default: fatal("bad input format");	     }	   return(head);}/* * read a list of (comma-separated) states, set them in the * given transition. * */statelist(fp,t)FILE *fp;Trans t;{  int curtok,sval;  curtok = COMMA;  while (curtok != RBRACK) {	if (curtok != COMMA) fatal("missing comma");	if ((curtok = gettoken(fp)) != WORD) fatal("missing state name");        if ((sval = lkup(tokval)) == -1) {		fprintf(stderr,"state %s undefined\n",tokval);		fatal("undefined state");	   }        setstate(sval,t);	curtok = gettoken(fp);   }}/* * copy an action from the input to the output file * */copyact(inp,outp,actno)FILE *inp,*outp;int actno;{  int c,bcnt;  fprintf(outp,"case %d:\n",actno);  while (((c = getc(inp)) != '\n') && (isspace(c) || c == C_L));  if (c == '{') {     bcnt = 1;     putc(c,outp);     while (bcnt > 0 && (c = getc(inp)) != EOF) {	if (c == '{') bcnt++;	else if (c == '}') bcnt--;	else if (c == '\n') lines++;	putc(c,outp);      }     if (bcnt > 0) fatal("action doesn't end");    }   else {	  while (c != '\n' && c != EOF) {		putc(c,outp);		c = getc(inp);	    }	  lines++;	}   fprintf(outp,"\nbreak;\n");}/* * find the action associated with a given character and state. * returns -1 if one can't be found. * */faction(hd,state,chr)Trans hd;int state,chr;{  while (hd != NULL) {    if (hd->anyst || teststate(state,hd))      if (hd->inchr == '.' || hd->inchr == chr) return(hd->actno);    hd = hd->nxt;    }  return(-1);}/* * empty the table... * */emptytbl(){  int i;  for (i=0; i<nstates*128; i++) tbl[i] = -1;}/* * add the specified action to the output for the given state and chr. * */addaction(act,state,chr)int act,state,chr;{ tbl[state*128 + chr] = act;}writetbl(fp)FILE *fp;{  warray(fp,"tbl",tbl,128*(nstates+1));}/* * write an array to the output file, given its name and size. * */warray(fp,nam,cont,siz)FILE *fp;char *nam;int cont[],siz;{  int i;  fprintf(fp,"int %s[] = {\n",nam);  for (i = 0; i < siz; i++) {	fprintf(fp,"%d, ",cont[i]);	if ((i % 20) == 0) putc('\n',fp);	}  fprintf(fp,"};\n");}main(argc,argv)int argc;char *argv[];{  Trans head;  int state,c;  FILE *infile,*outfile;  if (argc > 1) {    if ((infile = fopen(argv[1],"r")) == NULL) {    	fprintf(stderr,"Can't open %s\n",argv[1]);	fatal("unreadable input file"); } }  else infile = stdin;  if (argc > 2) {    if ((outfile = fopen(argv[2],"w")) == NULL) {    	fprintf(stderr,"Can't write to %s\n",argv[2]);	fatal("bad output file"); } }  else outfile = stdout;  clrhash();				/* empty hash table */  head = rdinput(infile,outfile);	/* read input file */  emptytbl();				/* empty our tables */  for (state = 0; state <= nstates; state++)    for (c = 1; c < 128; c++)     addaction(faction(head,state,c),state,c);	/* find actions, add to tbl */  writetbl(outfile);  copyrest(infile,outfile);  printf("%d states, %d actions\n",nstates,nacts);#ifdef undef  for (state = 1; state <= nstates; state ++)    for (c = 1; c < 128; c++)       if (tbl[state*128 + c] != -1) printf("state %d, chr %d, act %d\n",       	state,c,tbl[state*128 + c]);#endif  exit(GOOD_EXIT);}/* * fatal error handler * */fatal(msg)char *msg;{  fprintf(stderr,"error in line %d: %s\n",lines,msg);  exit(BAD_EXIT);}prolog(outfp)FILE *outfp;{  int c;  while ((c = *txt1++) != '\0')  putc(c,outfp);  while ((c = *fname++) != '\0') putc(c,outfp);  while ((c = *txt2++) != '\0')  putc(c,outfp);}epilogue(outfp)FILE *outfp;{  int c;  while ((c = *txt3++) != '\0') putc(c,outfp);}copyrest(in,out)FILE *in,*out;{  int c;  while ((c = getc(in)) != EOF) putc(c,out);}/* * gettoken - returns token type of next token, sets tokval * to the string value of the token if appropriate. * */gettoken(fp)FILE *fp;{  int c;  while (1) {				/* loop if reading comments... */    do {	  c = getc(fp);	  if (c == '\n') lines++;       } while ((isspace(c) || c == C_L)); /* skip whitespace */    switch(c) {	  case EOF: return(SEP);	  case '%': if ((c = getc(fp)) == '%') return(SEP);		    tokval[0] = '%';		    tokval[1] = c;		    rdword(fp,tokval+2);		    return(WORD);	  case '<': return(LBRACK);	  case '>': return(RBRACK);	  case ',': return(COMMA);	  case '/': if ((c = getc(fp)) == '*') {	    	      rdcmnt(fp);	/* skip over the comment */		      continue; }	/* and keep looping */		    else {			ungetc(c);	/* put this back into input */			c = '/'; }	/* put character back, fall thru */	  default: if (isword(c)) {			  ungetc(c,fp);			  rdword(fp,tokval);			  return(WORD);		      	}		   else fatal("Invalid character in input");	     }  }}/* * skip over a comment * */rdcmnt(fp)FILE *fp;{  int c,star,prcnt;  prcnt = star = 0;			/* no star seen yet */  while (!((c = getc(fp)) == '/' && star)) {    if (c == EOF || (prcnt && c == '%')) fatal("Unterminated comment");    prcnt = (c == '%');    star = (c == '*');    if (c == '\n') lines++; }}/* * symbol table management for wart * * entry points: *   clrhash - empty hash table. *   enter - enter a name into the symbol table *   lkup - find a name's value in the symbol table. * */#define HASHSIZE 101			/* # of entries in hash table */struct sym { char *name;		/* symbol name */	     int val;			/* value */	     struct sym *hnxt; }	/* next on collision chain */    *htab[HASHSIZE];			/* the hash table *//* * empty the hash table before using it... * */clrhash(){  int i;  for (i=0; i<HASHSIZE; i++) htab[i] = NULL;}/* * compute the value of the hash for a symbol * */hash(name)char *name;{  int sum;  for (sum = 0; *name != '\0'; name++) sum += (sum + *name);  sum %= HASHSIZE;			/* take sum mod hashsize */  if (sum < 0) sum += HASHSIZE;		/* disallow negative hash value */  return(sum);}/* * make a private copy of a string... * */char *copy(s)char *s;{  char *new;  new = (char *) malloc(strlen(s) + 1);  strcpy(new,s);  return(new);}/* * enter state name into the hash table * */enter(name,svalue)char *name;int svalue;{  int h;  struct sym *cur;  if (lkup(name) != -1) {	fprintf(stderr,"state %s appears twice...\n");	exit(BAD_EXIT); }  h = hash(name);  cur = (struct sym *)malloc(sizeof (struct sym));  cur->name = copy(name);  cur->val = svalue;  cur->hnxt = htab[h];  htab[h] = cur;}/* * find name in the symbol table, return its value.  Returns -1 * if not found. * */lkup(name)char *name;{  struct sym *cur;  for (cur = htab[hash(name)]; cur != NULL; cur = cur->hnxt)	if (strcmp(cur->name,name) == 0) return(cur->val);  return(-1);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产日产图区| 91精品国产乱码| 综合久久一区二区三区| 成人av在线观| 亚洲男同性恋视频| 欧美日韩一本到| 美女视频第一区二区三区免费观看网站| 欧美日韩精品久久久| 看片网站欧美日韩| 欧美激情一区二区| 一本高清dvd不卡在线观看 | 亚洲精品久久嫩草网站秘色| 色综合久久久久综合99| 亚洲va天堂va国产va久| 精品欧美一区二区久久| 福利视频网站一区二区三区| 亚洲精品乱码久久久久久黑人| 欧美日韩一区不卡| 国产精品99久久久久久久女警| 国产精品久久久久久久久图文区 | 99久久精品国产导航| 亚洲国产精品久久久男人的天堂| 欧美大片在线观看一区二区| 高清久久久久久| 亚洲国产综合在线| 337p粉嫩大胆色噜噜噜噜亚洲| 97久久精品人人澡人人爽| 天天综合色天天综合| 久久亚区不卡日本| 欧美午夜精品一区| 国产一区二区三区四区五区美女| 一区二区三区美女| 国产视频在线观看一区二区三区 | 国产一区激情在线| 亚洲乱码国产乱码精品精98午夜| 日韩一区二区三区观看| 不卡av电影在线播放| 免费一级片91| 亚洲夂夂婷婷色拍ww47| 欧美激情综合在线| 51午夜精品国产| 97se狠狠狠综合亚洲狠狠| 久久99精品久久久久久动态图| 一区二区久久久| 国产精品免费av| 日韩欧美你懂的| 91国在线观看| av在线播放不卡| 国内外成人在线| 日韩在线播放一区二区| 亚洲女人的天堂| 中文文精品字幕一区二区| 欧美久久婷婷综合色| 91免费国产视频网站| 国产成人aaa| 精品一区二区三区免费视频| 爽好多水快深点欧美视频| 亚洲欧洲日韩综合一区二区| 久久综合五月天婷婷伊人| 在线成人免费观看| 欧美在线色视频| 日本高清不卡在线观看| 精品91自产拍在线观看一区| 欧美日韩一二三区| 欧美日韩综合在线免费观看| 91尤物视频在线观看| 国产成人av电影在线播放| 国产精品一区二区无线| 激情久久五月天| 九色综合国产一区二区三区| 日韩精品免费视频人成| 午夜在线电影亚洲一区| 亚洲成人av在线电影| 亚洲福利视频一区| 亚洲成人激情综合网| 亚洲国产成人va在线观看天堂| 日韩毛片一二三区| 亚洲视频免费观看| 亚洲色图色小说| 亚洲一线二线三线久久久| 夜夜亚洲天天久久| 亚洲一二三区视频在线观看| 亚洲成av人片在www色猫咪| 亚洲一区二区黄色| 日本欧美在线观看| 韩国精品久久久| 国产黄色精品网站| 97精品超碰一区二区三区| 色综合久久久久网| 91精品国产综合久久福利| 精品日韩欧美一区二区| 2022国产精品视频| 自拍偷拍亚洲欧美日韩| 亚洲资源在线观看| 日韩成人午夜精品| 国产老女人精品毛片久久| 成人综合在线观看| 欧洲精品在线观看| 欧美一区二区在线播放| 精品国产电影一区二区| 国产精品成人一区二区艾草| 一区二区成人在线视频| 青青草97国产精品免费观看无弹窗版| 精彩视频一区二区三区| 成人黄色在线视频| 欧美日韩国产区一| 久久免费偷拍视频| 亚洲综合视频在线观看| 久久电影国产免费久久电影| 99久久精品国产麻豆演员表| 69精品人人人人| 国产日本亚洲高清| 亚洲在线视频网站| 国产福利视频一区二区三区| 色综合久久天天| 欧美成人猛片aaaaaaa| 国产精品传媒入口麻豆| 美女尤物国产一区| 91亚洲永久精品| 日韩精品中文字幕一区| 亚洲欧洲日产国码二区| 五月天国产精品| 不卡的电视剧免费网站有什么| 欧美一区二区在线播放| 亚洲精选视频免费看| 国产综合色在线视频区| 国产亚洲成年网址在线观看| 亚洲国产中文字幕在线视频综合| 国产精品一区二区久激情瑜伽 | 粉嫩av亚洲一区二区图片| 欧美三级欧美一级| 亚洲欧洲成人精品av97| 免费人成精品欧美精品| 色综合天天综合在线视频| 久久婷婷国产综合精品青草| 亚洲成av人片在线| 色哟哟欧美精品| 国产精品三级电影| 久久不见久久见免费视频7| 欧美日韩精品免费| 亚洲精品中文在线影院| 粉嫩av一区二区三区| 2023国产一二三区日本精品2022| 日本一道高清亚洲日美韩| 在线精品国精品国产尤物884a| 国产女人18毛片水真多成人如厕| 蜜臂av日日欢夜夜爽一区| 欧美丝袜自拍制服另类| 亚洲欧美日韩中文播放| 成人爽a毛片一区二区免费| 精品国产一区二区三区四区四| 日本成人在线网站| 欧美久久一区二区| 午夜欧美视频在线观看| 欧美午夜片在线观看| 亚洲女同女同女同女同女同69| av电影天堂一区二区在线 | 中文字幕综合网| av动漫一区二区| 国产精品久久久久久久久免费丝袜 | 一区二区三区中文在线观看| 成人精品一区二区三区四区| 国产三级欧美三级| 国产成人丝袜美腿| 国产日韩欧美综合一区| 国产精品影视网| 国产丝袜欧美中文另类| 国产成人三级在线观看| 中文字幕成人av| 97se亚洲国产综合在线| 一区二区三区四区国产精品| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 天天综合网天天综合色| 欧美日本在线观看| 日本美女一区二区三区视频| 91精品国产色综合久久ai换脸| 青青草国产成人av片免费| 精品少妇一区二区三区免费观看| 国产呦精品一区二区三区网站| 久久精品网站免费观看| 99精品桃花视频在线观看| 国产大陆精品国产| 欧美国产激情二区三区| 91尤物视频在线观看| 亚洲一区二区三区激情| 欧美一级日韩不卡播放免费| 久久精品国产99久久6| 精品久久免费看| 高清成人免费视频| 亚洲免费观看高清完整版在线| 欧美在线观看视频一区二区 | 亚洲青青青在线视频| 欧美在线观看禁18| 麻豆国产一区二区| 国产亚洲欧美一区在线观看| 色综合中文字幕国产 | 国产麻豆日韩欧美久久| 国产精品久久久久7777按摩| 日本高清不卡视频| 精久久久久久久久久久|