module Mail::Parsers::Ragel::MessageIdsMachine
Attributes
_message_ids_eof_actions[RW]
_message_ids_index_offsets[RW]
_message_ids_indicies[RW]
_message_ids_key_spans[RW]
_message_ids_trans_actions[RW]
_message_ids_trans_keys[RW]
_message_ids_trans_targs[RW]
message_ids_en_comment_tail[RW]
message_ids_en_main[RW]
message_ids_error[RW]
message_ids_first_final[RW]
message_ids_start[RW]
Public Class Methods
parse(data)
click to toggle source
line 17 “/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl”
# File lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb, line 1215 def self.parse(data) p = 0 eof = data.length stack = [] actions = [] data_unpacked = data.bytes.to_a # line 1224 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb" begin p ||= 0 pe ||= data.length cs = message_ids_start top = 0 end # line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl" # line 1234 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb" begin testEof = false _slen, _trans, _keys, _inds, _acts, _nacts = nil _goto_level = 0 _resume = 10 _eof_trans = 15 _again = 20 _test_eof = 30 _out = 40 while true if _goto_level <= 0 if p == pe _goto_level = _test_eof next end if cs == 0 _goto_level = _out next end end if _goto_level <= _resume _keys = cs << 1 _inds = _message_ids_index_offsets[cs] _slen = _message_ids_key_spans[cs] _trans = if ( _slen > 0 && _message_ids_trans_keys[_keys] <= ( data_unpacked[p]) && ( data_unpacked[p]) <= _message_ids_trans_keys[_keys + 1] ) then _message_ids_indicies[ _inds + ( data_unpacked[p]) - _message_ids_trans_keys[_keys] ] else _message_ids_indicies[ _inds + _slen ] end cs = _message_ids_trans_targs[_trans] if _message_ids_trans_actions[_trans] != 0 case _message_ids_trans_actions[_trans] when 3 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end when 26 then # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(5, p) end when 15 then # line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(12, p) end when 13 then # line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(13, p) end when 11 then # line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(18, p) end when 8 then # line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(19, p) end when 6 then # line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(20, p) end when 23 then # line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(21, p) end when 30 then # line 31 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(28, p) end when 2 then # line 32 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(29, p) end when 19 then # line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(38, p) end when 17 then # line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(39, p) end when 1 then # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 112 _goto_level = _again next end end when 29 then # line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin top -= 1 cs = stack[top] _goto_level = _again next end end when 16 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end # line 15 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(12, p) end when 12 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end # line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(18, p) end when 25 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end # line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(20, p) end when 24 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end # line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(21, p) end when 5 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end # line 32 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(29, p) end when 4 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 112 _goto_level = _again next end end when 27 then # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(5, p) end # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 112 _goto_level = _again next end end when 28 then # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(5, p) end # line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin top -= 1 cs = stack[top] _goto_level = _again next end end when 14 then # line 16 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(13, p) end # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 112 _goto_level = _again next end end when 21 then # line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(18, p) end # line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(21, p) end when 10 then # line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(19, p) end # line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(18, p) end when 9 then # line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(19, p) end # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 112 _goto_level = _again next end end when 7 then # line 23 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(20, p) end # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 112 _goto_level = _again next end end when 32 then # line 31 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(28, p) end # line 32 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(29, p) end when 31 then # line 31 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(28, p) end # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 112 _goto_level = _again next end end when 18 then # line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(39, p) end # line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(38, p) end when 22 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end # line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(18, p) end # line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(21, p) end when 20 then # line 22 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(19, p) end # line 21 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(18, p) end # line 24 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(21, p) end # line 1519 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb" end end end if _goto_level <= _again if cs == 0 _goto_level = _out next end p += 1 if p != pe _goto_level = _resume next end end if _goto_level <= _test_eof if p == eof case _message_ids_eof_actions[cs] when 3 then # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(4, p) end when 30 then # line 31 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(28, p) end # line 1545 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb" end end end if _goto_level <= _out break end end end # line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl" if p == eof && cs >= # line 1559 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb" 117 # line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl" return actions, nil else return [], "Only able to parse up to #{data[0..p]}" end end