Module: Mail::Parsers::Ragel::MimeVersionMachine
- Defined in:
- lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb
Class Attribute Summary collapse
-
._mime_version_eof_actions ⇒ Object
Returns the value of attribute _mime_version_eof_actions.
-
._mime_version_index_offsets ⇒ Object
Returns the value of attribute _mime_version_index_offsets.
-
._mime_version_indicies ⇒ Object
Returns the value of attribute _mime_version_indicies.
-
._mime_version_key_spans ⇒ Object
Returns the value of attribute _mime_version_key_spans.
-
._mime_version_trans_actions ⇒ Object
Returns the value of attribute _mime_version_trans_actions.
-
._mime_version_trans_keys ⇒ Object
Returns the value of attribute _mime_version_trans_keys.
-
._mime_version_trans_targs ⇒ Object
Returns the value of attribute _mime_version_trans_targs.
-
.mime_version_en_comment_tail ⇒ Object
Returns the value of attribute mime_version_en_comment_tail.
-
.mime_version_en_main ⇒ Object
Returns the value of attribute mime_version_en_main.
-
.mime_version_error ⇒ Object
Returns the value of attribute mime_version_error.
-
.mime_version_first_final ⇒ Object
Returns the value of attribute mime_version_first_final.
-
.mime_version_start ⇒ Object
Returns the value of attribute mime_version_start.
Class Method Summary collapse
-
.parse(data) ⇒ Object
line 17 “/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl”.
Class Attribute Details
._mime_version_eof_actions ⇒ Object
Returns the value of attribute _mime_version_eof_actions.
172 173 174 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 172 def _mime_version_eof_actions @_mime_version_eof_actions end |
._mime_version_index_offsets ⇒ Object
Returns the value of attribute _mime_version_index_offsets.
39 40 41 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 39 def _mime_version_index_offsets @_mime_version_index_offsets end |
._mime_version_indicies ⇒ Object
Returns the value of attribute _mime_version_indicies.
49 50 51 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 49 def _mime_version_indicies @_mime_version_indicies end |
._mime_version_key_spans ⇒ Object
Returns the value of attribute _mime_version_key_spans.
29 30 31 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 29 def _mime_version_key_spans @_mime_version_key_spans end |
._mime_version_trans_actions ⇒ Object
Returns the value of attribute _mime_version_trans_actions.
160 161 162 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 160 def _mime_version_trans_actions @_mime_version_trans_actions end |
._mime_version_trans_keys ⇒ Object
Returns the value of attribute _mime_version_trans_keys.
14 15 16 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 14 def _mime_version_trans_keys @_mime_version_trans_keys end |
._mime_version_trans_targs ⇒ Object
Returns the value of attribute _mime_version_trans_targs.
148 149 150 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 148 def _mime_version_trans_targs @_mime_version_trans_targs end |
.mime_version_en_comment_tail ⇒ Object
Returns the value of attribute mime_version_en_comment_tail.
195 196 197 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 195 def mime_version_en_comment_tail @mime_version_en_comment_tail end |
.mime_version_en_main ⇒ Object
Returns the value of attribute mime_version_en_main.
199 200 201 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 199 def mime_version_en_main @mime_version_en_main end |
.mime_version_error ⇒ Object
Returns the value of attribute mime_version_error.
190 191 192 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 190 def mime_version_error @mime_version_error end |
.mime_version_first_final ⇒ Object
Returns the value of attribute mime_version_first_final.
186 187 188 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 186 def mime_version_first_final @mime_version_first_final end |
.mime_version_start ⇒ Object
Returns the value of attribute mime_version_start.
182 183 184 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 182 def mime_version_start @mime_version_start end |
Class Method Details
.parse(data) ⇒ Object
line 17 “/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl”
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb', line 206 def self.parse(data) p = 0 eof = data.length stack = [] actions = [] data_unpacked = data.bytes.to_a # line 215 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb" begin p ||= 0 pe ||= data.length cs = mime_version_start top = 0 end # line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl" # line 225 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_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 = _mime_version_index_offsets[cs] _slen = _mime_version_key_spans[cs] _trans = if ( _slen > 0 && _mime_version_trans_keys[_keys] <= ( data_unpacked[p]) && ( data_unpacked[p]) <= _mime_version_trans_keys[_keys + 1] ) then _mime_version_indicies[ _inds + ( data_unpacked[p]) - _mime_version_trans_keys[_keys] ] else _mime_version_indicies[ _inds + _slen ] end cs = _mime_version_trans_targs[_trans] if _mime_version_trans_actions[_trans] != 0 case _mime_version_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 10 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 7 then # line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(24, p) end when 2 then # line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(25, p) end when 14 then # line 29 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(26, p) end when 8 then # line 30 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(27, 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 = 11 _goto_level = _again next end end when 13 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 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 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(25, p) end when 9 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 30 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(27, 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 = 11 _goto_level = _again next end end when 11 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 = 11 _goto_level = _again next end end when 12 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 6 then # line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(24, 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 = 11 _goto_level = _again next end end when 15 then # line 29 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(26, 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 = 11 _goto_level = _again next end end # line 389 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_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 _mime_version_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 14 then # line 29 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(26, p) end # line 415 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_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/mime_version_machine.rb.rl" if p == eof && cs >= # line 429 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb" 16 # line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl" return actions, nil else return [], "Only able to parse up to #{data[0..p]}" end end |