Consider the following re2c source (1.re):
/*!re2c
<c1> "b" {}
<c1> "bbb" {}
<c2> "a" {}
<c2> "aaa" {}
<c2> "aaaaa" {}
*/
Build and grep all 'yyaccept' and 'yyc_' (condition borders):
$ re2c -c 1.re | grep "yyaccept\|yyc_"
unsigned int yyaccept = 0;
case yycc1: goto yyc_c1;
case yycc2: goto yyc_c2;
yyc_c1:
yyaccept = 0;
yyc_c2:
if (yyaccept == 0) {
yyaccept = 0;
yyaccept = 1;
What do we have here? Condition 'c1' assigns 'yyaccept' a value but never uses it (because it doesn't need it).
Reproduced with 0.13.6, 0.14.2 and HEAD.
Original comment by: skvadrik
Consider the following re2c source (1.re):
Build and grep all 'yyaccept' and 'yyc_' (condition borders):
What do we have here? Condition 'c1' assigns 'yyaccept' a value but never uses it (because it doesn't need it).
Reproduced with 0.13.6, 0.14.2 and HEAD.
Original comment by: skvadrik