mail 2.6.1 → 2.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +5 -5
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +92 -80
  4. data/lib/mail/attachments_list.rb +11 -5
  5. data/lib/mail/body.rb +81 -44
  6. data/lib/mail/check_delivery_params.rb +50 -10
  7. data/lib/mail/configuration.rb +3 -0
  8. data/lib/mail/{patterns.rb → constants.rb} +26 -6
  9. data/lib/mail/core_extensions/smtp.rb +20 -16
  10. data/lib/mail/core_extensions/string.rb +1 -27
  11. data/lib/mail/elements/address.rb +81 -93
  12. data/lib/mail/elements/address_list.rb +12 -29
  13. data/lib/mail/elements/content_disposition_element.rb +9 -15
  14. data/lib/mail/elements/content_location_element.rb +8 -12
  15. data/lib/mail/elements/content_transfer_encoding_element.rb +6 -10
  16. data/lib/mail/elements/content_type_element.rb +9 -19
  17. data/lib/mail/elements/date_time_element.rb +7 -14
  18. data/lib/mail/elements/envelope_from_element.rb +15 -21
  19. data/lib/mail/elements/message_ids_element.rb +12 -14
  20. data/lib/mail/elements/mime_version_element.rb +7 -14
  21. data/lib/mail/elements/phrase_list.rb +7 -9
  22. data/lib/mail/elements/received_element.rb +10 -15
  23. data/lib/mail/elements.rb +1 -0
  24. data/lib/mail/encodings/7bit.rb +6 -15
  25. data/lib/mail/encodings/8bit.rb +5 -18
  26. data/lib/mail/encodings/base64.rb +15 -10
  27. data/lib/mail/encodings/binary.rb +4 -22
  28. data/lib/mail/encodings/identity.rb +24 -0
  29. data/lib/mail/encodings/quoted_printable.rb +13 -7
  30. data/lib/mail/encodings/transfer_encoding.rb +47 -28
  31. data/lib/mail/encodings/unix_to_unix.rb +20 -0
  32. data/lib/mail/encodings.rb +121 -82
  33. data/lib/mail/envelope.rb +2 -1
  34. data/lib/mail/field.rb +114 -62
  35. data/lib/mail/field_list.rb +2 -1
  36. data/lib/mail/fields/bcc_field.rb +17 -5
  37. data/lib/mail/fields/cc_field.rb +2 -2
  38. data/lib/mail/fields/comments_field.rb +2 -1
  39. data/lib/mail/fields/common/address_container.rb +3 -2
  40. data/lib/mail/fields/common/common_address.rb +40 -14
  41. data/lib/mail/fields/common/common_date.rb +2 -1
  42. data/lib/mail/fields/common/common_field.rb +6 -11
  43. data/lib/mail/fields/common/common_message_id.rb +3 -2
  44. data/lib/mail/fields/common/parameter_hash.rb +5 -4
  45. data/lib/mail/fields/content_description_field.rb +2 -1
  46. data/lib/mail/fields/content_disposition_field.rb +14 -13
  47. data/lib/mail/fields/content_id_field.rb +5 -4
  48. data/lib/mail/fields/content_location_field.rb +3 -2
  49. data/lib/mail/fields/content_transfer_encoding_field.rb +3 -2
  50. data/lib/mail/fields/content_type_field.rb +7 -11
  51. data/lib/mail/fields/date_field.rb +4 -4
  52. data/lib/mail/fields/from_field.rb +2 -2
  53. data/lib/mail/fields/in_reply_to_field.rb +2 -1
  54. data/lib/mail/fields/keywords_field.rb +3 -3
  55. data/lib/mail/fields/message_id_field.rb +3 -2
  56. data/lib/mail/fields/mime_version_field.rb +4 -3
  57. data/lib/mail/fields/optional_field.rb +5 -1
  58. data/lib/mail/fields/received_field.rb +5 -4
  59. data/lib/mail/fields/references_field.rb +2 -1
  60. data/lib/mail/fields/reply_to_field.rb +2 -2
  61. data/lib/mail/fields/resent_bcc_field.rb +2 -2
  62. data/lib/mail/fields/resent_cc_field.rb +2 -2
  63. data/lib/mail/fields/resent_date_field.rb +2 -2
  64. data/lib/mail/fields/resent_from_field.rb +2 -2
  65. data/lib/mail/fields/resent_message_id_field.rb +2 -1
  66. data/lib/mail/fields/resent_sender_field.rb +2 -2
  67. data/lib/mail/fields/resent_to_field.rb +2 -2
  68. data/lib/mail/fields/return_path_field.rb +2 -2
  69. data/lib/mail/fields/sender_field.rb +2 -2
  70. data/lib/mail/fields/structured_field.rb +1 -0
  71. data/lib/mail/fields/subject_field.rb +2 -1
  72. data/lib/mail/fields/to_field.rb +2 -2
  73. data/lib/mail/fields/unstructured_field.rb +28 -10
  74. data/lib/mail/fields.rb +1 -0
  75. data/lib/mail/header.rb +18 -14
  76. data/lib/mail/indifferent_hash.rb +1 -0
  77. data/lib/mail/mail.rb +6 -11
  78. data/lib/mail/matchers/attachment_matchers.rb +29 -0
  79. data/lib/mail/matchers/has_sent_mail.rb +53 -9
  80. data/lib/mail/message.rb +99 -89
  81. data/lib/mail/multibyte/chars.rb +32 -30
  82. data/lib/mail/multibyte/unicode.rb +31 -26
  83. data/lib/mail/multibyte/utils.rb +1 -0
  84. data/lib/mail/multibyte.rb +65 -15
  85. data/lib/mail/network/delivery_methods/exim.rb +7 -10
  86. data/lib/mail/network/delivery_methods/file_delivery.rb +5 -8
  87. data/lib/mail/network/delivery_methods/logger_delivery.rb +37 -0
  88. data/lib/mail/network/delivery_methods/sendmail.rb +17 -11
  89. data/lib/mail/network/delivery_methods/smtp.rb +60 -53
  90. data/lib/mail/network/delivery_methods/smtp_connection.rb +11 -6
  91. data/lib/mail/network/delivery_methods/test_mailer.rb +6 -8
  92. data/lib/mail/network/retriever_methods/base.rb +1 -0
  93. data/lib/mail/network/retriever_methods/imap.rb +19 -5
  94. data/lib/mail/network/retriever_methods/pop3.rb +4 -1
  95. data/lib/mail/network/retriever_methods/test_retriever.rb +2 -1
  96. data/lib/mail/network.rb +2 -0
  97. data/lib/mail/parser_tools.rb +15 -0
  98. data/lib/mail/parsers/address_lists_parser.rb +33208 -104
  99. data/lib/mail/parsers/address_lists_parser.rl +172 -0
  100. data/lib/mail/parsers/content_disposition_parser.rb +877 -49
  101. data/lib/mail/parsers/content_disposition_parser.rl +82 -0
  102. data/lib/mail/parsers/content_location_parser.rb +804 -23
  103. data/lib/mail/parsers/content_location_parser.rl +71 -0
  104. data/lib/mail/parsers/content_transfer_encoding_parser.rb +502 -19
  105. data/lib/mail/parsers/content_transfer_encoding_parser.rl +64 -0
  106. data/lib/mail/parsers/content_type_parser.rb +1024 -46
  107. data/lib/mail/parsers/content_type_parser.rl +83 -0
  108. data/lib/mail/parsers/date_time_parser.rb +872 -23
  109. data/lib/mail/parsers/date_time_parser.rl +62 -0
  110. data/lib/mail/parsers/envelope_from_parser.rb +3570 -34
  111. data/lib/mail/parsers/envelope_from_parser.rl +82 -0
  112. data/lib/mail/parsers/message_ids_parser.rb +2840 -25
  113. data/lib/mail/parsers/message_ids_parser.rl +82 -0
  114. data/lib/mail/parsers/mime_version_parser.rb +492 -26
  115. data/lib/mail/parsers/mime_version_parser.rl +61 -0
  116. data/lib/mail/parsers/phrase_lists_parser.rb +862 -17
  117. data/lib/mail/parsers/phrase_lists_parser.rl +83 -0
  118. data/lib/mail/parsers/received_parser.rb +8765 -36
  119. data/lib/mail/parsers/received_parser.rl +84 -0
  120. data/lib/mail/parsers/rfc2045_content_transfer_encoding.rl +13 -0
  121. data/lib/mail/parsers/rfc2045_content_type.rl +25 -0
  122. data/lib/mail/parsers/rfc2045_mime.rl +16 -0
  123. data/lib/mail/parsers/rfc2183_content_disposition.rl +15 -0
  124. data/lib/mail/parsers/rfc3629_utf8.rl +19 -0
  125. data/lib/mail/parsers/rfc5234_abnf_core_rules.rl +22 -0
  126. data/lib/mail/parsers/rfc5322.rl +59 -0
  127. data/lib/mail/parsers/rfc5322_address.rl +72 -0
  128. data/lib/mail/parsers/{ragel/date_time.rl → rfc5322_date_time.rl} +8 -1
  129. data/lib/mail/parsers/rfc5322_lexical_tokens.rl +60 -0
  130. data/lib/mail/parsers.rb +17 -24
  131. data/lib/mail/part.rb +8 -5
  132. data/lib/mail/parts_list.rb +31 -14
  133. data/lib/mail/utilities.rb +112 -13
  134. data/lib/mail/values/unicode_tables.dat +0 -0
  135. data/lib/mail/version.rb +8 -15
  136. data/lib/mail/version_specific/ruby_1_8.rb +52 -8
  137. data/lib/mail/version_specific/ruby_1_9.rb +143 -24
  138. data/lib/mail.rb +8 -14
  139. metadata +71 -81
  140. data/CHANGELOG.rdoc +0 -752
  141. data/CONTRIBUTING.md +0 -60
  142. data/Dependencies.txt +0 -2
  143. data/Gemfile +0 -15
  144. data/Rakefile +0 -29
  145. data/TODO.rdoc +0 -9
  146. data/VERSION +0 -4
  147. data/lib/mail/core_extensions/nil.rb +0 -19
  148. data/lib/mail/core_extensions/object.rb +0 -13
  149. data/lib/mail/core_extensions/string/access.rb +0 -145
  150. data/lib/mail/core_extensions/string/multibyte.rb +0 -78
  151. data/lib/mail/multibyte/exceptions.rb +0 -8
  152. data/lib/mail/parsers/ragel/common.rl +0 -184
  153. data/lib/mail/parsers/ragel/parser_info.rb +0 -61
  154. data/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb +0 -14864
  155. data/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl +0 -37
  156. data/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb +0 -751
  157. data/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl +0 -37
  158. data/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb +0 -614
  159. data/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl +0 -37
  160. data/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb +0 -447
  161. data/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl +0 -37
  162. data/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb +0 -825
  163. data/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl +0 -37
  164. data/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb +0 -817
  165. data/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl +0 -37
  166. data/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb +0 -2129
  167. data/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl +0 -37
  168. data/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb +0 -1570
  169. data/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl +0 -37
  170. data/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb +0 -440
  171. data/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl +0 -37
  172. data/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb +0 -564
  173. data/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl +0 -37
  174. data/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl +0 -51
  175. data/lib/mail/parsers/ragel/ruby/machines/received_machine.rb +0 -5144
  176. data/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl +0 -37
  177. data/lib/mail/parsers/ragel/ruby/parser.rb.rl.erb +0 -37
  178. data/lib/mail/parsers/ragel/ruby.rb +0 -39
  179. data/lib/mail/parsers/ragel.rb +0 -17
@@ -1,35 +1,884 @@
1
+
2
+ # frozen_string_literal: true
3
+ require "mail/utilities"
4
+ require "mail/parser_tools"
5
+
1
6
  module Mail::Parsers
2
- class DateTimeParser
3
- include Mail::Utilities
7
+ module DateTimeParser
8
+ extend Mail::ParserTools
9
+
10
+ DateTimeStruct = Struct.new(:date_string, :time_string, :error)
11
+
12
+ class << self
13
+ attr_accessor :_trans_keys
14
+ private :_trans_keys, :_trans_keys=
15
+ end
16
+ self._trans_keys = [
17
+ 0, 0, 9, 87, 9, 87,
18
+ 10, 10, 9, 32, 9,
19
+ 87, 9, 83, 9, 83,
20
+ 10, 10, 9, 32, 9, 83,
21
+ 112, 117, 114, 114, 9,
22
+ 57, 10, 10, 9, 32,
23
+ 9, 57, 48, 57, 9, 57,
24
+ 9, 57, 10, 10, 9,
25
+ 32, 9, 57, 48, 57,
26
+ 9, 58, 10, 10, 9, 32,
27
+ 9, 58, 9, 57, 10,
28
+ 10, 9, 32, 9, 57,
29
+ 48, 57, 9, 58, 9, 122,
30
+ 10, 10, 9, 32, 9,
31
+ 58, 9, 57, 10, 10,
32
+ 9, 32, 9, 57, 48, 57,
33
+ 9, 40, 9, 122, 10,
34
+ 10, 9, 32, 9, 40,
35
+ 48, 57, 48, 57, 48, 57,
36
+ 48, 57, 10, 10, 9,
37
+ 32, 84, 84, 103, 103,
38
+ 101, 101, 99, 99, 101, 101,
39
+ 98, 98, 97, 117, 110,
40
+ 110, 108, 110, 97, 97,
41
+ 114, 121, 111, 111, 118, 118,
42
+ 99, 99, 116, 116, 101,
43
+ 101, 112, 112, 114, 114,
44
+ 105, 105, 9, 44, 10, 10,
45
+ 9, 32, 9, 44, 9,
46
+ 57, 9, 57, 10, 10,
47
+ 9, 32, 9, 57, 111, 111,
48
+ 110, 110, 97, 117, 116,
49
+ 116, 104, 117, 117, 117,
50
+ 101, 101, 101, 101, 100, 100,
51
+ 1, 244, 1, 244, 10,
52
+ 10, 9, 32, 0, 244,
53
+ 128, 191, 160, 191, 128, 191,
54
+ 128, 159, 144, 191, 128,
55
+ 191, 128, 143, 9, 40,
56
+ 9, 40, 9, 40, 9, 83,
57
+ 9, 77, 9, 84, 0,
58
+ 0, 0,
59
+ ]
60
+
61
+ class << self
62
+ attr_accessor :_key_spans
63
+ private :_key_spans, :_key_spans=
64
+ end
65
+ self._key_spans = [
66
+ 0, 79, 79, 1, 24, 79, 75, 75,
67
+ 1, 24, 75, 6, 1, 49, 1, 24,
68
+ 49, 10, 49, 49, 1, 24, 49, 10,
69
+ 50, 1, 24, 50, 49, 1, 24, 49,
70
+ 10, 50, 114, 1, 24, 50, 49, 1,
71
+ 24, 49, 10, 32, 114, 1, 24, 32,
72
+ 10, 10, 10, 10, 1, 24, 1, 1,
73
+ 1, 1, 1, 1, 21, 1, 3, 1,
74
+ 8, 1, 1, 1, 1, 1, 1, 1,
75
+ 1, 36, 1, 24, 36, 49, 49, 1,
76
+ 24, 49, 1, 1, 21, 1, 14, 1,
77
+ 1, 1, 1, 244, 244, 1, 24, 245,
78
+ 64, 32, 64, 32, 48, 64, 16, 32,
79
+ 32, 32, 75, 69, 76, 0,
80
+ ]
81
+
82
+ class << self
83
+ attr_accessor :_index_offsets
84
+ private :_index_offsets, :_index_offsets=
85
+ end
86
+ self._index_offsets = [
87
+ 0, 0, 80, 160, 162, 187, 267, 343,
88
+ 419, 421, 446, 522, 529, 531, 581, 583,
89
+ 608, 658, 669, 719, 769, 771, 796, 846,
90
+ 857, 908, 910, 935, 986, 1036, 1038, 1063,
91
+ 1113, 1124, 1175, 1290, 1292, 1317, 1368, 1418,
92
+ 1420, 1445, 1495, 1506, 1539, 1654, 1656, 1681,
93
+ 1714, 1725, 1736, 1747, 1758, 1760, 1785, 1787,
94
+ 1789, 1791, 1793, 1795, 1797, 1819, 1821, 1825,
95
+ 1827, 1836, 1838, 1840, 1842, 1844, 1846, 1848,
96
+ 1850, 1852, 1889, 1891, 1916, 1953, 2003, 2053,
97
+ 2055, 2080, 2130, 2132, 2134, 2156, 2158, 2173,
98
+ 2175, 2177, 2179, 2181, 2426, 2671, 2673, 2698,
99
+ 2944, 3009, 3042, 3107, 3140, 3189, 3254, 3271,
100
+ 3304, 3337, 3370, 3446, 3516, 3593,
101
+ ]
102
+
103
+ class << self
104
+ attr_accessor :_indicies
105
+ private :_indicies, :_indicies=
106
+ end
107
+ self._indicies = [
108
+ 0, 1, 1, 1, 2, 1, 1, 1,
109
+ 1, 1, 1, 1, 1, 1, 1, 1,
110
+ 1, 1, 1, 1, 1, 1, 1, 0,
111
+ 1, 1, 1, 1, 1, 1, 1, 3,
112
+ 1, 1, 1, 1, 1, 1, 1, 4,
113
+ 4, 4, 4, 4, 4, 4, 4, 4,
114
+ 4, 1, 1, 1, 1, 1, 1, 1,
115
+ 1, 1, 1, 1, 1, 5, 1, 1,
116
+ 1, 1, 1, 1, 6, 1, 1, 1,
117
+ 1, 1, 7, 8, 1, 1, 9, 1,
118
+ 10, 1, 1, 1, 11, 1, 1, 1,
119
+ 1, 1, 1, 1, 1, 1, 1, 1,
120
+ 1, 1, 1, 1, 1, 1, 1, 10,
121
+ 1, 1, 1, 1, 1, 1, 1, 12,
122
+ 1, 1, 1, 1, 1, 1, 1, 13,
123
+ 13, 13, 13, 13, 13, 13, 13, 13,
124
+ 13, 1, 1, 1, 1, 1, 1, 1,
125
+ 1, 1, 1, 1, 1, 5,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1, 77, 1,
232
+ 1, 1, 1, 1, 1, 1, 1, 1,
233
+ 1, 1, 1, 1, 1, 1, 1, 1,
234
+ 1, 71, 1, 1, 1, 1, 1, 1,
235
+ 1, 78, 1, 1, 1, 1, 1, 1,
236
+ 1, 79, 79, 79, 79, 79, 79, 79,
237
+ 79, 79, 79, 1, 80, 1, 71, 1,
238
+ 1, 1, 1, 1, 1, 1, 1, 1,
239
+ 1, 1, 1, 1, 1, 1, 1, 1,
240
+ 1, 1, 1, 1, 1, 71, 1, 76,
241
+ 1, 1, 1, 81, 1, 1, 1, 1,
242
+ 1, 1, 1, 1, 1, 1, 1, 1,
243
+ 1, 1, 1, 1, 1, 1, 76, 1,
244
+ 1, 1, 1, 1, 1, 1, 82, 1,
245
+ 1, 1, 1, 1, 1, 1, 83, 83,
246
+ 83, 83, 83, 83, 83, 83, 83, 83,
247
+ 1, 84, 84, 84, 84, 84, 84, 84,
248
+ 84, 84, 84, 1, 85, 1, 1, 1,
249
+ 86, 1, 1, 1, 1, 1, 1, 1,
250
+ 1, 1, 1, 1, 1, 1, 1, 1,
251
+ 1, 1, 1, 85, 1, 1, 1, 1,
252
+ 1, 1, 1, 87, 1, 1, 1, 1,
253
+ 1, 1, 1, 1, 1, 1, 1, 1,
254
+ 1, 1, 1, 1, 1, 88, 1, 85,
255
+ 1, 1, 1, 86, 1, 1, 1, 1,
256
+ 1, 1, 1, 1, 1, 1, 1, 1,
257
+ 1, 1, 1, 1, 1, 1, 85, 1,
258
+ 1, 1, 1, 1, 1, 1, 87, 1,
259
+ 1, 89, 1, 89, 1, 1, 1, 1,
260
+ 1, 1, 1, 1, 1, 1, 1, 1,
261
+ 88, 1, 1, 1, 1, 1, 1, 90,
262
+ 90, 91, 90, 91, 90, 92, 90, 90,
263
+ 1, 90, 90, 91, 90, 90, 91, 90,
264
+ 90, 90, 90, 93, 90, 90, 90, 90,
265
+ 90, 1, 1, 1, 1, 1, 1, 90,
266
+ 90, 90, 90, 90, 90, 90, 90, 90,
267
+ 1, 90, 90, 90, 90, 90, 90, 90,
268
+ 90, 90, 90, 90, 90, 90, 90, 90,
269
+ 90, 1, 94, 1, 85, 1, 1, 1,
270
+ 1, 1, 1, 1, 1, 1, 1, 1,
271
+ 1, 1, 1, 1, 1, 1, 1, 1,
272
+ 1, 1, 1, 85, 1, 95, 1, 1,
273
+ 1, 96, 1, 1, 1, 1, 1, 1,
274
+ 1, 1, 1, 1, 1, 1, 1, 1,
275
+ 1, 1, 1, 1, 95, 1, 1, 1,
276
+ 1, 1, 1, 1, 97, 1, 1, 1,
277
+ 1, 1, 1, 1, 1, 1, 1, 1,
278
+ 1, 1, 1, 1, 1, 1, 98, 1,
279
+ 88, 1, 1, 1, 99, 1, 1, 1,
280
+ 1, 1, 1, 1, 1, 1, 1, 1,
281
+ 1, 1, 1, 1, 1, 1, 1, 88,
282
+ 1, 1, 1, 1, 1, 1, 1, 100,
283
+ 1, 1, 1, 1, 1, 1, 1, 101,
284
+ 101, 101, 101, 101, 101, 101, 101, 101,
285
+ 101, 1, 102, 1, 88, 1, 1, 1,
286
+ 1, 1, 1, 1, 1, 1, 1, 1,
287
+ 1, 1, 1, 1, 1, 1, 1, 1,
288
+ 1, 1, 1, 88, 1, 98, 1, 1,
289
+ 1, 103, 1, 1, 1, 1, 1, 1,
290
+ 1, 1, 1, 1, 1, 1, 1, 1,
291
+ 1, 1, 1, 1, 98, 1, 1, 1,
292
+ 1, 1, 1, 1, 104, 1, 1, 1,
293
+ 1, 1, 1, 1, 105, 105, 105, 105,
294
+ 105, 105, 105, 105, 105, 105, 1, 106,
295
+ 106, 106, 106, 106, 106, 106, 106, 106,
296
+ 106, 1, 107, 1, 1, 1, 108, 1,
297
+ 1, 1, 1, 1, 1, 1, 1, 1,
298
+ 1, 1, 1, 1, 1, 1, 1, 1,
299
+ 1, 107, 1, 1, 1, 1, 1, 1,
300
+ 1, 109, 1, 107, 1, 1, 1, 108,
301
+ 1, 1, 1, 1, 1, 1, 1, 1,
302
+ 1, 1, 1, 1, 1, 1, 1, 1,
303
+ 1, 1, 107, 1, 1, 1, 1, 1,
304
+ 1, 1, 109, 1, 1, 89, 1, 89,
305
+ 1, 1, 1, 1, 1, 1, 1, 1,
306
+ 1, 1, 1, 1, 1, 1, 1, 1,
307
+ 1, 1, 1, 90, 90, 91, 90, 91,
308
+ 90, 92, 90, 90, 1, 90, 90, 91,
309
+ 90, 90, 91, 90, 90, 90, 90, 93,
310
+ 90, 90, 90, 90, 90, 1, 1, 1,
311
+ 1, 1, 1, 90, 90, 90, 90, 90,
312
+ 90, 90, 90, 90, 1, 90, 90, 90,
313
+ 90, 90, 90, 90, 90, 90, 90, 90,
314
+ 90, 90, 90, 90, 90, 1, 110, 1,
315
+ 107, 1, 1, 1, 1, 1, 1, 1,
316
+ 1, 1, 1, 1, 1, 1, 1, 1,
317
+ 1, 1, 1, 1, 1, 1, 1, 107,
318
+ 1, 111, 1, 1, 1, 112, 1, 1,
319
+ 1, 1, 1, 1, 1, 1, 1, 1,
320
+ 1, 1, 1, 1, 1, 1, 1, 1,
321
+ 111, 1, 1, 1, 1, 1, 1, 1,
322
+ 113, 1, 114, 114, 114, 114, 114, 114,
323
+ 114, 114, 114, 114, 1, 115, 115, 115,
324
+ 115, 115, 115, 115, 115, 115, 115, 1,
325
+ 116, 116, 116, 116, 116, 116, 116, 116,
326
+ 116, 116, 1, 90, 90, 90, 90, 90,
327
+ 90, 90, 90, 90, 90, 1, 117, 1,
328
+ 118, 1, 1, 1, 1, 1, 1, 1,
329
+ 1, 1, 1, 1, 1, 1, 1, 1,
330
+ 1, 1, 1, 1, 1, 1, 1, 118,
331
+ 1, 90, 1, 49, 1, 119, 1, 49,
332
+ 1, 120, 1, 49, 1, 121, 1, 1,
333
+ 1, 1, 1, 1, 1, 1, 1, 1,
334
+ 1, 1, 1, 1, 1, 1, 1, 1,
335
+ 1, 122, 1, 49, 1, 49, 1, 49,
336
+ 1, 123, 1, 49, 1, 1, 1, 1,
337
+ 1, 1, 49, 1, 124, 1, 49, 1,
338
+ 125, 1, 49, 1, 126, 1, 49, 1,
339
+ 127, 1, 128, 1, 128, 1, 1, 1,
340
+ 129, 1, 1, 1, 1, 1, 1, 1,
341
+ 1, 1, 1, 1, 1, 1, 1, 1,
342
+ 1, 1, 1, 128, 1, 1, 1, 1,
343
+ 1, 1, 1, 130, 1, 1, 1, 131,
344
+ 1, 132, 1, 128, 1, 1, 1, 1,
345
+ 1, 1, 1, 1, 1, 1, 1, 1,
346
+ 1, 1, 1, 1, 1, 1, 1, 1,
347
+ 1, 1, 128, 1, 133, 1, 1, 1,
348
+ 134, 1, 1, 1, 1, 1, 1, 1,
349
+ 1, 1, 1, 1, 1, 1, 1, 1,
350
+ 1, 1, 1, 133, 1, 1, 1, 1,
351
+ 1, 1, 1, 135, 1, 1, 1, 136,
352
+ 1, 137, 1, 1, 1, 138, 1, 1,
353
+ 1, 1, 1, 1, 1, 1, 1, 1,
354
+ 1, 1, 1, 1, 1, 1, 1, 1,
355
+ 137, 1, 1, 1, 1, 1, 1, 1,
356
+ 139, 1, 1, 1, 1, 1, 1, 1,
357
+ 4, 4, 4, 4, 4, 4, 4, 4,
358
+ 4, 4, 1, 140, 1, 1, 1, 141,
359
+ 1, 1, 1, 1, 1, 1, 1, 1,
360
+ 1, 1, 1, 1, 1, 1, 1, 1,
361
+ 1, 1, 140, 1, 1, 1, 1, 1,
362
+ 1, 1, 142, 1, 1, 1, 1, 1,
363
+ 1, 1, 13, 13, 13, 13, 13, 13,
364
+ 13, 13, 13, 13, 1, 143, 1, 140,
365
+ 1, 1, 1, 1, 1, 1, 1, 1,
366
+ 1, 1, 1, 1, 1, 1, 1, 1,
367
+ 1, 1, 1, 1, 1, 1, 140, 1,
368
+ 144, 1, 1, 1, 145, 1, 1, 1,
369
+ 1, 1, 1, 1, 1, 1, 1, 1,
370
+ 1, 1, 1, 1, 1, 1, 1, 144,
371
+ 1, 1, 1, 1, 1, 1, 1, 146,
372
+ 1, 1, 1, 1, 1, 1, 1, 18,
373
+ 18, 18, 18, 18, 18, 18, 18, 18,
374
+ 18, 1, 147, 1, 128, 1, 148, 1,
375
+ 1, 1, 1, 1, 1, 1, 1, 1,
376
+ 1, 1, 1, 1, 1, 1, 1, 1,
377
+ 1, 1, 147, 1, 128, 1, 149, 1,
378
+ 1, 1, 1, 1, 1, 1, 1, 1,
379
+ 1, 1, 1, 150, 1, 128, 1, 128,
380
+ 1, 151, 1, 128, 1, 152, 152, 152,
381
+ 152, 152, 152, 152, 152, 152, 1, 152,
382
+ 152, 153, 152, 152, 152, 152, 152, 152,
383
+ 152, 152, 152, 152, 152, 152, 152, 152,
384
+ 152, 152, 152, 152, 152, 152, 152, 152,
385
+ 152, 152, 152, 152, 154, 155, 152, 152,
386
+ 152, 152, 152, 152, 152, 152, 152, 152,
387
+ 152, 152, 152, 152, 152, 152, 152, 152,
388
+ 152, 152, 152, 152, 152, 152, 152, 152,
389
+ 152, 152, 152, 152, 152, 152, 152, 152,
390
+ 152, 152, 152, 152, 152, 152, 152, 152,
391
+ 152, 152, 152, 152, 152, 152, 152, 152,
392
+ 156, 152, 152, 152, 152, 152, 152, 152,
393
+ 152, 152, 152, 152, 152, 152, 152, 152,
394
+ 152, 152, 152, 152, 152, 152, 152, 152,
395
+ 152, 152, 152, 152, 152, 152, 152, 152,
396
+ 152, 152, 152, 152, 1, 1, 1, 1,
397
+ 1, 1, 1, 1, 1, 1, 1, 1,
398
+ 1, 1, 1, 1, 1, 1, 1, 1,
399
+ 1, 1, 1, 1, 1, 1, 1, 1,
400
+ 1, 1, 1, 1, 1, 1, 1, 1,
401
+ 1, 1, 1, 1, 1, 1, 1, 1,
402
+ 1, 1, 1, 1, 1, 1, 1, 1,
403
+ 1, 1, 1, 1, 1, 1, 1, 1,
404
+ 1, 1, 1, 1, 1, 1, 157, 157,
405
+ 157, 157, 157, 157, 157, 157, 157, 157,
406
+ 157, 157, 157, 157, 157, 157, 157, 157,
407
+ 157, 157, 157, 157, 157, 157, 157, 157,
408
+ 157, 157, 157, 157, 158, 159, 159, 159,
409
+ 159, 159, 159, 159, 159, 159, 159, 159,
410
+ 159, 160, 159, 159, 161, 162, 162, 162,
411
+ 163, 1, 164, 164, 164, 164, 164, 164,
412
+ 164, 164, 164, 1, 164, 164, 165, 164,
413
+ 164, 164, 164, 164, 164, 164, 164, 164,
414
+ 164, 164, 164, 164, 164, 164, 164, 164,
415
+ 164, 164, 164, 164, 164, 164, 164, 164,
416
+ 164, 166, 167, 164, 164, 164, 164, 164,
417
+ 164, 164, 164, 164, 164, 164, 164, 164,
418
+ 164, 164, 164, 164, 164, 164, 164, 164,
419
+ 164, 164, 164, 164, 164, 164, 164, 164,
420
+ 164, 164, 164, 164, 164, 164, 164, 164,
421
+ 164, 164, 164, 164, 164, 164, 164, 164,
422
+ 164, 164, 164, 164, 164, 168, 164, 164,
423
+ 164, 164, 164, 164, 164, 164, 164, 164,
424
+ 164, 164, 164, 164, 164, 164, 164, 164,
425
+ 164, 164, 164, 164, 164, 164, 164, 164,
426
+ 164, 164, 164, 164, 164, 164, 164, 164,
427
+ 164, 1, 1, 1, 1, 1, 1, 1,
428
+ 1, 1, 1, 1, 1, 1, 1, 1,
429
+ 1, 1, 1, 1, 1, 1, 1, 1,
430
+ 1, 1, 1, 1, 1, 1, 1, 1,
431
+ 1, 1, 1, 1, 1, 1, 1, 1,
432
+ 1, 1, 1, 1, 1, 1, 1, 1,
433
+ 1, 1, 1, 1, 1, 1, 1, 1,
434
+ 1, 1, 1, 1, 1, 1, 1, 1,
435
+ 1, 1, 1, 169, 169, 169, 169, 169,
436
+ 169, 169, 169, 169, 169, 169, 169, 169,
437
+ 169, 169, 169, 169, 169, 169, 169, 169,
438
+ 169, 169, 169, 169, 169, 169, 169, 169,
439
+ 169, 170, 171, 171, 171, 171, 171, 171,
440
+ 171, 171, 171, 171, 171, 171, 172, 171,
441
+ 171, 173, 174, 174, 174, 175, 1, 176,
442
+ 1, 164, 1, 1, 1, 1, 1, 1,
443
+ 1, 1, 1, 1, 1, 1, 1, 1,
444
+ 1, 1, 1, 1, 1, 1, 1, 1,
445
+ 164, 1, 164, 164, 164, 164, 164, 164,
446
+ 164, 164, 164, 164, 164, 164, 164, 164,
447
+ 164, 164, 164, 164, 164, 164, 164, 164,
448
+ 164, 164, 164, 164, 164, 164, 164, 164,
449
+ 164, 164, 164, 164, 164, 164, 164, 164,
450
+ 164, 164, 164, 164, 164, 164, 164, 164,
451
+ 164, 164, 164, 164, 164, 164, 164, 164,
452
+ 164, 164, 164, 164, 164, 164, 164, 164,
453
+ 164, 164, 164, 164, 164, 164, 164, 164,
454
+ 164, 164, 164, 164, 164, 164, 164, 164,
455
+ 164, 164, 164, 164, 164, 164, 164, 164,
456
+ 164, 164, 164, 164, 164, 164, 164, 164,
457
+ 164, 164, 164, 164, 164, 164, 164, 164,
458
+ 164, 164, 164, 164, 164, 164, 164, 164,
459
+ 164, 164, 164, 164, 164, 164, 164, 164,
460
+ 164, 164, 164, 164, 164, 164, 164, 164,
461
+ 164, 164, 1, 1, 1, 1, 1, 1,
462
+ 1, 1, 1, 1, 1, 1, 1, 1,
463
+ 1, 1, 1, 1, 1, 1, 1, 1,
464
+ 1, 1, 1, 1, 1, 1, 1, 1,
465
+ 1, 1, 1, 1, 1, 1, 1, 1,
466
+ 1, 1, 1, 1, 1, 1, 1, 1,
467
+ 1, 1, 1, 1, 1, 1, 1, 1,
468
+ 1, 1, 1, 1, 1, 1, 1, 1,
469
+ 1, 1, 1, 1, 169, 169, 169, 169,
470
+ 169, 169, 169, 169, 169, 169, 169, 169,
471
+ 169, 169, 169, 169, 169, 169, 169, 169,
472
+ 169, 169, 169, 169, 169, 169, 169, 169,
473
+ 169, 169, 170, 171, 171, 171, 171, 171,
474
+ 171, 171, 171, 171, 171, 171, 171, 172,
475
+ 171, 171, 173, 174, 174, 174, 175, 1,
476
+ 164, 164, 164, 164, 164, 164, 164, 164,
477
+ 164, 164, 164, 164, 164, 164, 164, 164,
478
+ 164, 164, 164, 164, 164, 164, 164, 164,
479
+ 164, 164, 164, 164, 164, 164, 164, 164,
480
+ 164, 164, 164, 164, 164, 164, 164, 164,
481
+ 164, 164, 164, 164, 164, 164, 164, 164,
482
+ 164, 164, 164, 164, 164, 164, 164, 164,
483
+ 164, 164, 164, 164, 164, 164, 164, 164,
484
+ 1, 169, 169, 169, 169, 169, 169, 169,
485
+ 169, 169, 169, 169, 169, 169, 169, 169,
486
+ 169, 169, 169, 169, 169, 169, 169, 169,
487
+ 169, 169, 169, 169, 169, 169, 169, 169,
488
+ 169, 1, 169, 169, 169, 169, 169, 169,
489
+ 169, 169, 169, 169, 169, 169, 169, 169,
490
+ 169, 169, 169, 169, 169, 169, 169, 169,
491
+ 169, 169, 169, 169, 169, 169, 169, 169,
492
+ 169, 169, 169, 169, 169, 169, 169, 169,
493
+ 169, 169, 169, 169, 169, 169, 169, 169,
494
+ 169, 169, 169, 169, 169, 169, 169, 169,
495
+ 169, 169, 169, 169, 169, 169, 169, 169,
496
+ 169, 169, 1, 169, 169, 169, 169, 169,
497
+ 169, 169, 169, 169, 169, 169, 169, 169,
498
+ 169, 169, 169, 169, 169, 169, 169, 169,
499
+ 169, 169, 169, 169, 169, 169, 169, 169,
500
+ 169, 169, 169, 1, 171, 171, 171, 171,
501
+ 171, 171, 171, 171, 171, 171, 171, 171,
502
+ 171, 171, 171, 171, 171, 171, 171, 171,
503
+ 171, 171, 171, 171, 171, 171, 171, 171,
504
+ 171, 171, 171, 171, 171, 171, 171, 171,
505
+ 171, 171, 171, 171, 171, 171, 171, 171,
506
+ 171, 171, 171, 171, 1, 171, 171, 171,
507
+ 171, 171, 171, 171, 171, 171, 171, 171,
508
+ 171, 171, 171, 171, 171, 171, 171, 171,
509
+ 171, 171, 171, 171, 171, 171, 171, 171,
510
+ 171, 171, 171, 171, 171, 171, 171, 171,
511
+ 171, 171, 171, 171, 171, 171, 171, 171,
512
+ 171, 171, 171, 171, 171, 171, 171, 171,
513
+ 171, 171, 171, 171, 171, 171, 171, 171,
514
+ 171, 171, 171, 171, 171, 1, 171, 171,
515
+ 171, 171, 171, 171, 171, 171, 171, 171,
516
+ 171, 171, 171, 171, 171, 171, 1, 177,
517
+ 1, 1, 1, 178, 1, 1, 1, 1,
518
+ 1, 1, 1, 1, 1, 1, 1, 1,
519
+ 1, 1, 1, 1, 1, 1, 177, 1,
520
+ 1, 1, 1, 1, 1, 1, 179, 1,
521
+ 118, 1, 1, 1, 180, 1, 1, 1,
522
+ 1, 1, 1, 1, 1, 1, 1, 1,
523
+ 1, 1, 1, 1, 1, 1, 1, 118,
524
+ 1, 1, 1, 1, 1, 1, 1, 181,
525
+ 1, 182, 1, 1, 1, 183, 1, 1,
526
+ 1, 1, 1, 1, 1, 1, 1, 1,
527
+ 1, 1, 1, 1, 1, 1, 1, 1,
528
+ 182, 1, 1, 1, 1, 1, 1, 1,
529
+ 184, 1, 177, 1, 1, 1, 178, 1,
530
+ 1, 1, 1, 1, 1, 1, 1, 1,
531
+ 1, 1, 1, 1, 1, 1, 1, 1,
532
+ 1, 177, 1, 1, 1, 1, 1, 1,
533
+ 1, 179, 1, 1, 1, 1, 1, 1,
534
+ 1, 1, 1, 1, 1, 1, 1, 1,
535
+ 1, 1, 1, 1, 1, 1, 1, 1,
536
+ 1, 1, 1, 1, 1, 185, 1, 1,
537
+ 1, 1, 1, 1, 1, 1, 1, 1,
538
+ 1, 1, 1, 1, 185, 1, 177, 1,
539
+ 1, 1, 178, 1, 1, 1, 1, 1,
540
+ 1, 1, 1, 1, 1, 1, 1, 1,
541
+ 1, 1, 1, 1, 1, 177, 1, 1,
542
+ 1, 1, 1, 1, 1, 179, 1, 1,
543
+ 1, 1, 1, 1, 1, 1, 1, 1,
544
+ 1, 1, 1, 1, 1, 1, 1, 1,
545
+ 1, 1, 1, 1, 1, 1, 1, 1,
546
+ 1, 1, 1, 1, 1, 1, 1, 1,
547
+ 1, 1, 185, 1, 177, 1, 1, 1,
548
+ 178, 1, 1, 1, 1, 1, 1, 1,
549
+ 1, 1, 1, 1, 1, 1, 1, 1,
550
+ 1, 1, 1, 177, 1, 1, 1, 1,
551
+ 1, 1, 1, 179, 1, 1, 1, 1,
552
+ 1, 1, 1, 1, 1, 1, 1, 1,
553
+ 1, 1, 1, 1, 1, 1, 1, 1,
554
+ 1, 1, 1, 1, 1, 1, 1, 1,
555
+ 1, 1, 1, 1, 1, 1, 1, 1,
556
+ 1, 1, 1, 1, 1, 1, 1, 90,
557
+ 1, 1, 0,
558
+ ]
559
+
560
+ class << self
561
+ attr_accessor :_trans_targs
562
+ private :_trans_targs, :_trans_targs=
563
+ end
564
+ self._trans_targs = [
565
+ 2, 0, 3, 5, 6, 71, 82, 84,
566
+ 86, 89, 2, 3, 5, 6, 4, 2,
567
+ 3, 5, 6, 71, 82, 84, 86, 89,
568
+ 7, 8, 10, 11, 56, 58, 60, 63,
569
+ 65, 67, 69, 9, 7, 8, 10, 11,
570
+ 56, 58, 60, 63, 65, 67, 69, 12,
571
+ 55, 13, 14, 16, 17, 15, 13, 14,
572
+ 16, 17, 18, 19, 20, 22, 23, 21,
573
+ 19, 20, 22, 23, 24, 25, 27, 28,
574
+ 26, 24, 25, 27, 28, 29, 31, 32,
575
+ 30, 29, 31, 32, 33, 34, 35, 37,
576
+ 38, 48, 103, 106, 107, 108, 36, 34,
577
+ 35, 37, 38, 39, 41, 42, 40, 39,
578
+ 41, 42, 43, 44, 45, 47, 46, 44,
579
+ 45, 47, 49, 50, 51, 53, 104, 57,
580
+ 59, 61, 62, 64, 66, 68, 70, 72,
581
+ 73, 74, 76, 77, 75, 73, 74, 76,
582
+ 77, 78, 79, 81, 78, 79, 81, 80,
583
+ 78, 79, 81, 83, 85, 87, 88, 90,
584
+ 92, 93, 92, 109, 95, 96, 97, 98,
585
+ 99, 100, 101, 102, 92, 93, 92, 109,
586
+ 95, 96, 97, 98, 99, 100, 101, 102,
587
+ 94, 104, 52, 105, 52, 105, 104, 52,
588
+ 105, 54,
589
+ ]
590
+
591
+ class << self
592
+ attr_accessor :_trans_actions
593
+ private :_trans_actions, :_trans_actions=
594
+ end
595
+ self._trans_actions = [
596
+ 1, 0, 1, 2, 1, 0, 0, 0,
597
+ 0, 0, 0, 0, 3, 0, 0, 4,
598
+ 4, 5, 4, 4, 4, 4, 4, 4,
599
+ 0, 0, 3, 0, 0, 0, 0, 0,
600
+ 0, 0, 0, 0, 4, 4, 5, 4,
601
+ 4, 4, 4, 4, 4, 4, 4, 0,
602
+ 0, 0, 0, 3, 0, 0, 4, 4,
603
+ 5, 4, 0, 0, 0, 3, 6, 0,
604
+ 4, 4, 5, 7, 0, 0, 3, 0,
605
+ 0, 4, 4, 5, 4, 0, 3, 0,
606
+ 0, 4, 5, 4, 0, 0, 0, 3,
607
+ 0, 0, 0, 0, 0, 0, 0, 4,
608
+ 4, 5, 4, 0, 3, 0, 0, 4,
609
+ 5, 4, 0, 0, 0, 3, 0, 4,
610
+ 4, 5, 0, 0, 0, 0, 0, 0,
611
+ 0, 0, 0, 0, 0, 0, 0, 0,
612
+ 0, 0, 3, 0, 0, 4, 4, 5,
613
+ 4, 1, 1, 8, 0, 0, 3, 0,
614
+ 4, 4, 5, 0, 0, 0, 0, 0,
615
+ 9, 9, 10, 11, 9, 9, 9, 9,
616
+ 9, 9, 9, 9, 0, 0, 3, 12,
617
+ 0, 0, 0, 0, 0, 0, 0, 0,
618
+ 0, 13, 13, 14, 0, 3, 4, 4,
619
+ 5, 0,
620
+ ]
621
+
622
+ class << self
623
+ attr_accessor :_eof_actions
624
+ private :_eof_actions, :_eof_actions=
625
+ end
626
+ self._eof_actions = [
627
+ 0, 0, 0, 0, 0, 0, 0, 0,
628
+ 0, 0, 0, 0, 0, 0, 0, 0,
629
+ 0, 0, 0, 0, 0, 0, 0, 0,
630
+ 0, 0, 0, 0, 0, 0, 0, 0,
631
+ 0, 0, 0, 0, 0, 0, 0, 0,
632
+ 0, 0, 0, 0, 0, 0, 0, 0,
633
+ 0, 0, 0, 0, 0, 0, 0, 0,
634
+ 0, 0, 0, 0, 0, 0, 0, 0,
635
+ 0, 0, 0, 0, 0, 0, 0, 0,
636
+ 0, 0, 0, 0, 0, 0, 0, 0,
637
+ 0, 0, 0, 0, 0, 0, 0, 0,
638
+ 0, 0, 0, 0, 0, 0, 0, 0,
639
+ 0, 0, 0, 0, 0, 0, 0, 13,
640
+ 0, 4, 13, 13, 13, 0,
641
+ ]
642
+
643
+ class << self
644
+ attr_accessor :start
645
+ end
646
+ self.start = 1
647
+ class << self
648
+ attr_accessor :first_final
649
+ end
650
+ self.first_final = 103
651
+ class << self
652
+ attr_accessor :error
653
+ end
654
+ self.error = 0
655
+
656
+ class << self
657
+ attr_accessor :en_comment_tail
658
+ end
659
+ self.en_comment_tail = 91
660
+ class << self
661
+ attr_accessor :en_main
662
+ end
663
+ self.en_main = 1
664
+
665
+ def self.parse(data)
666
+ data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)
667
+
668
+ raise Mail::Field::NilParseError.new(Mail::DateTimeElement) if data.nil?
4
669
 
5
- def parse(s)
6
670
  date_time = DateTimeStruct.new([])
7
671
 
8
- actions, error = Ragel.parse(:date_time, s)
9
- if error
10
- raise Mail::Field::ParseError.new(Mail::DateTimeElement, s, error)
672
+ # Parser state
673
+ date_s = time_s = nil
674
+
675
+ # 5.1 Variables Used by Ragel
676
+ p = 0
677
+ eof = pe = data.length
678
+ stack = []
679
+
680
+ begin
681
+ p ||= 0
682
+ pe ||= data.length
683
+ cs = start
684
+ top = 0
11
685
  end
12
686
 
13
- date_s = time_s = nil
14
- actions.each_slice(2) do |action_id, p|
15
- action = Mail::Parsers::Ragel::ACTIONS[action_id]
16
- case action
17
-
18
- # Date
19
- when :date_s then date_s = p
20
- when :date_e
21
- date_time.date_string = s[date_s..(p-1)]
22
-
23
- # Time
24
- when :time_s then time_s = p
25
- when :time_e
26
- date_time.time_string = s[time_s..(p-1)]
27
-
28
- else
29
- raise Mail::Field::ParseError.new(Mail::DateTimeElement, s, "Failed to process unknown action: #{action}")
687
+ begin
688
+ testEof = false
689
+ _slen, _trans, _keys, _inds, _acts, _nacts = nil
690
+ _goto_level = 0
691
+ _resume = 10
692
+ _eof_trans = 15
693
+ _again = 20
694
+ _test_eof = 30
695
+ _out = 40
696
+ while true
697
+ if _goto_level <= 0
698
+ if p == pe
699
+ _goto_level = _test_eof
700
+ next
701
+ end
702
+ if cs == 0
703
+ _goto_level = _out
704
+ next
705
+ end
706
+ end
707
+ if _goto_level <= _resume
708
+ _keys = cs << 1
709
+ _inds = _index_offsets[cs]
710
+ _slen = _key_spans[cs]
711
+ _wide = data[p].ord
712
+ _trans = if (_slen > 0 &&
713
+ _trans_keys[_keys] <= _wide &&
714
+ _wide <= _trans_keys[_keys + 1])
715
+ _indicies[_inds + _wide - _trans_keys[_keys]]
716
+ else
717
+ _indicies[_inds + _slen]
718
+ end
719
+ cs = _trans_targs[_trans]
720
+ if _trans_actions[_trans] != 0
721
+ case _trans_actions[_trans]
722
+ when 1
723
+ begin
724
+ date_s = p
725
+ end
726
+ when 13
727
+ begin
728
+ date_time.time_string = chars(data, time_s, p - 1)
729
+ end
730
+ when 9
731
+ begin
732
+ end
733
+ when 4
734
+ begin
735
+ end
736
+ when 3
737
+ begin
738
+ begin
739
+ stack[top] = cs
740
+ top += 1
741
+ cs = 91
742
+ _goto_level = _again
743
+ next
744
+ end
745
+ end
746
+ when 12
747
+ begin
748
+ begin
749
+ top -= 1
750
+ cs = stack[top]
751
+ _goto_level = _again
752
+ next
753
+ end
754
+ end
755
+ when 8
756
+ begin
757
+ date_s = p
758
+ end
759
+ begin
760
+ begin
761
+ stack[top] = cs
762
+ top += 1
763
+ cs = 91
764
+ _goto_level = _again
765
+ next
766
+ end
767
+ end
768
+ when 6
769
+ begin
770
+ date_time.date_string = chars(data, date_s, p - 1)
771
+ end
772
+ begin
773
+ time_s = p
774
+ end
775
+ when 14
776
+ begin
777
+ date_time.time_string = chars(data, time_s, p - 1)
778
+ end
779
+ begin
780
+ begin
781
+ stack[top] = cs
782
+ top += 1
783
+ cs = 91
784
+ _goto_level = _again
785
+ next
786
+ end
787
+ end
788
+ when 10
789
+ begin
790
+ end
791
+ begin
792
+ begin
793
+ stack[top] = cs
794
+ top += 1
795
+ cs = 91
796
+ _goto_level = _again
797
+ next
798
+ end
799
+ end
800
+ when 11
801
+ begin
802
+ end
803
+ begin
804
+ begin
805
+ top -= 1
806
+ cs = stack[top]
807
+ _goto_level = _again
808
+ next
809
+ end
810
+ end
811
+ when 5
812
+ begin
813
+ end
814
+ begin
815
+ begin
816
+ stack[top] = cs
817
+ top += 1
818
+ cs = 91
819
+ _goto_level = _again
820
+ next
821
+ end
822
+ end
823
+ when 2
824
+ begin
825
+ begin
826
+ stack[top] = cs
827
+ top += 1
828
+ cs = 91
829
+ _goto_level = _again
830
+ next
831
+ end
832
+ end
833
+ begin
834
+ date_s = p
835
+ end
836
+ when 7
837
+ begin
838
+ end
839
+ begin
840
+ date_time.date_string = chars(data, date_s, p - 1)
841
+ end
842
+ begin
843
+ time_s = p
844
+ end
845
+ end
846
+ end
847
+ end
848
+ if _goto_level <= _again
849
+ if cs == 0
850
+ _goto_level = _out
851
+ next
852
+ end
853
+ p += 1
854
+ if p != pe
855
+ _goto_level = _resume
856
+ next
857
+ end
858
+ end
859
+ if _goto_level <= _test_eof
860
+ if p == eof
861
+ case _eof_actions[cs]
862
+ when 13
863
+ begin
864
+ date_time.time_string = chars(data, time_s, p - 1)
865
+ end
866
+ when 4
867
+ begin
868
+ end
869
+ end
870
+ end
871
+ end
872
+ if _goto_level <= _out
873
+ break
874
+ end
30
875
  end
31
876
  end
32
877
 
878
+ if p != eof || cs < 103
879
+ raise Mail::Field::IncompleteParseError.new(Mail::DateTimeElement, data, p)
880
+ end
881
+
33
882
  date_time
34
883
  end
35
884
  end