mail 2.6.6 → 2.7.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +25 -6
  3. data/Dependencies.txt +0 -1
  4. data/Gemfile +5 -8
  5. data/MIT-LICENSE +1 -1
  6. data/README.md +22 -11
  7. data/Rakefile +0 -6
  8. data/lib/mail.rb +2 -10
  9. data/lib/mail/attachments_list.rb +3 -2
  10. data/lib/mail/body.rb +3 -3
  11. data/lib/mail/core_extensions/smtp.rb +19 -16
  12. data/lib/mail/core_extensions/string.rb +0 -4
  13. data/lib/mail/elements/address.rb +9 -4
  14. data/lib/mail/elements/address_list.rb +10 -18
  15. data/lib/mail/elements/content_disposition_element.rb +8 -15
  16. data/lib/mail/elements/content_location_element.rb +5 -10
  17. data/lib/mail/elements/content_transfer_encoding_element.rb +5 -10
  18. data/lib/mail/elements/content_type_element.rb +8 -19
  19. data/lib/mail/elements/date_time_element.rb +6 -14
  20. data/lib/mail/elements/envelope_from_element.rb +14 -21
  21. data/lib/mail/elements/message_ids_element.rb +8 -12
  22. data/lib/mail/elements/mime_version_element.rb +6 -14
  23. data/lib/mail/elements/phrase_list.rb +6 -9
  24. data/lib/mail/elements/received_element.rb +9 -15
  25. data/lib/mail/encodings.rb +12 -14
  26. data/lib/mail/field.rb +7 -4
  27. data/lib/mail/fields/common/parameter_hash.rb +1 -1
  28. data/lib/mail/fields/content_type_field.rb +2 -7
  29. data/lib/mail/fields/unstructured_field.rb +2 -2
  30. data/lib/mail/header.rb +1 -0
  31. data/lib/mail/message.rb +23 -25
  32. data/lib/mail/multibyte.rb +51 -0
  33. data/lib/mail/multibyte/chars.rb +27 -27
  34. data/lib/mail/network/delivery_methods/exim.rb +10 -6
  35. data/lib/mail/network/delivery_methods/sendmail.rb +2 -6
  36. data/lib/mail/network/delivery_methods/smtp.rb +14 -6
  37. data/lib/mail/parsers.rb +16 -24
  38. data/lib/mail/parsers/address_lists_parser.rb +15321 -112
  39. data/lib/mail/parsers/address_lists_parser.rl +166 -0
  40. data/lib/mail/parsers/content_disposition_parser.rb +698 -55
  41. data/lib/mail/parsers/content_disposition_parser.rl +76 -0
  42. data/lib/mail/parsers/content_location_parser.rb +565 -23
  43. data/lib/mail/parsers/content_location_parser.rl +65 -0
  44. data/lib/mail/parsers/content_transfer_encoding_parser.rb +410 -22
  45. data/lib/mail/parsers/content_transfer_encoding_parser.rl +58 -0
  46. data/lib/mail/parsers/content_type_parser.rb +841 -54
  47. data/lib/mail/parsers/content_type_parser.rl +77 -0
  48. data/lib/mail/parsers/date_time_parser.rb +773 -26
  49. data/lib/mail/parsers/date_time_parser.rl +56 -0
  50. data/lib/mail/parsers/envelope_from_parser.rb +2051 -36
  51. data/lib/mail/parsers/envelope_from_parser.rl +76 -0
  52. data/lib/mail/parsers/message_ids_parser.rb +1494 -25
  53. data/lib/mail/parsers/message_ids_parser.rl +76 -0
  54. data/lib/mail/parsers/mime_version_parser.rb +393 -26
  55. data/lib/mail/parsers/mime_version_parser.rl +55 -0
  56. data/lib/mail/parsers/phrase_lists_parser.rb +529 -19
  57. data/lib/mail/parsers/phrase_lists_parser.rl +77 -0
  58. data/lib/mail/parsers/received_parser.rb +4711 -38
  59. data/lib/mail/parsers/received_parser.rl +78 -0
  60. data/lib/mail/parsers/rfc2045_content_transfer_encoding.rl +12 -0
  61. data/lib/mail/parsers/rfc2045_content_type.rl +24 -0
  62. data/lib/mail/parsers/rfc2045_mime.rl +15 -0
  63. data/lib/mail/parsers/rfc2183_content_disposition.rl +14 -0
  64. data/lib/mail/parsers/rfc5234_abnf_core_rules.rl +16 -0
  65. data/lib/mail/parsers/rfc5322.rl +57 -0
  66. data/lib/mail/parsers/rfc5322_address.rl +70 -0
  67. data/lib/mail/parsers/{ragel/date_time.rl → rfc5322_date_time.rl} +7 -1
  68. data/lib/mail/parsers/rfc5322_lexical_tokens.rl +56 -0
  69. data/lib/mail/part.rb +1 -1
  70. data/lib/mail/parts_list.rb +5 -6
  71. data/lib/mail/utilities.rb +4 -2
  72. data/lib/mail/version.rb +3 -3
  73. data/lib/mail/version_specific/ruby_1_8.rb +28 -2
  74. data/lib/mail/version_specific/ruby_1_9.rb +48 -8
  75. metadata +28 -45
  76. data/lib/mail/core_extensions/string/access.rb +0 -146
  77. data/lib/mail/core_extensions/string/multibyte.rb +0 -79
  78. data/lib/mail/parsers/ragel.rb +0 -18
  79. data/lib/mail/parsers/ragel/common.rl +0 -185
  80. data/lib/mail/parsers/ragel/parser_info.rb +0 -61
  81. data/lib/mail/parsers/ragel/ruby.rb +0 -40
  82. data/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb +0 -14864
  83. data/lib/mail/parsers/ragel/ruby/machines/address_lists_machine.rb.rl +0 -37
  84. data/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb +0 -751
  85. data/lib/mail/parsers/ragel/ruby/machines/content_disposition_machine.rb.rl +0 -37
  86. data/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb +0 -614
  87. data/lib/mail/parsers/ragel/ruby/machines/content_location_machine.rb.rl +0 -37
  88. data/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb +0 -447
  89. data/lib/mail/parsers/ragel/ruby/machines/content_transfer_encoding_machine.rb.rl +0 -37
  90. data/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb +0 -825
  91. data/lib/mail/parsers/ragel/ruby/machines/content_type_machine.rb.rl +0 -37
  92. data/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb +0 -817
  93. data/lib/mail/parsers/ragel/ruby/machines/date_time_machine.rb.rl +0 -37
  94. data/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb +0 -2149
  95. data/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl +0 -37
  96. data/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb +0 -1570
  97. data/lib/mail/parsers/ragel/ruby/machines/message_ids_machine.rb.rl +0 -37
  98. data/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb +0 -440
  99. data/lib/mail/parsers/ragel/ruby/machines/mime_version_machine.rb.rl +0 -37
  100. data/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb +0 -564
  101. data/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl +0 -37
  102. data/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl +0 -51
  103. data/lib/mail/parsers/ragel/ruby/machines/received_machine.rb +0 -5144
  104. data/lib/mail/parsers/ragel/ruby/machines/received_machine.rb.rl +0 -37
  105. data/lib/mail/parsers/ragel/ruby/parser.rb.rl.erb +0 -37
@@ -1,37 +0,0 @@
1
- %%{
2
- machine mime_version;
3
-
4
- include rb_actions "rb_actions.rl";
5
- include common "../../common.rl";
6
-
7
- getkey data_unpacked[p];
8
-
9
- main := mime_version;
10
- }%%
11
-
12
- module Mail
13
- module Parsers
14
- module Ragel
15
- module MimeVersionMachine
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
@@ -1,564 +0,0 @@
1
-
2
- # line 1 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
3
-
4
- # line 10 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
5
-
6
-
7
- module Mail
8
- module Parsers
9
- module Ragel
10
- module PhraseListsMachine
11
-
12
- # line 13 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
13
- class << self
14
- attr_accessor :_phrase_lists_trans_keys
15
- private :_phrase_lists_trans_keys, :_phrase_lists_trans_keys=
16
- end
17
- self._phrase_lists_trans_keys = [
18
- 0, 0, 9, 126, 9, 126,
19
- 10, 10, 9, 32, 10,
20
- 10, 9, 32, 1, 127,
21
- 1, 127, 10, 10, 9, 32,
22
- -128, -1, 9, 126, 10,
23
- 10, 9, 32, 9, 126,
24
- 1, 127, 1, 127, 10, 10,
25
- 9, 32, -128, -1, 9,
26
- 126, 9, 126, 9, 126,
27
- 0, 0, 0
28
- ]
29
-
30
- class << self
31
- attr_accessor :_phrase_lists_key_spans
32
- private :_phrase_lists_key_spans, :_phrase_lists_key_spans=
33
- end
34
- self._phrase_lists_key_spans = [
35
- 0, 118, 118, 1, 24, 1, 24, 127,
36
- 127, 1, 24, 128, 118, 1, 24, 118,
37
- 127, 127, 1, 24, 128, 118, 118, 118,
38
- 0
39
- ]
40
-
41
- class << self
42
- attr_accessor :_phrase_lists_index_offsets
43
- private :_phrase_lists_index_offsets, :_phrase_lists_index_offsets=
44
- end
45
- self._phrase_lists_index_offsets = [
46
- 0, 0, 119, 238, 240, 265, 267, 292,
47
- 420, 548, 550, 575, 704, 823, 825, 850,
48
- 969, 1097, 1225, 1227, 1252, 1381, 1500, 1619,
49
- 1738
50
- ]
51
-
52
- class << self
53
- attr_accessor :_phrase_lists_indicies
54
- private :_phrase_lists_indicies, :_phrase_lists_indicies=
55
- end
56
- self._phrase_lists_indicies = [
57
- 0, 1, 1, 1, 2, 1, 1, 1,
58
- 1, 1, 1, 1, 1, 1, 1, 1,
59
- 1, 1, 1, 1, 1, 1, 1, 0,
60
- 3, 4, 3, 3, 3, 3, 3, 5,
61
- 1, 3, 3, 1, 3, 6, 3, 3,
62
- 3, 3, 3, 3, 3, 3, 3, 3,
63
- 3, 1, 1, 1, 3, 1, 3, 6,
64
- 3, 3, 3, 3, 3, 3, 3, 3,
65
- 3, 3, 3, 3, 3, 3, 3, 3,
66
- 3, 3, 3, 3, 3, 3, 3, 3,
67
- 3, 3, 1, 1, 1, 3, 3, 3,
68
- 3, 3, 3, 3, 3, 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, 1, 7,
72
- 1, 1, 1, 8, 1, 1, 1, 1,
73
- 1, 1, 1, 1, 1, 1, 1, 1,
74
- 1, 1, 1, 1, 1, 1, 7, 9,
75
- 10, 9, 9, 9, 9, 9, 11, 1,
76
- 9, 9, 1, 9, 1, 9, 9, 9,
77
- 9, 9, 9, 9, 9, 9, 9, 9,
78
- 1, 1, 1, 9, 1, 9, 1, 9,
79
- 9, 9, 9, 9, 9, 9, 9, 9,
80
- 9, 9, 9, 9, 9, 9, 9, 9,
81
- 9, 9, 9, 9, 9, 9, 9, 9,
82
- 9, 1, 1, 1, 9, 9, 9, 9,
83
- 9, 9, 9, 9, 9, 9, 9, 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, 1, 12, 1,
87
- 7, 1, 1, 1, 1, 1, 1, 1,
88
- 1, 1, 1, 1, 1, 1, 1, 1,
89
- 1, 1, 1, 1, 1, 1, 1, 7,
90
- 1, 13, 1, 9, 1, 1, 1, 1,
91
- 1, 1, 1, 1, 1, 1, 1, 1,
92
- 1, 1, 1, 1, 1, 1, 1, 1,
93
- 1, 1, 9, 1, 14, 14, 14, 14,
94
- 14, 14, 14, 14, 14, 1, 14, 14,
95
- 15, 14, 14, 14, 14, 14, 14, 14,
96
- 14, 14, 14, 14, 14, 14, 14, 14,
97
- 14, 14, 14, 14, 14, 16, 14, 14,
98
- 14, 14, 14, 14, 14, 14, 14, 14,
99
- 14, 14, 14, 14, 14, 14, 14, 14,
100
- 14, 14, 14, 14, 14, 14, 14, 14,
101
- 14, 14, 14, 14, 14, 14, 14, 14,
102
- 14, 14, 14, 14, 14, 14, 14, 14,
103
- 14, 14, 14, 14, 14, 14, 14, 14,
104
- 14, 14, 14, 14, 14, 14, 14, 17,
105
- 14, 14, 14, 14, 14, 14, 14, 14,
106
- 14, 14, 14, 14, 14, 14, 14, 14,
107
- 14, 14, 14, 14, 14, 14, 14, 14,
108
- 14, 14, 14, 14, 14, 14, 14, 14,
109
- 14, 14, 14, 1, 18, 18, 18, 18,
110
- 18, 18, 18, 18, 18, 1, 18, 18,
111
- 19, 18, 18, 18, 18, 18, 18, 18,
112
- 18, 18, 18, 18, 18, 18, 18, 18,
113
- 18, 18, 18, 18, 18, 20, 18, 18,
114
- 18, 18, 18, 18, 18, 18, 18, 18,
115
- 18, 18, 18, 18, 18, 18, 18, 18,
116
- 18, 18, 18, 18, 18, 18, 18, 18,
117
- 18, 18, 18, 18, 18, 18, 18, 18,
118
- 18, 18, 18, 18, 18, 18, 18, 18,
119
- 18, 18, 18, 18, 18, 18, 18, 18,
120
- 18, 18, 18, 18, 18, 18, 18, 21,
121
- 18, 18, 18, 18, 18, 18, 18, 18,
122
- 18, 18, 18, 18, 18, 18, 18, 18,
123
- 18, 18, 18, 18, 18, 18, 18, 18,
124
- 18, 18, 18, 18, 18, 18, 18, 18,
125
- 18, 18, 18, 1, 22, 1, 18, 1,
126
- 1, 1, 1, 1, 1, 1, 1, 1,
127
- 1, 1, 1, 1, 1, 1, 1, 1,
128
- 1, 1, 1, 1, 1, 18, 1, 1,
129
- 1, 1, 1, 1, 1, 1, 1, 1,
130
- 1, 1, 1, 1, 1, 1, 1, 1,
131
- 1, 1, 1, 1, 1, 1, 1, 1,
132
- 1, 1, 1, 1, 1, 1, 1, 1,
133
- 1, 1, 1, 1, 1, 1, 1, 1,
134
- 1, 1, 1, 1, 1, 1, 1, 1,
135
- 1, 1, 1, 1, 1, 1, 1, 1,
136
- 1, 1, 1, 1, 1, 1, 1, 1,
137
- 1, 1, 1, 1, 1, 1, 1, 1,
138
- 1, 1, 1, 1, 1, 1, 1, 1,
139
- 1, 1, 1, 1, 1, 1, 1, 1,
140
- 1, 1, 1, 1, 1, 1, 1, 1,
141
- 1, 1, 1, 1, 1, 1, 1, 1,
142
- 1, 1, 1, 1, 1, 1, 1, 1,
143
- 1, 1, 1, 1, 1, 1, 1, 1,
144
- 1, 1, 1, 1, 1, 1, 1, 18,
145
- 23, 1, 1, 1, 24, 1, 1, 1,
146
- 1, 1, 1, 1, 1, 1, 1, 1,
147
- 1, 1, 1, 1, 1, 1, 1, 23,
148
- 3, 4, 3, 3, 3, 3, 3, 5,
149
- 1, 3, 3, 1, 3, 6, 3, 3,
150
- 3, 3, 3, 3, 3, 3, 3, 3,
151
- 3, 1, 1, 1, 3, 1, 3, 6,
152
- 3, 3, 3, 3, 3, 3, 3, 3,
153
- 3, 3, 3, 3, 3, 3, 3, 3,
154
- 3, 3, 3, 3, 3, 3, 3, 3,
155
- 3, 3, 1, 1, 1, 3, 3, 3,
156
- 3, 3, 3, 3, 3, 3, 3, 3,
157
- 3, 3, 3, 3, 3, 3, 3, 3,
158
- 3, 3, 3, 3, 3, 3, 3, 3,
159
- 3, 3, 3, 3, 3, 3, 1, 25,
160
- 1, 26, 1, 1, 1, 1, 1, 1,
161
- 1, 1, 1, 1, 1, 1, 1, 1,
162
- 1, 1, 1, 1, 1, 1, 1, 1,
163
- 26, 1, 27, 1, 1, 1, 28, 1,
164
- 1, 1, 1, 1, 1, 1, 1, 1,
165
- 1, 1, 1, 1, 1, 1, 1, 1,
166
- 1, 27, 29, 30, 29, 29, 29, 29,
167
- 29, 31, 1, 29, 29, 1, 29, 1,
168
- 29, 29, 29, 29, 29, 29, 29, 29,
169
- 29, 29, 29, 1, 1, 1, 29, 1,
170
- 29, 1, 29, 29, 29, 29, 29, 29,
171
- 29, 29, 29, 29, 29, 29, 29, 29,
172
- 29, 29, 29, 29, 29, 29, 29, 29,
173
- 29, 29, 29, 29, 1, 1, 1, 29,
174
- 29, 29, 29, 29, 29, 29, 29, 29,
175
- 29, 29, 29, 29, 29, 29, 29, 29,
176
- 29, 29, 29, 29, 29, 29, 29, 29,
177
- 29, 29, 29, 29, 29, 29, 29, 29,
178
- 1, 32, 32, 32, 32, 32, 32, 32,
179
- 32, 32, 1, 32, 32, 33, 32, 32,
180
- 32, 32, 32, 32, 32, 32, 32, 32,
181
- 32, 32, 32, 32, 32, 32, 32, 32,
182
- 32, 32, 32, 32, 32, 32, 32, 32,
183
- 34, 35, 32, 32, 32, 32, 32, 32,
184
- 32, 32, 32, 32, 32, 32, 32, 32,
185
- 32, 32, 32, 32, 32, 32, 32, 32,
186
- 32, 32, 32, 32, 32, 32, 32, 32,
187
- 32, 32, 32, 32, 32, 32, 32, 32,
188
- 32, 32, 32, 32, 32, 32, 32, 32,
189
- 32, 32, 32, 32, 36, 32, 32, 32,
190
- 32, 32, 32, 32, 32, 32, 32, 32,
191
- 32, 32, 32, 32, 32, 32, 32, 32,
192
- 32, 32, 32, 32, 32, 32, 32, 32,
193
- 32, 32, 32, 32, 32, 32, 32, 32,
194
- 1, 37, 37, 37, 37, 37, 37, 37,
195
- 37, 37, 1, 37, 37, 38, 37, 37,
196
- 37, 37, 37, 37, 37, 37, 37, 37,
197
- 37, 37, 37, 37, 37, 37, 37, 37,
198
- 37, 37, 37, 37, 37, 37, 37, 37,
199
- 39, 40, 37, 37, 37, 37, 37, 37,
200
- 37, 37, 37, 37, 37, 37, 37, 37,
201
- 37, 37, 37, 37, 37, 37, 37, 37,
202
- 37, 37, 37, 37, 37, 37, 37, 37,
203
- 37, 37, 37, 37, 37, 37, 37, 37,
204
- 37, 37, 37, 37, 37, 37, 37, 37,
205
- 37, 37, 37, 37, 41, 37, 37, 37,
206
- 37, 37, 37, 37, 37, 37, 37, 37,
207
- 37, 37, 37, 37, 37, 37, 37, 37,
208
- 37, 37, 37, 37, 37, 37, 37, 37,
209
- 37, 37, 37, 37, 37, 37, 37, 37,
210
- 1, 42, 1, 37, 1, 1, 1, 1,
211
- 1, 1, 1, 1, 1, 1, 1, 1,
212
- 1, 1, 1, 1, 1, 1, 1, 1,
213
- 1, 1, 37, 1, 1, 1, 1, 1,
214
- 1, 1, 1, 1, 1, 1, 1, 1,
215
- 1, 1, 1, 1, 1, 1, 1, 1,
216
- 1, 1, 1, 1, 1, 1, 1, 1,
217
- 1, 1, 1, 1, 1, 1, 1, 1,
218
- 1, 1, 1, 1, 1, 1, 1, 1,
219
- 1, 1, 1, 1, 1, 1, 1, 1,
220
- 1, 1, 1, 1, 1, 1, 1, 1,
221
- 1, 1, 1, 1, 1, 1, 1, 1,
222
- 1, 1, 1, 1, 1, 1, 1, 1,
223
- 1, 1, 1, 1, 1, 1, 1, 1,
224
- 1, 1, 1, 1, 1, 1, 1, 1,
225
- 1, 1, 1, 1, 1, 1, 1, 1,
226
- 1, 1, 1, 1, 1, 1, 1, 1,
227
- 1, 1, 1, 1, 1, 1, 1, 1,
228
- 1, 1, 1, 1, 1, 1, 1, 1,
229
- 1, 1, 1, 1, 37, 9, 1, 1,
230
- 1, 43, 1, 1, 1, 1, 1, 1,
231
- 1, 1, 1, 1, 1, 1, 1, 1,
232
- 1, 1, 1, 1, 9, 9, 10, 9,
233
- 9, 9, 9, 9, 44, 1, 9, 9,
234
- 45, 9, 46, 9, 9, 9, 9, 9,
235
- 9, 9, 9, 9, 9, 9, 1, 1,
236
- 1, 9, 1, 9, 46, 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
- 1, 1, 9, 9, 9, 9, 9, 9,
241
- 9, 9, 9, 9, 9, 9, 9, 9,
242
- 9, 9, 9, 9, 9, 9, 9, 9,
243
- 9, 9, 9, 9, 9, 9, 9, 9,
244
- 9, 9, 9, 1, 29, 1, 1, 1,
245
- 47, 1, 1, 1, 1, 1, 1, 1,
246
- 1, 1, 1, 1, 1, 1, 1, 1,
247
- 1, 1, 1, 29, 29, 30, 29, 29,
248
- 29, 29, 29, 48, 1, 29, 29, 49,
249
- 29, 50, 29, 29, 29, 29, 29, 29,
250
- 29, 29, 29, 29, 29, 1, 1, 1,
251
- 29, 1, 29, 50, 29, 29, 29, 29,
252
- 29, 29, 29, 29, 29, 29, 29, 29,
253
- 29, 29, 29, 29, 29, 29, 29, 29,
254
- 29, 29, 29, 29, 29, 29, 1, 1,
255
- 1, 29, 29, 29, 29, 29, 29, 29,
256
- 29, 29, 29, 29, 29, 29, 29, 29,
257
- 29, 29, 29, 29, 29, 29, 29, 29,
258
- 29, 29, 29, 29, 29, 29, 29, 29,
259
- 29, 29, 1, 7, 1, 1, 1, 8,
260
- 1, 1, 1, 1, 1, 1, 1, 1,
261
- 1, 1, 1, 1, 1, 1, 1, 1,
262
- 1, 1, 7, 9, 10, 9, 9, 9,
263
- 9, 9, 11, 1, 9, 9, 45, 9,
264
- 46, 9, 9, 9, 9, 9, 9, 9,
265
- 9, 9, 9, 9, 1, 1, 1, 9,
266
- 1, 9, 46, 9, 9, 9, 9, 9,
267
- 9, 9, 9, 9, 9, 9, 9, 9,
268
- 9, 9, 9, 9, 9, 9, 9, 9,
269
- 9, 9, 9, 9, 9, 1, 1, 1,
270
- 9, 9, 9, 9, 9, 9, 9, 9,
271
- 9, 9, 9, 9, 9, 9, 9, 9,
272
- 9, 9, 9, 9, 9, 9, 9, 9,
273
- 9, 9, 9, 9, 9, 9, 9, 9,
274
- 9, 1, 1, 0
275
- ]
276
-
277
- class << self
278
- attr_accessor :_phrase_lists_trans_targs
279
- private :_phrase_lists_trans_targs, :_phrase_lists_trans_targs=
280
- end
281
- self._phrase_lists_trans_targs = [
282
- 2, 0, 3, 21, 7, 15, 23, 2,
283
- 3, 21, 7, 15, 4, 6, 8, 9,
284
- 21, 11, 8, 9, 21, 11, 10, 12,
285
- 13, 14, 12, 2, 3, 21, 7, 15,
286
- 17, 18, 17, 24, 20, 17, 18, 17,
287
- 24, 20, 19, 5, 22, 12, 23, 5,
288
- 22, 12, 23
289
- ]
290
-
291
- class << self
292
- attr_accessor :_phrase_lists_trans_actions
293
- private :_phrase_lists_trans_actions, :_phrase_lists_trans_actions=
294
- end
295
- self._phrase_lists_trans_actions = [
296
- 1, 0, 1, 1, 1, 2, 1, 0,
297
- 0, 0, 0, 3, 0, 0, 4, 4,
298
- 5, 4, 0, 0, 6, 0, 0, 1,
299
- 1, 0, 0, 7, 7, 7, 7, 8,
300
- 9, 9, 10, 11, 9, 0, 0, 3,
301
- 12, 0, 0, 0, 3, 13, 0, 7,
302
- 8, 14, 7
303
- ]
304
-
305
- class << self
306
- attr_accessor :_phrase_lists_eof_actions
307
- private :_phrase_lists_eof_actions, :_phrase_lists_eof_actions=
308
- end
309
- self._phrase_lists_eof_actions = [
310
- 0, 0, 0, 0, 0, 0, 0, 0,
311
- 0, 0, 0, 0, 0, 0, 0, 0,
312
- 0, 0, 0, 0, 0, 13, 14, 13,
313
- 0
314
- ]
315
-
316
- class << self
317
- attr_accessor :phrase_lists_start
318
- end
319
- self.phrase_lists_start = 1;
320
- class << self
321
- attr_accessor :phrase_lists_first_final
322
- end
323
- self.phrase_lists_first_final = 21;
324
- class << self
325
- attr_accessor :phrase_lists_error
326
- end
327
- self.phrase_lists_error = 0;
328
-
329
- class << self
330
- attr_accessor :phrase_lists_en_comment_tail
331
- end
332
- self.phrase_lists_en_comment_tail = 16;
333
- class << self
334
- attr_accessor :phrase_lists_en_main
335
- end
336
- self.phrase_lists_en_main = 1;
337
-
338
-
339
- # line 17 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
340
-
341
- def self.parse(data)
342
- p = 0
343
- eof = data.length
344
- stack = []
345
-
346
- actions = []
347
- data_unpacked = data.bytes.to_a
348
-
349
- # line 350 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
350
- begin
351
- p ||= 0
352
- pe ||= data.length
353
- cs = phrase_lists_start
354
- top = 0
355
- end
356
-
357
- # line 26 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
358
-
359
- # line 360 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
360
- begin
361
- testEof = false
362
- _slen, _trans, _keys, _inds, _acts, _nacts = nil
363
- _goto_level = 0
364
- _resume = 10
365
- _eof_trans = 15
366
- _again = 20
367
- _test_eof = 30
368
- _out = 40
369
- while true
370
- if _goto_level <= 0
371
- if p == pe
372
- _goto_level = _test_eof
373
- next
374
- end
375
- if cs == 0
376
- _goto_level = _out
377
- next
378
- end
379
- end
380
- if _goto_level <= _resume
381
- _keys = cs << 1
382
- _inds = _phrase_lists_index_offsets[cs]
383
- _slen = _phrase_lists_key_spans[cs]
384
- _trans = if ( _slen > 0 &&
385
- _phrase_lists_trans_keys[_keys] <= ( data_unpacked[p]) &&
386
- ( data_unpacked[p]) <= _phrase_lists_trans_keys[_keys + 1]
387
- ) then
388
- _phrase_lists_indicies[ _inds + ( data_unpacked[p]) - _phrase_lists_trans_keys[_keys] ]
389
- else
390
- _phrase_lists_indicies[ _inds + _slen ]
391
- end
392
- cs = _phrase_lists_trans_targs[_trans]
393
- if _phrase_lists_trans_actions[_trans] != 0
394
- case _phrase_lists_trans_actions[_trans]
395
- when 7 then
396
- # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
397
- begin
398
- actions.push(4, p) end
399
- when 9 then
400
- # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
401
- begin
402
- actions.push(5, p) end
403
- when 13 then
404
- # line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
405
- begin
406
- actions.push(36, p) end
407
- when 1 then
408
- # line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
409
- begin
410
- actions.push(37, p) end
411
- when 6 then
412
- # line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
413
- begin
414
- actions.push(38, p) end
415
- when 4 then
416
- # line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
417
- begin
418
- actions.push(39, p) end
419
- when 3 then
420
- # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
421
- begin
422
- begin
423
- stack[top] = cs
424
- top+= 1
425
- cs = 16
426
- _goto_level = _again
427
- next
428
- end
429
- end
430
- when 12 then
431
- # line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
432
- begin
433
- begin
434
- top -= 1
435
- cs = stack[top]
436
- _goto_level = _again
437
- next
438
- end
439
- end
440
- when 14 then
441
- # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
442
- begin
443
- actions.push(4, p) end
444
- # line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
445
- begin
446
- actions.push(36, p) end
447
- when 8 then
448
- # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
449
- begin
450
- actions.push(4, p) end
451
- # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
452
- begin
453
- begin
454
- stack[top] = cs
455
- top+= 1
456
- cs = 16
457
- _goto_level = _again
458
- next
459
- end
460
- end
461
- when 10 then
462
- # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
463
- begin
464
- actions.push(5, p) end
465
- # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
466
- begin
467
- begin
468
- stack[top] = cs
469
- top+= 1
470
- cs = 16
471
- _goto_level = _again
472
- next
473
- end
474
- end
475
- when 11 then
476
- # line 8 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
477
- begin
478
- actions.push(5, p) end
479
- # line 6 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
480
- begin
481
- begin
482
- top -= 1
483
- cs = stack[top]
484
- _goto_level = _again
485
- next
486
- end
487
- end
488
- when 2 then
489
- # line 40 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
490
- begin
491
- actions.push(37, p) end
492
- # line 5 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
493
- begin
494
- begin
495
- stack[top] = cs
496
- top+= 1
497
- cs = 16
498
- _goto_level = _again
499
- next
500
- end
501
- end
502
- when 5 then
503
- # line 42 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
504
- begin
505
- actions.push(39, p) end
506
- # line 41 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
507
- begin
508
- actions.push(38, p) end
509
- # line 510 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
510
- end
511
- end
512
- end
513
- if _goto_level <= _again
514
- if cs == 0
515
- _goto_level = _out
516
- next
517
- end
518
- p += 1
519
- if p != pe
520
- _goto_level = _resume
521
- next
522
- end
523
- end
524
- if _goto_level <= _test_eof
525
- if p == eof
526
- case _phrase_lists_eof_actions[cs]
527
- when 13 then
528
- # line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
529
- begin
530
- actions.push(36, p) end
531
- when 14 then
532
- # line 7 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
533
- begin
534
- actions.push(4, p) end
535
- # line 39 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
536
- begin
537
- actions.push(36, p) end
538
- # line 539 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
539
- end
540
- end
541
-
542
- end
543
- if _goto_level <= _out
544
- break
545
- end
546
- end
547
- end
548
-
549
- # line 27 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
550
-
551
- if p == eof && cs >=
552
- # line 553 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb"
553
- 21
554
- # line 28 "/home/bpot/src/gh/bpot/mail/lib/mail/parsers/ragel/ruby/machines/phrase_lists_machine.rb.rl"
555
-
556
- return actions, nil
557
- else
558
- return [], "Only able to parse up to #{data[0..p]}"
559
- end
560
- end
561
- end
562
- end
563
- end
564
- end