class Treetop::Compiler::ParsingRule

def generate_method_definition(builder)

def generate_method_definition(builder)
  builder.reset_addresses
  expression_address = builder.next_address
  result_var = "r#{expression_address}"
  
  builder.method_declaration(method_name) do
    builder.assign 'start_index', 'index'
    generate_cache_lookup(builder)
    builder.newline
    parsing_expression.compile(expression_address, builder)
    builder.newline
    generate_cache_storage(builder, result_var)
    builder.newline          
    builder << "return #{result_var}"
  end
end