mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 21:11:52 +00:00
Lemon update 2016-04-29 11:28:35 on branch trunk
— Lemon bug fix: Do not merge action routines unless their destructors are also identical. Problem and suggested fix reported on the mailing list by Kelvin Sherlock. (user: drh)
This commit is contained in:
parent
6f92efc72c
commit
de56be6c01
1 changed files with 3 additions and 2 deletions
|
@ -4404,7 +4404,8 @@ void ReportTable(
|
||||||
writeRuleText(out, rp);
|
writeRuleText(out, rp);
|
||||||
fprintf(out," */\n"); lineno++;
|
fprintf(out," */\n"); lineno++;
|
||||||
for(rp2=rp->next; rp2; rp2=rp2->next){
|
for(rp2=rp->next; rp2; rp2=rp2->next){
|
||||||
if( rp2->code==rp->code ){
|
if( rp2->code==rp->code && rp2->codePrefix==rp->codePrefix
|
||||||
|
&& rp2->codeSuffix == rp->codeSuffix ){
|
||||||
fprintf(out," case %d: /*",rp2->iRule);
|
fprintf(out," case %d: /*",rp2->iRule);
|
||||||
writeRuleText(out, rp2);
|
writeRuleText(out, rp2);
|
||||||
fprintf(out, " */ yytestcase(yyruleno==%d);\n", rp2->iRule); lineno++;
|
fprintf(out, " */ yytestcase(yyruleno==%d);\n", rp2->iRule); lineno++;
|
||||||
|
@ -4413,7 +4414,7 @@ void ReportTable(
|
||||||
}
|
}
|
||||||
emit_code(out,rp,lemp,&lineno);
|
emit_code(out,rp,lemp,&lineno);
|
||||||
fprintf(out," break;\n"); lineno++;
|
fprintf(out," break;\n"); lineno++;
|
||||||
rp->code = 0;
|
rp->code = 0;
|
||||||
}
|
}
|
||||||
/* Finally, output the default: rule. We choose as the default: all
|
/* Finally, output the default: rule. We choose as the default: all
|
||||||
** empty actions. */
|
** empty actions. */
|
||||||
|
|
Loading…
Reference in a new issue