Changeset 8084
- Timestamp:
- 11/06/07 14:24:32 (1 year ago)
- Files:
-
- trunk/actionmailer/CHANGELOG (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer.rb (modified) (2 diffs)
- trunk/actionmailer/lib/action_mailer/vendor/tmail.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/address.rb (modified) (3 diffs)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/base64.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/compat.rb (added)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/config.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/core_extensions.rb (added)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/encode.rb (modified) (4 diffs)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/header.rb (modified) (9 diffs)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/interface.rb (added)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/mail.rb (modified) (5 diffs)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/Makefile (added)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/net.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/parser.rb (modified) (98 diffs)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/parser.y (added)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/port.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/scanner.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/stringio.rb (modified) (2 diffs)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/utils.rb (modified) (5 diffs)
- trunk/actionmailer/lib/action_mailer/vendor/tmail/version.rb (added)
- trunk/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionmailer/CHANGELOG
r8022 r8084 1 1 *SVN* 2 3 * Update TMail to v1.1.0. Use an updated version of TMail if available. [mikel] 2 4 3 5 * Introduce a new base test class for testing Mailers. ActionMailer::TestCase [Koz] trunk/actionmailer/lib/action_mailer.rb
r7425 r8084 32 32 end 33 33 34 # attempt to load the TMail gem 35 begin 36 require 'rubygems' 37 gem 'TMail', '> 1.1.0' 38 require 'tmail' 39 rescue Gem::LoadError 40 # no gem, fall back to vendor copy 41 end 42 34 43 $:.unshift(File.dirname(__FILE__) + "/action_mailer/vendor/") 35 44 45 require 'tmail' 36 46 require 'action_mailer/base' 37 47 require 'action_mailer/helpers' … … 39 49 require 'action_mailer/quoting' 40 50 require 'action_mailer/test_helper' 41 require 'tmail'42 51 require 'net/smtp' 43 52 trunk/actionmailer/lib/action_mailer/vendor/tmail.rb
r399 r8084 1 require 'tmail/ info'1 require 'tmail/version' 2 2 require 'tmail/mail' 3 3 require 'tmail/mailbox' 4 require 'tmail/core_extensions' trunk/actionmailer/lib/action_mailer/vendor/tmail/address.rb
r2634 r8084 1 # 2 # address.rb 1 =begin rdoc 2 3 = Address handling class 4 5 =end 3 6 # 4 7 #-- … … 52 55 end 53 56 end 57 54 58 @local = local 55 59 @domain = domain … … 96 100 97 101 alias address spec 98 99 102 100 103 def ==( other ) trunk/actionmailer/lib/action_mailer/vendor/tmail/attachments.rb
r6207 r8084 1 =begin rdoc 2 3 = Attachment handling class 4 5 =end 6 1 7 require 'stringio' 2 8 trunk/actionmailer/lib/action_mailer/vendor/tmail/base64.rb
r7476 r8084 1 # 2 # base64.rb 3 # 1 =begin rdoc 2 3 = Base64 handling class 4 5 =end 4 6 #-- 5 7 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> trunk/actionmailer/lib/action_mailer/vendor/tmail/config.rb
r2634 r8084 1 # 2 # config.rb 3 # 1 =begin rdoc 2 3 = Configuration Class 4 5 =end 4 6 #-- 5 7 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> trunk/actionmailer/lib/action_mailer/vendor/tmail/encode.rb
r2634 r8084 1 # 2 # encode.rb 3 # 1 =begin rdoc 2 3 = Text Encoding class 4 5 =end 4 6 #-- 5 7 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> … … 51 53 end 52 54 module_function :create_dest 53 55 54 56 def encoded( eol = "\r\n", charset = 'j', dest = nil ) 55 57 accept_strategy Encoder, eol, charset, dest 56 58 end 57 59 58 60 def decoded( eol = "\n", charset = 'e', dest = nil ) 61 # Turn the E-Mail into a string and return it with all 62 # encoded characters decoded. alias for to_s 59 63 accept_strategy Decoder, eol, charset, dest 60 64 end 61 65 62 66 alias to_s decoded 63 67 64 68 def accept_strategy( klass, eol, charset, dest = nil ) 65 69 dest ||= '' 66 accept klass.new( create_dest(dest), charset, eol)70 accept klass.new( create_dest(dest), charset, eol ) 67 71 dest 68 72 end 69 73 70 74 end 71 75 … … 142 146 143 147 def kv_pair( k, v ) 148 v = dquote(v) unless token_safe?(v) 144 149 @f << k << '=' << v 145 150 end … … 191 196 @opt = OPTIONS[$KCODE] 192 197 @eol = eol 198 @preserve_quotes = true 193 199 reset 200 end 201 202 def preserve_quotes=( bool ) 203 @preserve_quotes 204 end 205 206 def preserve_quotes 207 @preserve_quotes 194 208 end 195 209 trunk/actionmailer/lib/action_mailer/vendor/tmail/header.rb
r2634 r8084 1 # 2 # header.rb 1 =begin rdoc 2 3 = Header handling class 4 5 =end 6 # RFC #822 ftp://ftp.isi.edu/in-notes/rfc822.txt 7 # 3 8 # 4 9 #-- … … 77 82 @illegal = false 78 83 @parsed = false 84 79 85 if intern 80 86 @parsed = true … … 130 136 include StrategyInterface 131 137 132 def accept( strategy , dummy1 = nil, dummy2 = nil)138 def accept( strategy ) 133 139 ensure_parsed 134 140 do_accept strategy … … 208 214 209 215 def do_parse 216 quote_boundary 210 217 obj = Parser.parse(self.class::PARSE_TYPE, @body, @comments) 211 218 set obj if obj … … 740 747 def params 741 748 ensure_parsed 749 unless @params.blank? 750 @params.each do |k, v| 751 @params[k] = unquote(v) 752 end 753 end 742 754 @params 743 755 end … … 745 757 def []( key ) 746 758 ensure_parsed 747 @params and @params[key]759 @params and unquote(@params[key]) 748 760 end 749 761 … … 836 848 def params 837 849 ensure_parsed 850 unless @params.blank? 851 @params.each do |k, v| 852 @params[k] = unquote(v) 853 end 854 end 838 855 @params 839 856 end … … 841 858 def []( key ) 842 859 ensure_parsed 843 @params and @params[key]860 @params and unquote(@params[key]) 844 861 end 845 862 … … 868 885 strategy.meta ';' 869 886 strategy.space 870 strategy.kv_pair k, v887 strategy.kv_pair k, unquote(v) 871 888 end 872 889 end trunk/actionmailer/lib/action_mailer/vendor/tmail/mail.rb
r2634 r8084 1 # 2 # mail.rb 3 # 1 =begin rdoc 2 3 = Mail class 4 5 =end 4 6 #-- 5 7 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> … … 28 30 #++ 29 31 30 require 'tmail/ facade'32 require 'tmail/interface' 31 33 require 'tmail/encode' 32 34 require 'tmail/header' … … 38 40 require 'socket' 39 41 40 41 42 module TMail 42 43 … … 54 55 new(StringPort.new(str)) 55 56 end 57 56 58 end 57 59 … … 356 358 357 359 def body=( str ) 360 # Sets the body of the email to a new (encoded) string. 361 # 362 # We also reparses the email if the body is ever reassigned, this is a performance hit, however when 363 # you assign the body, you usually want to be able to make sure that you can access the attachments etc. 364 # 365 # Usage: 366 # 367 # mail.body = "Hello, this is\nthe body text" 368 # # => "Hello, this is\nthe body" 369 # mail.body 370 # # => "Hello, this is\nthe body" 371 @body_parsed = false 372 parse_body(StringInput.new(str)) 358 373 parse_body 359 374 @body_port.wopen {|f| f.write str } trunk/actionmailer/lib/action_mailer/vendor/tmail/mailbox.rb
r2634 r8084 1 # 2 # mailbox.rb 3 # 1 =begin rdoc 2 3 = Mailbox and Mbox interaction class 4 5 =end 4 6 #-- 5 7 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> trunk/actionmailer/lib/action_mailer/vendor/tmail/net.rb
r2634 r8084 1 # 2 # net.rb 3 # 1 =begin rdoc 2 3 = Net provides SMTP wrapping 4 5 =end 4 6 #-- 5 7 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> trunk/actionmailer/lib/action_mailer/vendor/tmail/obsolete.rb
r2634 r8084 1 # 2 # obsolete.rb 3 # 1 =begin rdoc 2 3 = Obsolete methods that are depriciated 4 5 =end 4 6 #-- 5 7 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> trunk/actionmailer/lib/action_mailer/vendor/tmail/parser.rb
r2634 r8084 1 #2 1 # DO NOT MODIFY!!!! 3 # This file is automatically generated by racc 1.4. 32 # This file is automatically generated by racc 1.4.5 4 3 # from racc grammer file "parser.y". 5 4 # … … 7 6 # parser.rb: generated by racc (runtime embedded) 8 7 # 9 10 ###### racc/parser.rb 11 8 ###### racc/parser.rb begin 12 9 unless $".index 'racc/parser.rb' 13 10 $".push 'racc/parser.rb' 14 11 15 self.class.module_eval <<'..end /home/aamine/lib/ruby/racc/parser.rb modeval..idb76f2e220d', '/home/aamine/lib/ruby/racc/parser.rb', 112 self.class.module_eval <<'..end racc/parser.rb modeval..id8076474214', 'racc/parser.rb', 1 16 13 # 17 # parser.rb14 # $Id: parser.rb,v 1.7 2005/11/20 17:31:32 aamine Exp $ 18 15 # 19 # Copyright (c) 1999-2003 Minero Aoki <aamine@loveruby.net>16 # Copyright (c) 1999-2005 Minero Aoki 20 17 # 21 # This program is free software.22 # You can distribute/modify this program under the same terms of ruby.18 # This program is free software. 19 # You can distribute/modify this program under the same terms of ruby. 23 20 # 24 # As a special exception, when this code is copied by Racc25 # into a Racc output file, you may use that output file26 # without restriction.21 # As a special exception, when this code is copied by Racc 22 # into a Racc output file, you may use that output file 23 # without restriction. 27 24 # 28 # $Id: parser.rb,v 1.1.1.1 2004/10/14 11:59:58 webster132 Exp $ 29 # 30 31 unless defined? NotImplementedError 25 26 unless defined?(NotImplementedError) 32 27 NotImplementedError = NotImplementError 33 28 end 34 35 29 36 30 module Racc … … 41 35 end 42 36 43 44 37 module Racc 45 38 46 unless defined? Racc_No_Extentions39 unless defined?(Racc_No_Extentions) 47 40 Racc_No_Extentions = false 48 41 end … … 50 43 class Parser 51 44 52 Racc_Runtime_Version = '1.4. 3'53 Racc_Runtime_Revision = '$Revision: 1. 1.1.1 $'.split(/\s+/)[1]54 55 Racc_Runtime_Core_Version_R = '1.4. 3'56 Racc_Runtime_Core_Revision_R = '$Revision: 1. 1.1.1 $'.split(/\s+/)[1]45 Racc_Runtime_Version = '1.4.5' 46 Racc_Runtime_Revision = '$Revision: 1.7 $'.split[1] 47 48 Racc_Runtime_Core_Version_R = '1.4.5' 49 Racc_Runtime_Core_Revision_R = '$Revision: 1.7 $'.split[1] 57 50 begin 58 51 require 'racc/cparse' 59 52 # Racc_Runtime_Core_Version_C = (defined in extention) 60 Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split (/\s+/)[2]53 Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2] 61 54 unless new.respond_to?(:_racc_do_parse_c, true) 62 55 raise LoadError, 'old cparse.so' … … 79 72 end 80 73 81 def self.racc_runtime_type74 def Parser.racc_runtime_type 82 75 Racc_Runtime_Type 83 76 end … … 87 80 def _racc_setup 88 81 @yydebug = false unless self.class::Racc_debug_parser 89 @yydebug = false unless defined? @yydebug82 @yydebug = false unless defined?(@yydebug) 90 83 if @yydebug 91 @racc_debug_out = $stderr unless defined? @racc_debug_out84 @racc_debug_out = $stderr unless defined?(@racc_debug_out) 92 85 @racc_debug_out ||= $stderr 93 86 end … … 111 104 end 112 105 113 114 106 ### 115 107 ### do_parse … … 117 109 118 110 def do_parse 119 __send__ Racc_Main_Parsing_Routine, _racc_setup(), false111 __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) 120 112 end 121 113 … … 124 116 end 125 117 126 def _racc_do_parse_rb( arg, in_debug)118 def _racc_do_parse_rb(arg, in_debug) 127 119 action_table, action_check, action_default, action_pointer, 128 120 goto_table, goto_check, goto_default, goto_pointer, … … 135 127 136 128 catch(:racc_end_parse) { 137 while true 138 if i = action_pointer[@racc_state[-1]] 139 if @racc_read_next 140 if @racc_t != 0 # not EOF 141 tok, @racc_val = next_token() 142 unless tok # EOF 143 @racc_t = 0 144 else 145 @racc_t = (token_table[tok] or 1) # error token 146 end 147 racc_read_token(@racc_t, tok, @racc_val) if @yydebug 148 @racc_read_next = false 129 while true 130 if i = action_pointer[@racc_state[-1]] 131 if @racc_read_next 132 if @racc_t != 0 # not EOF 133 tok, @racc_val = next_token() 134 unless tok # EOF 135 @racc_t = 0 136 else 137 @racc_t = (token_table[tok] or 1) # error token 149 138 end 139 racc_read_token(@racc_t, tok, @racc_val) if @yydebug 140 @racc_read_next = false 150 141 end 151 i += @racc_t 152 if i >= 0 and 153 act = action_table[i] and 154 action_check[i] == @racc_state[-1] 155 ; 156 else 157 act = action_default[@racc_state[-1]] 158 end 159 else 142 end 143 i += @racc_t 144 unless i >= 0 and 145 act = action_table[i] and 146 action_check[i] == @racc_state[-1] 160 147 act = action_default[@racc_state[-1]] 161 148 end 162 while act = _racc_evalact(act, arg)163 end149 else 150 act = action_default[@racc_state[-1]] 164 151 end 152 while act = _racc_evalact(act, arg) 153 ; 154 end 155 end 165 156 } 166 157 end 167 168 158 169 159 ### … … 171 161 ### 172 162 173 def yyparse( recv, mid)174 __send__ Racc_YY_Parse_Method, recv, mid, _racc_setup(), true175 end 176 177 def _racc_yyparse_rb( recv, mid, arg, c_debug)163 def yyparse(recv, mid) 164 __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true) 165 end 166 167 def _racc_yyparse_rb(recv, mid, arg, c_debug) 178 168 action_table, action_check, action_default, action_pointer, 179 169 goto_table, goto_check, goto_default, goto_pointer, … … 187 177 nerr = 0 188 178 189 190 179 catch(:racc_end_parse) { 191 180 until i = action_pointer[@racc_state[-1]] 192 181 while act = _racc_evalact(action_default[@racc_state[-1]], arg) 182 ; 193 183 end 194 184 end 195 196 185 recv.__send__(mid) do |tok, val| 197 # $stderr.puts "rd: tok=#{tok}, val=#{val}"198 186 unless tok 199 187 @racc_t = 0 … … 205 193 206 194 i += @racc_t 207 if i >= 0 and 208 act = action_table[i] and 209 action_check[i] == @racc_state[-1] 195 unless i >= 0 and 196 act = action_table[i] and 197 action_check[i] == @racc_state[-1] 198 act = action_default[@racc_state[-1]] 199 end 200 while act = _racc_evalact(act, arg) 210 201 ; 211 # $stderr.puts "01: act=#{act}"212 else213 act = action_default[@racc_state[-1]]214 # $stderr.puts "02: act=#{act}"215 # $stderr.puts "curstate=#{@racc_state[-1]}"216 end217 218 while act = _racc_evalact(act, arg)219 202 end 220 203 … … 222 205 not @racc_read_next or 223 206 @racc_t == 0 # $ 224 if i and i += @racc_t and 225 i >= 0 and 226 act = action_table[i] and 227 action_check[i] == @racc_state[-1] 228 ; 229 # $stderr.puts "03: act=#{act}" 230 else 231 # $stderr.puts "04: act=#{act}" 207 unless i and i += @racc_t and 208 i >= 0 and 209 act = action_table[i] and 210 action_check[i] == @racc_state[-1] 232 211 act = action_default[@racc_state[-1]] 233 212 end 234 235 213 while act = _racc_evalact(act, arg) 214 ; 236 215 end 237 216 end … … 240 219 end 241 220 242 243 221 ### 244 222 ### common 245 223 ### 246 224 247 def _racc_evalact( act, arg ) 248 # $stderr.puts "ea: act=#{act}" 225 def _racc_evalact(act, arg) 249 226 action_table, action_check, action_default, action_pointer, 250 227 goto_table, goto_check, goto_default, goto_pointer, 251 228 nt_base, reduce_table, token_table, shift_n, 252 229 reduce_n, use_result, * = arg 253 nerr = 0 # tmp230 nerr = 0 # tmp 254 231 255 232 if act > 0 and act < shift_n … … 257 234 # shift 258 235 # 259 260 236 if @racc_error_status > 0 261 237 @racc_error_status -= 1 unless @racc_t == 1 # error token 262 238 end 263 264 239 @racc_vstack.push @racc_val 265 240 @racc_state.push act 266 241 @racc_read_next = true 267 268 242 if @yydebug 269 243 @racc_tstack.push @racc_t … … 275 249 # reduce 276 250 # 277 278 251 code = catch(:racc_jump) { 279 @racc_state.push _racc_do_reduce(arg, act)280 false252 @racc_state.push _racc_do_reduce(arg, act) 253 false 281 254 } 282 255 if code … … 288 261 return shift_n 289 262 else 290 raise RuntimeError,'[Racc Bug] unknown jump code'263 raise '[Racc Bug] unknown jump code' 291 264 end 292 265 end … … 296 269 # accept 297 270 # 298 299 271 racc_accept if @yydebug 300 272 throw :racc_end_parse, @racc_vstack[0] … … 304 276 # error 305 277 # 306 307 278 case @racc_error_status 308 279 when 0 … … 319 290 @racc_user_yyerror = false 320 291 @racc_error_status = 3 321 322 292 while true 323 293 if i = action_pointer[@racc_state[-1]] … … 329 299 end 330 300 end 331 332 throw :racc_end_parse, nil if @racc_state.size < 2 301 throw :racc_end_parse, nil if @racc_state.size <= 1 333 302 @racc_state.pop 334 303 @racc_vstack.pop … … 338 307 end 339 308 end 340 341 309 return act 342 310 343 311 else 344 raise RuntimeError,"[Racc Bug] unknown action #{act.inspect}"312 raise "[Racc Bug] unknown action #{act.inspect}" 345 313 end 346 314 … … 350 318 end 351 319 352 def _racc_do_reduce( arg, act)320 def _racc_do_reduce(arg, act) 353 321 action_table, action_check, action_default, action_pointer, 354 322 goto_table, goto_check, goto_default, goto_pointer, … … 391 359 end 392 360 393 def on_error( t, val, vstack)361 def on_error(t, val, vstack) 394 362 raise ParseError, sprintf("\nparse error on value %s (%s)", 395 363 val.inspect, token_to_str(t) || '?') … … 408 376 end 409 377 410 378 # 411 379 # for debugging output 412 413 def racc_read_token( t, tok, val ) 380 # 381 382 def racc_read_token(t, tok, val) 414 383 @racc_debug_out.print 'read ' 415 384 @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') ' … … 418 387 end 419 388 420 def racc_shift( tok, tstack, vstack)389 def racc_shift(tok, tstack, vstack) 421 390 @racc_debug_out.puts "shift #{racc_token2str tok}" 422 391 racc_print_stacks tstack, vstack … … 424 393 end 425 394 426 def racc_reduce( toks, sim, tstack, vstack)395 def racc_reduce(toks, sim, tstack, vstack) 427 396 out = @racc_debug_out 428 397 out.print 'reduce ' … … 443 412 end 444 413 445 def racc_e_pop( state, tstack, vstack)414 def racc_e_pop(state, tstack, vstack) 446 415 @racc_debug_out.puts 'error recovering mode: pop token' 447 416 racc_print_states state … … 450 419 end 451 420 452 def racc_next_state( curstate, state)421 def racc_next_state(curstate, state) 453 422 @racc_debug_out.puts "goto #{curstate}" 454 423 racc_print_states state … … 456 425 end 457 426 458 def racc_print_stacks( t, v)427 def racc_print_stacks(t, v) 459 428 out = @racc_debug_out 460 429 out.print ' [' … … 465 434 end 466 435 467 def racc_print_states( s)436 def racc_print_states(s) 468 437 out = @racc_debug_out 469 438 out.print ' [' … … 472 441 end 473 442 474 def racc_token2str( tok)443 def racc_token2str(tok) 475 444 self.class::Racc_token_to_s_table[tok] or 476 raise RuntimeError,"[Racc Bug] can't convert token #{tok} to string"477 end 478 479 def token_to_str( t)445 raise "[Racc Bug] can't convert token #{tok} to string" 446 end 447 448 def token_to_str(t) 480 449 self.class::Racc_token_to_s_table[t] 481 450 end … … 484 453 485 454 end 486 ..end /home/aamine/lib/ruby/racc/parser.rb modeval..idb76f2e220d 487 end # end of racc/parser.rb 455 ..end racc/parser.rb modeval..id8076474214 456 end 457 ###### racc/parser.rb end 488 458 489 459 … … 491 461 # parser.rb 492 462 # 493 #-- 494 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> 463 # Copyright (c) 1998-2007 Minero Aoki 495 464 # 496 # Permission is hereby granted, free of charge, to any person obtaining 497 # a copy of this software and associated documentation files (the 498 # "Software"), to deal in the Software without restriction, including 499 # without limitation the rights to use, copy, modify, merge, publish, 500 # distribute, sublicense, and/or sell copies of the Software, and to 501 # permit persons to whom the Software is furnished to do so, subject to 502 # the following conditions: 465 # This program is free software. 466 # You can distribute/modify this program under the terms of 467 # the GNU Lesser General Public License version 2.1. 503 468 # 504 # The above copyright notice and this permission notice shall be505 # included in all copies or substantial portions of the Software.506 #507 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,508 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF509 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND510 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE511 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION512 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION513 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.514 #515 # Note: Originally licensed under LGPL v2+. Using MIT license for Rails516 # with permission of Minero Aoki.517 #++518 469 519 470 require 'tmail/scanner' … … 525 476 class Parser < Racc::Parser 526 477 527 module_eval <<'..end parser.y modeval..id 43721faf1c', 'parser.y', 331478 module_eval <<'..end parser.y modeval..id7b0b3dccb7', 'parser.y', 340 528 479 529 480 include TextUtils … … 568 519 end 569 520 570 ..end parser.y modeval..id 43721faf1c571 572 ##### racc 1.4. 3generates ###521 ..end parser.y modeval..id7b0b3dccb7 522 523 ##### racc 1.4.5 generates ### 573 524 574 525 racc_reduce_table = [ … … 670 621 0, 80, :_reduce_95, 671 622 5, 80, :_reduce_96, 672 1, 82, :_reduce_none, 673 1, 82, :_reduce_none, 674 1, 44, :_reduce_99, 675 3, 45, :_reduce_100, 623 5, 80, :_reduce_97, 624 1, 44, :_reduce_98, 625 3, 45, :_reduce_99, 676 626 0, 81, :_reduce_none, 677 627 1, 81, :_reduce_none, … … 684 634 1, 78, :_reduce_none ] 685 635 686 racc_reduce_n = 1 10687 688 racc_shift_n = 16 8636 racc_reduce_n = 109 637 638 racc_shift_n = 167 689 639 690 640 racc_action_table = [ 691 -70, -69, 23, 25, 14 6, 147, 29, 31, 105, 106,641 -70, -69, 23, 25, 145, 146, 29, 31, 105, 106, 692 642 16, 17, 20, 22, 136, 27, -70, -69, 32, 101, 693 -70, -69, 15 4, 100, 113, 115, -70, -69, -70, 109,694 75, 23, 25, 101, 15 5, 29, 31, 142, 143, 16,643 -70, -69, 153, 100, 113, 115, -70, -69, -70, 109, 644 75, 23, 25, 101, 154, 29, 31, 142, 143, 16, 695 645 17, 20, 22, 107, 27, 23, 25, 32, 98, 29, 696 646 31, 96, 94, 16, 17, 20, 22, 78, 27, 23, … … 704 654 23, 25, 75, 32, 29, 31, 65, 62, 16, 17, 705 655 20, 22, 139, 23, 25, 101, 32, 29, 31, 60, 706 100, 16, 17, 20, 22, 44, 27, 101, 14 8, 32,707 23, 25, 120, 14 9, 29, 31, 152, 153, 16, 17,708 20, 22, 42, 27, 15 7, 159, 32, 23, 25, 120,709 40, 29, 31, 15, 16 4, 16, 17, 20, 22, 40,710 27, 23, 25, 32, 68, 29, 31, 16 6, 167, 16,656 100, 16, 17, 20, 22, 44, 27, 101, 147, 32, 657 23, 25, 120, 148, 29, 31, 151, 152, 16, 17, 658 20, 22, 42, 27, 156, 158, 32, 23, 25, 120, 659 40, 29, 31, 15, 163, 16, 17, 20, 22, 40, 660 27, 23, 25, 32, 68, 29, 31, 165, 166, 16, 711 661 17, 20, 22, nil, 27, 23, 25, 32, nil, 29, 712 662 31, 74, nil, 16, 17, 20, 22, nil, 23, 25, … … 736 686 75, 28, 143, 66, 86, 86, 75, 28, 75, 75, 737 687 28, 3, 3, 86, 143, 3, 3, 134, 134, 3, 738 3, 3, 3, 73, 3, 15 2, 152, 3, 62, 152,739 15 2, 60, 56, 152, 152, 152, 152, 51, 152, 52,740 52, 15 2, 80, 52, 52, 52, 50, 52, 52, 52,688 3, 3, 3, 73, 3, 151, 151, 3, 62, 151, 689 151, 60, 56, 151, 151, 151, 151, 51, 151, 52, 690 52, 151, 80, 52, 52, 52, 50, 52, 52, 52, 741 691 52, 45, 89, 52, 42, 52, 71, 71, 41, 96, 742 692 71, 71, 97, 98, 71, 71, 71, 71, 100, 7, … … 749 699 135, 2, 2, 2, 2, 6, 2, 138, 139, 2, 750 700 90, 90, 90, 140, 90, 90, 141, 142, 90, 90, 751 90, 90, 5, 90, 14 8, 151, 90, 127, 127, 127,752 4, 127, 127, 1, 15 7, 127, 127, 127, 127, 159,753 127, 26, 26, 127, 26, 26, 26, 16 3, 164, 26,701 90, 90, 5, 90, 147, 150, 90, 127, 127, 127, 702 4, 127, 127, 1, 156, 127, 127, 127, 127, 158, 703 127, 26, 26, 127, 26, 26, 26, 162, 163, 26, 754 704 26, 26, 26, nil, 26, 27, 27, 26, nil, 27, 755 27, 27, nil, 27, 27, 27, 27, nil, 15 5, 155,756 nil, 27, 15 5, 155, nil, nil, 155, 155, 155, 155,757 nil, 122, 122, nil, 15 5, 122, 122, nil, nil, 122,705 27, 27, nil, 27, 27, 27, 27, nil, 154, 154, 706 nil, 27, 154, 154, nil, nil, 154, 154, 154, 154, 707 nil, 122, 122, nil, 154, 122, 122, nil, nil, 122, 758 708 122, 122, 122, nil, 76, 76, nil, 122, 76, 76, 759 709 nil, nil, 76, 76, 76, 76, nil, 38, 38, nil, … … 789 739 nil, 98, 217, nil, nil, nil, -19, 163, nil, 380, 790 740 128, 116, nil, nil, 14, 124, -26, nil, 128, 141, 791 148, 141, 152, 7, nil, nil, nil, nil, 160, nil,792 nil, 149, 31, nil, nil, 204, nil, 167, nil, 174,793 nil, nil, nil,169, 184, nil, nil, nil ]741 148, 141, 152, 7, nil, nil, nil, 160, nil, nil, 742 149, 31, nil, nil, 204