Module: Mail::Parsers::Ragel::ContentDispositionMachine
- Defined in:
- lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb
Class Attribute Summary collapse
-
._content_disposition_eof_actions ⇒ Object
Returns the value of attribute _content_disposition_eof_actions.
-
._content_disposition_index_offsets ⇒ Object
Returns the value of attribute _content_disposition_index_offsets.
-
._content_disposition_indicies ⇒ Object
Returns the value of attribute _content_disposition_indicies.
-
._content_disposition_key_spans ⇒ Object
Returns the value of attribute _content_disposition_key_spans.
-
._content_disposition_trans_actions ⇒ Object
Returns the value of attribute _content_disposition_trans_actions.
-
._content_disposition_trans_keys ⇒ Object
Returns the value of attribute _content_disposition_trans_keys.
-
._content_disposition_trans_targs ⇒ Object
Returns the value of attribute _content_disposition_trans_targs.
-
.content_disposition_en_comment_tail ⇒ Object
Returns the value of attribute content_disposition_en_comment_tail.
-
.content_disposition_en_main ⇒ Object
Returns the value of attribute content_disposition_en_main.
-
.content_disposition_error ⇒ Object
Returns the value of attribute content_disposition_error.
-
.content_disposition_first_final ⇒ Object
Returns the value of attribute content_disposition_first_final.
-
.content_disposition_start ⇒ Object
Returns the value of attribute content_disposition_start.
Class Method Summary collapse
-
.parse(data) ⇒ Object
line 17 “/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl”.
Class Attribute Details
._content_disposition_eof_actions ⇒ Object
Returns the value of attribute _content_disposition_eof_actions.
371 372 373 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 371 def _content_disposition_eof_actions @_content_disposition_eof_actions end |
._content_disposition_index_offsets ⇒ Object
Returns the value of attribute _content_disposition_index_offsets.
47 48 49 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 47 def _content_disposition_index_offsets @_content_disposition_index_offsets end |
._content_disposition_indicies ⇒ Object
Returns the value of attribute _content_disposition_indicies.
59 60 61 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 59 def _content_disposition_indicies @_content_disposition_indicies end |
._content_disposition_key_spans ⇒ Object
Returns the value of attribute _content_disposition_key_spans.
35 36 37 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 35 def _content_disposition_key_spans @_content_disposition_key_spans end |
._content_disposition_trans_actions ⇒ Object
Returns the value of attribute _content_disposition_trans_actions.
353 354 355 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 353 def _content_disposition_trans_actions @_content_disposition_trans_actions end |
._content_disposition_trans_keys ⇒ Object
Returns the value of attribute _content_disposition_trans_keys.
14 15 16 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 14 def _content_disposition_trans_keys @_content_disposition_trans_keys end |
._content_disposition_trans_targs ⇒ Object
Returns the value of attribute _content_disposition_trans_targs.
335 336 337 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 335 def _content_disposition_trans_targs @_content_disposition_trans_targs end |
.content_disposition_en_comment_tail ⇒ Object
Returns the value of attribute content_disposition_en_comment_tail.
396 397 398 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 396 def content_disposition_en_comment_tail @content_disposition_en_comment_tail end |
.content_disposition_en_main ⇒ Object
Returns the value of attribute content_disposition_en_main.
400 401 402 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 400 def content_disposition_en_main @content_disposition_en_main end |
.content_disposition_error ⇒ Object
Returns the value of attribute content_disposition_error.
391 392 393 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 391 def content_disposition_error @content_disposition_error end |
.content_disposition_first_final ⇒ Object
Returns the value of attribute content_disposition_first_final.
387 388 389 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 387 def content_disposition_first_final @content_disposition_first_final end |
.content_disposition_start ⇒ Object
Returns the value of attribute content_disposition_start.
383 384 385 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 383 def content_disposition_start @content_disposition_start end |
Class Method Details
.parse(data) ⇒ Object
line 17 “/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl”
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 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 |
# File 'lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb', line 407 def self.parse(data) p = 0 eof = data.length stack = [] actions = [] data_unpacked = data.bytes.to_a # line 416 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb" begin p ||= 0 pe ||= data.length cs = content_disposition_start top = 0 end # line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl" # line 426 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_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 = _content_disposition_index_offsets[cs] _slen = _content_disposition_key_spans[cs] _trans = if ( _slen > 0 && _content_disposition_trans_keys[_keys] <= ( data_unpacked[p]) && ( data_unpacked[p]) <= _content_disposition_trans_keys[_keys + 1] ) then _content_disposition_indicies[ _inds + ( data_unpacked[p]) - _content_disposition_trans_keys[_keys] ] else _content_disposition_indicies[ _inds + _slen ] end cs = _content_disposition_trans_targs[_trans] if _content_disposition_trans_actions[_trans] != 0 case _content_disposition_trans_actions[_trans] when 2 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 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 when 24 then # line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(10, p) end when 17 then # line 14 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(11, p) end when 5 then # line 35 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(32, p) end when 4 then # line 36 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(33, p) end when 19 then # line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(34, p) end when 6 then # line 38 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(35, p) end when 10 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 8 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 = 24 _goto_level = _again next end end when 15 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 11 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 36 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(33, p) end when 21 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 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(34, p) end 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 # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 24 _goto_level = _again next end end when 13 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 = 24 _goto_level = _again next end end when 14 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 25 then # line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(10, 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 = 24 _goto_level = _again next end end when 16 then # line 14 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(11, p) end # line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(10, p) end when 23 then # line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(34, 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 = 24 _goto_level = _again next end end when 7 then # line 38 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(35, 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 = 24 _goto_level = _again next end end when 9 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 20 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 = 24 _goto_level = _again next end end # line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(34, 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 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl" begin begin stack[top] = cs top+= 1 cs = 24 _goto_level = _again next end end # line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(34, p) end when 18 then # line 14 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(11, p) end # line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(10, 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 = 24 _goto_level = _again next end end # line 682 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_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 _content_disposition_eof_actions[cs] when 2 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 24 then # line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(10, p) end when 19 then # line 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(34, p) end when 21 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 37 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(34, p) end when 16 then # line 14 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(11, p) end # line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl" begin actions.push(10, p) end # line 726 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_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/content_disposition_machine.rb.rl" if p == eof && cs >= # line 740 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb" 29 # line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl" return actions, nil else return [], "Only able to parse up to #{data[0..p]}" end end |