- echo "$file: conflicts: $conflicts" > experr
- if test $sr_count -ne $sr_exp; then
- if test $sr_exp -ne 1; then s=s; else s= ; fi
- echo "$file: expected $sr_exp shift/reduce conflict$s" >> experr
- fi
- if test $rr_count -ne $rr_exp; then
- if test $rr_exp -ne 1; then s=s; else s= ; fi
- echo "$file: expected $rr_exp reduce/reduce conflict$s" >> experr
- fi
+ {
+ if test -z "$sr_exp_i" && test "$sr_count" -ne 0; then
+ echo "warning: $sr_count shift/reduce conflicts"
+ elif test "$sr_exp_i" -ne "$sr_count"; then
+ echo "error: shift/reduce conflicts: $sr_count found, $sr_exp_i expected"
+ fi
+ if test -z "$rr_exp_i" && test "$rr_count" -ne 0; then
+ echo "warning: $rr_count reduce/reduce conflicts"
+ elif test "$rr_exp_i" -ne "$rr_count"; then
+ echo "error: reduce/reduce conflicts: $rr_count found, $rr_exp_i expected"
+ fi
+ } | sed -e "s/^/$file: /" > experr