Home | History | Annotate | Download | only in tool

Lines Matching refs:cfp

256   struct config *cfp;      /* All configurations in this set */
269 struct config *cfp; /* The configuration to which linked */
810 struct config *cfp, *bp;
830 cfp = Configlist_return();
831 Configlist_eat(cfp);
836 cfp = Configlist_return(); /* Get a pointer to the config list */
840 stp->cfp = cfp; /* Remember the configuration closure */
870 struct config *cfp; /* For looping thru the config closure of "stp" */
873 struct symbol *sp; /* Symbol following the dot in configuration "cfp" */
879 for(cfp=stp->cfp; cfp; cfp=cfp->next) cfp->status = INCOMPLETE;
882 for(cfp=stp->cfp; cfp; cfp=cfp->next){
883 if( cfp->status==COMPLETE ) continue; /* Already used by inner loop */
884 if( cfp->dot>=cfp->rp->nrhs ) continue; /* Can't shift this config */
886 sp = cfp->rp->rhs[cfp->dot]; /* Symbol after the dot */
891 for(bcfp=cfp; bcfp; bcfp=bcfp->next){
895 if( !same_symbol(bsp,sp) ) continue; /* Must be same as for "cfp" */
924 struct config *cfp, *other;
933 for(cfp=stp->cfp; cfp; cfp=cfp->next){
934 cfp
942 for(cfp=stp->cfp; cfp; cfp=cfp->next){
943 for(plp=cfp->bplp; plp; plp=plp->next){
944 other = plp->cfp;
945 Plink_add(&other->fplp,cfp);
959 struct config *cfp;
965 for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){
966 cfp->status = INCOMPLETE;
973 for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){
974 if( cfp->status==COMPLETE ) continue;
975 for(plp=cfp->fplp; plp; plp=plp->next){
976 change = SetUnion(plp->cfp->fws,cfp->fws);
978 plp->cfp->status = INCOMPLETE;
982 cfp->status = COMPLETE;
995 struct config *cfp;
1006 for(cfp=stp->cfp; cfp; cfp=cfp->next){ /* Loop over all configurations */
1007 if( cfp->rp->nrhs==cfp->dot ){ /* Is dot at extreme right? */
1009 if( SetFind(cfp->fws,j) ){
1011 ** rule "cfp->rp" if the lookahead symbol is "lemp->symbols[j]" */
1012 Action_add(&stp->ap,REDUCE,lemp->symbols[j],(char *)cfp->rp);
1201 struct config *cfp, model;
1206 cfp = Configtable_find(&model);
1207 if( cfp==0 ){
1208 cfp = newconfig();
1209 cfp->rp = rp;
1210 cfp->dot = dot;
1211 cfp->fws = SetNew();
1212 cfp->stp = 0;
1213 cfp->fplp = cfp->bplp = 0;
1214 cfp->next = 0;
1215 cfp->bp = 0;
1216 *currentend = cfp;
1217 currentend = &cfp->next;
1218 Configtable_insert(cfp);
1220 return cfp;
1226 struct config *cfp, model;
1232 cfp = Configtable_find(&model);
1233 if( cfp==0 ){
1234 cfp = newconfig();
1235 cfp->rp = rp;
1236 cfp->dot = dot;
1237 cfp->fws = SetNew();
1238 cfp->stp = 0;
1239 cfp->fplp = cfp->bplp = 0;
1240 cfp->next = 0;
1241 cfp->bp = 0;
1242 *currentend = cfp;
1243 currentend = &cfp->next;
1244 *basisend = cfp;
1245 basisend = &cfp->bp;
1246 Configtable_insert(cfp);
1248 return cfp;
1254 struct config *cfp, *newcfp;
1260 for(cfp=current; cfp; cfp=cfp->next){
1261 rp = cfp->rp;
1262 dot = cfp->dot;
1289 if( i==rp->nrhs ) Plink_add(&cfp->fplp,newcfp);
1331 void Configlist_eat(struct config *cfp)
1334 for(; cfp; cfp=nextcfp){
1335 nextcfp = cfp->next;
1336 assert( cfp->fplp==0 );
1337 assert( cfp->bplp==0 );
1338 if( cfp->fws ) SetFree(cfp->fws);
1339 deleteconfig(cfp);
2687 void Plink_add(struct plink **plpp, struct config *cfp)
2693 newlink->cfp = cfp;
2831 void ConfigPrint(FILE *fp, struct config *cfp)
2836 rp = cfp->rp;
2839 if( i==cfp->dot ) fprintf(fp," *");
2879 fprintf(out,"%12s%s (state %2d) ","",tag,plp->cfp->stp->statenum);
2880 ConfigPrint(out,plp->cfp);
2942 struct config *cfp;
2951 if( lemp->basisflag ) cfp=stp->bp;
2952 else cfp=stp->cfp;
2953 while( cfp ){
2955 if( cfp->dot==cfp->rp->nrhs ){
2956 sprintf(buf,"(%d)",cfp->rp->index);
2961 ConfigPrint(fp,cfp);
2964 SetPrint(fp,cfp->fws,lemp);
2965 PlinkPrint(fp,cfp->fplp,"To ");
2966 PlinkPrint(fp,cfp->bplp,"From");
2968 if( lemp->basisflag ) cfp=cfp->bp;
2969 else cfp=cfp->next;