module Mail::Parsers::MessageIdsParser
def self.parse(data)
def self.parse(data) data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding) raise Mail::Field::NilParseError.new(Mail::MessageIdsElement) if data.nil? # Parser state message_ids = MessageIdsStruct.new([]) msg_id_s = nil # 5.1 Variables Used by Ragel p = 0 eof = pe = data.length stack = [] n |= 0 ||= data.length = start = 0 n tEof = false en, _trans, _keys, _inds, _acts, _nacts = nil to_level = 0 sume = 10 f_trans = 15 ain = 20 st_eof = 30 t = 40 le true _goto_level <= 0 p == pe oto_level = _test_eof xt cs == 0 oto_level = _out xt _goto_level <= _resume ys = cs << 1 ds = _index_offsets[cs] en = _key_spans[cs] de = data[p].ord ans = if ( _slen > 0 && trans_keys[_keys] <= _wide && wide <= _trans_keys[_keys + 1] ) then indicies[ _inds + _wide - _trans_keys[_keys] ] lse indicies[ _inds + _slen ] nd = _trans_targs[_trans] _trans_actions[_trans] != 0 e _trans_actions[_trans] n 2 then gin _id_s = p end n 30 then gin sage_ids.message_ids << chars(data, msg_id_s, p-1).rstrip end n 3 then gin d n 26 then gin d n 15 then gin d n 13 then gin d n 11 then gin d n 8 then gin d n 6 then gin d n 19 then gin d n 17 then gin d n 23 then gin d n 1 then gin gin ack[top] = cs p+= 1 = 196 oto_level = _again xt nd n 29 then gin gin p -= 1 = stack[top] oto_level = _again xt nd n 32 then gin sage_ids.message_ids << chars(data, msg_id_s, p-1).rstrip end gin _id_s = p end n 31 then gin sage_ids.message_ids << chars(data, msg_id_s, p-1).rstrip end gin gin ack[top] = cs p+= 1 = 196 oto_level = _again xt nd n 5 then gin d gin _id_s = p end n 16 then gin d gin d n 12 then gin d gin d n 25 then gin d gin d n 24 then gin d gin d n 4 then gin d gin gin ack[top] = cs p+= 1 = 196 oto_level = _again xt nd n 27 then gin d gin gin ack[top] = cs p+= 1 = 196 oto_level = _again xt nd n 28 then gin d gin gin p -= 1 = stack[top] oto_level = _again xt nd n 14 then gin d gin gin ack[top] = cs p+= 1 = 196 oto_level = _again xt nd n 21 then gin d gin d n 10 then gin d gin d n 9 then gin d gin gin ack[top] = cs p+= 1 = 196 oto_level = _again xt nd n 7 then gin d gin gin ack[top] = cs p+= 1 = 196 oto_level = _again xt nd n 18 then gin d gin d n 22 then gin d gin d gin d n 20 then gin d gin d gin d _goto_level <= _again cs == 0 oto_level = _out xt = 1 p != pe oto_level = _resume xt _goto_level <= _test_eof p == eof ase _eof_actions[cs] n 30 then gin sage_ids.message_ids << chars(data, msg_id_s, p-1).rstrip end n 3 then gin d nd _goto_level <= _out eak if p != eof || cs < 208 raise Mail::Field::IncompleteParseError.new(Mail::MessageIdsElement, data, p) end message_ids end