Hello,
Could you allow an outputting of autoreduced states when they produce
conflicts? I have noticed that such errors are caused by small and
hard-to-find remnants in a grammar file. There is no other way to detect
such errors. A few lines are getting the problem off (function
lemon.c:ReportOutput):
======
--- "../../sqlite-src-3240000/tool/lemon.c" 2018-06-04
21:51:19.000000000 +0200
+++ lemon.c 2018-07-09 19:58:39.852430500 +0200
@@ -3294,9 +3740,19 @@
fp = file_open(lemp,".out","wb");
if( fp==0 ) return;
- for(i=0; i<lemp->nxstate; i++){
+ for(i=0; i<lemp->nstate; i++){
stp = lemp->sorted[i];
- fprintf(fp,"State %d:\n",stp->statenum);
+ if( i>=lemp->nxstate ){
+ for(ap=stp->ap; ap!=0; ap=ap->next){
+ if( ap->type==SSCONFLICT ) break;
+ if( ap->type==SRCONFLICT ) break;
+ if( ap->type==RRCONFLICT ) break;
+ }
+ if( ap==0 ) continue;
+ fprintf(fp,"Degenerated state %d:\n",stp->statenum);
+ } else {
+ fprintf(fp,"State %d:\n",stp->statenum);
+ }
if( lemp->basisflag ) cfp=stp->bp;
else cfp=stp->cfp;
while( cfp ){
======
-- best regards
Cezary H. Noweta
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users