Example 01_fill.re in docs is broken
Closed this issue · 2 comments
szanni commented
Trying to compile the example file 01_fill.re
in the docs fails to compile as of version 1.3
Steps to reproduce:
git clone https://github.com/skvadrik/re2c
cd re2c
# optionally: git checkout 1.3
./autogen.sh; ./configure.sh; make
cd doc/manual/fill
../../../re2c -W 01_fill.re -o 01_fill.c
cc 01_fill.c
The last step fails with the following message:
01_fill.re: In function ‘lex’:
01_fill.c:208:4: error: label ‘yy14’ used but not defined
208 | goto yy14;
| ^~~~
It seems the generator is broken? The example compiles and runs fine when using version 1.2.1
skvadrik commented
Reproduced with HEAD. There was some work on between 1.2.1 and 1.3 on reducing redundant labels, and it probably reduced too much. And the example should be added as a test. I will look into it.