module Mail::RFC2822Obsolete - mail-2.5.4 Documentation

# module Mail::RFC2822Obsolete

### Public Instance Methods

_nt_obs_FWS() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 413
    def _nt_obs_FWS
      start_index = index
      if node_cache[:obs_FWS].has_key?(index)
        cached = node_cache[:obs_FWS][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      s1, i1 = [], index
      loop do
        r2 = _nt_WSP
        if r2
          s1 << r2
        else
          break
        end
      end
      if s1.empty?
        @index = i1
        r1 = nil
      else
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
      end
      s0 << r1
      if r1
        s3, i3 = [], index
        loop do
          i4, s4 = index, []
          r5 = _nt_CRLF
          s4 << r5
          if r5
            s6, i6 = [], index
            loop do
              r7 = _nt_WSP
              if r7
                s6 << r7
              else
                break
              end
            end
            if s6.empty?
              @index = i6
              r6 = nil
            else
              r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
            end
            s4 << r6
          end
          if s4.last
            r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
            r4.extend(ObsFWS0)
          else
            @index = i4
            r4 = nil
          end
          if r4
            s3 << r4
          else
            break
          end
        end
        r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
        s0 << r3
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsFWS1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_FWS][start_index] = r0

      r0
    end

_nt_obs_addr_list() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1633
    def _nt_obs_addr_list
      start_index = index
      if node_cache[:obs_addr_list].has_key?(index)
        cached = node_cache[:obs_addr_list][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      s1, i1 = [], index
      loop do
        i2, s2 = index, []
        r4 = _nt_address
        if r4
          r3 = r4
        else
          r3 = instantiate_node(SyntaxNode,input, index...index)
        end
        s2 << r3
        if r3
          r6 = _nt_CFWS
          if r6
            r5 = r6
          else
            r5 = instantiate_node(SyntaxNode,input, index...index)
          end
          s2 << r5
          if r5
            if has_terminal?(",", false, index)
              r7 = instantiate_node(SyntaxNode,input, index...(index + 1))
              @index += 1
            else
              terminal_parse_failure(",")
              r7 = nil
            end
            s2 << r7
            if r7
              r9 = _nt_CFWS
              if r9
                r8 = r9
              else
                r8 = instantiate_node(SyntaxNode,input, index...index)
              end
              s2 << r8
            end
          end
        end
        if s2.last
          r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
          r2.extend(ObsAddrList0)
        else
          @index = i2
          r2 = nil
        end
        if r2
          s1 << r2
        else
          break
        end
      end
      if s1.empty?
        @index = i1
        r1 = nil
      else
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
      end
      s0 << r1
      if r1
        r11 = _nt_address
        if r11
          r10 = r11
        else
          r10 = instantiate_node(SyntaxNode,input, index...index)
        end
        s0 << r10
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsAddrList1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_addr_list][start_index] = r0

      r0
    end

_nt_obs_angle_addr() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1139
    def _nt_obs_angle_addr
      start_index = index
      if node_cache[:obs_angle_addr].has_key?(index)
        cached = node_cache[:obs_angle_addr][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r2 = _nt_CFWS
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        if has_terminal?("<", false, index)
          r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
          @index += 1
        else
          terminal_parse_failure("<")
          r3 = nil
        end
        s0 << r3
        if r3
          r5 = _nt_obs_route
          if r5
            r4 = r5
          else
            r4 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r4
          if r4
            r6 = _nt_addr_spec
            s0 << r6
            if r6
              if has_terminal?(">", false, index)
                r7 = instantiate_node(SyntaxNode,input, index...(index + 1))
                @index += 1
              else
                terminal_parse_failure(">")
                r7 = nil
              end
              s0 << r7
              if r7
                r9 = _nt_CFWS
                if r9
                  r8 = r9
                else
                  r8 = instantiate_node(SyntaxNode,input, index...index)
                end
                s0 << r8
              end
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsAngleAddr0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_angle_addr][start_index] = r0

      r0
    end

_nt_obs_bcc() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2324
    def _nt_obs_bcc
      start_index = index
      if node_cache[:obs_bcc].has_key?(index)
        cached = node_cache[:obs_bcc][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Bcc", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 3))
        @index += 3
      else
        terminal_parse_failure("Bcc")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            i5 = index
            r6 = _nt_address_list
            if r6
              r5 = r6
            else
              r8 = _nt_CFWS
              if r8
                r7 = r8
              else
                r7 = instantiate_node(SyntaxNode,input, index...index)
              end
              if r7
                r5 = r7
              else
                @index = i5
                r5 = nil
              end
            end
            s0 << r5
            if r5
              r9 = _nt_CRLF
              s0 << r9
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsBcc0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_bcc][start_index] = r0

      r0
    end

_nt_obs_cc() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2254
    def _nt_obs_cc
      start_index = index
      if node_cache[:obs_cc].has_key?(index)
        cached = node_cache[:obs_cc][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Cc", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 2))
        @index += 2
      else
        terminal_parse_failure("Cc")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_address_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsCc0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_cc][start_index] = r0

      r0
    end

_nt_obs_char() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 164
    def _nt_obs_char
      start_index = index
      if node_cache[:obs_char].has_key?(index)
        cached = node_cache[:obs_char][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0 = index
      if has_terminal?('\G[\x00-\x09]', true, index)
        r1 = true
        @index += 1
      else
        r1 = nil
      end
      if r1
        r0 = r1
      else
        if has_terminal?('\G[\x0B-\x0C]', true, index)
          r2 = true
          @index += 1
        else
          r2 = nil
        end
        if r2
          r0 = r2
        else
          if has_terminal?('\G[\x0E-\x7F]', true, index)
            r3 = true
            @index += 1
          else
            r3 = nil
          end
          if r3
            r0 = r3
          else
            @index = i0
            r0 = nil
          end
        end
      end

      node_cache[:obs_char][start_index] = r0

      r0
    end

_nt_obs_comments() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2781
    def _nt_obs_comments
      start_index = index
      if node_cache[:obs_comments].has_key?(index)
        cached = node_cache[:obs_comments][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Comments", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 8))
        @index += 8
      else
        terminal_parse_failure("Comments")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_unstructured
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsComments0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_comments][start_index] = r0

      r0
    end

_nt_obs_day() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 679
    def _nt_obs_day
      start_index = index
      if node_cache[:obs_day].has_key?(index)
        cached = node_cache[:obs_day][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r2 = _nt_CFWS
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        i3 = index
        r4 = _nt_DIGIT
        if r4
          r3 = r4
        else
          i5, s5 = index, []
          r6 = _nt_DIGIT
          s5 << r6
          if r6
            r7 = _nt_DIGIT
            s5 << r7
          end
          if s5.last
            r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
            r5.extend(ObsDay0)
          else
            @index = i5
            r5 = nil
          end
          if r5
            r3 = r5
          else
            @index = i3
            r3 = nil
          end
        end
        s0 << r3
        if r3
          r9 = _nt_CFWS
          if r9
            r8 = r9
          else
            r8 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r8
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsDay1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_day][start_index] = r0

      r0
    end

_nt_obs_day_of_week() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 501
    def _nt_obs_day_of_week
      start_index = index
      if node_cache[:obs_day_of_week].has_key?(index)
        cached = node_cache[:obs_day_of_week][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r2 = _nt_CFWS
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        r3 = _nt_day_name
        s0 << r3
        if r3
          r5 = _nt_CFWS
          if r5
            r4 = r5
          else
            r4 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r4
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsDayOfWeek0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_day_of_week][start_index] = r0

      r0
    end

_nt_obs_domain() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1470
    def _nt_obs_domain
      start_index = index
      if node_cache[:obs_domain].has_key?(index)
        cached = node_cache[:obs_domain][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r1 = _nt_atom
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          i3, s3 = index, []
          if has_terminal?(".", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(".")
            r4 = nil
          end
          s3 << r4
          if r4
            r5 = _nt_atom
            s3 << r5
          end
          if s3.last
            r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
            r3.extend(ObsDomain0)
          else
            @index = i3
            r3 = nil
          end
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsDomain1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_domain][start_index] = r0

      r0
    end

_nt_obs_domain_list() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1288
    def _nt_obs_domain_list
      start_index = index
      if node_cache[:obs_domain_list].has_key?(index)
        cached = node_cache[:obs_domain_list][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("@", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        terminal_parse_failure("@")
        r1 = nil
      end
      s0 << r1
      if r1
        r2 = _nt_domain
        s0 << r2
        if r2
          s3, i3 = [], index
          loop do
            i4, s4 = index, []
            s5, i5 = [], index
            loop do
              if has_terminal?(",", false, index)
                r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
                @index += 1
              else
                terminal_parse_failure(",")
                r6 = nil
              end
              if r6
                s5 << r6
              else
                break
              end
            end
            r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
            s4 << r5
            if r5
              r8 = _nt_CFWS
              if r8
                r7 = r8
              else
                r7 = instantiate_node(SyntaxNode,input, index...index)
              end
              s4 << r7
              if r7
                if has_terminal?("@", false, index)
                  r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
                  @index += 1
                else
                  terminal_parse_failure("@")
                  r9 = nil
                end
                s4 << r9
                if r9
                  r10 = _nt_domain
                  s4 << r10
                end
              end
            end
            if s4.last
              r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
              r4.extend(ObsDomainList0)
            else
              @index = i4
              r4 = nil
            end
            if r4
              s3 << r4
            else
              break
            end
          end
          r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
          s0 << r3
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsDomainList1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_domain_list][start_index] = r0

      r0
    end

_nt_obs_fields() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1725
    def _nt_obs_fields
      start_index = index
      if node_cache[:obs_fields].has_key?(index)
        cached = node_cache[:obs_fields][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      s0, i0 = [], index
      loop do
        i1 = index
        r2 = _nt_obs_return
        if r2
          r1 = r2
        else
          r3 = _nt_obs_received
          if r3
            r1 = r3
          else
            r4 = _nt_obs_orig_date
            if r4
              r1 = r4
            else
              r5 = _nt_obs_from
              if r5
                r1 = r5
              else
                r6 = _nt_obs_sender
                if r6
                  r1 = r6
                else
                  r7 = _nt_obs_reply_to
                  if r7
                    r1 = r7
                  else
                    r8 = _nt_obs_to
                    if r8
                      r1 = r8
                    else
                      r9 = _nt_obs_cc
                      if r9
                        r1 = r9
                      else
                        r10 = _nt_obs_bcc
                        if r10
                          r1 = r10
                        else
                          r11 = _nt_obs_message_id
                          if r11
                            r1 = r11
                          else
                            r12 = _nt_obs_in_reply_to
                            if r12
                              r1 = r12
                            else
                              r13 = _nt_obs_references
                              if r13
                                r1 = r13
                              else
                                r14 = _nt_obs_subject
                                if r14
                                  r1 = r14
                                else
                                  r15 = _nt_obs_comments
                                  if r15
                                    r1 = r15
                                  else
                                    r16 = _nt_obs_keywords
                                    if r16
                                      r1 = r16
                                    else
                                      r17 = _nt_obs_resent_date
                                      if r17
                                        r1 = r17
                                      else
                                        r18 = _nt_obs_resent_from
                                        if r18
                                          r1 = r18
                                        else
                                          r19 = _nt_obs_resent_send
                                          if r19
                                            r1 = r19
                                          else
                                            r20 = _nt_obs_resent_rply
                                            if r20
                                              r1 = r20
                                            else
                                              r21 = _nt_obs_resent_to
                                              if r21
                                                r1 = r21
                                              else
                                                r22 = _nt_obs_resent_cc
                                                if r22
                                                  r1 = r22
                                                else
                                                  r23 = _nt_obs_resent_bcc
                                                  if r23
                                                    r1 = r23
                                                  else
                                                    r24 = _nt_obs_resent_mid
                                                    if r24
                                                      r1 = r24
                                                    else
                                                      r25 = _nt_obs_optional
                                                      if r25
                                                        r1 = r25
                                                      else
                                                        @index = i1
                                                        r1 = nil
                                                      end
                                                    end
                                                  end
                                                end
                                              end
                                            end
                                          end
                                        end
                                      end
                                    end
                                  end
                                end
                              end
                            end
                          end
                        end
                      end
                    end
                  end
                end
              end
            end
          end
        end
        if r1
          s0 << r1
        else
          break
        end
      end
      r0 = instantiate_node(SyntaxNode,input, i0...index, s0)

      node_cache[:obs_fields][start_index] = r0

      r0
    end

_nt_obs_from() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1958
    def _nt_obs_from
      start_index = index
      if node_cache[:obs_from].has_key?(index)
        cached = node_cache[:obs_from][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("From", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 4))
        @index += 4
      else
        terminal_parse_failure("From")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_mailbox_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsFrom0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_from][start_index] = r0

      r0
    end

_nt_obs_hour() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 762
    def _nt_obs_hour
      start_index = index
      if node_cache[:obs_hour].has_key?(index)
        cached = node_cache[:obs_hour][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r2 = _nt_CFWS
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        i3, s3 = index, []
        r4 = _nt_DIGIT
        s3 << r4
        if r4
          r5 = _nt_DIGIT
          s3 << r5
        end
        if s3.last
          r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
          r3.extend(ObsHour0)
        else
          @index = i3
          r3 = nil
        end
        s0 << r3
        if r3
          r7 = _nt_CFWS
          if r7
            r6 = r7
          else
            r6 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r6
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsHour1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_hour][start_index] = r0

      r0
    end

_nt_obs_id_left() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2661
    def _nt_obs_id_left
      start_index = index
      if node_cache[:obs_id_left].has_key?(index)
        cached = node_cache[:obs_id_left][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      r0 = _nt_local_part

      node_cache[:obs_id_left][start_index] = r0

      r0
    end

_nt_obs_id_right() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2679
    def _nt_obs_id_right
      start_index = index
      if node_cache[:obs_id_right].has_key?(index)
        cached = node_cache[:obs_id_right][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      r0 = _nt_domain

      node_cache[:obs_id_right][start_index] = r0

      r0
    end

_nt_obs_in_reply_to() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2485
    def _nt_obs_in_reply_to
      start_index = index
      if node_cache[:obs_in_reply_to].has_key?(index)
        cached = node_cache[:obs_in_reply_to][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("In-Reply-To", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 11))
        @index += 11
      else
        terminal_parse_failure("In-Reply-To")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            s5, i5 = [], index
            loop do
              i6 = index
              r7 = _nt_phrase
              if r7
                r6 = r7
              else
                r8 = _nt_msg_id
                if r8
                  r6 = r8
                else
                  @index = i6
                  r6 = nil
                end
              end
              if r6
                s5 << r6
              else
                break
              end
            end
            r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
            s0 << r5
            if r5
              r9 = _nt_CRLF
              s0 << r9
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsInReplyTo0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_in_reply_to][start_index] = r0

      r0
    end

_nt_obs_keywords() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2855
    def _nt_obs_keywords
      start_index = index
      if node_cache[:obs_keywords].has_key?(index)
        cached = node_cache[:obs_keywords][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Keywords", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 8))
        @index += 8
      else
        terminal_parse_failure("Keywords")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_obs_phrase_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsKeywords0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_keywords][start_index] = r0

      r0
    end

_nt_obs_local_part() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1398
    def _nt_obs_local_part
      start_index = index
      if node_cache[:obs_local_part].has_key?(index)
        cached = node_cache[:obs_local_part][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r1 = _nt_word
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          i3, s3 = index, []
          if has_terminal?(".", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(".")
            r4 = nil
          end
          s3 << r4
          if r4
            r5 = _nt_word
            s3 << r5
          end
          if s3.last
            r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
            r3.extend(ObsLocalPart0)
          else
            @index = i3
            r3 = nil
          end
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsLocalPart1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_local_part][start_index] = r0

      r0
    end

_nt_obs_mbox_list() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1535
    def _nt_obs_mbox_list
      start_index = index
      if node_cache[:obs_mbox_list].has_key?(index)
        cached = node_cache[:obs_mbox_list][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      s1, i1 = [], index
      loop do
        i2, s2 = index, []
        r4 = _nt_mailbox
        if r4
          r3 = r4
        else
          r3 = instantiate_node(SyntaxNode,input, index...index)
        end
        s2 << r3
        if r3
          r6 = _nt_CFWS
          if r6
            r5 = r6
          else
            r5 = instantiate_node(SyntaxNode,input, index...index)
          end
          s2 << r5
          if r5
            if has_terminal?(",", false, index)
              r7 = instantiate_node(SyntaxNode,input, index...(index + 1))
              @index += 1
            else
              terminal_parse_failure(",")
              r7 = nil
            end
            s2 << r7
            if r7
              r9 = _nt_CFWS
              if r9
                r8 = r9
              else
                r8 = instantiate_node(SyntaxNode,input, index...index)
              end
              s2 << r8
            end
          end
        end
        if s2.last
          r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
          r2.extend(ObsMboxList0)
        else
          @index = i2
          r2 = nil
        end
        if r2
          s1 << r2
        else
          break
        end
      end
      if s1.empty?
        @index = i1
        r1 = nil
      else
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
      end
      s0 << r1
      if r1
        r11 = _nt_mailbox
        if r11
          r10 = r11
        else
          r10 = instantiate_node(SyntaxNode,input, index...index)
        end
        s0 << r10
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsMboxList1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_mbox_list][start_index] = r0

      r0
    end

_nt_obs_message_id() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2415
    def _nt_obs_message_id
      start_index = index
      if node_cache[:obs_message_id].has_key?(index)
        cached = node_cache[:obs_message_id][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Message-ID", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 10))
        @index += 10
      else
        terminal_parse_failure("Message-ID")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_msg_id
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsMessageId0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_message_id][start_index] = r0

      r0
    end

_nt_obs_minute() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 833
    def _nt_obs_minute
      start_index = index
      if node_cache[:obs_minute].has_key?(index)
        cached = node_cache[:obs_minute][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r2 = _nt_CFWS
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        i3, s3 = index, []
        r4 = _nt_DIGIT
        s3 << r4
        if r4
          r5 = _nt_DIGIT
          s3 << r5
        end
        if s3.last
          r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
          r3.extend(ObsMinute0)
        else
          @index = i3
          r3 = nil
        end
        s0 << r3
        if r3
          r7 = _nt_CFWS
          if r7
            r6 = r7
          else
            r6 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r6
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsMinute1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_minute][start_index] = r0

      r0
    end

_nt_obs_month() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 631
    def _nt_obs_month
      start_index = index
      if node_cache[:obs_month].has_key?(index)
        cached = node_cache[:obs_month][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r1 = _nt_CFWS
      s0 << r1
      if r1
        r2 = _nt_month_name
        s0 << r2
        if r2
          r3 = _nt_CFWS
          s0 << r3
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsMonth0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_month][start_index] = r0

      r0
    end

_nt_obs_optional() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3704
    def _nt_obs_optional
      start_index = index
      if node_cache[:obs_optional].has_key?(index)
        cached = node_cache[:obs_optional][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r1 = _nt_field_name
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_unstructured
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsOptional0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_optional][start_index] = r0

      r0
    end

_nt_obs_orig_date() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1884
    def _nt_obs_orig_date
      start_index = index
      if node_cache[:obs_orig_date].has_key?(index)
        cached = node_cache[:obs_orig_date][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Date", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 4))
        @index += 4
      else
        terminal_parse_failure("Date")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_date_time
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsOrigDate0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_orig_date][start_index] = r0

      r0
    end

_nt_obs_path() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3672
    def _nt_obs_path
      start_index = index
      if node_cache[:obs_path].has_key?(index)
        cached = node_cache[:obs_path][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      r0 = _nt_obs_angle_addr

      node_cache[:obs_path][start_index] = r0

      r0
    end

_nt_obs_phrase() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 232
    def _nt_obs_phrase
      start_index = index
      if node_cache[:obs_phrase].has_key?(index)
        cached = node_cache[:obs_phrase][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      s0, i0 = [], index
      loop do
        i1 = index
        r2 = _nt_word
        if r2
          r1 = r2
        else
          if has_terminal?(".", false, index)
            r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(".")
            r3 = nil
          end
          if r3
            r1 = r3
          else
            if has_terminal?("@", false, index)
              r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
              @index += 1
            else
              terminal_parse_failure("@")
              r4 = nil
            end
            if r4
              r1 = r4
            else
              @index = i1
              r1 = nil
            end
          end
        end
        if r1
          s0 << r1
        else
          break
        end
      end
      if s0.empty?
        @index = i0
        r0 = nil
      else
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
      end

      node_cache[:obs_phrase][start_index] = r0

      r0
    end

_nt_obs_phrase_list() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 299
    def _nt_obs_phrase_list
      start_index = index
      if node_cache[:obs_phrase_list].has_key?(index)
        cached = node_cache[:obs_phrase_list][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_phrase
      if r1
        r0 = r1
      else
        i2, s2 = index, []
        s3, i3 = [], index
        loop do
          i4, s4 = index, []
          r6 = _nt_phrase
          if r6
            r5 = r6
          else
            r5 = instantiate_node(SyntaxNode,input, index...index)
          end
          s4 << r5
          if r5
            r8 = _nt_CFWS
            if r8
              r7 = r8
            else
              r7 = instantiate_node(SyntaxNode,input, index...index)
            end
            s4 << r7
            if r7
              if has_terminal?(",", false, index)
                r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
                @index += 1
              else
                terminal_parse_failure(",")
                r9 = nil
              end
              s4 << r9
              if r9
                r11 = _nt_CFWS
                if r11
                  r10 = r11
                else
                  r10 = instantiate_node(SyntaxNode,input, index...index)
                end
                s4 << r10
              end
            end
          end
          if s4.last
            r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
            r4.extend(ObsPhraseList0)
          else
            @index = i4
            r4 = nil
          end
          if r4
            s3 << r4
          else
            break
          end
        end
        if s3.empty?
          @index = i3
          r3 = nil
        else
          r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
        end
        s2 << r3
        if r3
          r13 = _nt_phrase
          if r13
            r12 = r13
          else
            r12 = instantiate_node(SyntaxNode,input, index...index)
          end
          s2 << r12
        end
        if s2.last
          r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
          r2.extend(ObsPhraseList1)
        else
          @index = i2
          r2 = nil
        end
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:obs_phrase_list][start_index] = r0

      r0
    end

_nt_obs_qp() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 15
    def _nt_obs_qp
      start_index = index
      if node_cache[:obs_qp].has_key?(index)
        cached = node_cache[:obs_qp][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("\\", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        terminal_parse_failure("\\")
        r1 = nil
      end
      s0 << r1
      if r1
        if has_terminal?('\G[\x00-\x7F]', true, index)
          r2 = true
          @index += 1
        else
          r2 = nil
        end
        s0 << r2
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsQp0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_qp][start_index] = r0

      r0
    end

_nt_obs_received() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3608
    def _nt_obs_received
      start_index = index
      if node_cache[:obs_received].has_key?(index)
        cached = node_cache[:obs_received][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Received", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 8))
        @index += 8
      else
        terminal_parse_failure("Received")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_name_val_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsReceived0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_received][start_index] = r0

      r0
    end

_nt_obs_references() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2576
    def _nt_obs_references
      start_index = index
      if node_cache[:obs_references].has_key?(index)
        cached = node_cache[:obs_references][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("References", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 10))
        @index += 10
      else
        terminal_parse_failure("References")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            s5, i5 = [], index
            loop do
              i6 = index
              r7 = _nt_phrase
              if r7
                r6 = r7
              else
                r8 = _nt_msg_id
                if r8
                  r6 = r8
                else
                  @index = i6
                  r6 = nil
                end
              end
              if r6
                s5 << r6
              else
                break
              end
            end
            r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
            s0 << r5
            if r5
              r9 = _nt_CRLF
              s0 << r9
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsReferences0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_references][start_index] = r0

      r0
    end

_nt_obs_reply_to() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2106
    def _nt_obs_reply_to
      start_index = index
      if node_cache[:obs_reply_to].has_key?(index)
        cached = node_cache[:obs_reply_to][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Reply-To", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 8))
        @index += 8
      else
        terminal_parse_failure("Reply-To")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_mailbox_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsReplyTo0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_reply_to][start_index] = r0

      r0
    end

_nt_obs_resent_bcc() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3295
    def _nt_obs_resent_bcc
      start_index = index
      if node_cache[:obs_resent_bcc].has_key?(index)
        cached = node_cache[:obs_resent_bcc][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Resent-Bcc", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 10))
        @index += 10
      else
        terminal_parse_failure("Resent-Bcc")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            i5 = index
            r6 = _nt_address_list
            if r6
              r5 = r6
            else
              r8 = _nt_CFWS
              if r8
                r7 = r8
              else
                r7 = instantiate_node(SyntaxNode,input, index...index)
              end
              if r7
                r5 = r7
              else
                @index = i5
                r5 = nil
              end
            end
            s0 << r5
            if r5
              r9 = _nt_CRLF
              s0 << r9
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsResentBcc0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_resent_bcc][start_index] = r0

      r0
    end

_nt_obs_resent_cc() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3225
    def _nt_obs_resent_cc
      start_index = index
      if node_cache[:obs_resent_cc].has_key?(index)
        cached = node_cache[:obs_resent_cc][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Resent-Cc", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 9))
        @index += 9
      else
        terminal_parse_failure("Resent-Cc")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_address_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsResentCc0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_resent_cc][start_index] = r0

      r0
    end

_nt_obs_resent_date() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3077
    def _nt_obs_resent_date
      start_index = index
      if node_cache[:obs_resent_date].has_key?(index)
        cached = node_cache[:obs_resent_date][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Resent-Date", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 11))
        @index += 11
      else
        terminal_parse_failure("Resent-Date")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_date_time
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsResentDate0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_resent_date][start_index] = r0

      r0
    end

_nt_obs_resent_from() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2929
    def _nt_obs_resent_from
      start_index = index
      if node_cache[:obs_resent_from].has_key?(index)
        cached = node_cache[:obs_resent_from][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Resent-From", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 11))
        @index += 11
      else
        terminal_parse_failure("Resent-From")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_mailbox_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsResentFrom0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_resent_from][start_index] = r0

      r0
    end

_nt_obs_resent_mid() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3386
    def _nt_obs_resent_mid
      start_index = index
      if node_cache[:obs_resent_mid].has_key?(index)
        cached = node_cache[:obs_resent_mid][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Resent-Message-ID", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 17))
        @index += 17
      else
        terminal_parse_failure("Resent-Message-ID")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_msg_id
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsResentMid0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_resent_mid][start_index] = r0

      r0
    end

_nt_obs_resent_rply() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3460
    def _nt_obs_resent_rply
      start_index = index
      if node_cache[:obs_resent_rply].has_key?(index)
        cached = node_cache[:obs_resent_rply][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Resent-Reply-To", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 15))
        @index += 15
      else
        terminal_parse_failure("Resent-Reply-To")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_address_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsResentRply0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_resent_rply][start_index] = r0

      r0
    end

_nt_obs_resent_send() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3003
    def _nt_obs_resent_send
      start_index = index
      if node_cache[:obs_resent_send].has_key?(index)
        cached = node_cache[:obs_resent_send][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Resent-Sender", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 13))
        @index += 13
      else
        terminal_parse_failure("Resent-Sender")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_mailbox
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsResentSend0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_resent_send][start_index] = r0

      r0
    end

_nt_obs_resent_to() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3151
    def _nt_obs_resent_to
      start_index = index
      if node_cache[:obs_resent_to].has_key?(index)
        cached = node_cache[:obs_resent_to][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Resent-To", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 9))
        @index += 9
      else
        terminal_parse_failure("Resent-To")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_address_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsResentTo0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_resent_to][start_index] = r0

      r0
    end

_nt_obs_return() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 3534
    def _nt_obs_return
      start_index = index
      if node_cache[:obs_return].has_key?(index)
        cached = node_cache[:obs_return][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Return-Path", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 11))
        @index += 11
      else
        terminal_parse_failure("Return-Path")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_path
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsReturn0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_return][start_index] = r0

      r0
    end

_nt_obs_route() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 1220
    def _nt_obs_route
      start_index = index
      if node_cache[:obs_route].has_key?(index)
        cached = node_cache[:obs_route][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r2 = _nt_CFWS
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        r3 = _nt_obs_domain_list
        s0 << r3
        if r3
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r6 = _nt_CFWS
            if r6
              r5 = r6
            else
              r5 = instantiate_node(SyntaxNode,input, index...index)
            end
            s0 << r5
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsRoute0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_route][start_index] = r0

      r0
    end

_nt_obs_second() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 904
    def _nt_obs_second
      start_index = index
      if node_cache[:obs_second].has_key?(index)
        cached = node_cache[:obs_second][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r2 = _nt_CFWS
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        i3, s3 = index, []
        r4 = _nt_DIGIT
        s3 << r4
        if r4
          r5 = _nt_DIGIT
          s3 << r5
        end
        if s3.last
          r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
          r3.extend(ObsSecond0)
        else
          @index = i3
          r3 = nil
        end
        s0 << r3
        if r3
          r7 = _nt_CFWS
          if r7
            r6 = r7
          else
            r6 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r6
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsSecond1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_second][start_index] = r0

      r0
    end

_nt_obs_sender() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2032
    def _nt_obs_sender
      start_index = index
      if node_cache[:obs_sender].has_key?(index)
        cached = node_cache[:obs_sender][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Sender", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 6))
        @index += 6
      else
        terminal_parse_failure("Sender")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_mailbox
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsSender0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_sender][start_index] = r0

      r0
    end

_nt_obs_subject() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2707
    def _nt_obs_subject
      start_index = index
      if node_cache[:obs_subject].has_key?(index)
        cached = node_cache[:obs_subject][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("Subject", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 7))
        @index += 7
      else
        terminal_parse_failure("Subject")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_unstructured
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsSubject0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_subject][start_index] = r0

      r0
    end

_nt_obs_text() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 67
    def _nt_obs_text
      start_index = index
      if node_cache[:obs_text].has_key?(index)
        cached = node_cache[:obs_text][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      s1, i1 = [], index
      loop do
        r2 = _nt_LF
        if r2
          s1 << r2
        else
          break
        end
      end
      r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
      s0 << r1
      if r1
        s3, i3 = [], index
        loop do
          r4 = _nt_CR
          if r4
            s3 << r4
          else
            break
          end
        end
        r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
        s0 << r3
        if r3
          s5, i5 = [], index
          loop do
            i6, s6 = index, []
            r7 = _nt_obs_char
            s6 << r7
            if r7
              s8, i8 = [], index
              loop do
                r9 = _nt_LF
                if r9
                  s8 << r9
                else
                  break
                end
              end
              r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
              s6 << r8
              if r8
                s10, i10 = [], index
                loop do
                  r11 = _nt_CR
                  if r11
                    s10 << r11
                  else
                    break
                  end
                end
                r10 = instantiate_node(SyntaxNode,input, i10...index, s10)
                s6 << r10
              end
            end
            if s6.last
              r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
              r6.extend(ObsText0)
            else
              @index = i6
              r6 = nil
            end
            if r6
              s5 << r6
            else
              break
            end
          end
          r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
          s0 << r5
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsText1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_text][start_index] = r0

      r0
    end

_nt_obs_to() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 2180
    def _nt_obs_to
      start_index = index
      if node_cache[:obs_to].has_key?(index)
        cached = node_cache[:obs_to][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      if has_terminal?("To", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 2))
        @index += 2
      else
        terminal_parse_failure("To")
        r1 = nil
      end
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          r3 = _nt_WSP
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          if has_terminal?(":", false, index)
            r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(":")
            r4 = nil
          end
          s0 << r4
          if r4
            r5 = _nt_address_list
            s0 << r5
            if r5
              r6 = _nt_CRLF
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsTo0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_to][start_index] = r0

      r0
    end

_nt_obs_utext() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 214
    def _nt_obs_utext
      start_index = index
      if node_cache[:obs_utext].has_key?(index)
        cached = node_cache[:obs_utext][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      r0 = _nt_obs_text

      node_cache[:obs_utext][start_index] = r0

      r0
    end

_nt_obs_year() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 559
    def _nt_obs_year
      start_index = index
      if node_cache[:obs_year].has_key?(index)
        cached = node_cache[:obs_year][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0, s0 = index, []
      r2 = _nt_CFWS
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        i3, s3 = index, []
        r4 = _nt_DIGIT
        s3 << r4
        if r4
          r5 = _nt_DIGIT
          s3 << r5
        end
        if s3.last
          r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
          r3.extend(ObsYear0)
        else
          @index = i3
          r3 = nil
        end
        s0 << r3
        if r3
          r7 = _nt_CFWS
          if r7
            r6 = r7
          else
            r6 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r6
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(ObsYear1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:obs_year][start_index] = r0

      r0
    end

_nt_obs_zone() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 962
    def _nt_obs_zone
      start_index = index
      if node_cache[:obs_zone].has_key?(index)
        cached = node_cache[:obs_zone][index]
        if cached
          cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
          @index = cached.interval.end
        end
        return cached
      end

      i0 = index
      if has_terminal?("UT", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 2))
        @index += 2
      else
        terminal_parse_failure("UT")
        r1 = nil
      end
      if r1
        r0 = r1
      else
        if has_terminal?("GMT", false, index)
          r2 = instantiate_node(SyntaxNode,input, index...(index + 3))
          @index += 3
        else
          terminal_parse_failure("GMT")
          r2 = nil
        end
        if r2
          r0 = r2
        else
          if has_terminal?("EST", false, index)
            r3 = instantiate_node(SyntaxNode,input, index...(index + 3))
            @index += 3
          else
            terminal_parse_failure("EST")
            r3 = nil
          end
          if r3
            r0 = r3
          else
            if has_terminal?("EDT", false, index)
              r4 = instantiate_node(SyntaxNode,input, index...(index + 3))
              @index += 3
            else
              terminal_parse_failure("EDT")
              r4 = nil
            end
            if r4
              r0 = r4
            else
              if has_terminal?("CST", false, index)
                r5 = instantiate_node(SyntaxNode,input, index...(index + 3))
                @index += 3
              else
                terminal_parse_failure("CST")
                r5 = nil
              end
              if r5
                r0 = r5
              else
                if has_terminal?("CDT", false, index)
                  r6 = instantiate_node(SyntaxNode,input, index...(index + 3))
                  @index += 3
                else
                  terminal_parse_failure("CDT")
                  r6 = nil
                end
                if r6
                  r0 = r6
                else
                  if has_terminal?("MST", false, index)
                    r7 = instantiate_node(SyntaxNode,input, index...(index + 3))
                    @index += 3
                  else
                    terminal_parse_failure("MST")
                    r7 = nil
                  end
                  if r7
                    r0 = r7
                  else
                    if has_terminal?("MDT", false, index)
                      r8 = instantiate_node(SyntaxNode,input, index...(index + 3))
                      @index += 3
                    else
                      terminal_parse_failure("MDT")
                      r8 = nil
                    end
                    if r8
                      r0 = r8
                    else
                      if has_terminal?("PST", false, index)
                        r9 = instantiate_node(SyntaxNode,input, index...(index + 3))
                        @index += 3
                      else
                        terminal_parse_failure("PST")
                        r9 = nil
                      end
                      if r9
                        r0 = r9
                      else
                        if has_terminal?("PDT", false, index)
                          r10 = instantiate_node(SyntaxNode,input, index...(index + 3))
                          @index += 3
                        else
                          terminal_parse_failure("PDT")
                          r10 = nil
                        end
                        if r10
                          r0 = r10
                        else
                          if has_terminal?('\G[\x41-\x49]', true, index)
                            r11 = true
                            @index += 1
                          else
                            r11 = nil
                          end
                          if r11
                            r0 = r11
                          else
                            if has_terminal?('\G[\x4B-\x5A]', true, index)
                              r12 = true
                              @index += 1
                            else
                              r12 = nil
                            end
                            if r12
                              r0 = r12
                            else
                              if has_terminal?('\G[\x61-\x69]', true, index)
                                r13 = true
                                @index += 1
                              else
                                r13 = nil
                              end
                              if r13
                                r0 = r13
                              else
                                if has_terminal?('\G[\x6B-\x7A]', true, index)
                                  r14 = true
                                  @index += 1
                                else
                                  r14 = nil
                                end
                                if r14
                                  r0 = r14
                                else
                                  @index = i0
                                  r0 = nil
                                end
                              end
                            end
                          end
                        end
                      end
                    end
                  end
                end
              end
            end
          end
        end
      end

      node_cache[:obs_zone][start_index] = r0

      r0
    end

root() click to toggle source

    # File lib/mail/parsers/rfc2822_obsolete.rb, line 8
    def root
      @root ||= :obs_qp
    end