diff --git a/lib/mailparser/rfc2045/parser.rb b/lib/mailparser/rfc2045/parser.rb index 6bf6796..91bd955 100644 --- a/lib/mailparser/rfc2045/parser.rb +++ b/lib/mailparser/rfc2045/parser.rb @@ -1,8 +1,7 @@ -# coding: ascii-8bit # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.7 -# from Racc grammer file "". +# This file is automatically generated by Racc 1.4.16 +# from Racc grammar file "". # require 'racc/parser.rb' @@ -40,17 +39,17 @@ def on_error(t, val, vstack) ##### State transition tables begin ### racc_action_table = [ - 27, 8, 11, 28, 2, 3, 4, 13, 14, 15, - 5, 18, 19, 21, 24, 25, 16 ] + 27, 5, 8, 28, 2, 3, 4, 11, 13, 14, + 15, 16, 18, 19, 21, 24, 25 ] racc_action_check = [ - 25, 2, 3, 25, 0, 0, 0, 4, 5, 7, - 1, 15, 16, 20, 21, 23, 13 ] + 25, 1, 2, 25, 0, 0, 0, 3, 4, 5, + 7, 13, 15, 16, 20, 21, 23 ] racc_action_pointer = [ - 2, 10, -7, -6, 1, 8, nil, 4, nil, nil, - nil, nil, nil, 9, nil, 3, 6, nil, nil, nil, - 4, 6, nil, 5, nil, -8, nil, nil, nil ] + 2, 1, -6, -1, 2, 9, nil, 5, nil, nil, + nil, nil, nil, 4, nil, 4, 7, nil, nil, nil, + 5, 7, nil, 6, nil, -8, nil, nil, nil ] racc_action_default = [ -16, -16, -16, -16, -16, -16, -1, -16, -8, -2, @@ -182,21 +181,21 @@ def _reduce_3(val, _values) module_eval(<<'.,.,', 'parser.y', 17) def _reduce_4(val, _values) ContentType.new(val[0], val[2], val[3]) - + end .,., module_eval(<<'.,.,', 'parser.y', 22) def _reduce_5(val, _values) ContentTransferEncoding.new(val[0]) - + end .,., module_eval(<<'.,.,', 'parser.y', 29) def _reduce_6(val, _values) val.join - + end .,., @@ -209,7 +208,7 @@ def _reduce_6(val, _values) module_eval(<<'.,.,', 'parser.y', 40) def _reduce_10(val, _values) {} - + end .,., @@ -219,14 +218,14 @@ def _reduce_11(val, _values) pv = $1 if pv =~ /\A\"(.*)\"\Z/m val[0][pn] = pv.gsub(/\s*\n\s*/, " ") val[0] - + end .,., module_eval(<<'.,.,', 'parser.y', 52) def _reduce_12(val, _values) [val[0].downcase, val[2]] - + end .,., @@ -241,5 +240,5 @@ def _reduce_none(val, _values) end end # class Parser - end # module RFC2045 - end # module MailParser + end # module RFC2045 +end # module MailParser diff --git a/lib/mailparser/rfc2183/parser.rb b/lib/mailparser/rfc2183/parser.rb index 0e19fc1..325c0ce 100644 --- a/lib/mailparser/rfc2183/parser.rb +++ b/lib/mailparser/rfc2183/parser.rb @@ -1,8 +1,7 @@ -# coding: ascii-8bit # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.7 -# from Racc grammer file "". +# This file is automatically generated by Racc 1.4.16 +# from Racc grammar file "". # require 'racc/parser.rb' @@ -40,14 +39,14 @@ def on_error(t, val, vstack) ##### State transition tables begin ### racc_action_table = [ - 15, 9, 6, 16, 7, 3, 12, 13, 2 ] + 15, 2, 3, 16, 6, 7, 9, 12, 13 ] racc_action_check = [ - 13, 8, 2, 13, 3, 1, 9, 11, 0 ] + 13, 0, 1, 13, 2, 3, 8, 9, 11 ] racc_action_pointer = [ - 6, 5, -1, 4, nil, nil, nil, nil, -3, 3, - nil, 2, nil, -3, nil, nil, nil ] + -1, 2, 1, 5, nil, nil, nil, nil, 2, 4, + nil, 3, nil, -3, nil, nil, nil ] racc_action_default = [ -10, -10, -10, -10, -1, -4, -3, 17, -2, -10, @@ -142,7 +141,7 @@ def _reduce_1(val, _values) module_eval(<<'.,.,', 'parser.y', 13) def _reduce_2(val, _values) ContentDisposition.new(val[0], val[1]) - + end .,., @@ -151,7 +150,7 @@ def _reduce_2(val, _values) module_eval(<<'.,.,', 'parser.y', 20) def _reduce_4(val, _values) {} - + end .,., @@ -161,14 +160,14 @@ def _reduce_5(val, _values) pv = $1 if pv =~ /\A\"(.*)\"\Z/m val[0][pn] = pv.gsub(/\s*\n\s*/, " ") val[0] - + end .,., module_eval(<<'.,.,', 'parser.y', 32) def _reduce_6(val, _values) [val[0].downcase, val[2]] - + end .,., @@ -183,5 +182,5 @@ def _reduce_none(val, _values) end end # class Parser - end # module RFC2183 - end # module MailParser + end # module RFC2183 +end # module MailParser diff --git a/lib/mailparser/rfc2822/parser.rb b/lib/mailparser/rfc2822/parser.rb index 6c3b163..914975e 100644 --- a/lib/mailparser/rfc2822/parser.rb +++ b/lib/mailparser/rfc2822/parser.rb @@ -1,8 +1,7 @@ -# coding: ascii-8bit # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.12 -# from Racc grammer file "". +# This file is automatically generated by Racc 1.4.16 +# from Racc grammar file "". # require 'racc/parser.rb' @@ -481,14 +480,14 @@ def _reduce_13(val, _values) val[0].last.comments = decode2(@scanner.get_comment_by_id(@comma_list[-1], nil)) end val[0] - + end .,., module_eval(<<'.,.,', 'parser.y', 32) def _reduce_14(val, _values) val[0] ? [val[0]] : [] - + end .,., @@ -498,7 +497,7 @@ def _reduce_15(val, _values) val[0].last.comments = decode2(@scanner.get_comment_by_id(@comma_list[-2], @comma_list[-1])) if val[0].last.kind_of? Mailbox val[0] << val[2] if val[2] val[0] - + end .,., @@ -512,14 +511,14 @@ def _reduce_18(val, _values) val[0].last.comments = decode2(@scanner.get_comment_by_id(@comma_list[-1], nil)) end val[0] - + end .,., module_eval(<<'.,.,', 'parser.y', 55) def _reduce_19(val, _values) val[0] ? [val[0]] : [] - + end .,., @@ -531,7 +530,7 @@ def _reduce_20(val, _values) end val[0] << val[2] if val[2] val[0] - + end .,., @@ -548,28 +547,28 @@ def _reduce_20(val, _values) module_eval(<<'.,.,', 'parser.y', 76) def _reduce_26(val, _values) Mailbox.new(val[0]) - + end .,., module_eval(<<'.,.,', 'parser.y', 81) def _reduce_27(val, _values) Mailbox.new(val[0]) - + end .,., module_eval(<<'.,.,', 'parser.y', 85) def _reduce_28(val, _values) Mailbox.new(val[1], val[0]) - + end .,., module_eval(<<'.,.,', 'parser.y', 90) def _reduce_29(val, _values) [val[0]] - + end .,., @@ -577,21 +576,21 @@ def _reduce_29(val, _values) def _reduce_30(val, _values) val[0] << val[1] val[0] - + end .,., module_eval(<<'.,.,', 'parser.y', 100) def _reduce_31(val, _values) val[1] - + end .,., module_eval(<<'.,.,', 'parser.y', 104) def _reduce_32(val, _values) val[2] - + end .,., @@ -608,21 +607,21 @@ def _reduce_32(val, _values) module_eval(<<'.,.,', 'parser.y', 118) def _reduce_38(val, _values) Group.new(val[2], val[0]) - + end .,., module_eval(<<'.,.,', 'parser.y', 123) def _reduce_39(val, _values) decode(val[0]) - + end .,., module_eval(<<'.,.,', 'parser.y', 128) def _reduce_40(val, _values) [val[0]].compact - + end .,., @@ -630,7 +629,7 @@ def _reduce_40(val, _values) def _reduce_41(val, _values) val[0] << val[2] if val[2] val[0] - + end .,., @@ -639,7 +638,7 @@ def _reduce_41(val, _values) module_eval(<<'.,.,', 'parser.y', 139) def _reduce_43(val, _values) decode(val[0]) - + end .,., @@ -650,21 +649,21 @@ def _reduce_43(val, _values) module_eval(<<'.,.,', 'parser.y', 147) def _reduce_46(val, _values) val[0].to_s - + end .,., module_eval(<<'.,.,', 'parser.y', 151) def _reduce_47(val, _values) val[0] << " #{val[1]}" - + end .,., module_eval(<<'.,.,', 'parser.y', 156) def _reduce_48(val, _values) AddrSpec.new(val[0], val[2]) - + end .,., @@ -673,14 +672,14 @@ def _reduce_48(val, _values) module_eval(<<'.,.,', 'parser.y', 162) def _reduce_50(val, _values) val.join - + end .,., module_eval(<<'.,.,', 'parser.y', 166) def _reduce_51(val, _values) val.join - + end .,., @@ -689,7 +688,7 @@ def _reduce_51(val, _values) module_eval(<<'.,.,', 'parser.y', 172) def _reduce_53(val, _values) val.join - + end .,., @@ -710,49 +709,49 @@ def _reduce_53(val, _values) module_eval(<<'.,.,', 'parser.y', 187) def _reduce_61(val, _values) val.join - + end .,., module_eval(<<'.,.,', 'parser.y', 191) def _reduce_62(val, _values) val[0] << val[1]+val[2] - + end .,., module_eval(<<'.,.,', 'parser.y', 195) def _reduce_63(val, _values) val[0] << val[1]+val[2] - + end .,., module_eval(<<'.,.,', 'parser.y', 200) def _reduce_64(val, _values) val.join - + end .,., module_eval(<<'.,.,', 'parser.y', 204) def _reduce_65(val, _values) val.join - + end .,., module_eval(<<'.,.,', 'parser.y', 209) def _reduce_66(val, _values) val.join - + end .,., module_eval(<<'.,.,', 'parser.y', 213) def _reduce_67(val, _values) val.join - + end .,., @@ -763,28 +762,28 @@ def _reduce_67(val, _values) module_eval(<<'.,.,', 'parser.y', 221) def _reduce_70(val, _values) MsgIdList.new(val[0]) - + end .,., module_eval(<<'.,.,', 'parser.y', 225) def _reduce_71(val, _values) val[0] << val[1] - + end .,., module_eval(<<'.,.,', 'parser.y', 230) def _reduce_72(val, _values) MsgId.new(val[1,3].join) - + end .,., module_eval(<<'.,.,', 'parser.y', 235) def _reduce_73(val, _values) MsgIdList.new() - + end .,., @@ -793,7 +792,7 @@ def _reduce_73(val, _values) module_eval(<<'.,.,', 'parser.y', 240) def _reduce_75(val, _values) val[0] << val[1] - + end .,., @@ -804,7 +803,7 @@ def _reduce_75(val, _values) module_eval(<<'.,.,', 'parser.y', 253) def _reduce_78(val, _values) nil - + end .,., @@ -813,14 +812,14 @@ def _reduce_78(val, _values) module_eval(<<'.,.,', 'parser.y', 260) def _reduce_80(val, _values) Received.new(val[0], val[2]) - + end .,., module_eval(<<'.,.,', 'parser.y', 265) def _reduce_81(val, _values) {} - + end .,., @@ -828,7 +827,7 @@ def _reduce_81(val, _values) def _reduce_82(val, _values) val[0][val[1][0]] = val[1][1] val[0] - + end .,., @@ -838,7 +837,7 @@ def _reduce_83(val, _values) raise MailParser::ParseError, val[0]+@scanner.rest end [val[0].downcase, val[1].to_s] - + end .,., @@ -860,7 +859,7 @@ def _reduce_87(val, _values) rescue ArgumentError raise MailParser::ParseError, "invalid date format" end - + end .,., @@ -871,7 +870,7 @@ def _reduce_89(val, _values) unless ['mon','tue','wed','thu','fri','sat','sun'].include? val[0].downcase then raise MailParser::ParseError, "invalid day of the week: #{val[0]}" end - + end .,., @@ -884,7 +883,7 @@ def _reduce_90(val, _values) raise MailParser::ParseError, "invalid minute: #{val[2]}" end [val[0].to_i, val[2].to_i, 0] - + end .,., @@ -900,7 +899,7 @@ def _reduce_91(val, _values) raise MailParser::ParseError, "invalid second: #{val[4]}" end [val[0].to_i, val[2].to_i, val[4].to_i] - + end .,., @@ -911,7 +910,7 @@ def _reduce_92(val, _values) else ZONE[val[0].upcase] || "-0000" end - + end .,., @@ -920,5 +919,5 @@ def _reduce_none(val, _values) end end # class Parser - end # module RFC2822 - end # module MailParser + end # module RFC2822 +end # module MailParser