Lines Matching refs:cfp

208   struct config *cfp;      /* All configurations in this set */  member
221 struct config *cfp; /* The configuration to which linked */ member
723 struct config *cfp, *bp; local
743 cfp = Configlist_return();
744 Configlist_eat(cfp);
749 cfp = Configlist_return(); /* Get a pointer to the config list */
753 stp->cfp = cfp; /* Remember the configuration closure */
769 struct config *cfp; /* For looping thru the config closure of "stp" */ local
778 for(cfp=stp->cfp; cfp; cfp=cfp->next) cfp->status = INCOMPLETE;
781 for(cfp=stp->cfp; cfp; cfp=cfp->next){
782 if( cfp->status==COMPLETE ) continue; /* Already used by inner loop */
783 if( cfp->dot>=cfp->rp->nrhs ) continue; /* Can't shift this config */
785 sp = cfp->rp->rhs[cfp->dot]; /* Symbol after the dot */
790 for(bcfp=cfp; bcfp; bcfp=bcfp->next){
817 struct config *cfp, *other; local
826 for(cfp=stp->cfp; cfp; cfp=cfp->next){
827 cfp->stp = stp;
835 for(cfp=stp->cfp; cfp; cfp=cfp->next){
836 for(plp=cfp->bplp; plp; plp=plp->next){
837 other = plp->cfp;
838 Plink_add(&other->fplp,cfp);
853 struct config *cfp; local
859 for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){
860 cfp->status = INCOMPLETE;
867 for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){
868 if( cfp->status==COMPLETE ) continue;
869 for(plp=cfp->fplp; plp; plp=plp->next){
870 change = SetUnion(plp->cfp->fws,cfp->fws);
872 plp->cfp->status = INCOMPLETE;
876 cfp->status = COMPLETE;
890 struct config *cfp; local
901 for(cfp=stp->cfp; cfp; cfp=cfp->next){ /* Loop over all configurations */
902 if( cfp->rp->nrhs==cfp->dot ){ /* Is dot at extreme right? */
904 if( SetFind(cfp->fws,j) ){
907 Action_add(&stp->ap,REDUCE,lemp->symbols[j],(char *)cfp->rp);
1089 struct config *cfp, model; local
1094 cfp = Configtable_find(&model);
1095 if( cfp==0 ){
1096 cfp = newconfig();
1097 cfp->rp = rp;
1098 cfp->dot = dot;
1099 cfp->fws = SetNew();
1100 cfp->stp = 0;
1101 cfp->fplp = cfp->bplp = 0;
1102 cfp->next = 0;
1103 cfp->bp = 0;
1104 *currentend = cfp;
1105 currentend = &cfp->next;
1106 Configtable_insert(cfp);
1108 return cfp;
1116 struct config *cfp, model; local
1122 cfp = Configtable_find(&model);
1123 if( cfp==0 ){
1124 cfp = newconfig();
1125 cfp->rp = rp;
1126 cfp->dot = dot;
1127 cfp->fws = SetNew();
1128 cfp->stp = 0;
1129 cfp->fplp = cfp->bplp = 0;
1130 cfp->next = 0;
1131 cfp->bp = 0;
1132 *currentend = cfp;
1133 currentend = &cfp->next;
1134 *basisend = cfp;
1135 basisend = &cfp->bp;
1136 Configtable_insert(cfp);
1138 return cfp;
1145 struct config *cfp, *newcfp; local
1151 for(cfp=current; cfp; cfp=cfp->next){
1152 rp = cfp->rp;
1153 dot = cfp->dot;
1174 if( i==rp->nrhs ) Plink_add(&cfp->fplp,newcfp);
1216 void Configlist_eat(cfp) in Configlist_eat() argument
1217 struct config *cfp; in Configlist_eat()
1220 for(; cfp; cfp=nextcfp){
1221 nextcfp = cfp->next;
1222 assert( cfp->fplp==0 );
1223 assert( cfp->bplp==0 );
1224 if( cfp->fws ) SetFree(cfp->fws);
1225 deleteconfig(cfp);
2446 void Plink_add(plpp,cfp) in Plink_add() argument
2448 struct config *cfp;
2454 new->cfp = cfp;
2575 void ConfigPrint(fp,cfp) in ConfigPrint() argument
2577 struct config *cfp;
2581 rp = cfp->rp;
2584 if( i==cfp->dot ) fprintf(fp," *");
2618 fprintf(out,"%12s%s (state %2d) ","",tag,plp->cfp->stp->index);
2619 ConfigPrint(out,plp->cfp);
2663 struct config *cfp; local
2673 if( lemp->basisflag ) cfp=stp->bp;
2674 else cfp=stp->cfp;
2675 while( cfp ){
2677 if( cfp->dot==cfp->rp->nrhs ){
2678 sprintf(buf,"(%d)",cfp->rp->index);
2683 ConfigPrint(fp,cfp);
2686 SetPrint(fp,cfp->fws,lemp);
2687 PlinkPrint(fp,cfp->fplp,"To ");
2688 PlinkPrint(fp,cfp->bplp,"From");
2690 if( lemp->basisflag ) cfp=cfp->bp;
2691 else cfp=cfp->next;