mail-portertech 2.6.2.edge

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.rdoc +753 -0
  3. data/CONTRIBUTING.md +60 -0
  4. data/Dependencies.txt +2 -0
  5. data/Gemfile +15 -0
  6. data/MIT-LICENSE +20 -0
  7. data/README.md +683 -0
  8. data/Rakefile +29 -0
  9. data/TODO.rdoc +9 -0
  10. data/lib/mail.rb +91 -0
  11. data/lib/mail/attachments_list.rb +104 -0
  12. data/lib/mail/body.rb +291 -0
  13. data/lib/mail/check_delivery_params.rb +20 -0
  14. data/lib/mail/configuration.rb +75 -0
  15. data/lib/mail/core_extensions/nil.rb +19 -0
  16. data/lib/mail/core_extensions/object.rb +13 -0
  17. data/lib/mail/core_extensions/smtp.rb +24 -0
  18. data/lib/mail/core_extensions/string.rb +43 -0
  19. data/lib/mail/core_extensions/string/access.rb +145 -0
  20. data/lib/mail/core_extensions/string/multibyte.rb +78 -0
  21. data/lib/mail/elements.rb +14 -0
  22. data/lib/mail/elements/address.rb +270 -0
  23. data/lib/mail/elements/address_list.rb +51 -0
  24. data/lib/mail/elements/content_disposition_element.rb +26 -0
  25. data/lib/mail/elements/content_location_element.rb +21 -0
  26. data/lib/mail/elements/content_transfer_encoding_element.rb +17 -0
  27. data/lib/mail/elements/content_type_element.rb +31 -0
  28. data/lib/mail/elements/date_time_element.rb +22 -0
  29. data/lib/mail/elements/envelope_from_element.rb +39 -0
  30. data/lib/mail/elements/message_ids_element.rb +24 -0
  31. data/lib/mail/elements/mime_version_element.rb +22 -0
  32. data/lib/mail/elements/phrase_list.rb +16 -0
  33. data/lib/mail/elements/received_element.rb +26 -0
  34. data/lib/mail/encodings.rb +304 -0
  35. data/lib/mail/encodings/7bit.rb +31 -0
  36. data/lib/mail/encodings/8bit.rb +31 -0
  37. data/lib/mail/encodings/base64.rb +33 -0
  38. data/lib/mail/encodings/binary.rb +31 -0
  39. data/lib/mail/encodings/quoted_printable.rb +39 -0
  40. data/lib/mail/encodings/transfer_encoding.rb +58 -0
  41. data/lib/mail/envelope.rb +30 -0
  42. data/lib/mail/field.rb +247 -0
  43. data/lib/mail/field_list.rb +33 -0
  44. data/lib/mail/fields.rb +35 -0
  45. data/lib/mail/fields/bcc_field.rb +56 -0
  46. data/lib/mail/fields/cc_field.rb +55 -0
  47. data/lib/mail/fields/comments_field.rb +41 -0
  48. data/lib/mail/fields/common/address_container.rb +16 -0
  49. data/lib/mail/fields/common/common_address.rb +135 -0
  50. data/lib/mail/fields/common/common_date.rb +35 -0
  51. data/lib/mail/fields/common/common_field.rb +57 -0
  52. data/lib/mail/fields/common/common_message_id.rb +48 -0
  53. data/lib/mail/fields/common/parameter_hash.rb +58 -0
  54. data/lib/mail/fields/content_description_field.rb +19 -0
  55. data/lib/mail/fields/content_disposition_field.rb +70 -0
  56. data/lib/mail/fields/content_id_field.rb +62 -0
  57. data/lib/mail/fields/content_location_field.rb +42 -0
  58. data/lib/mail/fields/content_transfer_encoding_field.rb +44 -0
  59. data/lib/mail/fields/content_type_field.rb +201 -0
  60. data/lib/mail/fields/date_field.rb +57 -0
  61. data/lib/mail/fields/from_field.rb +55 -0
  62. data/lib/mail/fields/in_reply_to_field.rb +56 -0
  63. data/lib/mail/fields/keywords_field.rb +44 -0
  64. data/lib/mail/fields/message_id_field.rb +82 -0
  65. data/lib/mail/fields/mime_version_field.rb +53 -0
  66. data/lib/mail/fields/optional_field.rb +13 -0
  67. data/lib/mail/fields/received_field.rb +75 -0
  68. data/lib/mail/fields/references_field.rb +56 -0
  69. data/lib/mail/fields/reply_to_field.rb +55 -0
  70. data/lib/mail/fields/resent_bcc_field.rb +55 -0
  71. data/lib/mail/fields/resent_cc_field.rb +55 -0
  72. data/lib/mail/fields/resent_date_field.rb +35 -0
  73. data/lib/mail/fields/resent_from_field.rb +55 -0
  74. data/lib/mail/fields/resent_message_id_field.rb +34 -0
  75. data/lib/mail/fields/resent_sender_field.rb +62 -0
  76. data/lib/mail/fields/resent_to_field.rb +55 -0
  77. data/lib/mail/fields/return_path_field.rb +65 -0
  78. data/lib/mail/fields/sender_field.rb +67 -0
  79. data/lib/mail/fields/structured_field.rb +51 -0
  80. data/lib/mail/fields/subject_field.rb +16 -0
  81. data/lib/mail/fields/to_field.rb +55 -0
  82. data/lib/mail/fields/unstructured_field.rb +204 -0
  83. data/lib/mail/header.rb +274 -0
  84. data/lib/mail/indifferent_hash.rb +146 -0
  85. data/lib/mail/mail.rb +267 -0
  86. data/lib/mail/matchers/has_sent_mail.rb +157 -0
  87. data/lib/mail/message.rb +2160 -0
  88. data/lib/mail/multibyte.rb +42 -0
  89. data/lib/mail/multibyte/chars.rb +474 -0
  90. data/lib/mail/multibyte/exceptions.rb +8 -0
  91. data/lib/mail/multibyte/unicode.rb +400 -0
  92. data/lib/mail/multibyte/utils.rb +60 -0
  93. data/lib/mail/network.rb +14 -0
  94. data/lib/mail/network/delivery_methods/exim.rb +52 -0
  95. data/lib/mail/network/delivery_methods/file_delivery.rb +45 -0
  96. data/lib/mail/network/delivery_methods/sendmail.rb +89 -0
  97. data/lib/mail/network/delivery_methods/smtp.rb +142 -0
  98. data/lib/mail/network/delivery_methods/smtp_connection.rb +61 -0
  99. data/lib/mail/network/delivery_methods/test_mailer.rb +44 -0
  100. data/lib/mail/network/retriever_methods/base.rb +63 -0
  101. data/lib/mail/network/retriever_methods/imap.rb +173 -0
  102. data/lib/mail/network/retriever_methods/pop3.rb +140 -0
  103. data/lib/mail/network/retriever_methods/test_retriever.rb +43 -0
  104. data/lib/mail/parsers.rb +26 -0
  105. data/lib/mail/parsers/address_lists_parser.rb +132 -0
  106. data/lib/mail/parsers/content_disposition_parser.rb +67 -0
  107. data/lib/mail/parsers/content_location_parser.rb +35 -0
  108. data/lib/mail/parsers/content_transfer_encoding_parser.rb +33 -0
  109. data/lib/mail/parsers/content_type_parser.rb +64 -0
  110. data/lib/mail/parsers/date_time_parser.rb +36 -0
  111. data/lib/mail/parsers/envelope_from_parser.rb +45 -0
  112. data/lib/mail/parsers/message_ids_parser.rb +39 -0
  113. data/lib/mail/parsers/mime_version_parser.rb +41 -0
  114. data/lib/mail/parsers/phrase_lists_parser.rb +33 -0
  115. data/lib/mail/parsers/ragel.rb +17 -0
  116. data/lib/mail/parsers/ragel/common.rl +184 -0
  117. data/lib/mail/parsers/ragel/date_time.rl +30 -0
  118. data/lib/mail/parsers/ragel/parser_info.rb +61 -0
  119. data/lib/mail/parsers/ragel/ruby.rb +39 -0
  120. data/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb +14864 -0
  121. data/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl +37 -0
  122. data/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb +751 -0
  123. data/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl +37 -0
  124. data/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb +614 -0
  125. data/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl +37 -0
  126. data/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb +447 -0
  127. data/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl +37 -0
  128. data/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb +825 -0
  129. data/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl +37 -0
  130. data/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb +817 -0
  131. data/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl +37 -0
  132. data/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb +2129 -0
  133. data/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl +37 -0
  134. data/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb +1570 -0
  135. data/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl +37 -0
  136. data/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb +440 -0
  137. data/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl +37 -0
  138. data/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb +564 -0
  139. data/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl +37 -0
  140. data/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl +51 -0
  141. data/lib/mail/parsers/ragel/ruby/machines/received_machine.rb +5144 -0
  142. data/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl +37 -0
  143. data/lib/mail/parsers/ragel/ruby/parser.rb.rl.erb +37 -0
  144. data/lib/mail/parsers/received_parser.rb +47 -0
  145. data/lib/mail/part.rb +120 -0
  146. data/lib/mail/parts_list.rb +57 -0
  147. data/lib/mail/patterns.rb +37 -0
  148. data/lib/mail/utilities.rb +225 -0
  149. data/lib/mail/values/unicode_tables.dat +0 -0
  150. data/lib/mail/version.rb +4 -0
  151. data/lib/mail/version_specific/ruby_1_8.rb +119 -0
  152. data/lib/mail/version_specific/ruby_1_9.rb +159 -0
  153. metadata +276 -0
@@ -0,0 +1,37 @@
1
+ %%{
2
+ machine content_disposition;
3
+
4
+ include rb_actions "rb_actions.rl";
5
+ include common "../../common.rl";
6
+
7
+ getkey data_unpacked[p];
8
+
9
+ main := content_disposition;
10
+ }%%
11
+
12
+ module Mail
13
+ module Parsers
14
+ module Ragel
15
+ module ContentDispositionMachine
16
+ %%write data;
17
+
18
+ def self.parse(data)
19
+ p = 0
20
+ eof = data.length
21
+ stack = []
22
+
23
+ actions = []
24
+ data_unpacked = data.bytes.to_a
25
+ %%write init;
26
+ %%write exec;
27
+
28
+ if p == eof && cs >= %%{ write first_final; }%%
29
+ return actions, nil
30
+ else
31
+ return [], "Only able to parse up to #{data[0..p]}"
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,614 @@
1
+
2
+ # line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
3
+
4
+ # line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
5
+
6
+
7
+ module Mail
8
+ module Parsers
9
+ module Ragel
10
+ module ContentLocationMachine
11
+
12
+ # line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
13
+ class << self
14
+ attr_accessor :_content_location_trans_keys
15
+ private :_content_location_trans_keys, :_content_location_trans_keys=
16
+ end
17
+ self._content_location_trans_keys = [
18
+ 0, 0, 9, 126, 10, 10,
19
+ 9, 32, 10, 10, 9,
20
+ 32, 1, 127, 10, 10,
21
+ 9, 32, -128, -1, 10, 10,
22
+ 9, 32, 9, 126, 1,
23
+ 127, 1, 127, 10, 10,
24
+ 9, 32, 0, 127, 9, 126,
25
+ 9, 40, 9, 40, 1,
26
+ 127, 1, 127, 1, 127,
27
+ 1, 127, 9, 126, 0, 0,
28
+ 0
29
+ ]
30
+
31
+ class << self
32
+ attr_accessor :_content_location_key_spans
33
+ private :_content_location_key_spans, :_content_location_key_spans=
34
+ end
35
+ self._content_location_key_spans = [
36
+ 0, 118, 1, 24, 1, 24, 127, 1,
37
+ 24, 128, 1, 24, 118, 127, 127, 1,
38
+ 24, 128, 118, 32, 32, 127, 127, 127,
39
+ 127, 118, 0
40
+ ]
41
+
42
+ class << self
43
+ attr_accessor :_content_location_index_offsets
44
+ private :_content_location_index_offsets, :_content_location_index_offsets=
45
+ end
46
+ self._content_location_index_offsets = [
47
+ 0, 0, 119, 121, 146, 148, 173, 301,
48
+ 303, 328, 457, 459, 484, 603, 731, 859,
49
+ 861, 886, 1015, 1134, 1167, 1200, 1328, 1456,
50
+ 1584, 1712, 1831
51
+ ]
52
+
53
+ class << self
54
+ attr_accessor :_content_location_indicies
55
+ private :_content_location_indicies, :_content_location_indicies=
56
+ end
57
+ self._content_location_indicies = [
58
+ 0, 1, 1, 1, 2, 1, 1, 1,
59
+ 1, 1, 1, 1, 1, 1, 1, 1,
60
+ 1, 1, 1, 1, 1, 1, 1, 0,
61
+ 3, 4, 3, 3, 3, 3, 3, 5,
62
+ 1, 3, 3, 3, 3, 3, 1, 3,
63
+ 3, 3, 3, 3, 3, 3, 3, 3,
64
+ 3, 1, 1, 1, 3, 1, 1, 1,
65
+ 3, 3, 3, 3, 3, 3, 3, 3,
66
+ 3, 3, 3, 3, 3, 3, 3, 3,
67
+ 3, 3, 3, 3, 3, 3, 3, 3,
68
+ 3, 3, 1, 1, 1, 3, 3, 3,
69
+ 3, 3, 3, 3, 3, 3, 3, 3,
70
+ 3, 3, 3, 3, 3, 3, 3, 3,
71
+ 3, 3, 3, 3, 3, 3, 3, 3,
72
+ 3, 3, 3, 3, 3, 3, 1, 6,
73
+ 1, 0, 1, 1, 1, 1, 1, 1,
74
+ 1, 1, 1, 1, 1, 1, 1, 1,
75
+ 1, 1, 1, 1, 1, 1, 1, 1,
76
+ 0, 1, 7, 1, 8, 1, 1, 1,
77
+ 1, 1, 1, 1, 1, 1, 1, 1,
78
+ 1, 1, 1, 1, 1, 1, 1, 1,
79
+ 1, 1, 1, 8, 1, 9, 9, 9,
80
+ 9, 9, 9, 9, 9, 9, 1, 9,
81
+ 9, 10, 9, 9, 9, 9, 9, 9,
82
+ 9, 9, 9, 9, 9, 9, 9, 9,
83
+ 9, 9, 9, 9, 9, 9, 11, 9,
84
+ 9, 9, 9, 9, 9, 9, 9, 9,
85
+ 9, 9, 9, 9, 9, 9, 9, 9,
86
+ 9, 9, 9, 9, 9, 9, 9, 9,
87
+ 9, 9, 9, 9, 9, 9, 9, 9,
88
+ 9, 9, 9, 9, 9, 9, 9, 9,
89
+ 9, 9, 9, 9, 9, 9, 9, 9,
90
+ 9, 9, 9, 9, 9, 9, 9, 9,
91
+ 12, 9, 9, 9, 9, 9, 9, 9,
92
+ 9, 9, 9, 9, 9, 9, 9, 9,
93
+ 9, 9, 9, 9, 9, 9, 9, 9,
94
+ 9, 9, 9, 9, 9, 9, 9, 9,
95
+ 9, 9, 9, 9, 1, 13, 1, 9,
96
+ 1, 1, 1, 1, 1, 1, 1, 1,
97
+ 1, 1, 1, 1, 1, 1, 1, 1,
98
+ 1, 1, 1, 1, 1, 1, 9, 1,
99
+ 1, 1, 1, 1, 1, 1, 1, 1,
100
+ 1, 1, 1, 1, 1, 1, 1, 1,
101
+ 1, 1, 1, 1, 1, 1, 1, 1,
102
+ 1, 1, 1, 1, 1, 1, 1, 1,
103
+ 1, 1, 1, 1, 1, 1, 1, 1,
104
+ 1, 1, 1, 1, 1, 1, 1, 1,
105
+ 1, 1, 1, 1, 1, 1, 1, 1,
106
+ 1, 1, 1, 1, 1, 1, 1, 1,
107
+ 1, 1, 1, 1, 1, 1, 1, 1,
108
+ 1, 1, 1, 1, 1, 1, 1, 1,
109
+ 1, 1, 1, 1, 1, 1, 1, 1,
110
+ 1, 1, 1, 1, 1, 1, 1, 1,
111
+ 1, 1, 1, 1, 1, 1, 1, 1,
112
+ 1, 1, 1, 1, 1, 1, 1, 1,
113
+ 1, 1, 1, 1, 1, 1, 1, 1,
114
+ 1, 1, 1, 1, 1, 1, 1, 1,
115
+ 9, 14, 1, 15, 1, 1, 1, 1,
116
+ 1, 1, 1, 1, 1, 1, 1, 1,
117
+ 1, 1, 1, 1, 1, 1, 1, 1,
118
+ 1, 1, 15, 1, 16, 1, 1, 1,
119
+ 17, 1, 1, 1, 1, 1, 1, 1,
120
+ 1, 1, 1, 1, 1, 1, 1, 1,
121
+ 1, 1, 1, 16, 18, 19, 18, 18,
122
+ 18, 18, 18, 20, 1, 18, 18, 18,
123
+ 18, 18, 1, 18, 18, 18, 18, 18,
124
+ 18, 18, 18, 18, 18, 1, 1, 1,
125
+ 18, 1, 1, 1, 18, 18, 18, 18,
126
+ 18, 18, 18, 18, 18, 18, 18, 18,
127
+ 18, 18, 18, 18, 18, 18, 18, 18,
128
+ 18, 18, 18, 18, 18, 18, 1, 1,
129
+ 1, 18, 18, 18, 18, 18, 18, 18,
130
+ 18, 18, 18, 18, 18, 18, 18, 18,
131
+ 18, 18, 18, 18, 18, 18, 18, 18,
132
+ 18, 18, 18, 18, 18, 18, 18, 18,
133
+ 18, 18, 1, 21, 21, 21, 21, 21,
134
+ 21, 21, 21, 21, 1, 21, 21, 22,
135
+ 21, 21, 21, 21, 21, 21, 21, 21,
136
+ 21, 21, 21, 21, 21, 21, 21, 21,
137
+ 21, 21, 21, 21, 21, 21, 21, 21,
138
+ 21, 21, 23, 24, 21, 21, 21, 21,
139
+ 21, 21, 21, 21, 21, 21, 21, 21,
140
+ 21, 21, 21, 21, 21, 21, 21, 21,
141
+ 21, 21, 21, 21, 21, 21, 21, 21,
142
+ 21, 21, 21, 21, 21, 21, 21, 21,
143
+ 21, 21, 21, 21, 21, 21, 21, 21,
144
+ 21, 21, 21, 21, 21, 21, 25, 21,
145
+ 21, 21, 21, 21, 21, 21, 21, 21,
146
+ 21, 21, 21, 21, 21, 21, 21, 21,
147
+ 21, 21, 21, 21, 21, 21, 21, 21,
148
+ 21, 21, 21, 21, 21, 21, 21, 21,
149
+ 21, 21, 1, 26, 26, 26, 26, 26,
150
+ 26, 26, 26, 26, 1, 26, 26, 27,
151
+ 26, 26, 26, 26, 26, 26, 26, 26,
152
+ 26, 26, 26, 26, 26, 26, 26, 26,
153
+ 26, 26, 26, 26, 26, 26, 26, 26,
154
+ 26, 26, 28, 29, 26, 26, 26, 26,
155
+ 26, 26, 26, 26, 26, 26, 26, 26,
156
+ 26, 26, 26, 26, 26, 26, 26, 26,
157
+ 26, 26, 26, 26, 26, 26, 26, 26,
158
+ 26, 26, 26, 26, 26, 26, 26, 26,
159
+ 26, 26, 26, 26, 26, 26, 26, 26,
160
+ 26, 26, 26, 26, 26, 26, 30, 26,
161
+ 26, 26, 26, 26, 26, 26, 26, 26,
162
+ 26, 26, 26, 26, 26, 26, 26, 26,
163
+ 26, 26, 26, 26, 26, 26, 26, 26,
164
+ 26, 26, 26, 26, 26, 26, 26, 26,
165
+ 26, 26, 1, 31, 1, 26, 1, 1,
166
+ 1, 1, 1, 1, 1, 1, 1, 1,
167
+ 1, 1, 1, 1, 1, 1, 1, 1,
168
+ 1, 1, 1, 1, 26, 1, 26, 26,
169
+ 26, 26, 26, 26, 26, 26, 26, 26,
170
+ 26, 26, 26, 26, 26, 26, 26, 26,
171
+ 26, 26, 26, 26, 26, 26, 26, 26,
172
+ 26, 26, 26, 26, 26, 26, 26, 26,
173
+ 26, 26, 26, 26, 26, 26, 26, 26,
174
+ 26, 26, 26, 26, 26, 26, 26, 26,
175
+ 26, 26, 26, 26, 26, 26, 26, 26,
176
+ 26, 26, 26, 26, 26, 26, 26, 26,
177
+ 26, 26, 26, 26, 26, 26, 26, 26,
178
+ 26, 26, 26, 26, 26, 26, 26, 26,
179
+ 26, 26, 26, 26, 26, 26, 26, 26,
180
+ 26, 26, 26, 26, 26, 26, 26, 26,
181
+ 26, 26, 26, 26, 26, 26, 26, 26,
182
+ 26, 26, 26, 26, 26, 26, 26, 26,
183
+ 26, 26, 26, 26, 26, 26, 26, 26,
184
+ 26, 26, 26, 26, 26, 26, 1, 32,
185
+ 1, 1, 1, 33, 1, 1, 1, 1,
186
+ 1, 1, 1, 1, 1, 1, 1, 1,
187
+ 1, 1, 1, 1, 1, 1, 32, 34,
188
+ 34, 34, 34, 34, 34, 34, 35, 1,
189
+ 34, 34, 34, 34, 34, 1, 34, 34,
190
+ 34, 34, 34, 34, 34, 34, 34, 34,
191
+ 1, 1, 1, 34, 1, 1, 1, 34,
192
+ 34, 34, 34, 34, 34, 34, 34, 34,
193
+ 34, 34, 34, 34, 34, 34, 34, 34,
194
+ 34, 34, 34, 34, 34, 34, 34, 34,
195
+ 34, 1, 1, 1, 34, 34, 34, 34,
196
+ 34, 34, 34, 34, 34, 34, 34, 34,
197
+ 34, 34, 34, 34, 34, 34, 34, 34,
198
+ 34, 34, 34, 34, 34, 34, 34, 34,
199
+ 34, 34, 34, 34, 34, 1, 8, 1,
200
+ 1, 1, 36, 1, 1, 1, 1, 1,
201
+ 1, 1, 1, 1, 1, 1, 1, 1,
202
+ 1, 1, 1, 1, 1, 8, 1, 1,
203
+ 1, 1, 1, 1, 1, 37, 1, 38,
204
+ 1, 1, 1, 39, 1, 1, 1, 1,
205
+ 1, 1, 1, 1, 1, 1, 1, 1,
206
+ 1, 1, 1, 1, 1, 1, 38, 1,
207
+ 1, 1, 1, 1, 1, 1, 40, 1,
208
+ 41, 41, 41, 41, 41, 41, 41, 41,
209
+ 42, 1, 41, 41, 43, 41, 41, 41,
210
+ 41, 41, 41, 41, 41, 41, 41, 41,
211
+ 41, 41, 41, 41, 41, 41, 41, 42,
212
+ 44, 45, 44, 44, 44, 44, 44, 46,
213
+ 41, 44, 44, 44, 44, 44, 41, 44,
214
+ 44, 44, 44, 44, 44, 44, 44, 44,
215
+ 44, 41, 41, 41, 44, 41, 41, 41,
216
+ 44, 44, 44, 44, 44, 44, 44, 44,
217
+ 44, 44, 44, 44, 44, 44, 44, 44,
218
+ 44, 44, 44, 44, 44, 44, 44, 44,
219
+ 44, 44, 41, 47, 41, 44, 44, 44,
220
+ 44, 44, 44, 44, 44, 44, 44, 44,
221
+ 44, 44, 44, 44, 44, 44, 44, 44,
222
+ 44, 44, 44, 44, 44, 44, 44, 44,
223
+ 44, 44, 44, 44, 44, 44, 41, 1,
224
+ 9, 9, 9, 9, 9, 9, 9, 9,
225
+ 15, 1, 9, 9, 48, 9, 9, 9,
226
+ 9, 9, 9, 9, 9, 9, 9, 9,
227
+ 9, 9, 9, 9, 9, 9, 9, 15,
228
+ 9, 11, 9, 9, 9, 9, 9, 49,
229
+ 9, 9, 9, 9, 9, 9, 9, 9,
230
+ 9, 9, 9, 9, 9, 9, 9, 9,
231
+ 9, 9, 9, 9, 9, 9, 9, 9,
232
+ 9, 9, 9, 9, 9, 9, 9, 9,
233
+ 9, 9, 9, 9, 9, 9, 9, 9,
234
+ 9, 9, 9, 9, 9, 9, 9, 9,
235
+ 9, 9, 9, 12, 9, 9, 9, 9,
236
+ 9, 9, 9, 9, 9, 9, 9, 9,
237
+ 9, 9, 9, 9, 9, 9, 9, 9,
238
+ 9, 9, 9, 9, 9, 9, 9, 9,
239
+ 9, 9, 9, 9, 9, 9, 9, 1,
240
+ 9, 9, 9, 9, 9, 9, 9, 9,
241
+ 50, 1, 9, 9, 51, 9, 9, 9,
242
+ 9, 9, 9, 9, 9, 9, 9, 9,
243
+ 9, 9, 9, 9, 9, 9, 9, 50,
244
+ 9, 11, 9, 9, 9, 9, 9, 52,
245
+ 9, 9, 9, 9, 9, 9, 9, 9,
246
+ 9, 9, 9, 9, 9, 9, 9, 9,
247
+ 9, 9, 9, 9, 9, 9, 9, 9,
248
+ 9, 9, 9, 9, 9, 9, 9, 9,
249
+ 9, 9, 9, 9, 9, 9, 9, 9,
250
+ 9, 9, 9, 9, 9, 9, 9, 9,
251
+ 9, 9, 9, 12, 9, 9, 9, 9,
252
+ 9, 9, 9, 9, 9, 9, 9, 9,
253
+ 9, 9, 9, 9, 9, 9, 9, 9,
254
+ 9, 9, 9, 9, 9, 9, 9, 9,
255
+ 9, 9, 9, 9, 9, 9, 9, 1,
256
+ 9, 9, 9, 9, 9, 9, 9, 9,
257
+ 53, 1, 9, 9, 54, 9, 9, 9,
258
+ 9, 9, 9, 9, 9, 9, 9, 9,
259
+ 9, 9, 9, 9, 9, 9, 9, 53,
260
+ 55, 56, 55, 55, 55, 55, 55, 57,
261
+ 9, 55, 55, 55, 55, 55, 9, 55,
262
+ 55, 55, 55, 55, 55, 55, 55, 55,
263
+ 55, 9, 9, 9, 55, 9, 9, 9,
264
+ 55, 55, 55, 55, 55, 55, 55, 55,
265
+ 55, 55, 55, 55, 55, 55, 55, 55,
266
+ 55, 55, 55, 55, 55, 55, 55, 55,
267
+ 55, 55, 9, 12, 9, 55, 55, 55,
268
+ 55, 55, 55, 55, 55, 55, 55, 55,
269
+ 55, 55, 55, 55, 55, 55, 55, 55,
270
+ 55, 55, 55, 55, 55, 55, 55, 55,
271
+ 55, 55, 55, 55, 55, 55, 9, 1,
272
+ 32, 1, 1, 1, 33, 1, 1, 1,
273
+ 1, 1, 1, 1, 1, 1, 1, 1,
274
+ 1, 1, 1, 1, 1, 1, 1, 32,
275
+ 34, 34, 34, 34, 34, 34, 34, 58,
276
+ 1, 34, 34, 34, 34, 34, 1, 34,
277
+ 34, 34, 34, 34, 34, 34, 34, 34,
278
+ 34, 1, 1, 1, 34, 1, 1, 1,
279
+ 34, 34, 34, 34, 34, 34, 34, 34,
280
+ 34, 34, 34, 34, 34, 34, 34, 34,
281
+ 34, 34, 34, 34, 34, 34, 34, 34,
282
+ 34, 34, 1, 1, 1, 34, 34, 34,
283
+ 34, 34, 34, 34, 34, 34, 34, 34,
284
+ 34, 34, 34, 34, 34, 34, 34, 34,
285
+ 34, 34, 34, 34, 34, 34, 34, 34,
286
+ 34, 34, 34, 34, 34, 34, 1, 1,
287
+ 0
288
+ ]
289
+
290
+ class << self
291
+ attr_accessor :_content_location_trans_targs
292
+ private :_content_location_trans_targs, :_content_location_trans_targs=
293
+ end
294
+ self._content_location_trans_targs = [
295
+ 1, 0, 2, 18, 21, 12, 3, 5,
296
+ 19, 6, 7, 19, 9, 8, 11, 22,
297
+ 1, 2, 18, 21, 12, 14, 15, 14,
298
+ 26, 17, 14, 15, 14, 26, 17, 16,
299
+ 19, 4, 18, 20, 4, 20, 19, 4,
300
+ 20, 6, 22, 10, 24, 25, 23, 9,
301
+ 10, 23, 22, 10, 23, 22, 10, 24,
302
+ 25, 23, 20
303
+ ]
304
+
305
+ class << self
306
+ attr_accessor :_content_location_trans_actions
307
+ private :_content_location_trans_actions, :_content_location_trans_actions=
308
+ end
309
+ self._content_location_trans_actions = [
310
+ 0, 0, 0, 1, 1, 2, 0, 0,
311
+ 0, 0, 0, 3, 0, 0, 0, 0,
312
+ 4, 4, 5, 5, 6, 7, 7, 8,
313
+ 9, 7, 0, 0, 2, 10, 0, 0,
314
+ 11, 11, 0, 12, 0, 2, 4, 4,
315
+ 6, 13, 14, 14, 13, 15, 16, 13,
316
+ 0, 2, 4, 4, 6, 11, 11, 0,
317
+ 3, 12, 17
318
+ ]
319
+
320
+ class << self
321
+ attr_accessor :_content_location_eof_actions
322
+ private :_content_location_eof_actions, :_content_location_eof_actions=
323
+ end
324
+ self._content_location_eof_actions = [
325
+ 0, 0, 0, 0, 0, 0, 0, 0,
326
+ 0, 0, 0, 0, 0, 0, 0, 0,
327
+ 0, 0, 11, 0, 4, 11, 0, 4,
328
+ 11, 11, 0
329
+ ]
330
+
331
+ class << self
332
+ attr_accessor :content_location_start
333
+ end
334
+ self.content_location_start = 1;
335
+ class << self
336
+ attr_accessor :content_location_first_final
337
+ end
338
+ self.content_location_first_final = 18;
339
+ class << self
340
+ attr_accessor :content_location_error
341
+ end
342
+ self.content_location_error = 0;
343
+
344
+ class << self
345
+ attr_accessor :content_location_en_comment_tail
346
+ end
347
+ self.content_location_en_comment_tail = 13;
348
+ class << self
349
+ attr_accessor :content_location_en_main
350
+ end
351
+ self.content_location_en_main = 1;
352
+
353
+
354
+ # line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
355
+
356
+ def self.parse(data)
357
+ p = 0
358
+ eof = data.length
359
+ stack = []
360
+
361
+ actions = []
362
+ data_unpacked = data.bytes.to_a
363
+
364
+ # line 365 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
365
+ begin
366
+ p ||= 0
367
+ pe ||= data.length
368
+ cs = content_location_start
369
+ top = 0
370
+ end
371
+
372
+ # line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
373
+
374
+ # line 375 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
375
+ begin
376
+ testEof = false
377
+ _slen, _trans, _keys, _inds, _acts, _nacts = nil
378
+ _goto_level = 0
379
+ _resume = 10
380
+ _eof_trans = 15
381
+ _again = 20
382
+ _test_eof = 30
383
+ _out = 40
384
+ while true
385
+ if _goto_level <= 0
386
+ if p == pe
387
+ _goto_level = _test_eof
388
+ next
389
+ end
390
+ if cs == 0
391
+ _goto_level = _out
392
+ next
393
+ end
394
+ end
395
+ if _goto_level <= _resume
396
+ _keys = cs << 1
397
+ _inds = _content_location_index_offsets[cs]
398
+ _slen = _content_location_key_spans[cs]
399
+ _trans = if ( _slen > 0 &&
400
+ _content_location_trans_keys[_keys] <= ( data_unpacked[p]) &&
401
+ ( data_unpacked[p]) <= _content_location_trans_keys[_keys + 1]
402
+ ) then
403
+ _content_location_indicies[ _inds + ( data_unpacked[p]) - _content_location_trans_keys[_keys] ]
404
+ else
405
+ _content_location_indicies[ _inds + _slen ]
406
+ end
407
+ cs = _content_location_trans_targs[_trans]
408
+ if _content_location_trans_actions[_trans] != 0
409
+ case _content_location_trans_actions[_trans]
410
+ when 4 then
411
+ # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
412
+ begin
413
+ actions.push(4, p) end
414
+ when 7 then
415
+ # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
416
+ begin
417
+ actions.push(5, p) end
418
+ when 3 then
419
+ # line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
420
+ begin
421
+ actions.push(38, p) end
422
+ when 13 then
423
+ # line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
424
+ begin
425
+ actions.push(39, p) end
426
+ when 11 then
427
+ # line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
428
+ begin
429
+ actions.push(46, p) end
430
+ when 1 then
431
+ # line 50 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
432
+ begin
433
+ actions.push(47, p) end
434
+ when 2 then
435
+ # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
436
+ begin
437
+ begin
438
+ stack[top] = cs
439
+ top+= 1
440
+ cs = 13
441
+ _goto_level = _again
442
+ next
443
+ end
444
+ end
445
+ when 10 then
446
+ # line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
447
+ begin
448
+ begin
449
+ top -= 1
450
+ cs = stack[top]
451
+ _goto_level = _again
452
+ next
453
+ end
454
+ end
455
+ when 5 then
456
+ # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
457
+ begin
458
+ actions.push(4, p) end
459
+ # line 50 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
460
+ begin
461
+ actions.push(47, p) end
462
+ when 6 then
463
+ # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
464
+ begin
465
+ actions.push(4, p) end
466
+ # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
467
+ begin
468
+ begin
469
+ stack[top] = cs
470
+ top+= 1
471
+ cs = 13
472
+ _goto_level = _again
473
+ next
474
+ end
475
+ end
476
+ when 8 then
477
+ # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
478
+ begin
479
+ actions.push(5, p) end
480
+ # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
481
+ begin
482
+ begin
483
+ stack[top] = cs
484
+ top+= 1
485
+ cs = 13
486
+ _goto_level = _again
487
+ next
488
+ end
489
+ end
490
+ when 9 then
491
+ # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
492
+ begin
493
+ actions.push(5, p) end
494
+ # line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
495
+ begin
496
+ begin
497
+ top -= 1
498
+ cs = stack[top]
499
+ _goto_level = _again
500
+ next
501
+ end
502
+ end
503
+ when 15 then
504
+ # line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
505
+ begin
506
+ actions.push(39, p) end
507
+ # line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
508
+ begin
509
+ actions.push(38, p) end
510
+ when 14 then
511
+ # line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
512
+ begin
513
+ actions.push(39, p) end
514
+ # line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
515
+ begin
516
+ actions.push(46, p) end
517
+ when 12 then
518
+ # line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
519
+ begin
520
+ actions.push(46, p) end
521
+ # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
522
+ begin
523
+ begin
524
+ stack[top] = cs
525
+ top+= 1
526
+ cs = 13
527
+ _goto_level = _again
528
+ next
529
+ end
530
+ end
531
+ when 17 then
532
+ # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
533
+ begin
534
+ begin
535
+ stack[top] = cs
536
+ top+= 1
537
+ cs = 13
538
+ _goto_level = _again
539
+ next
540
+ end
541
+ end
542
+ # line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
543
+ begin
544
+ actions.push(46, p) end
545
+ when 16 then
546
+ # line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
547
+ begin
548
+ actions.push(39, p) end
549
+ # line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
550
+ begin
551
+ actions.push(46, p) end
552
+ # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
553
+ begin
554
+ begin
555
+ stack[top] = cs
556
+ top+= 1
557
+ cs = 13
558
+ _goto_level = _again
559
+ next
560
+ end
561
+ end
562
+ # line 563 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
563
+ end
564
+ end
565
+ end
566
+ if _goto_level <= _again
567
+ if cs == 0
568
+ _goto_level = _out
569
+ next
570
+ end
571
+ p += 1
572
+ if p != pe
573
+ _goto_level = _resume
574
+ next
575
+ end
576
+ end
577
+ if _goto_level <= _test_eof
578
+ if p == eof
579
+ case _content_location_eof_actions[cs]
580
+ when 4 then
581
+ # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
582
+ begin
583
+ actions.push(4, p) end
584
+ when 11 then
585
+ # line 49 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
586
+ begin
587
+ actions.push(46, p) end
588
+ # line 589 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
589
+ end
590
+ end
591
+
592
+ end
593
+ if _goto_level <= _out
594
+ break
595
+ end
596
+ end
597
+ end
598
+
599
+ # line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
600
+
601
+ if p == eof && cs >=
602
+ # line 603 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb"
603
+ 18
604
+ # line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl"
605
+
606
+ return actions, nil
607
+ else
608
+ return [], "Only able to parse up to #{data[0..p]}"
609
+ end
610
+ end
611
+ end
612
+ end
613
+ end
614
+ end