Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8084

Show
Ignore:
Timestamp:
11/06/07 14:24:32 (1 year ago)
Author:
rick
Message:

Update TMail to v1.1.0. Use an updated version of TMail if available. [mikel]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionmailer/CHANGELOG

    r8022 r8084  
    11*SVN* 
     2 
     3* Update TMail to v1.1.0.  Use an updated version of TMail if available.  [mikel] 
    24 
    35* Introduce a new base test class for testing Mailers.  ActionMailer::TestCase [Koz] 
  • trunk/actionmailer/lib/action_mailer.rb

    r7425 r8084  
    3232end 
    3333 
     34# attempt to load the TMail gem 
     35begin 
     36  require 'rubygems' 
     37  gem 'TMail', '> 1.1.0' 
     38  require 'tmail' 
     39rescue Gem::LoadError 
     40  # no gem, fall back to vendor copy 
     41end 
     42 
    3443$:.unshift(File.dirname(__FILE__) + "/action_mailer/vendor/") 
    3544 
     45require 'tmail' 
    3646require 'action_mailer/base' 
    3747require 'action_mailer/helpers' 
     
    3949require 'action_mailer/quoting' 
    4050require 'action_mailer/test_helper' 
    41 require 'tmail' 
    4251require 'net/smtp' 
    4352 
  • trunk/actionmailer/lib/action_mailer/vendor/tmail.rb

    r399 r8084  
    1 require 'tmail/info
     1require 'tmail/version
    22require 'tmail/mail' 
    33require 'tmail/mailbox' 
     4require '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 
    36# 
    47#-- 
     
    5255        end 
    5356      end 
     57 
    5458      @local = local 
    5559      @domain = domain 
     
    96100 
    97101    alias address  spec 
    98  
    99102 
    100103    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 
    17require 'stringio' 
    28 
  • 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 
    46#-- 
    57# 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 
    46#-- 
    57# 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 
    46#-- 
    57# Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> 
     
    5153    end 
    5254    module_function :create_dest 
    53  
     55     
    5456    def encoded( eol = "\r\n", charset = 'j', dest = nil ) 
    5557      accept_strategy Encoder, eol, charset, dest 
    5658    end 
    57  
     59     
    5860    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 
    5963      accept_strategy Decoder, eol, charset, dest 
    6064    end 
    61  
     65     
    6266    alias to_s decoded 
    63    
     67     
    6468    def accept_strategy( klass, eol, charset, dest = nil ) 
    6569      dest ||= '' 
    66       accept klass.new(create_dest(dest), charset, eol
     70      accept klass.new( create_dest(dest), charset, eol
    6771      dest 
    6872    end 
    69  
     73     
    7074  end 
    7175 
     
    142146 
    143147    def kv_pair( k, v ) 
     148      v = dquote(v) unless token_safe?(v) 
    144149      @f << k << '=' << v 
    145150    end 
     
    191196      @opt = OPTIONS[$KCODE] 
    192197      @eol = eol 
     198      @preserve_quotes = true 
    193199      reset 
     200    end 
     201 
     202    def preserve_quotes=( bool ) 
     203      @preserve_quotes 
     204    end 
     205     
     206    def preserve_quotes 
     207      @preserve_quotes 
    194208    end 
    195209 
  • 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#  
    38# 
    49#-- 
     
    7782      @illegal = false 
    7883      @parsed = false 
     84       
    7985      if intern 
    8086        @parsed = true 
     
    130136    include StrategyInterface 
    131137 
    132     def accept( strategy, dummy1 = nil, dummy2 = nil
     138    def accept( strategy
    133139      ensure_parsed 
    134140      do_accept strategy 
     
    208214 
    209215    def do_parse 
     216      quote_boundary 
    210217      obj = Parser.parse(self.class::PARSE_TYPE, @body, @comments) 
    211218      set obj if obj 
     
    740747    def params 
    741748      ensure_parsed 
     749      unless @params.blank? 
     750        @params.each do |k, v| 
     751          @params[k] = unquote(v) 
     752        end 
     753      end 
    742754      @params 
    743755    end 
     
    745757    def []( key ) 
    746758      ensure_parsed 
    747       @params and @params[key] 
     759      @params and unquote(@params[key]) 
    748760    end 
    749761 
     
    836848    def params 
    837849      ensure_parsed 
     850      unless @params.blank? 
     851        @params.each do |k, v| 
     852          @params[k] = unquote(v) 
     853        end 
     854      end 
    838855      @params 
    839856    end 
     
    841858    def []( key ) 
    842859      ensure_parsed 
    843       @params and @params[key] 
     860      @params and unquote(@params[key]) 
    844861    end 
    845862 
     
    868885        strategy.meta ';' 
    869886        strategy.space 
    870         strategy.kv_pair k, v 
     887        strategy.kv_pair k, unquote(v) 
    871888      end 
    872889    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 
    46#-- 
    57# Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> 
     
    2830#++ 
    2931 
    30 require 'tmail/facade' 
     32require 'tmail/interface' 
    3133require 'tmail/encode' 
    3234require 'tmail/header' 
     
    3840require 'socket' 
    3941 
    40  
    4142module TMail 
    4243 
     
    5455        new(StringPort.new(str)) 
    5556      end 
     57 
    5658    end 
    5759 
     
    356358 
    357359    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)) 
    358373      parse_body 
    359374      @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 
    46#-- 
    57# 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 
    46#-- 
    57# 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 
    46#-- 
    57# Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> 
  • trunk/actionmailer/lib/action_mailer/vendor/tmail/parser.rb

    r2634 r8084  
    1 # 
    21# DO NOT MODIFY!!!! 
    3 # This file is automatically generated by racc 1.4.3 
     2# This file is automatically generated by racc 1.4.5 
    43# from racc grammer file "parser.y". 
    54# 
     
    76# parser.rb: generated by racc (runtime embedded) 
    87# 
    9  
    10 ###### racc/parser.rb 
    11  
     8###### racc/parser.rb begin 
    129unless $".index 'racc/parser.rb' 
    1310$".push 'racc/parser.rb' 
    1411 
    15 self.class.module_eval <<'..end /home/aamine/lib/ruby/racc/parser.rb modeval..idb76f2e220d', '/home/aamine/lib/ruby/racc/parser.rb', 1 
     12self.class.module_eval <<'..end racc/parser.rb modeval..id8076474214', 'racc/parser.rb', 1 
    1613# 
    17 # parser.rb 
     14# $Id: parser.rb,v 1.7 2005/11/20 17:31:32 aamine Exp $ 
    1815# 
    19 #   Copyright (c) 1999-2003 Minero Aoki <aamine@loveruby.net> 
     16# Copyright (c) 1999-2005 Minero Aoki 
    2017# 
    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. 
    2320# 
    24 #   As a special exception, when this code is copied by Racc 
    25 #   into a Racc output file, you may use that output file 
    26 #   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. 
    2724# 
    28 #   $Id: parser.rb,v 1.1.1.1 2004/10/14 11:59:58 webster132 Exp $ 
    29 
    30  
    31 unless defined? NotImplementedError 
     25 
     26unless defined?(NotImplementedError) 
    3227  NotImplementedError = NotImplementError 
    3328end 
    34  
    3529 
    3630module Racc 
     
    4135end 
    4236 
    43  
    4437module Racc 
    4538 
    46   unless defined? Racc_No_Extentions 
     39  unless defined?(Racc_No_Extentions) 
    4740    Racc_No_Extentions = false 
    4841  end 
     
    5043  class Parser 
    5144 
    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] 
    5750    begin 
    5851      require 'racc/cparse' 
    5952    # 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] 
    6154      unless new.respond_to?(:_racc_do_parse_c, true) 
    6255        raise LoadError, 'old cparse.so' 
     
    7972    end 
    8073 
    81     def self.racc_runtime_type 
     74    def Parser.racc_runtime_type 
    8275      Racc_Runtime_Type 
    8376    end 
     
    8780    def _racc_setup 
    8881      @yydebug = false unless self.class::Racc_debug_parser 
    89       @yydebug = false unless defined? @yydebug 
     82      @yydebug = false unless defined?(@yydebug) 
    9083      if @yydebug 
    91         @racc_debug_out = $stderr unless defined? @racc_debug_out 
     84        @racc_debug_out = $stderr unless defined?(@racc_debug_out) 
    9285        @racc_debug_out ||= $stderr 
    9386      end 
     
    111104    end 
    112105 
    113  
    114106    ### 
    115107    ### do_parse 
     
    117109 
    118110    def do_parse 
    119       __send__ Racc_Main_Parsing_Routine, _racc_setup(), false 
     111      __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) 
    120112    end 
    121113 
     
    124116    end 
    125117 
    126     def _racc_do_parse_rb( arg, in_debug
     118    def _racc_do_parse_rb(arg, in_debug
    127119      action_table, action_check, action_default, action_pointer, 
    128120      goto_table,   goto_check,   goto_default,   goto_pointer, 
     
    135127 
    136128      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 
    149138                end 
     139                racc_read_token(@racc_t, tok, @racc_val) if @yydebug 
     140                @racc_read_next = false 
    150141              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] 
    160147              act = action_default[@racc_state[-1]] 
    161148            end 
    162             while act = _racc_evalact(act, arg) 
    163             end 
     149          else 
     150            act = action_default[@racc_state[-1]] 
    164151          end 
     152          while act = _racc_evalact(act, arg) 
     153            ; 
     154          end 
     155        end 
    165156      } 
    166157    end 
    167  
    168158 
    169159    ### 
     
    171161    ### 
    172162 
    173     def yyparse( recv, mid
    174       __send__ Racc_YY_Parse_Method, recv, mid, _racc_setup(), true 
    175     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
    178168      action_table, action_check, action_default, action_pointer, 
    179169      goto_table,   goto_check,   goto_default,   goto_pointer, 
     
    187177      nerr = 0 
    188178 
    189  
    190179      catch(:racc_end_parse) { 
    191180        until i = action_pointer[@racc_state[-1]] 
    192181          while act = _racc_evalact(action_default[@racc_state[-1]], arg) 
     182            ; 
    193183          end 
    194184        end 
    195  
    196185        recv.__send__(mid) do |tok, val| 
    197 # $stderr.puts "rd: tok=#{tok}, val=#{val}" 
    198186          unless tok 
    199187            @racc_t = 0 
     
    205193 
    206194          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) 
    210201            ; 
    211 # $stderr.puts "01: act=#{act}" 
    212           else 
    213             act = action_default[@racc_state[-1]] 
    214 # $stderr.puts "02: act=#{act}" 
    215 # $stderr.puts "curstate=#{@racc_state[-1]}" 
    216           end 
    217  
    218           while act = _racc_evalact(act, arg) 
    219202          end 
    220203 
     
    222205                not @racc_read_next or 
    223206                @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] 
    232211              act = action_default[@racc_state[-1]] 
    233212            end 
    234  
    235213            while act = _racc_evalact(act, arg) 
     214              ; 
    236215            end 
    237216          end 
     
    240219    end 
    241220 
    242  
    243221    ### 
    244222    ### common 
    245223    ### 
    246224 
    247     def _racc_evalact( act, arg ) 
    248 # $stderr.puts "ea: act=#{act}" 
     225    def _racc_evalact(act, arg) 
    249226      action_table, action_check, action_default, action_pointer, 
    250227      goto_table,   goto_check,   goto_default,   goto_pointer, 
    251228      nt_base,      reduce_table, token_table,    shift_n, 
    252229      reduce_n,     use_result,   * = arg 
    253 nerr = 0   # tmp 
     230      nerr = 0   # tmp 
    254231 
    255232      if act > 0 and act < shift_n 
     
    257234        # shift 
    258235        # 
    259  
    260236        if @racc_error_status > 0 
    261237          @racc_error_status -= 1 unless @racc_t == 1   # error token 
    262238        end 
    263  
    264239        @racc_vstack.push @racc_val 
    265240        @racc_state.push act 
    266241        @racc_read_next = true 
    267  
    268242        if @yydebug 
    269243          @racc_tstack.push @racc_t 
     
    275249        # reduce 
    276250        # 
    277  
    278251        code = catch(:racc_jump) { 
    279             @racc_state.push _racc_do_reduce(arg, act) 
    280             false 
     252          @racc_state.push _racc_do_reduce(arg, act) 
     253          false 
    281254        } 
    282255        if code 
     
    288261            return shift_n 
    289262          else 
    290             raise RuntimeError, '[Racc Bug] unknown jump code' 
     263            raise '[Racc Bug] unknown jump code' 
    291264          end 
    292265        end 
     
    296269        # accept 
    297270        # 
    298  
    299271        racc_accept if @yydebug 
    300272        throw :racc_end_parse, @racc_vstack[0] 
     
    304276        # error 
    305277        # 
    306  
    307278        case @racc_error_status 
    308279        when 0 
     
    319290        @racc_user_yyerror = false 
    320291        @racc_error_status = 3 
    321  
    322292        while true 
    323293          if i = action_pointer[@racc_state[-1]] 
     
    329299            end 
    330300          end 
    331  
    332           throw :racc_end_parse, nil if @racc_state.size < 2 
     301          throw :racc_end_parse, nil if @racc_state.size <= 1 
    333302          @racc_state.pop 
    334303          @racc_vstack.pop 
     
    338307          end 
    339308        end 
    340  
    341309        return act 
    342310 
    343311      else 
    344         raise RuntimeError, "[Racc Bug] unknown action #{act.inspect}" 
     312        raise "[Racc Bug] unknown action #{act.inspect}" 
    345313      end 
    346314 
     
    350318    end 
    351319 
    352     def _racc_do_reduce( arg, act
     320    def _racc_do_reduce(arg, act
    353321      action_table, action_check, action_default, action_pointer, 
    354322      goto_table,   goto_check,   goto_default,   goto_pointer, 
     
    391359    end 
    392360 
    393     def on_error( t, val, vstack
     361    def on_error(t, val, vstack
    394362      raise ParseError, sprintf("\nparse error on value %s (%s)", 
    395363                                val.inspect, token_to_str(t) || '?') 
     
    408376    end 
    409377 
    410  
     378    # 
    411379    # for debugging output 
    412  
    413     def racc_read_token( t, tok, val ) 
     380    # 
     381 
     382    def racc_read_token(t, tok, val) 
    414383      @racc_debug_out.print 'read    ' 
    415384      @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') ' 
     
    418387    end 
    419388 
    420     def racc_shift( tok, tstack, vstack
     389    def racc_shift(tok, tstack, vstack
    421390      @racc_debug_out.puts "shift   #{racc_token2str tok}" 
    422391      racc_print_stacks tstack, vstack 
     
    424393    end 
    425394 
    426     def racc_reduce( toks, sim, tstack, vstack
     395    def racc_reduce(toks, sim, tstack, vstack
    427396      out = @racc_debug_out 
    428397      out.print 'reduce ' 
     
    443412    end 
    444413 
    445     def racc_e_pop( state, tstack, vstack
     414    def racc_e_pop(state, tstack, vstack
    446415      @racc_debug_out.puts 'error recovering mode: pop token' 
    447416      racc_print_states state 
     
    450419    end 
    451420 
    452     def racc_next_state( curstate, state
     421    def racc_next_state(curstate, state
    453422      @racc_debug_out.puts  "goto    #{curstate}" 
    454423      racc_print_states state 
     
    456425    end 
    457426 
    458     def racc_print_stacks( t, v
     427    def racc_print_stacks(t, v
    459428      out = @racc_debug_out 
    460429      out.print '        [' 
     
    465434    end 
    466435 
    467     def racc_print_states( s
     436    def racc_print_states(s
    468437      out = @racc_debug_out 
    469438      out.print '        [' 
     
    472441    end 
    473442 
    474     def racc_token2str( tok
     443    def racc_token2str(tok
    475444      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
    480449      self.class::Racc_token_to_s_table[t] 
    481450    end 
     
    484453 
    485454end 
    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 
     456end 
     457###### racc/parser.rb end 
    488458 
    489459 
     
    491461# parser.rb 
    492462# 
    493 #-- 
    494 # Copyright (c) 1998-2003 Minero Aoki <aamine@loveruby.net> 
     463# Copyright (c) 1998-2007 Minero Aoki 
    495464# 
    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. 
    503468# 
    504 # The above copyright notice and this permission notice shall be 
    505 # 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 OF 
    509 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
    510 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
    511 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
    512 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
    513 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
    514 # 
    515 # Note: Originally licensed under LGPL v2+. Using MIT license for Rails 
    516 # with permission of Minero Aoki. 
    517 #++ 
    518469 
    519470require 'tmail/scanner' 
     
    525476  class Parser < Racc::Parser 
    526477 
    527 module_eval <<'..end parser.y modeval..id43721faf1c', 'parser.y', 331 
     478module_eval <<'..end parser.y modeval..id7b0b3dccb7', 'parser.y', 340 
    528479 
    529480  include TextUtils 
     
    568519  end 
    569520 
    570 ..end parser.y modeval..id43721faf1c 
    571  
    572 ##### racc 1.4.3 generates ### 
     521..end parser.y modeval..id7b0b3dccb7 
     522 
     523##### racc 1.4.5 generates ### 
    573524 
    574525racc_reduce_table = [ 
     
    670621 0, 80, :_reduce_95, 
    671622 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, 
    676626 0, 81, :_reduce_none, 
    677627 1, 81, :_reduce_none, 
     
    684634 1, 78, :_reduce_none ] 
    685635 
    686 racc_reduce_n = 110 
    687  
    688 racc_shift_n = 168 
     636racc_reduce_n = 109 
     637 
     638racc_shift_n = 167 
    689639 
    690640racc_action_table = [ 
    691    -70,   -69,    23,    25,   146,   147,    29,    31,   105,   106, 
     641   -70,   -69,    23,    25,   145,   146,    29,    31,   105,   106, 
    692642    16,    17,    20,    22,   136,    27,   -70,   -69,    32,   101, 
    693    -70,   -69,   154,   100,   113,   115,   -70,   -69,   -70,   109, 
    694     75,    23,    25,   101,   155,    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, 
    695645    17,    20,    22,   107,    27,    23,    25,    32,    98,    29, 
    696646    31,    96,    94,    16,    17,    20,    22,    78,    27,    23, 
     
    704654    23,    25,    75,    32,    29,    31,    65,    62,    16,    17, 
    705655    20,    22,   139,    23,    25,   101,    32,    29,    31,    60, 
    706    100,    16,    17,    20,    22,    44,    27,   101,   148,    32, 
    707     23,    25,   120,   149,    29,    31,   152,   153,    16,    17, 
    708     20,    22,    42,    27,   157,   159,    32,    23,    25,   120, 
    709     40,    29,    31,    15,   164,    16,    17,    20,    22,    40, 
    710     27,    23,    25,    32,    68,    29,    31,   166,   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, 
    711661    17,    20,    22,   nil,    27,    23,    25,    32,   nil,    29, 
    712662    31,    74,   nil,    16,    17,    20,    22,   nil,    23,    25, 
     
    736686    75,    28,   143,    66,    86,    86,    75,    28,    75,    75, 
    737687    28,     3,     3,    86,   143,     3,     3,   134,   134,     3, 
    738      3,     3,     3,    73,     3,   152,   152,     3,    62,   152
    739    152,    60,    56,   152,   152,   152,   152,    51,   152,    52, 
    740     52,   152,    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, 
    741691    52,    45,    89,    52,    42,    52,    71,    71,    41,    96, 
    742692    71,    71,    97,    98,    71,    71,    71,    71,   100,     7, 
     
    749699   135,     2,     2,     2,     2,     6,     2,   138,   139,     2, 
    750700    90,    90,    90,   140,    90,    90,   141,   142,    90,    90, 
    751     90,    90,     5,    90,   148,   151,    90,   127,   127,   127, 
    752      4,   127,   127,     1,   157,   127,   127,   127,   127,   159
    753    127,    26,    26,   127,    26,    26,    26,   163,   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, 
    754704    26,    26,    26,   nil,    26,    27,    27,    26,   nil,    27, 
    755     27,    27,   nil,    27,    27,    27,    27,   nil,   155,   155
    756    nil,    27,   155,   155,   nil,   nil,   155,   155,   155,   155
    757    nil,   122,   122,   nil,   155,   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, 
    758708   122,   122,   122,   nil,    76,    76,   nil,   122,    76,    76, 
    759709   nil,   nil,    76,    76,    76,    76,   nil,    38,    38,   nil, 
     
    789739   nil,    98,   217,   nil,   nil,   nil,   -19,   163,   nil,   380, 
    790740   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