Module: Mail::RFC2822

### Home Classes Methods

### In Files

- lib/mail/parsers/rfc2822.rb

### Namespace

- MODULE Mail::RFC2822::AddrSpec0
- MODULE Mail::RFC2822::Address0
- MODULE Mail::RFC2822::Address1
- MODULE Mail::RFC2822::AddressList0
- MODULE Mail::RFC2822::AddressList1
- MODULE Mail::RFC2822::AngleAddr0
- MODULE Mail::RFC2822::Atom0
- MODULE Mail::RFC2822::CFWS0
- MODULE Mail::RFC2822::CFWS1
- MODULE Mail::RFC2822::Comment0
- MODULE Mail::RFC2822::Comment1
- MODULE Mail::RFC2822::Date0
- MODULE Mail::RFC2822::DateTime0
- MODULE Mail::RFC2822::DateTime1
- MODULE Mail::RFC2822::Day0
- MODULE Mail::RFC2822::DayOfWeek0
- MODULE Mail::RFC2822::DomainLiteral0
- MODULE Mail::RFC2822::DomainLiteral1
- MODULE Mail::RFC2822::DomainText0
- MODULE Mail::RFC2822::DomainText1
- MODULE Mail::RFC2822::DotAtom0
- MODULE Mail::RFC2822::DotAtomText0
- MODULE Mail::RFC2822::FWS0
- MODULE Mail::RFC2822::FWS1
- MODULE Mail::RFC2822::Group0
- MODULE Mail::RFC2822::Hour0
- MODULE Mail::RFC2822::ItemName0
- MODULE Mail::RFC2822::ItemName1
- MODULE Mail::RFC2822::LocalDotAtom0
- MODULE Mail::RFC2822::LocalDotAtomText0
- MODULE Mail::RFC2822::MailboxList0
- MODULE Mail::RFC2822::MailboxList1
- MODULE Mail::RFC2822::MailboxListGroup0
- MODULE Mail::RFC2822::MessageIds0
- MODULE Mail::RFC2822::MessageIds1
- MODULE Mail::RFC2822::Minute0
- MODULE Mail::RFC2822::Month0
- MODULE Mail::RFC2822::MsgId0
- MODULE Mail::RFC2822::MsgIdDomainText0
- MODULE Mail::RFC2822::MsgIdDomainText1
- MODULE Mail::RFC2822::MsgIdDotAtomText0
- MODULE Mail::RFC2822::MsgIdValue0
- MODULE Mail::RFC2822::NameAddr0
- MODULE Mail::RFC2822::NameValList0
- MODULE Mail::RFC2822::NameValList1
- MODULE Mail::RFC2822::NameValList2
- MODULE Mail::RFC2822::NameValPair0
- MODULE Mail::RFC2822::NoFoldLiteral0
- MODULE Mail::RFC2822::NoFoldQuote0
- MODULE Mail::RFC2822::Path0
- MODULE Mail::RFC2822::PhraseList0
- MODULE Mail::RFC2822::PhraseList1
- MODULE Mail::RFC2822::QuotedDomain0
- MODULE Mail::RFC2822::QuotedPair0
- MODULE Mail::RFC2822::QuotedString0
- MODULE Mail::RFC2822::QuotedString1
- MODULE Mail::RFC2822::Received0
- MODULE Mail::RFC2822::Return0
- MODULE Mail::RFC2822::Second0
- MODULE Mail::RFC2822::Time0
- MODULE Mail::RFC2822::TimeOfDay0
- MODULE Mail::RFC2822::TimeOfDay1
- MODULE Mail::RFC2822::Year0
- MODULE Mail::RFC2822::Zone0

### Methods

- #_nt_ALPHA
- #_nt_CFWS
- #_nt_CR
- #_nt_CRLF
- #_nt_DIGIT
- #_nt_DQUOTE
- #_nt_FWS
- #_nt_LF
- #_nt_NO_WS_CTL
- #_nt_WSP
- #_nt_addr_spec
- #_nt_address
- #_nt_address_list
- #_nt_angle_addr
- #_nt_atext
- #_nt_atom
- #_nt_ccontent
- #_nt_comment
- #_nt_ctext
- #_nt_date
- #_nt_date_time
- #_nt_day
- #_nt_day_name
- #_nt_day_of_week
- #_nt_dcontent
- #_nt_display_name
- #_nt_domain
- #_nt_domain_literal
- #_nt_domain_text
- #_nt_dot_atom
- #_nt_dot_atom_text
- #_nt_dtext
- #_nt_group
- #_nt_hour
- #_nt_id_left
- #_nt_id_right
- #_nt_item_name
- #_nt_item_value
- #_nt_local_dot_atom
- #_nt_local_dot_atom_text
- #_nt_local_part
- #_nt_mailbox
- #_nt_mailbox_list
- #_nt_mailbox_list_group
- #_nt_message_id_text
- #_nt_message_ids
- #_nt_minute
- #_nt_month
- #_nt_month_name
- #_nt_msg_id
- #_nt_msg_id_atext
- #_nt_msg_id_domain_text
- #_nt_msg_id_dot_atom_text
- #_nt_msg_id_value
- #_nt_mtext
- #_nt_name_addr
- #_nt_name_val_list
- #_nt_name_val_pair
- #_nt_no_fold_literal
- #_nt_no_fold_quote
- #_nt_path
- #_nt_phrase
- #_nt_phrase_list
- #_nt_qcontent
- #_nt_qdcontent
- #_nt_qtext
- #_nt_quoted_domain
- #_nt_quoted_pair
- #_nt_quoted_string
- #_nt_received
- #_nt_return
- #_nt_second
- #_nt_specials
- #_nt_text
- #_nt_time
- #_nt_time_of_day
- #_nt_word
- #_nt_year
- #_nt_zone
- #root

### Included Modules

- Treetop::Runtime
- Mail::RFC2822Obsolete

### Files

- TODO.rdoc
- VERSION

### Class/Module Index

Quicksearch

- Mail
- Mail::Address
- Mail::AddressContainer
- Mail::AddressLists
- Mail::AddressLists::PrimaryAddress0
- Mail::AddressLists::PrimaryAddress1
- Mail::AddressListsParser
- Mail::AttachmentsList
- Mail::BccField
- Mail::Body
- Mail::CcField
- Mail::CommentsField
- Mail::ContentDescriptionField
- Mail::ContentDisposition
- Mail::ContentDisposition::ContentDisposition0
- Mail::ContentDisposition::ContentDisposition1
- Mail::ContentDisposition::ContentDisposition2
- Mail::ContentDisposition::DispositionType0
- Mail::ContentDisposition::DispositionType1
- Mail::ContentDisposition::Parameter0
- Mail::ContentDisposition::Parameter1
- Mail::ContentDisposition::Value0
- Mail::ContentDispositionField
- Mail::ContentDispositionParser
- Mail::ContentIdField
- Mail::ContentLocation
- Mail::ContentLocation::Location0
- Mail::ContentLocation::Primary0
- Mail::ContentLocationField
- Mail::ContentLocationParser
- Mail::ContentTransferEncoding
- Mail::ContentTransferEncoding::Encoding0
- Mail::ContentTransferEncoding::Encoding1
- Mail::ContentTransferEncoding::Primary0
- Mail::ContentTransferEncodingElement
- Mail::ContentTransferEncodingField
- Mail::ContentTransferEncodingParser
- Mail::ContentType
- Mail::ContentType::CompositeType0
- Mail::ContentType::CompositeType1
- Mail::ContentType::ContentType0
- Mail::ContentType::ContentType1
- Mail::ContentType::ContentType2
- Mail::ContentType::DiscreteType0
- Mail::ContentType::DiscreteType1
- Mail::ContentType::DiscreteType2
- Mail::ContentType::DiscreteType3
- Mail::ContentType::DiscreteType4
- Mail::ContentType::Parameter0
- Mail::ContentType::Parameter1
- Mail::ContentType::Value0
- Mail::ContentTypeField
- Mail::ContentTypeParser
- Mail::DateField
- Mail::DateTime
- Mail::DateTime::Primary0
- Mail::DateTime::Primary1
- Mail::DateTimeParser
- Mail::Encodings
- Mail::Encodings::Base64
- Mail::Encodings::Binary
- Mail::Encodings::EightBit
- Mail::Encodings::QuotedPrintable
- Mail::Encodings::SevenBit
- Mail::Encodings::TransferEncoding
- Mail::Envelope
- Mail::EnvelopeFrom
- Mail::EnvelopeFrom::CtimeDate0
- Mail::EnvelopeFrom::Primary0
- Mail::EnvelopeFromElement
- Mail::EnvelopeFromParser
- Mail::Exim
- Mail::Field
- Mail::Field::FieldError
- Mail::FieldList
- Mail::FileDelivery
- Mail::FromField
- Mail::Header
- Mail::IMAP
- Mail::InReplyToField
- Mail::IndifferentHash
- Mail::KeywordsField
- Mail::Matchers
- Mail::Matchers::HasSentEmailMatcher
- Mail::MessageIdField
- Mail::MessageIds
- Mail::MessageIds::Primary0
- Mail::MessageIdsElement
- Mail::MessageIdsParser
- Mail::MimeVersion
- Mail::MimeVersion::Version0
- Mail::MimeVersion::Version1
- Mail::MimeVersionElement
- Mail::MimeVersionField
- Mail::MimeVersionParser
- Mail::Multibyte
- Mail::Multibyte::EncodingError
- Mail::OptionalField
- Mail::POP3
- Mail::ParameterHash
- Mail::Part
- Mail::PartsList
- Mail::Patterns
- Mail::PhraseList
- Mail::PhraseLists
- Mail::PhraseLists::PrimaryPhrase0
- Mail::PhraseListsParser
- Mail::RFC2045
- Mail::RFC2045::CustomXToken0
- Mail::RFC2045Parser
- Mail::RFC2822
- Mail::RFC2822::AddrSpec0
- Mail::RFC2822::Address0
- Mail::RFC2822::Address1
- Mail::RFC2822::AddressList0
- Mail::RFC2822::AddressList1
- Mail::RFC2822::AngleAddr0
- Mail::RFC2822::Atom0
- Mail::RFC2822::CFWS0
- Mail::RFC2822::CFWS1
- Mail::RFC2822::Comment0
- Mail::RFC2822::Comment1
- Mail::RFC2822::Date0
- Mail::RFC2822::DateTime0
- Mail::RFC2822::DateTime1
- Mail::RFC2822::Day0
- Mail::RFC2822::DayOfWeek0
- Mail::RFC2822::DomainLiteral0
- Mail::RFC2822::DomainLiteral1
- Mail::RFC2822::DomainText0
- Mail::RFC2822::DomainText1
- Mail::RFC2822::DotAtom0
- Mail::RFC2822::DotAtomText0
- Mail::RFC2822::FWS0
- Mail::RFC2822::FWS1
- Mail::RFC2822::Group0
- Mail::RFC2822::Hour0
- Mail::RFC2822::ItemName0
- Mail::RFC2822::ItemName1
- Mail::RFC2822::LocalDotAtom0
- Mail::RFC2822::LocalDotAtomText0
- Mail::RFC2822::MailboxList0
- Mail::RFC2822::MailboxList1
- Mail::RFC2822::MailboxListGroup0
- Mail::RFC2822::MessageIds0
- Mail::RFC2822::MessageIds1
- Mail::RFC2822::Minute0
- Mail::RFC2822::Month0
- Mail::RFC2822::MsgId0
- Mail::RFC2822::MsgIdDomainText0
- Mail::RFC2822::MsgIdDomainText1
- Mail::RFC2822::MsgIdDotAtomText0
- Mail::RFC2822::MsgIdValue0
- Mail::RFC2822::NameAddr0
- Mail::RFC2822::NameValList0
- Mail::RFC2822::NameValList1
- Mail::RFC2822::NameValList2
- Mail::RFC2822::NameValPair0
- Mail::RFC2822::NoFoldLiteral0
- Mail::RFC2822::NoFoldQuote0
- Mail::RFC2822::Path0
- Mail::RFC2822::PhraseList0
- Mail::RFC2822::PhraseList1
- Mail::RFC2822::QuotedDomain0
- Mail::RFC2822::QuotedPair0
- Mail::RFC2822::QuotedString0
- Mail::RFC2822::QuotedString1
- Mail::RFC2822::Received0
- Mail::RFC2822::Return0
- Mail::RFC2822::Second0
- Mail::RFC2822::Time0
- Mail::RFC2822::TimeOfDay0
- Mail::RFC2822::TimeOfDay1
- Mail::RFC2822::Year0
- Mail::RFC2822::Zone0
- Mail::RFC2822Obsolete
- Mail::RFC2822Obsolete::ObsAddrList0
- Mail::RFC2822Obsolete::ObsAddrList1
- Mail::RFC2822Obsolete::ObsAngleAddr0
- Mail::RFC2822Obsolete::ObsBcc0
- Mail::RFC2822Obsolete::ObsCc0
- Mail::RFC2822Obsolete::ObsComments0
- Mail::RFC2822Obsolete::ObsDay0
- Mail::RFC2822Obsolete::ObsDay1
- Mail::RFC2822Obsolete::ObsDayOfWeek0
- Mail::RFC2822Obsolete::ObsDomain0
- Mail::RFC2822Obsolete::ObsDomain1
- Mail::RFC2822Obsolete::ObsDomainList0
- Mail::RFC2822Obsolete::ObsDomainList1
- Mail::RFC2822Obsolete::ObsFWS0
- Mail::RFC2822Obsolete::ObsFWS1
- Mail::RFC2822Obsolete::ObsFrom0
- Mail::RFC2822Obsolete::ObsHour0
- Mail::RFC2822Obsolete::ObsHour1
- Mail::RFC2822Obsolete::ObsInReplyTo0
- Mail::RFC2822Obsolete::ObsKeywords0
- Mail::RFC2822Obsolete::ObsLocalPart0
- Mail::RFC2822Obsolete::ObsLocalPart1
- Mail::RFC2822Obsolete::ObsMboxList0
- Mail::RFC2822Obsolete::ObsMboxList1
- Mail::RFC2822Obsolete::ObsMessageId0
- Mail::RFC2822Obsolete::ObsMinute0
- Mail::RFC2822Obsolete::ObsMinute1
- Mail::RFC2822Obsolete::ObsMonth0
- Mail::RFC2822Obsolete::ObsOptional0
- Mail::RFC2822Obsolete::ObsOrigDate0
- Mail::RFC2822Obsolete::ObsPhraseList0
- Mail::RFC2822Obsolete::ObsPhraseList1
- Mail::RFC2822Obsolete::ObsQp0
- Mail::RFC2822Obsolete::ObsReceived0
- Mail::RFC2822Obsolete::ObsReferences0
- Mail::RFC2822Obsolete::ObsReplyTo0
- Mail::RFC2822Obsolete::ObsResentBcc0
- Mail::RFC2822Obsolete::ObsResentCc0
- Mail::RFC2822Obsolete::ObsResentDate0
- Mail::RFC2822Obsolete::ObsResentFrom0
- Mail::RFC2822Obsolete::ObsResentMid0
- Mail::RFC2822Obsolete::ObsResentRply0
- Mail::RFC2822Obsolete::ObsResentSend0
- Mail::RFC2822Obsolete::ObsResentTo0
- Mail::RFC2822Obsolete::ObsReturn0
- Mail::RFC2822Obsolete::ObsRoute0
- Mail::RFC2822Obsolete::ObsSecond0
- Mail::RFC2822Obsolete::ObsSecond1
- Mail::RFC2822Obsolete::ObsSender0
- Mail::RFC2822Obsolete::ObsSubject0
- Mail::RFC2822Obsolete::ObsText0
- Mail::RFC2822Obsolete::ObsText1
- Mail::RFC2822Obsolete::ObsTo0
- Mail::RFC2822Obsolete::ObsYear0
- Mail::RFC2822Obsolete::ObsYear1
- Mail::RFC2822ObsoleteParser
- Mail::RFC2822Parser
- Mail::Received
- Mail::Received::Primary0
- Mail::ReceivedElement
- Mail::ReceivedField
- Mail::ReceivedParser
- Mail::ReferencesField
- Mail::ReplyToField
- Mail::ResentBccField
- Mail::ResentCcField
- Mail::ResentDateField
- Mail::ResentFromField
- Mail::ResentMessageIdField
- Mail::ResentSenderField
- Mail::ResentToField
- Mail::Retriever
- Mail::ReturnPathField
- Mail::Ruby18
- Mail::Ruby19
- Mail::RubyVer
- Mail::SMTP
- Mail::SMTPConnection
- Mail::SenderField
- Mail::Sendmail
- Mail::ShellEscape
- Mail::StructuredField
- Mail::SubjectField
- Mail::TestMailer
- Mail::TestRetriever
- Mail::ToField
- Mail::UnstructuredField
- Mail::Utilities
- Mail::VERSION
- Net
- Net::SMTP
- Object
- String

No matching classes.

# Mail::RFC2822

### Public Instance Methods

_nt_ALPHA() click to toggle source

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

      if has_terminal?('\G[a-zA-Z]', true, index)
        r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        r0 = nil
      end

      node_cache[:ALPHA][start_index] = r0

      r0
    end

_nt_CFWS() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 304
    def _nt_CFWS
      start_index = index
      if node_cache[:CFWS].has_key?(index)
        cached = node_cache[:CFWS][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, []
        s3, i3 = [], index
        loop do
          r4 = _nt_FWS
          if r4
            s3 << r4
          else
            break
          end
        end
        r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
        s2 << r3
        if r3
          r5 = _nt_comment
          s2 << r5
        end
        if s2.last
          r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
          r2.extend(CFWS0)
        else
          @index = i2
          r2 = nil
        end
        if r2
          s1 << r2
        else
          break
        end
      end
      r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
      s0 << r1
      if r1
        r7 = _nt_FWS
        if r7
          r6 = r7
        else
          r6 = instantiate_node(SyntaxNode,input, index...index)
        end
        s0 << r6
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(CFWS1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:CFWS][start_index] = r0

      r0
    end

_nt_CR() click to toggle source

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

      if has_terminal?("\r", false, index)
        r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        terminal_parse_failure("\r")
        r0 = nil
      end

      node_cache[:CR][start_index] = r0

      r0
    end

_nt_CRLF() click to toggle source

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

      if has_terminal?("\r\n", false, index)
        r0 = instantiate_node(SyntaxNode,input, index...(index + 2))
        @index += 2
      else
        terminal_parse_failure("\r\n")
        r0 = nil
      end

      node_cache[:CRLF][start_index] = r0

      r0
    end

_nt_DIGIT() click to toggle source

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

      if has_terminal?('\G[0-9]', true, index)
        r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        r0 = nil
      end

      node_cache[:DIGIT][start_index] = r0

      r0
    end

_nt_DQUOTE() click to toggle source

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

      if has_terminal?('"', false, index)
        r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        terminal_parse_failure('"')
        r0 = nil
      end

      node_cache[:DQUOTE][start_index] = r0

      r0
    end

_nt_FWS() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      s2, i2 = [], index
      loop do
        r3 = _nt_WSP
        if r3
          s2 << r3
        else
          break
        end
      end
      r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
      s1 << r2
      if r2
        r4 = _nt_CRLF
        s1 << r4
        if r4
          s5, i5 = [], index
          loop do
            r6 = _nt_WSP
            if r6
              s5 << r6
            else
              break
            end
          end
          if s5.empty?
            @index = i5
            r5 = nil
          else
            r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
          end
          s1 << r5
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(FWS0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        i7, s7 = index, []
        r8 = _nt_CRLF
        s7 << r8
        if r8
          s9, i9 = [], index
          loop do
            r10 = _nt_WSP
            if r10
              s9 << r10
            else
              break
            end
          end
          if s9.empty?
            @index = i9
            r9 = nil
          else
            r9 = instantiate_node(SyntaxNode,input, i9...index, s9)
          end
          s7 << r9
        end
        if s7.last
          r7 = instantiate_node(SyntaxNode,input, i7...index, s7)
          r7.extend(FWS1)
        else
          @index = i7
          r7 = nil
        end
        if r7
          r0 = r7
        else
          r11 = _nt_obs_FWS
          if r11
            r0 = r11
          else
            @index = i0
            r0 = nil
          end
        end
      end

      node_cache[:FWS][start_index] = r0

      r0
    end

_nt_LF() click to toggle source

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

      if has_terminal?("\n", false, index)
        r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        terminal_parse_failure("\n")
        r0 = nil
      end

      node_cache[:LF][start_index] = r0

      r0
    end

_nt_NO_WS_CTL() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 371
    def _nt_NO_WS_CTL
      start_index = index
      if node_cache[:NO_WS_CTL].has_key?(index)
        cached = node_cache[:NO_WS_CTL][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[\x01-\x08]', 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-\x1F]', true, index)
            r3 = true
            @index += 1
          else
            r3 = nil
          end
          if r3
            r0 = r3
          else
            if has_terminal?('\G[\x7f]', true, index)
              r4 = true
              @index += 1
            else
              r4 = nil
            end
            if r4
              r0 = r4
            else
              @index = i0
              r0 = nil
            end
          end
        end
      end

      node_cache[:NO_WS_CTL][start_index] = r0

      r0
    end

_nt_WSP() click to toggle source

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

      if has_terminal?('\G[\x09\x20]', true, index)
        r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        r0 = nil
      end

      node_cache[:WSP][start_index] = r0

      r0
    end

_nt_addr_spec() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_local_part
      s1 << r2
      if r2
        if has_terminal?("@", false, index)
          r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
          @index += 1
        else
          terminal_parse_failure("@")
          r3 = nil
        end
        s1 << r3
        if r3
          r4 = _nt_domain
          s1 << r4
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(AddrSpec0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r5 = _nt_local_part
        if r5
          r0 = r5
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:addr_spec][start_index] = r0

      r0
    end

_nt_address() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2835
    def _nt_address
      start_index = index
      if node_cache[:address].has_key?(index)
        cached = node_cache[: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_group
      r1.extend(Address0)
      if r1
        r0 = r1
      else
        r2 = _nt_mailbox
        r2.extend(Address1)
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:address][start_index] = r0

      r0
    end

_nt_address_list() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2883
    def _nt_address_list
      start_index = index
      if node_cache[:address_list].has_key?(index)
        cached = node_cache[:address_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, []
      r2 = _nt_address
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        s3, i3 = [], index
        loop do
          i4, s4 = index, []
          s5, i5 = [], index
          loop do
            r6 = _nt_FWS
            if r6
              s5 << r6
            else
              break
            end
          end
          r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
          s4 << 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
            s4 << r7
            if r7
              s8, i8 = [], index
              loop do
                r9 = _nt_FWS
                if r9
                  s8 << r9
                else
                  break
                end
              end
              r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
              s4 << r8
              if r8
                r11 = _nt_address
                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(AddressList0)
          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(AddressList1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:address_list][start_index] = r0

      r0
    end

_nt_angle_addr() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r3 = _nt_CFWS
      if r3
        r2 = r3
      else
        r2 = instantiate_node(SyntaxNode,input, index...index)
      end
      s1 << 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
        s1 << r4
        if r4
          r5 = _nt_addr_spec
          s1 << r5
          if r5
            if has_terminal?(">", false, index)
              r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
              @index += 1
            else
              terminal_parse_failure(">")
              r6 = nil
            end
            s1 << r6
            if r6
              r8 = _nt_CFWS
              if r8
                r7 = r8
              else
                r7 = instantiate_node(SyntaxNode,input, index...index)
              end
              s1 << r7
            end
          end
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(AngleAddr0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r9 = _nt_obs_angle_addr
        if r9
          r0 = r9
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:angle_addr][start_index] = r0

      r0
    end

_nt_atext() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 770
    def _nt_atext
      start_index = index
      if node_cache[:atext].has_key?(index)
        cached = node_cache[:atext][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_ALPHA
      if r1
        r0 = r1
      else
        r2 = _nt_DIGIT
        if r2
          r0 = 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
            r0 = 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
              r0 = r4
            else
              if has_terminal?("$", false, index)
                r5 = instantiate_node(SyntaxNode,input, index...(index + 1))
                @index += 1
              else
                terminal_parse_failure("$")
                r5 = nil
              end
              if r5
                r0 = r5
              else
                if has_terminal?("%", false, index)
                  r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
                  @index += 1
                else
                  terminal_parse_failure("%")
                  r6 = nil
                end
                if r6
                  r0 = r6
                else
                  if has_terminal?("&", false, index)
                    r7 = instantiate_node(SyntaxNode,input, index...(index + 1))
                    @index += 1
                  else
                    terminal_parse_failure("&")
                    r7 = nil
                  end
                  if r7
                    r0 = r7
                  else
                    if has_terminal?("'", false, index)
                      r8 = instantiate_node(SyntaxNode,input, index...(index + 1))
                      @index += 1
                    else
                      terminal_parse_failure("'")
                      r8 = nil
                    end
                    if r8
                      r0 = r8
                    else
                      if has_terminal?("*", false, index)
                        r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
                        @index += 1
                      else
                        terminal_parse_failure("*")
                        r9 = nil
                      end
                      if r9
                        r0 = r9
                      else
                        if has_terminal?("+", false, index)
                          r10 = instantiate_node(SyntaxNode,input, index...(index + 1))
                          @index += 1
                        else
                          terminal_parse_failure("+")
                          r10 = nil
                        end
                        if r10
                          r0 = r10
                        else
                          if has_terminal?("-", false, index)
                            r11 = instantiate_node(SyntaxNode,input, index...(index + 1))
                            @index += 1
                          else
                            terminal_parse_failure("-")
                            r11 = nil
                          end
                          if r11
                            r0 = r11
                          else
                            if has_terminal?("/", false, index)
                              r12 = instantiate_node(SyntaxNode,input, index...(index + 1))
                              @index += 1
                            else
                              terminal_parse_failure("/")
                              r12 = nil
                            end
                            if r12
                              r0 = r12
                            else
                              if has_terminal?("=", false, index)
                                r13 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                @index += 1
                              else
                                terminal_parse_failure("=")
                                r13 = nil
                              end
                              if r13
                                r0 = r13
                              else
                                if has_terminal?("?", false, index)
                                  r14 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                  @index += 1
                                else
                                  terminal_parse_failure("?")
                                  r14 = nil
                                end
                                if r14
                                  r0 = r14
                                else
                                  if has_terminal?("^", false, index)
                                    r15 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                    @index += 1
                                  else
                                    terminal_parse_failure("^")
                                    r15 = nil
                                  end
                                  if r15
                                    r0 = r15
                                  else
                                    if has_terminal?("_", false, index)
                                      r16 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                      @index += 1
                                    else
                                      terminal_parse_failure("_")
                                      r16 = nil
                                    end
                                    if r16
                                      r0 = r16
                                    else
                                      if has_terminal?("`", false, index)
                                        r17 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                        @index += 1
                                      else
                                        terminal_parse_failure("`")
                                        r17 = nil
                                      end
                                      if r17
                                        r0 = r17
                                      else
                                        if has_terminal?("{", false, index)
                                          r18 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                          @index += 1
                                        else
                                          terminal_parse_failure("{")
                                          r18 = nil
                                        end
                                        if r18
                                          r0 = r18
                                        else
                                          if has_terminal?("|", false, index)
                                            r19 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                            @index += 1
                                          else
                                            terminal_parse_failure("|")
                                            r19 = nil
                                          end
                                          if r19
                                            r0 = r19
                                          else
                                            if has_terminal?("}", false, index)
                                              r20 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                              @index += 1
                                            else
                                              terminal_parse_failure("}")
                                              r20 = nil
                                            end
                                            if r20
                                              r0 = r20
                                            else
                                              if has_terminal?("~", false, index)
                                                r21 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                                @index += 1
                                              else
                                                terminal_parse_failure("~")
                                                r21 = nil
                                              end
                                              if r21
                                                r0 = r21
                                              else
                                                @index = i0
                                                r0 = nil
                                              end
                                            end
                                          end
                                        end
                                      end
                                    end
                                  end
                                end
                              end
                            end
                          end
                        end
                      end
                    end
                  end
                end
              end
            end
          end
        end
      end

      node_cache[:atext][start_index] = r0

      r0
    end

_nt_atom() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1062
    def _nt_atom
      start_index = index
      if node_cache[:atom].has_key?(index)
        cached = node_cache[:atom][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
        s3, i3 = [], index
        loop do
          r4 = _nt_atext
          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
        s0 << r3
        if r3
          r6 = _nt_CFWS
          if r6
            r5 = r6
          else
            r5 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r5
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(Atom0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:atom][start_index] = r0

      r0
    end

_nt_ccontent() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 643
    def _nt_ccontent
      start_index = index
      if node_cache[:ccontent].has_key?(index)
        cached = node_cache[:ccontent][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_ctext
      if r1
        r0 = r1
      else
        r2 = _nt_quoted_pair
        if r2
          r0 = r2
        else
          r3 = _nt_comment
          if r3
            r0 = r3
          else
            @index = i0
            r0 = nil
          end
        end
      end

      node_cache[:ccontent][start_index] = r0

      r0
    end

_nt_comment() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 687
    def _nt_comment
      start_index = index
      if node_cache[:comment].has_key?(index)
        cached = node_cache[:comment][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
        s2, i2 = [], index
        loop do
          i3, s3 = index, []
          r5 = _nt_FWS
          if r5
            r4 = r5
          else
            r4 = instantiate_node(SyntaxNode,input, index...index)
          end
          s3 << r4
          if r4
            r6 = _nt_ccontent
            s3 << r6
          end
          if s3.last
            r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
            r3.extend(Comment0)
          else
            @index = i3
            r3 = nil
          end
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s0 << r2
        if r2
          r8 = _nt_FWS
          if r8
            r7 = r8
          else
            r7 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << 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
            s0 << r9
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(Comment1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:comment][start_index] = r0

      r0
    end

_nt_ctext() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 588
    def _nt_ctext
      start_index = index
      if node_cache[:ctext].has_key?(index)
        cached = node_cache[:ctext][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_NO_WS_CTL
      if r1
        r0 = r1
      else
        if has_terminal?('\G[\x21-\x27]', true, index)
          r2 = true
          @index += 1
        else
          r2 = nil
        end
        if r2
          r0 = r2
        else
          if has_terminal?('\G[\x2a-\x5b]', true, index)
            r3 = true
            @index += 1
          else
            r3 = nil
          end
          if r3
            r0 = r3
          else
            if has_terminal?('\G[\x5d-\x7e]', true, index)
              r4 = true
              @index += 1
            else
              r4 = nil
            end
            if r4
              r0 = r4
            else
              @index = i0
              r0 = nil
            end
          end
        end
      end

      node_cache[:ctext][start_index] = r0

      r0
    end

_nt_date() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 3237
    def _nt_date
      start_index = index
      if node_cache[:date].has_key?(index)
        cached = node_cache[: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, []
      r1 = _nt_day
      s0 << r1
      if r1
        r2 = _nt_month
        s0 << r2
        if r2
          r3 = _nt_year
          s0 << r3
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(Date0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:date][start_index] = r0

      r0
    end

_nt_date_time() click to toggle source

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

      i0, s0 = index, []
      i2, s2 = index, []
      r3 = _nt_day_of_week
      s2 << 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
        s2 << r4
      end
      if s2.last
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        r2.extend(DateTime0)
      else
        @index = i2
        r2 = nil
      end
      if r2
        r1 = r2
      else
        r1 = instantiate_node(SyntaxNode,input, index...index)
      end
      s0 << r1
      if r1
        r5 = _nt_date
        s0 << r5
        if r5
          r6 = _nt_FWS
          s0 << r6
          if r6
            r7 = _nt_time
            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
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(DateTime1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:date_time][start_index] = r0

      r0
    end

_nt_day() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r3 = _nt_FWS
      if r3
        r2 = r3
      else
        r2 = instantiate_node(SyntaxNode,input, index...index)
      end
      s1 << r2
      if r2
        r4 = _nt_DIGIT
        s1 << r4
        if r4
          r6 = _nt_DIGIT
          if r6
            r5 = r6
          else
            r5 = instantiate_node(SyntaxNode,input, index...index)
          end
          s1 << r5
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(Day0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r7 = _nt_obs_day
        if r7
          r0 = r7
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:day][start_index] = r0

      r0
    end

_nt_day_name() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 3126
    def _nt_day_name
      start_index = index
      if node_cache[:day_name].has_key?(index)
        cached = node_cache[:day_name][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?("Mon", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 3))
        @index += 3
      else
        terminal_parse_failure("Mon")
        r1 = nil
      end
      if r1
        r0 = r1
      else
        if has_terminal?("Tue", false, index)
          r2 = instantiate_node(SyntaxNode,input, index...(index + 3))
          @index += 3
        else
          terminal_parse_failure("Tue")
          r2 = nil
        end
        if r2
          r0 = r2
        else
          if has_terminal?("Wed", false, index)
            r3 = instantiate_node(SyntaxNode,input, index...(index + 3))
            @index += 3
          else
            terminal_parse_failure("Wed")
            r3 = nil
          end
          if r3
            r0 = r3
          else
            if has_terminal?("Thu", false, index)
              r4 = instantiate_node(SyntaxNode,input, index...(index + 3))
              @index += 3
            else
              terminal_parse_failure("Thu")
              r4 = nil
            end
            if r4
              r0 = r4
            else
              if has_terminal?("Fri", false, index)
                r5 = instantiate_node(SyntaxNode,input, index...(index + 3))
                @index += 3
              else
                terminal_parse_failure("Fri")
                r5 = nil
              end
              if r5
                r0 = r5
              else
                if has_terminal?("Sat", false, index)
                  r6 = instantiate_node(SyntaxNode,input, index...(index + 3))
                  @index += 3
                else
                  terminal_parse_failure("Sat")
                  r6 = nil
                end
                if r6
                  r0 = r6
                else
                  if has_terminal?("Sun", false, index)
                    r7 = instantiate_node(SyntaxNode,input, index...(index + 3))
                    @index += 3
                  else
                    terminal_parse_failure("Sun")
                    r7 = nil
                  end
                  if r7
                    r0 = r7
                  else
                    @index = i0
                    r0 = nil
                  end
                end
              end
            end
          end
        end
      end

      node_cache[:day_name][start_index] = r0

      r0
    end

_nt_day_of_week() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 3078
    def _nt_day_of_week
      start_index = index
      if node_cache[:day_of_week].has_key?(index)
        cached = node_cache[: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 = index
      i1, s1 = index, []
      r3 = _nt_FWS
      if r3
        r2 = r3
      else
        r2 = instantiate_node(SyntaxNode,input, index...index)
      end
      s1 << r2
      if r2
        r4 = _nt_day_name
        s1 << r4
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(DayOfWeek0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r5 = _nt_obs_day_of_week
        if r5
          r0 = r5
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:day_of_week][start_index] = r0

      r0
    end

_nt_dcontent() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1896
    def _nt_dcontent
      start_index = index
      if node_cache[:dcontent].has_key?(index)
        cached = node_cache[:dcontent][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_dtext
      if r1
        r0 = r1
      else
        r2 = _nt_quoted_pair
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:dcontent][start_index] = r0

      r0
    end

_nt_display_name() click to toggle source

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

      r0 = _nt_phrase

      node_cache[:display_name][start_index] = r0

      r0
    end

_nt_domain() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2153
    def _nt_domain
      start_index = index
      if node_cache[:domain].has_key?(index)
        cached = node_cache[:domain][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_dot_atom
      if r1
        r0 = r1
      else
        r2 = _nt_domain_literal
        if r2
          r0 = r2
        else
          r3 = _nt_obs_domain
          if r3
            r0 = r3
          else
            @index = i0
            r0 = nil
          end
        end
      end

      node_cache[:domain][start_index] = r0

      r0
    end

_nt_domain_literal() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1795
    def _nt_domain_literal
      start_index = index
      if node_cache[:domain_literal].has_key?(index)
        cached = node_cache[:domain_literal][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
          s4, i4 = [], index
          loop do
            i5, s5 = index, []
            r7 = _nt_FWS
            if r7
              r6 = r7
            else
              r6 = instantiate_node(SyntaxNode,input, index...index)
            end
            s5 << r6
            if r6
              r8 = _nt_dcontent
              s5 << r8
            end
            if s5.last
              r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
              r5.extend(DomainLiteral0)
            else
              @index = i5
              r5 = nil
            end
            if r5
              s4 << r5
            else
              break
            end
          end
          r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
          s0 << r4
          if r4
            r10 = _nt_FWS
            if r10
              r9 = r10
            else
              r9 = instantiate_node(SyntaxNode,input, index...index)
            end
            s0 << r9
            if r9
              if has_terminal?("]", false, index)
                r11 = instantiate_node(SyntaxNode,input, index...(index + 1))
                @index += 1
              else
                terminal_parse_failure("]")
                r11 = nil
              end
              s0 << r11
              if r11
                r13 = _nt_CFWS
                if r13
                  r12 = r13
                else
                  r12 = instantiate_node(SyntaxNode,input, index...index)
                end
                s0 << r12
              end
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(DomainLiteral1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:domain_literal][start_index] = r0

      r0
    end

_nt_domain_text() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_DQUOTE
      s1 << r2
      if r2
        s3, i3 = [], index
        loop do
          i4, s4 = index, []
          r6 = _nt_FWS
          if r6
            r5 = r6
          else
            r5 = instantiate_node(SyntaxNode,input, index...index)
          end
          s4 << r5
          if r5
            r7 = _nt_quoted_domain
            s4 << r7
          end
          if s4.last
            r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
            r4.extend(DomainText0)
          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
        s1 << r3
        if r3
          r9 = _nt_FWS
          if r9
            r8 = r9
          else
            r8 = instantiate_node(SyntaxNode,input, index...index)
          end
          s1 << r8
          if r8
            r10 = _nt_DQUOTE
            s1 << r10
          end
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(DomainText1)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        s11, i11 = [], index
        loop do
          r12 = _nt_atext
          if r12
            s11 << r12
          else
            break
          end
        end
        if s11.empty?
          @index = i11
          r11 = nil
        else
          r11 = instantiate_node(SyntaxNode,input, i11...index, s11)
        end
        if r11
          r0 = r11
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:domain_text][start_index] = r0

      r0
    end

_nt_dot_atom() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1128
    def _nt_dot_atom
      start_index = index
      if node_cache[:dot_atom].has_key?(index)
        cached = node_cache[:dot_atom][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_dot_atom_text
        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(DotAtom0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:dot_atom][start_index] = r0

      r0
    end

_nt_dot_atom_text() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1264
    def _nt_dot_atom_text
      start_index = index
      if node_cache[:dot_atom_text].has_key?(index)
        cached = node_cache[:dot_atom_text][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, s1 = index, []
        r2 = _nt_domain_text
        s1 << 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
          if r4
            r3 = r4
          else
            r3 = instantiate_node(SyntaxNode,input, index...index)
          end
          s1 << r3
        end
        if s1.last
          r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
          r1.extend(DotAtomText0)
        else
          @index = i1
          r1 = nil
        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[:dot_atom_text][start_index] = r0

      r0
    end

_nt_dtext() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1926
    def _nt_dtext
      start_index = index
      if node_cache[:dtext].has_key?(index)
        cached = node_cache[:dtext][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_NO_WS_CTL
      if r1
        r0 = r1
      else
        if has_terminal?('\G[\x21-\x5a]', true, index)
          r2 = true
          @index += 1
        else
          r2 = nil
        end
        if r2
          r0 = r2
        else
          if has_terminal?('\G[\x5e-\x7e]', true, index)
            r3 = true
            @index += 1
          else
            r3 = nil
          end
          if r3
            r0 = r3
          else
            @index = i0
            r0 = nil
          end
        end
      end

      node_cache[:dtext][start_index] = r0

      r0
    end

_nt_group() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2199
    def _nt_group
      start_index = index
      if node_cache[:group].has_key?(index)
        cached = node_cache[:group][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_display_name
      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
          i4 = index
          r5 = _nt_mailbox_list_group
          if r5
            r4 = r5
          else
            r6 = _nt_CFWS
            if r6
              r4 = r6
            else
              @index = i4
              r4 = nil
            end
          end
          if r4
            r3 = r4
          else
            r3 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r3
          if r3
            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
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(Group0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:group][start_index] = r0

      r0
    end

_nt_hour() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_DIGIT
      s1 << r2
      if r2
        r3 = _nt_DIGIT
        s1 << r3
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(Hour0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r4 = _nt_obs_hour
        if r4
          r0 = r4
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:hour][start_index] = r0

      r0
    end

_nt_id_left() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4687
    def _nt_id_left
      start_index = index
      if node_cache[:id_left].has_key?(index)
        cached = node_cache[:id_left][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_message_id_text
      if r1
        r0 = r1
      else
        r2 = _nt_no_fold_quote
        if r2
          r0 = r2
        else
          r3 = _nt_obs_id_left
          if r3
            r0 = r3
          else
            @index = i0
            r0 = nil
          end
        end
      end

      node_cache[:id_left][start_index] = r0

      r0
    end

_nt_id_right() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4722
    def _nt_id_right
      start_index = index
      if node_cache[:id_right].has_key?(index)
        cached = node_cache[:id_right][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_msg_id_dot_atom_text
      if r1
        r0 = r1
      else
        r2 = _nt_no_fold_literal
        if r2
          r0 = r2
        else
          r3 = _nt_obs_id_right
          if r3
            r0 = r3
          else
            @index = i0
            r0 = nil
          end
        end
      end

      node_cache[:id_right][start_index] = r0

      r0
    end

_nt_item_name() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4356
    def _nt_item_name
      start_index = index
      if node_cache[:item_name].has_key?(index)
        cached = node_cache[:item_name][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_ALPHA
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          i3, s3 = index, []
          if has_terminal?("-", false, index)
            r5 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure("-")
            r5 = nil
          end
          if r5
            r4 = r5
          else
            r4 = instantiate_node(SyntaxNode,input, index...index)
          end
          s3 << r4
          if r4
            i6 = index
            r7 = _nt_ALPHA
            if r7
              r6 = r7
            else
              r8 = _nt_DIGIT
              if r8
                r6 = r8
              else
                @index = i6
                r6 = nil
              end
            end
            s3 << r6
          end
          if s3.last
            r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
            r3.extend(ItemName0)
          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(ItemName1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:item_name][start_index] = r0

      r0
    end

_nt_item_value() click to toggle source

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

      i0 = index
      s1, i1 = [], index
      loop do
        r2 = _nt_angle_addr
        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
      if r1
        r0 = r1
      else
        r3 = _nt_addr_spec
        if r3
          r0 = r3
        else
          r4 = _nt_atom
          if r4
            r0 = r4
          else
            r5 = _nt_domain
            if r5
              r0 = r5
            else
              r6 = _nt_msg_id
              if r6
                r0 = r6
              else
                @index = i0
                r0 = nil
              end
            end
          end
        end
      end

      node_cache[:item_value][start_index] = r0

      r0
    end

_nt_local_dot_atom() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1180
    def _nt_local_dot_atom
      start_index = index
      if node_cache[:local_dot_atom].has_key?(index)
        cached = node_cache[:local_dot_atom][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_local_dot_atom_text
        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(LocalDotAtom0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:local_dot_atom][start_index] = r0

      r0
    end

_nt_local_dot_atom_text() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1326
    def _nt_local_dot_atom_text
      start_index = index
      if node_cache[:local_dot_atom_text].has_key?(index)
        cached = node_cache[:local_dot_atom_text][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, s1 = index, []
        s2, i2 = [], index
        loop do
          if has_terminal?(".", false, index)
            r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(".")
            r3 = nil
          end
          if r3
            s2 << r3
          else
            break
          end
        end
        r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        s1 << r2
        if r2
          r4 = _nt_domain_text
          s1 << r4
        end
        if s1.last
          r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
          r1.extend(LocalDotAtomText0)
        else
          @index = i1
          r1 = nil
        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[:local_dot_atom_text][start_index] = r0

      r0
    end

_nt_local_part() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2118
    def _nt_local_part
      start_index = index
      if node_cache[:local_part].has_key?(index)
        cached = node_cache[:local_part][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_local_dot_atom
      if r1
        r0 = r1
      else
        r2 = _nt_quoted_string
        if r2
          r0 = r2
        else
          r3 = _nt_obs_local_part
          if r3
            r0 = r3
          else
            @index = i0
            r0 = nil
          end
        end
      end

      node_cache[:local_part][start_index] = r0

      r0
    end

_nt_mailbox() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2769
    def _nt_mailbox
      start_index = index
      if node_cache[:mailbox].has_key?(index)
        cached = node_cache[:mailbox][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_name_addr
      if r1
        r0 = r1
      else
        r2 = _nt_addr_spec
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:mailbox][start_index] = r0

      r0
    end

_nt_mailbox_list() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_mailbox
      s1 << r2
      if r2
        s3, i3 = [], index
        loop do
          i4, s4 = index, []
          if has_terminal?(",", false, index)
            r5 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure(",")
            r5 = nil
          end
          s4 << r5
          if r5
            r6 = _nt_mailbox
            s4 << r6
          end
          if s4.last
            r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
            r4.extend(MailboxList0)
          else
            @index = i4
            r4 = nil
          end
          if r4
            s3 << r4
          else
            break
          end
        end
        r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
        s1 << r3
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(MailboxList1)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r7 = _nt_obs_mbox_list
        if r7
          r0 = r7
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:mailbox_list][start_index] = r0

      r0
    end

_nt_mailbox_list_group() click to toggle source

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

      r0 = _nt_mailbox_list
      r0.extend(MailboxListGroup0)

      node_cache[:mailbox_list_group][start_index] = r0

      r0
    end

_nt_message_id_text() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1225
    def _nt_message_id_text
      start_index = index
      if node_cache[:message_id_text].has_key?(index)
        cached = node_cache[:message_id_text][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
        r1 = _nt_mtext
        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[:message_id_text][start_index] = r0

      r0
    end

_nt_message_ids() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4511
    def _nt_message_ids
      start_index = index
      if node_cache[:message_ids].has_key?(index)
        cached = node_cache[:message_ids][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_msg_id
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          i3, s3 = index, []
          r4 = _nt_CFWS
          s3 << r4
          if r4
            r5 = _nt_msg_id
            s3 << r5
          end
          if s3.last
            r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
            r3.extend(MessageIds0)
          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(MessageIds1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:message_ids][start_index] = r0

      r0
    end

_nt_minute() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_DIGIT
      s1 << r2
      if r2
        r3 = _nt_DIGIT
        s1 << r3
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(Minute0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r4 = _nt_obs_minute
        if r4
          r0 = r4
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:minute][start_index] = r0

      r0
    end

_nt_month() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_FWS
      s1 << r2
      if r2
        r3 = _nt_month_name
        s1 << r3
        if r3
          r4 = _nt_FWS
          s1 << r4
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(Month0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r5 = _nt_obs_month
        if r5
          r0 = r5
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:month][start_index] = r0

      r0
    end

_nt_month_name() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 3402
    def _nt_month_name
      start_index = index
      if node_cache[:month_name].has_key?(index)
        cached = node_cache[:month_name][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?("Jan", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 3))
        @index += 3
      else
        terminal_parse_failure("Jan")
        r1 = nil
      end
      if r1
        r0 = r1
      else
        if has_terminal?("Feb", false, index)
          r2 = instantiate_node(SyntaxNode,input, index...(index + 3))
          @index += 3
        else
          terminal_parse_failure("Feb")
          r2 = nil
        end
        if r2
          r0 = r2
        else
          if has_terminal?("Mar", false, index)
            r3 = instantiate_node(SyntaxNode,input, index...(index + 3))
            @index += 3
          else
            terminal_parse_failure("Mar")
            r3 = nil
          end
          if r3
            r0 = r3
          else
            if has_terminal?("Apr", false, index)
              r4 = instantiate_node(SyntaxNode,input, index...(index + 3))
              @index += 3
            else
              terminal_parse_failure("Apr")
              r4 = nil
            end
            if r4
              r0 = r4
            else
              if has_terminal?("May", false, index)
                r5 = instantiate_node(SyntaxNode,input, index...(index + 3))
                @index += 3
              else
                terminal_parse_failure("May")
                r5 = nil
              end
              if r5
                r0 = r5
              else
                if has_terminal?("Jun", false, index)
                  r6 = instantiate_node(SyntaxNode,input, index...(index + 3))
                  @index += 3
                else
                  terminal_parse_failure("Jun")
                  r6 = nil
                end
                if r6
                  r0 = r6
                else
                  if has_terminal?("Jul", false, index)
                    r7 = instantiate_node(SyntaxNode,input, index...(index + 3))
                    @index += 3
                  else
                    terminal_parse_failure("Jul")
                    r7 = nil
                  end
                  if r7
                    r0 = r7
                  else
                    if has_terminal?("Aug", false, index)
                      r8 = instantiate_node(SyntaxNode,input, index...(index + 3))
                      @index += 3
                    else
                      terminal_parse_failure("Aug")
                      r8 = nil
                    end
                    if r8
                      r0 = r8
                    else
                      if has_terminal?("Sep", false, index)
                        r9 = instantiate_node(SyntaxNode,input, index...(index + 3))
                        @index += 3
                      else
                        terminal_parse_failure("Sep")
                        r9 = nil
                      end
                      if r9
                        r0 = r9
                      else
                        if has_terminal?("Oct", false, index)
                          r10 = instantiate_node(SyntaxNode,input, index...(index + 3))
                          @index += 3
                        else
                          terminal_parse_failure("Oct")
                          r10 = nil
                        end
                        if r10
                          r0 = r10
                        else
                          if has_terminal?("Nov", false, index)
                            r11 = instantiate_node(SyntaxNode,input, index...(index + 3))
                            @index += 3
                          else
                            terminal_parse_failure("Nov")
                            r11 = nil
                          end
                          if r11
                            r0 = r11
                          else
                            if has_terminal?("Dec", false, index)
                              r12 = instantiate_node(SyntaxNode,input, index...(index + 3))
                              @index += 3
                            else
                              terminal_parse_failure("Dec")
                              r12 = nil
                            end
                            if r12
                              r0 = r12
                            else
                              @index = i0
                              r0 = nil
                            end
                          end
                        end
                      end
                    end
                  end
                end
              end
            end
          end
        end
      end

      node_cache[:month_name][start_index] = r0

      r0
    end

_nt_msg_id() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4571
    def _nt_msg_id
      start_index = index
      if node_cache[:msg_id].has_key?(index)
        cached = node_cache[:msg_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, []
      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
          r4 = _nt_msg_id_value
          s0 << r4
          if r4
            if has_terminal?(">", false, index)
              r5 = instantiate_node(SyntaxNode,input, index...(index + 1))
              @index += 1
            else
              terminal_parse_failure(">")
              r5 = nil
            end
            s0 << r5
            if r5
              r7 = _nt_CFWS
              if r7
                r6 = r7
              else
                r6 = instantiate_node(SyntaxNode,input, index...index)
              end
              s0 << r6
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(MsgId0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:msg_id][start_index] = r0

      r0
    end

_nt_msg_id_atext() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4938
    def _nt_msg_id_atext
      start_index = index
      if node_cache[:msg_id_atext].has_key?(index)
        cached = node_cache[:msg_id_atext][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_ALPHA
      if r1
        r0 = r1
      else
        r2 = _nt_DIGIT
        if r2
          r0 = 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
            r0 = 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
              r0 = r4
            else
              if has_terminal?("$", false, index)
                r5 = instantiate_node(SyntaxNode,input, index...(index + 1))
                @index += 1
              else
                terminal_parse_failure("$")
                r5 = nil
              end
              if r5
                r0 = r5
              else
                if has_terminal?("%", false, index)
                  r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
                  @index += 1
                else
                  terminal_parse_failure("%")
                  r6 = nil
                end
                if r6
                  r0 = r6
                else
                  if has_terminal?("&", false, index)
                    r7 = instantiate_node(SyntaxNode,input, index...(index + 1))
                    @index += 1
                  else
                    terminal_parse_failure("&")
                    r7 = nil
                  end
                  if r7
                    r0 = r7
                  else
                    if has_terminal?("'", false, index)
                      r8 = instantiate_node(SyntaxNode,input, index...(index + 1))
                      @index += 1
                    else
                      terminal_parse_failure("'")
                      r8 = nil
                    end
                    if r8
                      r0 = r8
                    else
                      if has_terminal?("*", false, index)
                        r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
                        @index += 1
                      else
                        terminal_parse_failure("*")
                        r9 = nil
                      end
                      if r9
                        r0 = r9
                      else
                        if has_terminal?("+", false, index)
                          r10 = instantiate_node(SyntaxNode,input, index...(index + 1))
                          @index += 1
                        else
                          terminal_parse_failure("+")
                          r10 = nil
                        end
                        if r10
                          r0 = r10
                        else
                          if has_terminal?("-", false, index)
                            r11 = instantiate_node(SyntaxNode,input, index...(index + 1))
                            @index += 1
                          else
                            terminal_parse_failure("-")
                            r11 = nil
                          end
                          if r11
                            r0 = r11
                          else
                            if has_terminal?("/", false, index)
                              r12 = instantiate_node(SyntaxNode,input, index...(index + 1))
                              @index += 1
                            else
                              terminal_parse_failure("/")
                              r12 = nil
                            end
                            if r12
                              r0 = r12
                            else
                              if has_terminal?("=", false, index)
                                r13 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                @index += 1
                              else
                                terminal_parse_failure("=")
                                r13 = nil
                              end
                              if r13
                                r0 = r13
                              else
                                if has_terminal?("?", false, index)
                                  r14 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                  @index += 1
                                else
                                  terminal_parse_failure("?")
                                  r14 = nil
                                end
                                if r14
                                  r0 = r14
                                else
                                  if has_terminal?("^", false, index)
                                    r15 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                    @index += 1
                                  else
                                    terminal_parse_failure("^")
                                    r15 = nil
                                  end
                                  if r15
                                    r0 = r15
                                  else
                                    if has_terminal?("_", false, index)
                                      r16 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                      @index += 1
                                    else
                                      terminal_parse_failure("_")
                                      r16 = nil
                                    end
                                    if r16
                                      r0 = r16
                                    else
                                      if has_terminal?("`", false, index)
                                        r17 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                        @index += 1
                                      else
                                        terminal_parse_failure("`")
                                        r17 = nil
                                      end
                                      if r17
                                        r0 = r17
                                      else
                                        if has_terminal?("{", false, index)
                                          r18 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                          @index += 1
                                        else
                                          terminal_parse_failure("{")
                                          r18 = nil
                                        end
                                        if r18
                                          r0 = r18
                                        else
                                          if has_terminal?("|", false, index)
                                            r19 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                            @index += 1
                                          else
                                            terminal_parse_failure("|")
                                            r19 = nil
                                          end
                                          if r19
                                            r0 = r19
                                          else
                                            if has_terminal?("}", false, index)
                                              r20 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                              @index += 1
                                            else
                                              terminal_parse_failure("}")
                                              r20 = nil
                                            end
                                            if r20
                                              r0 = r20
                                            else
                                              if has_terminal?("~", false, index)
                                                r21 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                                @index += 1
                                              else
                                                terminal_parse_failure("~")
                                                r21 = nil
                                              end
                                              if r21
                                                r0 = r21
                                              else
                                                if has_terminal?("@", false, index)
                                                  r22 = instantiate_node(SyntaxNode,input, index...(index + 1))
                                                  @index += 1
                                                else
                                                  terminal_parse_failure("@")
                                                  r22 = nil
                                                end
                                                if r22
                                                  r0 = r22
                                                else
                                                  @index = i0
                                                  r0 = nil
                                                end
                                              end
                                            end
                                          end
                                        end
                                      end
                                    end
                                  end
                                end
                              end
                            end
                          end
                        end
                      end
                    end
                  end
                end
              end
            end
          end
        end
      end

      node_cache[:msg_id_atext][start_index] = r0

      r0
    end

_nt_msg_id_domain_text() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_DQUOTE
      s1 << r2
      if r2
        s3, i3 = [], index
        loop do
          i4, s4 = index, []
          r6 = _nt_FWS
          if r6
            r5 = r6
          else
            r5 = instantiate_node(SyntaxNode,input, index...index)
          end
          s4 << r5
          if r5
            r7 = _nt_quoted_domain
            s4 << r7
          end
          if s4.last
            r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
            r4.extend(MsgIdDomainText0)
          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
        s1 << r3
        if r3
          r9 = _nt_FWS
          if r9
            r8 = r9
          else
            r8 = instantiate_node(SyntaxNode,input, index...index)
          end
          s1 << r8
          if r8
            r10 = _nt_DQUOTE
            s1 << r10
          end
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(MsgIdDomainText1)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        s11, i11 = [], index
        loop do
          r12 = _nt_msg_id_atext
          if r12
            s11 << r12
          else
            break
          end
        end
        if s11.empty?
          @index = i11
          r11 = nil
        else
          r11 = instantiate_node(SyntaxNode,input, i11...index, s11)
        end
        if r11
          r0 = r11
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:msg_id_domain_text][start_index] = r0

      r0
    end

_nt_msg_id_dot_atom_text() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4764
    def _nt_msg_id_dot_atom_text
      start_index = index
      if node_cache[:msg_id_dot_atom_text].has_key?(index)
        cached = node_cache[:msg_id_dot_atom_text][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, s1 = index, []
        r2 = _nt_msg_id_domain_text
        s1 << 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
          if r4
            r3 = r4
          else
            r3 = instantiate_node(SyntaxNode,input, index...index)
          end
          s1 << r3
        end
        if s1.last
          r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
          r1.extend(MsgIdDotAtomText0)
        else
          @index = i1
          r1 = nil
        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[:msg_id_dot_atom_text][start_index] = r0

      r0
    end

_nt_msg_id_value() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4646
    def _nt_msg_id_value
      start_index = index
      if node_cache[:msg_id_value].has_key?(index)
        cached = node_cache[:msg_id_value][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_id_left
      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_id_right
          s0 << r3
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(MsgIdValue0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:msg_id_value][start_index] = r0

      r0
    end

_nt_mtext() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1009
    def _nt_mtext
      start_index = index
      if node_cache[:mtext].has_key?(index)
        cached = node_cache[:mtext][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_atext
        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
            @index = i1
            r1 = nil
          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[:mtext][start_index] = r0

      r0
    end

_nt_name_addr() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_display_name
      s1 << r2
      if r2
        r3 = _nt_angle_addr
        s1 << r3
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(NameAddr0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r4 = _nt_angle_addr
        if r4
          r0 = r4
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:name_addr][start_index] = r0

      r0
    end

_nt_name_val_list() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4226
    def _nt_name_val_list
      start_index = index
      if node_cache[:name_val_list].has_key?(index)
        cached = node_cache[:name_val_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, []
      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_name_val_pair
        s3 << r4
        if r4
          s5, i5 = [], index
          loop do
            i6, s6 = index, []
            r7 = _nt_CFWS
            s6 << r7
            if r7
              r8 = _nt_name_val_pair
              s6 << r8
            end
            if s6.last
              r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
              r6.extend(NameValList0)
            else
              @index = i6
              r6 = nil
            end
            if r6
              s5 << r6
            else
              break
            end
          end
          r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
          s3 << r5
        end
        if s3.last
          r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
          r3.extend(NameValList1)
        else
          @index = i3
          r3 = nil
        end
        s0 << r3
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(NameValList2)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:name_val_list][start_index] = r0

      r0
    end

_nt_name_val_pair() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4311
    def _nt_name_val_pair
      start_index = index
      if node_cache[:name_val_pair].has_key?(index)
        cached = node_cache[:name_val_pair][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_item_name
      s0 << r1
      if r1
        r2 = _nt_CFWS
        s0 << r2
        if r2
          r3 = _nt_item_value
          s0 << r3
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(NameValPair0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:name_val_pair][start_index] = r0

      r0
    end

_nt_no_fold_literal() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 5262
    def _nt_no_fold_literal
      start_index = index
      if node_cache[:no_fold_literal].has_key?(index)
        cached = node_cache[:no_fold_literal][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
        s2, i2 = [], index
        loop do
          i3 = index
          r4 = _nt_dtext
          if r4
            r3 = r4
          else
            r5 = _nt_quoted_pair
            if r5
              r3 = r5
            else
              @index = i3
              r3 = nil
            end
          end
          if r3
            s2 << r3
          else
            break
          end
        end
        if s2.empty?
          @index = i2
          r2 = nil
        else
          r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        end
        s0 << r2
        if r2
          if has_terminal?("]", false, index)
            r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
            @index += 1
          else
            terminal_parse_failure("]")
            r6 = nil
          end
          s0 << r6
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(NoFoldLiteral0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:no_fold_literal][start_index] = r0

      r0
    end

_nt_no_fold_quote() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 5198
    def _nt_no_fold_quote
      start_index = index
      if node_cache[:no_fold_quote].has_key?(index)
        cached = node_cache[:no_fold_quote][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_DQUOTE
      s0 << r1
      if r1
        s2, i2 = [], index
        loop do
          i3 = index
          r4 = _nt_qtext
          if r4
            r3 = r4
          else
            r5 = _nt_quoted_pair
            if r5
              r3 = r5
            else
              @index = i3
              r3 = nil
            end
          end
          if r3
            s2 << r3
          else
            break
          end
        end
        if s2.empty?
          @index = i2
          r2 = nil
        else
          r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        end
        s0 << r2
        if r2
          r6 = _nt_DQUOTE
          s0 << r6
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(NoFoldQuote0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:no_fold_quote][start_index] = r0

      r0
    end

_nt_path() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r3 = _nt_CFWS
      if r3
        r2 = r3
      else
        r2 = instantiate_node(SyntaxNode,input, index...index)
      end
      s1 << 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
        s1 << r4
        if r4
          i5 = index
          r7 = _nt_CFWS
          if r7
            r6 = r7
          else
            r6 = instantiate_node(SyntaxNode,input, index...index)
          end
          if r6
            r5 = r6
          else
            r8 = _nt_addr_spec
            if r8
              r5 = r8
            else
              @index = i5
              r5 = nil
            end
          end
          s1 << r5
          if r5
            if has_terminal?(">", false, index)
              r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
              @index += 1
            else
              terminal_parse_failure(">")
              r9 = nil
            end
            s1 << r9
            if r9
              r11 = _nt_CFWS
              if r11
                r10 = r11
              else
                r10 = instantiate_node(SyntaxNode,input, index...index)
              end
              s1 << r10
            end
          end
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(Path0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r12 = _nt_obs_path
        if r12
          r0 = r12
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:path][start_index] = r0

      r0
    end

_nt_phrase() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1624
    def _nt_phrase
      start_index = index
      if node_cache[:phrase].has_key?(index)
        cached = node_cache[:phrase][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_obs_phrase
      if r1
        r0 = r1
      else
        s2, i2 = [], index
        loop do
          r3 = _nt_word
          if r3
            s2 << r3
          else
            break
          end
        end
        if s2.empty?
          @index = i2
          r2 = nil
        else
          r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
        end
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:phrase][start_index] = r0

      r0
    end

_nt_phrase_list() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1714
    def _nt_phrase_list
      start_index = index
      if node_cache[:phrase_list].has_key?(index)
        cached = node_cache[:phrase_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, []
      r1 = _nt_phrase
      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
            s5, i5 = [], index
            loop do
              r6 = _nt_FWS
              if r6
                s5 << r6
              else
                break
              end
            end
            r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
            s3 << r5
            if r5
              r7 = _nt_phrase
              s3 << r7
            end
          end
          if s3.last
            r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
            r3.extend(PhraseList0)
          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(PhraseList1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:phrase_list][start_index] = r0

      r0
    end

_nt_qcontent() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2416
    def _nt_qcontent
      start_index = index
      if node_cache[:qcontent].has_key?(index)
        cached = node_cache[:qcontent][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_qtext
      if r1
        r0 = r1
      else
        r2 = _nt_quoted_pair
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:qcontent][start_index] = r0

      r0
    end

_nt_qdcontent() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1559
    def _nt_qdcontent
      start_index = index
      if node_cache[:qdcontent].has_key?(index)
        cached = node_cache[:qdcontent][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_NO_WS_CTL
      if r1
        r0 = r1
      else
        if has_terminal?('\G[\x21]', true, index)
          r2 = true
          @index += 1
        else
          r2 = nil
        end
        if r2
          r0 = r2
        else
          if has_terminal?('\G[\x23-\x45]', true, index)
            r3 = true
            @index += 1
          else
            r3 = nil
          end
          if r3
            r0 = r3
          else
            if has_terminal?('\G[\x47-\x5b]', true, index)
              r4 = true
              @index += 1
            else
              r4 = nil
            end
            if r4
              r0 = r4
            else
              if has_terminal?('\G[\x5d-\x7e]', true, index)
                r5 = true
                @index += 1
              else
                r5 = nil
              end
              if r5
                r0 = r5
              else
                @index = i0
                r0 = nil
              end
            end
          end
        end
      end

      node_cache[:qdcontent][start_index] = r0

      r0
    end

_nt_qtext() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2501
    def _nt_qtext
      start_index = index
      if node_cache[:qtext].has_key?(index)
        cached = node_cache[:qtext][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_NO_WS_CTL
      if r1
        r0 = r1
      else
        if has_terminal?('\G[\x21]', true, index)
          r2 = true
          @index += 1
        else
          r2 = nil
        end
        if r2
          r0 = r2
        else
          if has_terminal?('\G[\x23-\x5b]', true, index)
            r3 = true
            @index += 1
          else
            r3 = nil
          end
          if r3
            r0 = r3
          else
            if has_terminal?('\G[\x5d-\x7e]', true, index)
              r4 = true
              @index += 1
            else
              r4 = nil
            end
            if r4
              r0 = r4
            else
              @index = i0
              r0 = nil
            end
          end
        end
      end

      node_cache[:qtext][start_index] = r0

      r0
    end

_nt_quoted_domain() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1510
    def _nt_quoted_domain
      start_index = index
      if node_cache[:quoted_domain].has_key?(index)
        cached = node_cache[:quoted_domain][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_qdcontent
      if r1
        r0 = r1
      else
        i2, s2 = index, []
        if has_terminal?("\\", false, index)
          r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
          @index += 1
        else
          terminal_parse_failure("\\")
          r3 = nil
        end
        s2 << r3
        if r3
          r4 = _nt_text
          s2 << r4
        end
        if s2.last
          r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
          r2.extend(QuotedDomain0)
        else
          @index = i2
          r2 = nil
        end
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:quoted_domain][start_index] = r0

      r0
    end

_nt_quoted_pair() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      if has_terminal?("\\", false, index)
        r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        terminal_parse_failure("\\")
        r2 = nil
      end
      s1 << r2
      if r2
        r3 = _nt_text
        s1 << r3
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(QuotedPair0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r4 = _nt_obs_qp
        if r4
          r0 = r4
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:quoted_pair][start_index] = r0

      r0
    end

_nt_quoted_string() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2322
    def _nt_quoted_string
      start_index = index
      if node_cache[:quoted_string].has_key?(index)
        cached = node_cache[:quoted_string][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_DQUOTE
        s0 << r3
        if r3
          s4, i4 = [], index
          loop do
            i5, s5 = index, []
            r7 = _nt_FWS
            if r7
              r6 = r7
            else
              r6 = instantiate_node(SyntaxNode,input, index...index)
            end
            s5 << r6
            if r6
              r8 = _nt_qcontent
              s5 << r8
            end
            if s5.last
              r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
              r5.extend(QuotedString0)
            else
              @index = i5
              r5 = nil
            end
            if r5
              s4 << r5
            else
              break
            end
          end
          if s4.empty?
            @index = i4
            r4 = nil
          else
            r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
          end
          s0 << r4
          if r4
            r10 = _nt_FWS
            if r10
              r9 = r10
            else
              r9 = instantiate_node(SyntaxNode,input, index...index)
            end
            s0 << r9
            if r9
              r11 = _nt_DQUOTE
              s0 << r11
              if r11
                r13 = _nt_CFWS
                if r13
                  r12 = r13
                else
                  r12 = instantiate_node(SyntaxNode,input, index...index)
                end
                s0 << r12
              end
            end
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(QuotedString1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:quoted_string][start_index] = r0

      r0
    end

_nt_received() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4161
    def _nt_received
      start_index = index
      if node_cache[:received].has_key?(index)
        cached = node_cache[: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, []
      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
          if r3
            r4 = _nt_CRLF
            s0 << r4
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(Received0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:received][start_index] = r0

      r0
    end

_nt_return() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 4019
    def _nt_return
      start_index = index
      if node_cache[:return].has_key?(index)
        cached = node_cache[: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, []
      r1 = _nt_path
      s0 << r1
      if r1
        r2 = _nt_CRLF
        s0 << r2
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(Return0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:return][start_index] = r0

      r0
    end

_nt_second() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_DIGIT
      s1 << r2
      if r2
        r3 = _nt_DIGIT
        s1 << r3
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(Second0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r4 = _nt_obs_second
        if r4
          r0 = r4
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:second][start_index] = r0

      r0
    end

_nt_specials() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 431
    def _nt_specials
      start_index = index
      if node_cache[:specials].has_key?(index)
        cached = node_cache[:specials][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?("(", false, index)
        r1 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        terminal_parse_failure("(")
        r1 = nil
      end
      if r1
        r0 = r1
      else
        if has_terminal?(")", false, index)
          r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
          @index += 1
        else
          terminal_parse_failure(")")
          r2 = nil
        end
        if r2
          r0 = 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
            r0 = 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
              r0 = r4
            else
              if has_terminal?("[", false, index)
                r5 = instantiate_node(SyntaxNode,input, index...(index + 1))
                @index += 1
              else
                terminal_parse_failure("[")
                r5 = nil
              end
              if r5
                r0 = r5
              else
                if has_terminal?("]", false, index)
                  r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
                  @index += 1
                else
                  terminal_parse_failure("]")
                  r6 = nil
                end
                if r6
                  r0 = r6
                else
                  if has_terminal?(":", false, index)
                    r7 = instantiate_node(SyntaxNode,input, index...(index + 1))
                    @index += 1
                  else
                    terminal_parse_failure(":")
                    r7 = nil
                  end
                  if r7
                    r0 = r7
                  else
                    if has_terminal?(";", false, index)
                      r8 = instantiate_node(SyntaxNode,input, index...(index + 1))
                      @index += 1
                    else
                      terminal_parse_failure(";")
                      r8 = nil
                    end
                    if r8
                      r0 = r8
                    else
                      if has_terminal?("@", false, index)
                        r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
                        @index += 1
                      else
                        terminal_parse_failure("@")
                        r9 = nil
                      end
                      if r9
                        r0 = r9
                      else
                        if has_terminal?('\', false, index)
                          r10 = instantiate_node(SyntaxNode,input, index...(index + 1))
                          @index += 1
                        else
                          terminal_parse_failure('\')
                          r10 = nil
                        end
                        if r10
                          r0 = r10
                        else
                          if has_terminal?(",", false, index)
                            r11 = instantiate_node(SyntaxNode,input, index...(index + 1))
                            @index += 1
                          else
                            terminal_parse_failure(",")
                            r11 = nil
                          end
                          if r11
                            r0 = r11
                          else
                            if has_terminal?(".", false, index)
                              r12 = instantiate_node(SyntaxNode,input, index...(index + 1))
                              @index += 1
                            else
                              terminal_parse_failure(".")
                              r12 = nil
                            end
                            if r12
                              r0 = r12
                            else
                              r13 = _nt_DQUOTE
                              if r13
                                r0 = r13
                              else
                                @index = i0
                                r0 = nil
                              end
                            end
                          end
                        end
                      end
                    end
                  end
                end
              end
            end
          end
        end
      end

      node_cache[:specials][start_index] = r0

      r0
    end

_nt_text() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 2556
    def _nt_text
      start_index = index
      if node_cache[:text].has_key?(index)
        cached = node_cache[:text][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[\x01-\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-\x7e]', true, index)
            r3 = true
            @index += 1
          else
            r3 = nil
          end
          if r3
            r0 = r3
          else
            r4 = _nt_obs_text
            if r4
              r0 = r4
            else
              @index = i0
              r0 = nil
            end
          end
        end
      end

      node_cache[:text][start_index] = r0

      r0
    end

_nt_time() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 3632
    def _nt_time
      start_index = index
      if node_cache[:time].has_key?(index)
        cached = node_cache[:time][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_time_of_day
      s0 << r1
      if r1
        r2 = _nt_FWS
        s0 << r2
        if r2
          r3 = _nt_zone
          s0 << r3
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(Time0)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:time][start_index] = r0

      r0
    end

_nt_time_of_day() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 3684
    def _nt_time_of_day
      start_index = index
      if node_cache[:time_of_day].has_key?(index)
        cached = node_cache[:time_of_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, []
      r1 = _nt_hour
      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_minute
          s0 << r3
          if r3
            i5, s5 = index, []
            if has_terminal?(":", false, index)
              r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
              @index += 1
            else
              terminal_parse_failure(":")
              r6 = nil
            end
            s5 << r6
            if r6
              r7 = _nt_second
              s5 << r7
            end
            if s5.last
              r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
              r5.extend(TimeOfDay0)
            else
              @index = i5
              r5 = nil
            end
            if r5
              r4 = r5
            else
              r4 = instantiate_node(SyntaxNode,input, index...index)
            end
            s0 << r4
          end
        end
      end
      if s0.last
        r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
        r0.extend(TimeOfDay1)
      else
        @index = i0
        r0 = nil
      end

      node_cache[:time_of_day][start_index] = r0

      r0
    end

_nt_word() click to toggle source

    # File lib/mail/parsers/rfc2822.rb, line 1668
    def _nt_word
      start_index = index
      if node_cache[:word].has_key?(index)
        cached = node_cache[:word][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_atom
      if r1
        r0 = r1
      else
        r2 = _nt_quoted_string
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:word][start_index] = r0

      r0
    end

_nt_year() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      r2 = _nt_DIGIT
      s1 << r2
      if r2
        r3 = _nt_DIGIT
        s1 << r3
        if r3
          r4 = _nt_DIGIT
          s1 << r4
          if r4
            r5 = _nt_DIGIT
            s1 << r5
          end
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(Year0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r6 = _nt_obs_year
        if r6
          r0 = r6
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:year][start_index] = r0

      r0
    end

_nt_zone() click to toggle source

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

      i0 = index
      i1, s1 = index, []
      i2 = index
      if has_terminal?("+", false, index)
        r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
        @index += 1
      else
        terminal_parse_failure("+")
        r3 = nil
      end
      if r3
        r2 = 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
          r2 = r4
        else
          @index = i2
          r2 = nil
        end
      end
      s1 << r2
      if r2
        r5 = _nt_DIGIT
        s1 << r5
        if r5
          r6 = _nt_DIGIT
          s1 << r6
          if r6
            r7 = _nt_DIGIT
            s1 << r7
            if r7
              r8 = _nt_DIGIT
              s1 << r8
            end
          end
        end
      end
      if s1.last
        r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
        r1.extend(Zone0)
      else
        @index = i1
        r1 = nil
      end
      if r1
        r0 = r1
      else
        r9 = _nt_obs_zone
        if r9
          r0 = r9
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:zone][start_index] = r0

      r0
    end

root() click to toggle source

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.