Sha256: d31a0fad2f0685d0a8ad213db7995bdd63d8aeef61a310f6b5450995e5e43ac1

Contents?: true

Size: 1.28 KB

Versions: 141

Compression:

Stored size: 1.28 KB

Contents

# Autogenerated from a Treetop grammar. Edits may be lost.


module Mail
  module AddressLists
    include Treetop::Runtime

    def root
      @root ||= :primary_address
    end

    include RFC2822

    module PrimaryAddress0
      def addresses
        ([first_addr] + other_addr.elements.map { |o| o.addr_value }).reject { |e| e.empty? }
      end
    end

    module PrimaryAddress1
      def addresses
        [first_addr] + other_addr.elements.map { |o| o.addr_value }
      end
    end

    def _nt_primary_address
      start_index = index
      if node_cache[:primary_address].has_key?(index)
        cached = node_cache[:primary_address][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0 = index
      r1 = _nt_address_list
      r1.extend(PrimaryAddress0)
      if r1
        r0 = r1
      else
        r2 = _nt_obs_addr_list
        r2.extend(PrimaryAddress1)
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:primary_address][start_index] = r0

      r0
    end

  end

  class AddressListsParser < Treetop::Runtime::CompiledParser
    include AddressLists
  end

end

Version data entries

141 entries across 129 versions & 14 rubygems

Version Path
mail-2.5.5 lib/mail/parsers/address_lists.rb
mail-2.5.5.rc1 lib/mail/parsers/address_lists.rb
classiccms-0.7.5 vendor/bundle/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
classiccms-0.7.4 vendor/bundle/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
classiccms-0.7.3 vendor/bundle/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
challah-1.0.0 vendor/bundle/gems/mail-2.5.4/lib/mail/parsers/address_lists.rb
classiccms-0.7.2 vendor/bundle/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
classiccms-0.7.1 vendor/bundle/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
swipe-rails-0.0.5 vendor/bundle/gems/mail-2.5.4/lib/mail/parsers/address_lists.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
classiccms-0.7.0 vendor/bundle/gems/mail-2.4.4/lib/mail/parsers/address_lists.rb
mail-2.5.4 lib/mail/parsers/address_lists.rb
mail-2.2.20 lib/mail/parsers/address_lists.rb
challah-1.0.0.beta3 vendor/bundle/gems/mail-2.5.3/lib/mail/parsers/address_lists.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/mail-2.5.3/lib/mail/parsers/address_lists.rb