class Treetop::Compiler::OccurrenceRange

def clean_unsaturated

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

end

def compile(address, builder, parent_expression)

def compile(address, builder, parent_expression)
  super
  if !min.empty? && min.text_value.to_i != 0
    # We got some, but fewer than we wanted. There'll be a failure reported already
    builder.if__ "#{accumulator_var}.size < #{min.text_value}" do
      reset_index
      assign_failure start_index_var

    builder.else_ do
lean_unsaturated
ssign_and_extend_result parent_expression

  else
an_unsaturated
ign_and_extend_result parent_expression
  end_comment(parent_expression)
end

def expected

def expected
t_expression.atomic.expected && "at least #{min.text_value} "+parent_expression.atomic.expected
end