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

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

?? lemon.c

?? sqlite庫
?? C
?? 第 1 頁 / 共 5 頁
字號:
  int i;  struct config *cfp, *other;  struct state *stp;  struct plink *plp;  /* Housekeeping detail:  ** Add to every propagate link a pointer back to the state to  ** which the link is attached. */  for(i=0; i<lemp->nstate; i++){    stp = lemp->sorted[i];    for(cfp=stp->cfp; cfp; cfp=cfp->next){      cfp->stp = stp;    }  }  /* Convert all backlinks into forward links.  Only the forward  ** links are used in the follow-set computation. */  for(i=0; i<lemp->nstate; i++){    stp = lemp->sorted[i];    for(cfp=stp->cfp; cfp; cfp=cfp->next){      for(plp=cfp->bplp; plp; plp=plp->next){        other = plp->cfp;        Plink_add(&other->fplp,cfp);      }    }  }}/* Compute all followsets.**** A followset is the set of all symbols which can come immediately** after a configuration.*/void FindFollowSets(lemp)struct lemon *lemp;{  int i;  struct config *cfp;  struct plink *plp;  int progress;  int change;  for(i=0; i<lemp->nstate; i++){    for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){      cfp->status = INCOMPLETE;    }  }    do{    progress = 0;    for(i=0; i<lemp->nstate; i++){      for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){        if( cfp->status==COMPLETE ) continue;        for(plp=cfp->fplp; plp; plp=plp->next){          change = SetUnion(plp->cfp->fws,cfp->fws);          if( change ){            plp->cfp->status = INCOMPLETE;            progress = 1;	  }	}        cfp->status = COMPLETE;      }    }  }while( progress );}static int resolve_conflict();/* Compute the reduce actions, and resolve conflicts.*/void FindActions(lemp)struct lemon *lemp;{  int i,j;  struct config *cfp;  struct state *stp;  struct symbol *sp;  struct rule *rp;  /* Add all of the reduce actions   ** A reduce action is added for each element of the followset of  ** a configuration which has its dot at the extreme right.  */  for(i=0; i<lemp->nstate; i++){   /* Loop over all states */    stp = lemp->sorted[i];    for(cfp=stp->cfp; cfp; cfp=cfp->next){  /* Loop over all configurations */      if( cfp->rp->nrhs==cfp->dot ){        /* Is dot at extreme right? */        for(j=0; j<lemp->nterminal; j++){          if( SetFind(cfp->fws,j) ){            /* Add a reduce action to the state "stp" which will reduce by the            ** rule "cfp->rp" if the lookahead symbol is "lemp->symbols[j]" */            Action_add(&stp->ap,REDUCE,lemp->symbols[j],(char *)cfp->rp);          }	}      }    }  }  /* Add the accepting token */  if( lemp->start ){    sp = Symbol_find(lemp->start);    if( sp==0 ) sp = lemp->rule->lhs;  }else{    sp = lemp->rule->lhs;  }  /* Add to the first state (which is always the starting state of the  ** finite state machine) an action to ACCEPT if the lookahead is the  ** start nonterminal.  */  Action_add(&lemp->sorted[0]->ap,ACCEPT,sp,0);  /* Resolve conflicts */  for(i=0; i<lemp->nstate; i++){    struct action *ap, *nap;    struct state *stp;    stp = lemp->sorted[i];    assert( stp->ap );    stp->ap = Action_sort(stp->ap);    for(ap=stp->ap; ap && ap->next; ap=ap->next){      for(nap=ap->next; nap && nap->sp==ap->sp; nap=nap->next){         /* The two actions "ap" and "nap" have the same lookahead.         ** Figure out which one should be used */         lemp->nconflict += resolve_conflict(ap,nap,lemp->errsym);      }    }  }  /* Report an error for each rule that can never be reduced. */  for(rp=lemp->rule; rp; rp=rp->next) rp->canReduce = B_FALSE;  for(i=0; i<lemp->nstate; i++){    struct action *ap;    for(ap=lemp->sorted[i]->ap; ap; ap=ap->next){      if( ap->type==REDUCE ) ap->x.rp->canReduce = B_TRUE;    }  }  for(rp=lemp->rule; rp; rp=rp->next){    if( rp->canReduce ) continue;    ErrorMsg(lemp->filename,rp->ruleline,"This rule can not be reduced.\n");    lemp->errorcnt++;  }}/* Resolve a conflict between the two given actions.  If the** conflict can't be resolve, return non-zero.**** NO LONGER TRUE:**   To resolve a conflict, first look to see if either action**   is on an error rule.  In that case, take the action which**   is not associated with the error rule.  If neither or both**   actions are associated with an error rule, then try to**   use precedence to resolve the conflict.**** If either action is a SHIFT, then it must be apx.  This** function won't work if apx->type==REDUCE and apy->type==SHIFT.*/static int resolve_conflict(apx,apy,errsym)struct action *apx;struct action *apy;struct symbol *errsym;   /* The error symbol (if defined.  NULL otherwise) */{  struct symbol *spx, *spy;  int errcnt = 0;  assert( apx->sp==apy->sp );  /* Otherwise there would be no conflict */  if( apx->type==SHIFT && apy->type==REDUCE ){    spx = apx->sp;    spy = apy->x.rp->precsym;    if( spy==0 || spx->prec<0 || spy->prec<0 ){      /* Not enough precedence information. */      apy->type = CONFLICT;      errcnt++;    }else if( spx->prec>spy->prec ){    /* Lower precedence wins */      apy->type = RD_RESOLVED;    }else if( spx->prec<spy->prec ){      apx->type = SH_RESOLVED;    }else if( spx->prec==spy->prec && spx->assoc==RIGHT ){ /* Use operator */      apy->type = RD_RESOLVED;                             /* associativity */    }else if( spx->prec==spy->prec && spx->assoc==LEFT ){  /* to break tie */      apx->type = SH_RESOLVED;    }else{      assert( spx->prec==spy->prec && spx->assoc==NONE );      apy->type = CONFLICT;      errcnt++;    }  }else if( apx->type==REDUCE && apy->type==REDUCE ){    spx = apx->x.rp->precsym;    spy = apy->x.rp->precsym;    if( spx==0 || spy==0 || spx->prec<0 ||    spy->prec<0 || spx->prec==spy->prec ){      apy->type = CONFLICT;      errcnt++;    }else if( spx->prec>spy->prec ){      apy->type = RD_RESOLVED;    }else if( spx->prec<spy->prec ){      apx->type = RD_RESOLVED;    }  }else{    assert(       apx->type==SH_RESOLVED ||      apx->type==RD_RESOLVED ||      apx->type==CONFLICT ||      apy->type==SH_RESOLVED ||      apy->type==RD_RESOLVED ||      apy->type==CONFLICT    );    /* The REDUCE/SHIFT case cannot happen because SHIFTs come before    ** REDUCEs on the list.  If we reach this point it must be because    ** the parser conflict had already been resolved. */  }  return errcnt;}/********************* From the file "configlist.c" *************************//*** Routines to processing a configuration list and building a state** in the LEMON parser generator.*/static struct config *freelist = 0;      /* List of free configurations */static struct config *current = 0;       /* Top of list of configurations */static struct config **currentend = 0;   /* Last on list of configs */static struct config *basis = 0;         /* Top of list of basis configs */static struct config **basisend = 0;     /* End of list of basis configs *//* Return a pointer to a new configuration */PRIVATE struct config *newconfig(){  struct config *new;  if( freelist==0 ){    int i;    int amt = 3;    freelist = (struct config *)malloc( sizeof(struct config)*amt );    if( freelist==0 ){      fprintf(stderr,"Unable to allocate memory for a new configuration.");      exit(1);    }    for(i=0; i<amt-1; i++) freelist[i].next = &freelist[i+1];    freelist[amt-1].next = 0;  }  new = freelist;  freelist = freelist->next;  return new;}/* The configuration "old" is no longer used */PRIVATE void deleteconfig(old)struct config *old;{  old->next = freelist;  freelist = old;}/* Initialized the configuration list builder */void Configlist_init(){  current = 0;  currentend = &current;  basis = 0;  basisend = &basis;  Configtable_init();  return;}/* Initialized the configuration list builder */void Configlist_reset(){  current = 0;  currentend = &current;  basis = 0;  basisend = &basis;  Configtable_clear(0);  return;}/* Add another configuration to the configuration list */struct config *Configlist_add(rp,dot)struct rule *rp;    /* The rule */int dot;            /* Index into the RHS of the rule where the dot goes */{  struct config *cfp, model;  assert( currentend!=0 );  model.rp = rp;  model.dot = dot;  cfp = Configtable_find(&model);  if( cfp==0 ){    cfp = newconfig();    cfp->rp = rp;    cfp->dot = dot;    cfp->fws = SetNew();    cfp->stp = 0;    cfp->fplp = cfp->bplp = 0;    cfp->next = 0;    cfp->bp = 0;    *currentend = cfp;    currentend = &cfp->next;    Configtable_insert(cfp);  }  return cfp;}/* Add a basis configuration to the configuration list */struct config *Configlist_addbasis(rp,dot)struct rule *rp;int dot;{  struct config *cfp, model;  assert( basisend!=0 );  assert( currentend!=0 );  model.rp = rp;  model.dot = dot;  cfp = Configtable_find(&model);  if( cfp==0 ){    cfp = newconfig();    cfp->rp = rp;    cfp->dot = dot;    cfp->fws = SetNew();    cfp->stp = 0;    cfp->fplp = cfp->bplp = 0;    cfp->next = 0;    cfp->bp = 0;    *currentend = cfp;    currentend = &cfp->next;    *basisend = cfp;    basisend = &cfp->bp;    Configtable_insert(cfp);  }  return cfp;}/* Compute the closure of the configuration list */void Configlist_closure(lemp)struct lemon *lemp;{  struct config *cfp, *newcfp;  struct rule *rp, *newrp;  struct symbol *sp, *xsp;  int i, dot;  assert( currentend!=0 );  for(cfp=current; cfp; cfp=cfp->next){    rp = cfp->rp;    dot = cfp->dot;    if( dot>=rp->nrhs ) continue;    sp = rp->rhs[dot];    if( sp->type==NONTERMINAL ){      if( sp->rule==0 && sp!=lemp->errsym ){        ErrorMsg(lemp->filename,rp->line,"Nonterminal \"%s\" has no rules.",          sp->name);        lemp->errorcnt++;      }      for(newrp=sp->rule; newrp; newrp=newrp->nextlhs){        newcfp = Configlist_add(newrp,0);        for(i=dot+1; i<rp->nrhs; i++){          xsp = rp->rhs[i];          if( xsp->type==TERMINAL ){            SetAdd(newcfp->fws,xsp->index);            break;          }else if( xsp->type==MULTITERMINAL ){            int k;            for(k=0; k<xsp->nsubsym; k++){              SetAdd(newcfp->fws, xsp->subsym[k]->index);            }            break;	  }else{            SetUnion(newcfp->fws,xsp->firstset);            if( xsp->lambda==B_FALSE ) break;	  }	}        if( i==rp->nrhs ) Plink_add(&cfp->fplp,newcfp);      }    }  }  return;}/* Sort the configuration list */void Configlist_sort(){  current = (struct config *)msort((char *)current,(char **)&(current->next),Configcmp);  currentend = 0;  return;}/* Sort the basis configuration list */void Configlist_sortbasis(){  basis = (struct config *)msort((char *)current,(char **)&(current->bp),Configcmp);  basisend = 0;  return;}/* Return a pointer to the head of the configuration list and** reset the list */struct config *Configlist_return(){  struct config *old;  old = current;  current = 0;  currentend = 0;  return old;}/* Return a pointer to the head of the configuration list and** reset the list */struct config *Configlist_basis(){  struct config *old;  old = basis;  basis = 0;  basisend = 0;  return old;}/* Free all elements of the given configuration list */void Configlist_eat(cfp)struct config *cfp;{  struct config *nextcfp;  for(; cfp; cfp=nextcfp){    nextcfp = cfp->next;    assert( cfp->fplp==0 );    assert( cfp->bplp==0 );    if( cfp->fws ) SetFree(cfp->fws);    deleteconfig(cfp);  }  return;}/***************** From the file "error.c" *********************************//*** Code for printing error message.*//* Find a good place to break "msg" so that its length is at least "min"** but no more than "max".  Make the point as close to max as possible.*/static int findbreak(msg,min,max)char *msg;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
视频精品一区二区| 99久久婷婷国产精品综合| 国产suv精品一区二区6| 欧美日韩久久不卡| 国产亚洲成av人在线观看导航 | 欧美日韩国产一二三| 日韩午夜激情av| 亚洲激情校园春色| 成人福利在线看| 亚洲精品在线观看视频| 亚洲成人免费在线观看| 成人午夜在线免费| 精品国产一区二区国模嫣然| 午夜私人影院久久久久| 91麻豆精东视频| 久久久久九九视频| 久久精品国产成人一区二区三区| 一本一道综合狠狠老| 国产欧美日韩视频在线观看| 久久不见久久见免费视频1| 欧美亚洲动漫精品| 亚洲女性喷水在线观看一区| 成人黄色在线网站| 中文字幕av免费专区久久| 激情文学综合网| 精品久久久久久综合日本欧美| 婷婷综合五月天| 欧美亚州韩日在线看免费版国语版| 国产精品久久福利| 成人永久aaa| 国产精品美女久久久久久2018| 国产在线精品免费| 久久在线观看免费| 国产一区免费电影| 欧美激情艳妇裸体舞| 国产成人精品免费在线| 日本一区二区综合亚洲| 福利视频网站一区二区三区| 国产精品久久网站| 91伊人久久大香线蕉| 中文字幕一区二区三区四区| 99re这里只有精品视频首页| 亚洲人成伊人成综合网小说| 91日韩在线专区| 亚洲影视资源网| 日韩一区二区电影在线| 精品一区二区精品| 久久精品视频一区| av一二三不卡影片| 一卡二卡欧美日韩| 日韩一二三四区| 国产成人亚洲精品青草天美| 中文字幕一区二区三区av| 91福利精品视频| 日韩成人一区二区三区在线观看| 欧美一区二区三区四区久久| 精品一二三四在线| 国产精品黄色在线观看| 在线观看一区二区视频| 婷婷丁香久久五月婷婷| 精品国产伦一区二区三区观看方式| 国产成人综合在线| 一区二区三区在线免费播放| 欧美精品粉嫩高潮一区二区| 国产一区二区三区免费看| 国产精品电影院| 欧美一级久久久久久久大片| 成人网男人的天堂| 日韩国产精品大片| 综合久久国产九一剧情麻豆| 91精品啪在线观看国产60岁| 国产精品白丝av| 五月开心婷婷久久| 国产精品私人自拍| 欧美日韩国产小视频| 成人午夜激情在线| 日韩中文字幕区一区有砖一区| 国产无遮挡一区二区三区毛片日本 | 成人在线视频首页| 午夜精品久久久久久久99樱桃| 国产视频一区二区在线观看| 欧美亚洲高清一区| 粉嫩一区二区三区性色av| 亚洲国产成人精品视频| 欧美国产禁国产网站cc| 日韩一二三区视频| 色88888久久久久久影院野外| 国内精品伊人久久久久影院对白| 一级精品视频在线观看宜春院| 久久免费精品国产久精品久久久久| 色菇凉天天综合网| 福利视频网站一区二区三区| 日本成人在线网站| 亚洲宅男天堂在线观看无病毒| 久久久99精品免费观看不卡| 日韩一级大片在线观看| 欧美吻胸吃奶大尺度电影| 99国产精品久久| 高清日韩电视剧大全免费| 午夜精品久久久久久久久久| 国产精品国产三级国产普通话99| 欧美日韩一区二区在线观看 | 久久久精品tv| 99国产精品国产精品久久| 国产色产综合产在线视频| 99国产精品久久久久久久久久久| 美女被吸乳得到大胸91| 精品国产乱码久久久久久影片| 国产99精品国产| 亚洲丝袜自拍清纯另类| 在线亚洲免费视频| 9色porny自拍视频一区二区| 一级中文字幕一区二区| 亚洲成人高清在线| 懂色av一区二区三区免费观看 | 亚洲欧美激情一区二区| 在线免费av一区| 麻豆一区二区99久久久久| 亚洲视频狠狠干| 久久美女高清视频| 欧美日韩不卡在线| 色噜噜狠狠成人中文综合| 日韩电影免费一区| 亚洲精品高清在线| 日韩制服丝袜av| 午夜精品久久久久| 亚洲国产毛片aaaaa无费看 | 精品在线你懂的| 亚洲六月丁香色婷婷综合久久| 久久久久久久久久久电影| 欧美日韩午夜在线| 欧美日韩免费观看一区三区| 97精品久久久久中文字幕| 国产精品一线二线三线| 国产精品一卡二卡在线观看| 国产成人h网站| 午夜精品福利一区二区蜜股av| 日韩久久免费av| 91精品中文字幕一区二区三区| 3d动漫精品啪啪| 欧美成va人片在线观看| 国产精品影视在线观看| 亚洲精品菠萝久久久久久久| 久久网站最新地址| 欧美日韩日日夜夜| 欧美大胆人体bbbb| 国产精品丝袜91| 亚洲午夜av在线| 免费日本视频一区| 国产成a人无v码亚洲福利| 91老师国产黑色丝袜在线| 欧美日韩国产片| 国产午夜精品一区二区| 国产在线精品一区二区三区不卡| 国产一区二区三区在线观看精品| 国产成人午夜视频| 欧美疯狂做受xxxx富婆| 久久免费偷拍视频| 777色狠狠一区二区三区| 欧美一区二区视频网站| 中文字幕精品一区| 国产91高潮流白浆在线麻豆| 26uuu国产日韩综合| 91视频免费观看| 国产福利电影一区二区三区| 亚洲综合色婷婷| 成人午夜私人影院| 日韩精品一级中文字幕精品视频免费观看 | 首页国产欧美日韩丝袜| 91丝袜呻吟高潮美腿白嫩在线观看| 精品国产制服丝袜高跟| 国产自产v一区二区三区c| ww亚洲ww在线观看国产| 狠狠色丁香久久婷婷综合丁香| 51精品秘密在线观看| 一区二区三区中文字幕| ...av二区三区久久精品| 国产精品美日韩| 亚洲天堂成人网| 亚洲猫色日本管| 日韩经典一区二区| 麻豆一区二区在线| 91浏览器打开| 国产欧美一区二区精品仙草咪| 亚洲一区中文日韩| 精品在线你懂的| 99久久精品免费看国产免费软件| 91在线免费看| 制服丝袜亚洲网站| 国产欧美精品一区二区色综合朱莉| 国产精品国产自产拍在线| 欧美日韩国产首页| 日本一区二区三区国色天香| 七七婷婷婷婷精品国产| 日韩欧美成人一区二区| 中文字幕av一区二区三区免费看| 国产91在线观看丝袜| 欧美精品在线观看一区二区| 亚洲夂夂婷婷色拍ww47| 亚洲影视在线播放|