Don't output newline instead if label in initial DFA state.
Rationale: the equivalence of initial label to
're2c::label_counter_t::FIRST' is NOT a proper criterion
and pretty-printing shouldn't rely on it. The real criterion
is something like "(first re2c block OR any use block in '-r'
mode) AND first condition in'-c' mode", but it's spurious and
introduces unnecessary complications.
Droping this newline allows us drop equivalence operator for
labels.
Used the following bash script to ensure that all the changes
in tests are caused by missing newline(s):
#!/bin/bash
for f2 in *.temp
do
f1=${f2%.temp}
diff1=`diff $f1 $f2 | grep '^< ' | wc -l`
diff1_line=`diff $f1 $f2 | grep '^< #line' | wc -l`
diff1_newline=`diff $f1 $f2 | grep '^< $' | wc -l`
diff2=`diff $f1 $f2 | grep '^> ' | wc -l`
diff2_line=`diff $f1 $f2 | grep '^> #line' | wc -l`
# missing: only newlines and line directives
if [[ $diff1 -ne $((diff1_line + diff1_newline)) ]]
then
echo "FAIL1: $f1"
exit 1
fi
# added: only line directives
if [[ $diff2 -ne $diff2_line ]]
then
echo "FAIL2: $f1"
exit 1
fi
# the number of missing line directives
# equals to the number of added line directives
if [[ $diff1_line -ne $diff2_line ]]
then
echo "FAIL4: $f1"
exit 1
fi
done
echo "OK"