class Treetop::Compiler::OccurrenceRange

def clean_unsaturated

remove the last terminal_failure if we merely failed to reach the maximum
def clean_unsaturated
  if !max.empty? && max.text_value.to_i > 0
    builder.if_ "#{accumulator_var}.size < #{max.text_value}" do
      builder << '@terminal_failures.pop'  # Ignore the last failure.
    end
  end
end