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

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

?? lemon.c

?? 新版輕量級嵌入式數據庫
?? 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一区二区三区免费野_久草精品视频
亚洲一区二区三区四区在线观看 | 国产麻豆精品视频| 天天综合色天天综合色h| 亚洲一区二区视频| 亚洲不卡在线观看| 韩国午夜理伦三级不卡影院| 国产很黄免费观看久久| 风间由美中文字幕在线看视频国产欧美| 激情综合网天天干| 欧美视频在线一区二区三区 | 国模一区二区三区白浆| 欧美日韩中文精品| 日本在线播放一区二区三区| 在线观看一区二区视频| 国产精品久久网站| 99久久婷婷国产综合精品电影| 精品久久国产老人久久综合| 日韩高清国产一区在线| 欧美日韩一区二区三区视频| 亚洲中国最大av网站| 色狠狠一区二区三区香蕉| 中文字幕一区二区不卡| 99麻豆久久久国产精品免费| 亚洲同性同志一二三专区| 91色在线porny| 国产日韩精品一区二区三区| 成人午夜电影小说| 亚洲综合男人的天堂| 在线电影院国产精品| 精品一区二区在线免费观看| 国产精品久久久久久久久久久免费看 | 99视频精品全部免费在线| 亚洲欧洲精品成人久久奇米网| 欧美视频完全免费看| 麻豆国产精品官网| 欧美极品少妇xxxxⅹ高跟鞋 | 久久亚洲二区三区| 成人av网址在线| 免费的成人av| 亚洲人成电影网站色mp4| 欧美大肚乱孕交hd孕妇| 成人免费视频视频| 亚洲欧洲www| 欧美日韩精品一区二区三区| 亚洲国产成人tv| 日韩午夜av电影| 丁香天五香天堂综合| 国产精品污www在线观看| 成人av资源在线观看| 一区二区三区在线观看欧美| 欧美吞精做爰啪啪高潮| 亚洲成a人片在线不卡一二三区| 欧美午夜在线观看| 日韩国产欧美三级| 欧美va亚洲va在线观看蝴蝶网| 大白屁股一区二区视频| 亚洲永久免费视频| 久久女同精品一区二区| 日本大香伊一区二区三区| 免费亚洲电影在线| 亚洲欧美日韩国产一区二区三区| 717成人午夜免费福利电影| 美女视频一区二区三区| 亚洲视频每日更新| 国产亚洲综合色| 久久久综合精品| 精品久久一二三区| 欧美人妖巨大在线| 在线视频你懂得一区| 91同城在线观看| 国产激情一区二区三区| 秋霞午夜av一区二区三区| 日韩黄色一级片| 亚洲综合免费观看高清在线观看| 中文字幕二三区不卡| 欧美精品第1页| av网站免费线看精品| 国产一区二区三区精品视频| 美女视频黄久久| 国精产品一区一区三区mba桃花 | 91美女福利视频| 91色九色蝌蚪| 色综合久久综合| 精品视频全国免费看| 欧美日韩中文字幕一区二区| 欧美男同性恋视频网站| 91精品国产综合久久精品麻豆 | 天堂精品中文字幕在线| 国产69精品久久久久777| 日韩一级完整毛片| 日本aⅴ免费视频一区二区三区| aaa亚洲精品| 亚洲精品在线观看网站| 一区二区中文视频| 久久99精品久久久久| 色伊人久久综合中文字幕| 欧美一区二区三区影视| 久久精品亚洲精品国产欧美kt∨ | 7777精品伊人久久久大香线蕉最新版| 欧美一区中文字幕| 久久久久久亚洲综合影院红桃| 亚洲人成网站影音先锋播放| 蜜臀av性久久久久蜜臀aⅴ流畅 | 制服丝袜亚洲播放| 国产91精品在线观看| 韩国av一区二区三区在线观看| 色综合夜色一区| 一区二区三区四区乱视频| 亚洲视频你懂的| 一个色综合网站| 在线精品视频免费播放| 秋霞电影一区二区| 欧美一区二区三区啪啪| 麻豆久久久久久久| 欧美精品一区二区三区蜜桃| 狠狠色丁香久久婷婷综| 日韩精品影音先锋| 成人国产视频在线观看| 亚洲特黄一级片| 欧美一区二区啪啪| 国产麻豆精品在线| 欧美精品 国产精品| 国产日韩欧美综合一区| 色悠久久久久综合欧美99| 成人av电影在线观看| 久久99精品久久久久久国产越南| 国产成人综合亚洲91猫咪| 日本乱人伦一区| 中文字幕一区二区视频| 奇米影视一区二区三区| 国产91精品久久久久久久网曝门| 日韩欧美精品三级| 欧美日韩夫妻久久| 岛国一区二区三区| 91精品国产一区二区三区| 国产欧美日韩三级| 美女性感视频久久| 欧美视频在线一区二区三区| 国产欧美日韩激情| 捆绑调教一区二区三区| 欧美性猛交xxxx乱大交退制版| 国产精品午夜在线| 精品一区二区三区在线观看国产| 欧美日韩视频在线观看一区二区三区 | 成人精品免费视频| 精品福利av导航| 美日韩一区二区| 6080午夜不卡| 亚洲成精国产精品女| 色欧美片视频在线观看| 国产精品国产成人国产三级 | 欧美在线你懂得| 中文字幕日韩一区| 国产一区二区三区日韩| 精品久久久久久亚洲综合网 | 欧美精品一卡二卡| 亚洲影院久久精品| 一本色道久久综合亚洲91| 中文字幕制服丝袜一区二区三区| 国产美女视频91| 久久久久久一级片| 国产成人免费视频| 中文字幕第一区综合| 福利91精品一区二区三区| 国产欧美日本一区视频| 国产精品一区免费视频| 久久久美女毛片| 国产91精品免费| 中文字幕亚洲一区二区va在线| 成人免费黄色在线| 亚洲人被黑人高潮完整版| 色综合咪咪久久| 亚洲一区二区偷拍精品| 欧美美女视频在线观看| 日韩**一区毛片| 欧美xxxxx牲另类人与| 精品综合久久久久久8888| 久久综合狠狠综合久久激情| 国产精品白丝jk白祙喷水网站| 欧美激情一区二区三区四区| eeuss鲁一区二区三区| 亚洲精品第1页| 欧美一级夜夜爽| 国产成人高清视频| 亚洲丝袜美腿综合| 欧美日韩黄视频| 韩国三级电影一区二区| 国产精品久久久久桃色tv| 在线观看91精品国产入口| 日韩专区欧美专区| 国产丝袜在线精品| 一本大道av伊人久久综合| 视频一区免费在线观看| 精品成人一区二区三区四区| 成人动漫在线一区| 五月激情六月综合| 国产午夜精品久久久久久久| 不卡的av中国片| 男人的天堂久久精品| 亚洲视频小说图片|