module Mail
  grammar AddressLists

    include RFC2822

    rule primary_address
      address_list {
        def addresses
          [first_addr] + other_addr.elements.map { |o| o.addr_value }
        end
      } / obs_addr_list {
        def addresses
          [first_addr] + other_addr.elements.map { |o| o.addr_value }
        end
      }
    end
    
  end
end