Sha256: a1d9ba3071f4a3445f6951c2652cc7cd249ee87507d2dec95a488522119e901c

Contents?: true

Size: 1.24 KB

Versions: 14

Compression:

Stored size: 1.24 KB

Contents

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


module Mail
  module Received
    include Treetop::Runtime

    def root
      @root || :primary
    end

    include RFC2822

    module Primary0
      def name_val_list
        elements[0]
      end

      def date_time
        elements[2]
      end
    end

    def _nt_primary
      start_index = index
      if node_cache[:primary].has_key?(index)
        cached = node_cache[:primary][index]
        @index = cached.interval.end if cached
        return cached
      end

      i0, s0 = index, []
      r1 = _nt_name_val_list
      s0 << r1
      if r1
        if has_terminal?(";", false, index)
          r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
          @index += 1
        else
          terminal_parse_failure(";")
          r2 = nil
        end
        s0 << r2
        if r2
          r3 = _nt_date_time
          s0 << r3
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(Primary0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:primary][start_index] = r0

      r0
    end

  end

  class ReceivedParser < Treetop::Runtime::CompiledParser
    include Received
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mail-1.4.0 lib/mail/parsers/received.rb
mail-1.3.5 lib/mail/parsers/received.rb
mail-1.3.4 lib/mail/parsers/received.rb
mail-1.3.3 lib/mail/parsers/received.rb
mail-1.3.2 lib/mail/parsers/received.rb
mail-1.3.1 lib/mail/parsers/received.rb
mail-1.3.0 lib/mail/parsers/received.rb
mail-1.2.9 lib/mail/parsers/received.rb
mail-1.2.8 lib/mail/parsers/received.rb
mail-1.2.6 lib/mail/parsers/received.rb
mail-1.2.5 ./lib/mail/parsers/received.rb
mail-1.2.1 ./lib/mail/parsers/received.rb
mail-1.1.0 ./lib/mail/parsers/received.rb
mail-1.0.0 ./lib/mail/parsers/received.rb