Upgraded Rails and RSpec
[monkeycharger.git] / vendor / rails / actionmailer / lib / action_mailer / vendor / tmail-1.1.0 / tmail / parser.rb
blob5deb0ff65538ed554d00d6833acfb4b5fdbe7764
1 # DO NOT MODIFY!!!!
2 # This file is automatically generated by racc 1.4.5
3 # from racc grammer file "parser.y".
6 # parser.rb: generated by racc (runtime embedded)
8 ###### racc/parser.rb begin
9 unless $".index 'racc/parser.rb'
10 $".push 'racc/parser.rb'
12 self.class.module_eval <<'..end racc/parser.rb modeval..id8076474214', 'racc/parser.rb', 1
14 # $Id: parser.rb,v 1.7 2005/11/20 17:31:32 aamine Exp $
16 # Copyright (c) 1999-2005 Minero Aoki
18 # This program is free software.
19 # You can distribute/modify this program under the same terms of ruby.
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.
26 unless defined?(NotImplementedError)
27   NotImplementedError = NotImplementError
28 end
30 module Racc
31   class ParseError < StandardError; end
32 end
33 unless defined?(::ParseError)
34   ParseError = Racc::ParseError
35 end
37 module Racc
39   unless defined?(Racc_No_Extentions)
40     Racc_No_Extentions = false
41   end
43   class Parser
45     Racc_Runtime_Version = '1.4.5'
46     Racc_Runtime_Revision = '$Revision: 1.7 $'.split[1]
48     Racc_Runtime_Core_Version_R = '1.4.5'
49     Racc_Runtime_Core_Revision_R = '$Revision: 1.7 $'.split[1]
50     begin
51       require 'racc/cparse'
52     # Racc_Runtime_Core_Version_C  = (defined in extention)
53       Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
54       unless new.respond_to?(:_racc_do_parse_c, true)
55         raise LoadError, 'old cparse.so'
56       end
57       if Racc_No_Extentions
58         raise LoadError, 'selecting ruby version of racc runtime core'
59       end
61       Racc_Main_Parsing_Routine    = :_racc_do_parse_c
62       Racc_YY_Parse_Method         = :_racc_yyparse_c
63       Racc_Runtime_Core_Version    = Racc_Runtime_Core_Version_C
64       Racc_Runtime_Core_Revision   = Racc_Runtime_Core_Revision_C
65       Racc_Runtime_Type            = 'c'
66     rescue LoadError
67       Racc_Main_Parsing_Routine    = :_racc_do_parse_rb
68       Racc_YY_Parse_Method         = :_racc_yyparse_rb
69       Racc_Runtime_Core_Version    = Racc_Runtime_Core_Version_R
70       Racc_Runtime_Core_Revision   = Racc_Runtime_Core_Revision_R
71       Racc_Runtime_Type            = 'ruby'
72     end
74     def Parser.racc_runtime_type
75       Racc_Runtime_Type
76     end
78     private
80     def _racc_setup
81       @yydebug = false unless self.class::Racc_debug_parser
82       @yydebug = false unless defined?(@yydebug)
83       if @yydebug
84         @racc_debug_out = $stderr unless defined?(@racc_debug_out)
85         @racc_debug_out ||= $stderr
86       end
87       arg = self.class::Racc_arg
88       arg[13] = true if arg.size < 14
89       arg
90     end
92     def _racc_init_sysvars
93       @racc_state  = [0]
94       @racc_tstack = []
95       @racc_vstack = []
97       @racc_t = nil
98       @racc_val = nil
100       @racc_read_next = true
102       @racc_user_yyerror = false
103       @racc_error_status = 0
104     end
106     ###
107     ### do_parse
108     ###
110     def do_parse
111       __send__(Racc_Main_Parsing_Routine, _racc_setup(), false)
112     end
114     def next_token
115       raise NotImplementedError, "#{self.class}\#next_token is not defined"
116     end
118     def _racc_do_parse_rb(arg, in_debug)
119       action_table, action_check, action_default, action_pointer,
120       goto_table,   goto_check,   goto_default,   goto_pointer,
121       nt_base,      reduce_table, token_table,    shift_n,
122       reduce_n,     use_result,   * = arg
124       _racc_init_sysvars
125       tok = act = i = nil
126       nerr = 0
128       catch(:racc_end_parse) {
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
138                 end
139                 racc_read_token(@racc_t, tok, @racc_val) if @yydebug
140                 @racc_read_next = false
141               end
142             end
143             i += @racc_t
144             unless i >= 0 and
145                    act = action_table[i] and
146                    action_check[i] == @racc_state[-1]
147               act = action_default[@racc_state[-1]]
148             end
149           else
150             act = action_default[@racc_state[-1]]
151           end
152           while act = _racc_evalact(act, arg)
153             ;
154           end
155         end
156       }
157     end
159     ###
160     ### yyparse
161     ###
163     def yyparse(recv, mid)
164       __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true)
165     end
167     def _racc_yyparse_rb(recv, mid, arg, c_debug)
168       action_table, action_check, action_default, action_pointer,
169       goto_table,   goto_check,   goto_default,   goto_pointer,
170       nt_base,      reduce_table, token_table,    shift_n,
171       reduce_n,     use_result,   * = arg
173       _racc_init_sysvars
174       tok = nil
175       act = nil
176       i = nil
177       nerr = 0
179       catch(:racc_end_parse) {
180         until i = action_pointer[@racc_state[-1]]
181           while act = _racc_evalact(action_default[@racc_state[-1]], arg)
182             ;
183           end
184         end
185         recv.__send__(mid) do |tok, val|
186           unless tok
187             @racc_t = 0
188           else
189             @racc_t = (token_table[tok] or 1)   # error token
190           end
191           @racc_val = val
192           @racc_read_next = false
194           i += @racc_t
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)
201             ;
202           end
204           while not (i = action_pointer[@racc_state[-1]]) or
205                 not @racc_read_next or
206                 @racc_t == 0   # $
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]
211               act = action_default[@racc_state[-1]]
212             end
213             while act = _racc_evalact(act, arg)
214               ;
215             end
216           end
217         end
218       }
219     end
221     ###
222     ### common
223     ###
225     def _racc_evalact(act, arg)
226       action_table, action_check, action_default, action_pointer,
227       goto_table,   goto_check,   goto_default,   goto_pointer,
228       nt_base,      reduce_table, token_table,    shift_n,
229       reduce_n,     use_result,   * = arg
230       nerr = 0   # tmp
232       if act > 0 and act < shift_n
233         #
234         # shift
235         #
236         if @racc_error_status > 0
237           @racc_error_status -= 1 unless @racc_t == 1   # error token
238         end
239         @racc_vstack.push @racc_val
240         @racc_state.push act
241         @racc_read_next = true
242         if @yydebug
243           @racc_tstack.push @racc_t
244           racc_shift @racc_t, @racc_tstack, @racc_vstack
245         end
247       elsif act < 0 and act > -reduce_n
248         #
249         # reduce
250         #
251         code = catch(:racc_jump) {
252           @racc_state.push _racc_do_reduce(arg, act)
253           false
254         }
255         if code
256           case code
257           when 1 # yyerror
258             @racc_user_yyerror = true   # user_yyerror
259             return -reduce_n
260           when 2 # yyaccept
261             return shift_n
262           else
263             raise '[Racc Bug] unknown jump code'
264           end
265         end
267       elsif act == shift_n
268         #
269         # accept
270         #
271         racc_accept if @yydebug
272         throw :racc_end_parse, @racc_vstack[0]
274       elsif act == -reduce_n
275         #
276         # error
277         #
278         case @racc_error_status
279         when 0
280           unless arg[21]    # user_yyerror
281             nerr += 1
282             on_error @racc_t, @racc_val, @racc_vstack
283           end
284         when 3
285           if @racc_t == 0   # is $
286             throw :racc_end_parse, nil
287           end
288           @racc_read_next = true
289         end
290         @racc_user_yyerror = false
291         @racc_error_status = 3
292         while true
293           if i = action_pointer[@racc_state[-1]]
294             i += 1   # error token
295             if  i >= 0 and
296                 (act = action_table[i]) and
297                 action_check[i] == @racc_state[-1]
298               break
299             end
300           end
301           throw :racc_end_parse, nil if @racc_state.size <= 1
302           @racc_state.pop
303           @racc_vstack.pop
304           if @yydebug
305             @racc_tstack.pop
306             racc_e_pop @racc_state, @racc_tstack, @racc_vstack
307           end
308         end
309         return act
311       else
312         raise "[Racc Bug] unknown action #{act.inspect}"
313       end
315       racc_next_state(@racc_state[-1], @racc_state) if @yydebug
317       nil
318     end
320     def _racc_do_reduce(arg, act)
321       action_table, action_check, action_default, action_pointer,
322       goto_table,   goto_check,   goto_default,   goto_pointer,
323       nt_base,      reduce_table, token_table,    shift_n,
324       reduce_n,     use_result,   * = arg
325       state = @racc_state
326       vstack = @racc_vstack
327       tstack = @racc_tstack
329       i = act * -3
330       len       = reduce_table[i]
331       reduce_to = reduce_table[i+1]
332       method_id = reduce_table[i+2]
333       void_array = []
335       tmp_t = tstack[-len, len] if @yydebug
336       tmp_v = vstack[-len, len]
337       tstack[-len, len] = void_array if @yydebug
338       vstack[-len, len] = void_array
339       state[-len, len]  = void_array
341       # tstack must be updated AFTER method call
342       if use_result
343         vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
344       else
345         vstack.push __send__(method_id, tmp_v, vstack)
346       end
347       tstack.push reduce_to
349       racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug
351       k1 = reduce_to - nt_base
352       if i = goto_pointer[k1]
353         i += state[-1]
354         if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
355           return curstate
356         end
357       end
358       goto_default[k1]
359     end
361     def on_error(t, val, vstack)
362       raise ParseError, sprintf("\nparse error on value %s (%s)",
363                                 val.inspect, token_to_str(t) || '?')
364     end
366     def yyerror
367       throw :racc_jump, 1
368     end
370     def yyaccept
371       throw :racc_jump, 2
372     end
374     def yyerrok
375       @racc_error_status = 0
376     end
378     #
379     # for debugging output
380     #
382     def racc_read_token(t, tok, val)
383       @racc_debug_out.print 'read    '
384       @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
385       @racc_debug_out.puts val.inspect
386       @racc_debug_out.puts
387     end
389     def racc_shift(tok, tstack, vstack)
390       @racc_debug_out.puts "shift   #{racc_token2str tok}"
391       racc_print_stacks tstack, vstack
392       @racc_debug_out.puts
393     end
395     def racc_reduce(toks, sim, tstack, vstack)
396       out = @racc_debug_out
397       out.print 'reduce '
398       if toks.empty?
399         out.print ' <none>'
400       else
401         toks.each {|t| out.print ' ', racc_token2str(t) }
402       end
403       out.puts " --> #{racc_token2str(sim)}"
404           
405       racc_print_stacks tstack, vstack
406       @racc_debug_out.puts
407     end
409     def racc_accept
410       @racc_debug_out.puts 'accept'
411       @racc_debug_out.puts
412     end
414     def racc_e_pop(state, tstack, vstack)
415       @racc_debug_out.puts 'error recovering mode: pop token'
416       racc_print_states state
417       racc_print_stacks tstack, vstack
418       @racc_debug_out.puts
419     end
421     def racc_next_state(curstate, state)
422       @racc_debug_out.puts  "goto    #{curstate}"
423       racc_print_states state
424       @racc_debug_out.puts
425     end
427     def racc_print_stacks(t, v)
428       out = @racc_debug_out
429       out.print '        ['
430       t.each_index do |i|
431         out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
432       end
433       out.puts ' ]'
434     end
436     def racc_print_states(s)
437       out = @racc_debug_out
438       out.print '        ['
439       s.each {|st| out.print ' ', st }
440       out.puts ' ]'
441     end
443     def racc_token2str(tok)
444       self.class::Racc_token_to_s_table[tok] or
445           raise "[Racc Bug] can't convert token #{tok} to string"
446     end
448     def token_to_str(t)
449       self.class::Racc_token_to_s_table[t]
450     end
452   end
455 ..end racc/parser.rb modeval..id8076474214
457 ###### racc/parser.rb end
461 # parser.rb
463 # Copyright (c) 1998-2007 Minero Aoki
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.
470 require 'tmail/scanner'
471 require 'tmail/utils'
474 module TMail
476   class Parser < Racc::Parser
478 module_eval <<'..end parser.y modeval..id7b0b3dccb7', 'parser.y', 340
480   include TextUtils
482   def self.parse( ident, str, cmt = nil )
483     new.parse(ident, str, cmt)
484   end
486   MAILP_DEBUG = false
488   def initialize
489     self.debug = MAILP_DEBUG
490   end
492   def debug=( flag )
493     @yydebug = flag && Racc_debug_parser
494     @scanner_debug = flag
495   end
497   def debug
498     @yydebug
499   end
501   def parse( ident, str, comments = nil )
502     @scanner = Scanner.new(str, ident, comments)
503     @scanner.debug = @scanner_debug
504     @first = [ident, ident]
505     result = yyparse(self, :parse_in)
506     comments.map! {|c| to_kcode(c) } if comments
507     result
508   end
510   private
512   def parse_in( &block )
513     yield @first
514     @scanner.scan(&block)
515   end
516   
517   def on_error( t, val, vstack )
518     raise SyntaxError, "parse error on token #{racc_token2str t}"
519   end
521 ..end parser.y modeval..id7b0b3dccb7
523 ##### racc 1.4.5 generates ###
525 racc_reduce_table = [
526  0, 0, :racc_error,
527  2, 35, :_reduce_1,
528  2, 35, :_reduce_2,
529  2, 35, :_reduce_3,
530  2, 35, :_reduce_4,
531  2, 35, :_reduce_5,
532  2, 35, :_reduce_6,
533  2, 35, :_reduce_7,
534  2, 35, :_reduce_8,
535  2, 35, :_reduce_9,
536  2, 35, :_reduce_10,
537  2, 35, :_reduce_11,
538  2, 35, :_reduce_12,
539  6, 36, :_reduce_13,
540  0, 48, :_reduce_none,
541  2, 48, :_reduce_none,
542  3, 49, :_reduce_16,
543  5, 49, :_reduce_17,
544  1, 50, :_reduce_18,
545  7, 37, :_reduce_19,
546  0, 51, :_reduce_none,
547  2, 51, :_reduce_21,
548  0, 52, :_reduce_none,
549  2, 52, :_reduce_23,
550  1, 58, :_reduce_24,
551  3, 58, :_reduce_25,
552  2, 58, :_reduce_26,
553  0, 53, :_reduce_none,
554  2, 53, :_reduce_28,
555  0, 54, :_reduce_29,
556  3, 54, :_reduce_30,
557  0, 55, :_reduce_none,
558  2, 55, :_reduce_32,
559  2, 55, :_reduce_33,
560  0, 56, :_reduce_none,
561  2, 56, :_reduce_35,
562  1, 61, :_reduce_36,
563  1, 61, :_reduce_37,
564  0, 57, :_reduce_none,
565  2, 57, :_reduce_39,
566  1, 38, :_reduce_none,
567  1, 38, :_reduce_none,
568  3, 38, :_reduce_none,
569  1, 46, :_reduce_none,
570  1, 46, :_reduce_none,
571  1, 46, :_reduce_none,
572  1, 39, :_reduce_none,
573  2, 39, :_reduce_47,
574  1, 64, :_reduce_48,
575  3, 64, :_reduce_49,
576  1, 68, :_reduce_none,
577  1, 68, :_reduce_none,
578  1, 69, :_reduce_52,
579  3, 69, :_reduce_53,
580  1, 47, :_reduce_none,
581  1, 47, :_reduce_none,
582  2, 47, :_reduce_56,
583  2, 67, :_reduce_none,
584  3, 65, :_reduce_58,
585  2, 65, :_reduce_59,
586  1, 70, :_reduce_60,
587  2, 70, :_reduce_61,
588  4, 62, :_reduce_62,
589  3, 62, :_reduce_63,
590  2, 72, :_reduce_none,
591  2, 73, :_reduce_65,
592  4, 73, :_reduce_66,
593  3, 63, :_reduce_67,
594  1, 63, :_reduce_68,
595  1, 74, :_reduce_none,
596  2, 74, :_reduce_70,
597  1, 71, :_reduce_71,
598  3, 71, :_reduce_72,
599  1, 59, :_reduce_73,
600  3, 59, :_reduce_74,
601  1, 76, :_reduce_75,
602  2, 76, :_reduce_76,
603  1, 75, :_reduce_none,
604  1, 75, :_reduce_none,
605  1, 75, :_reduce_none,
606  1, 77, :_reduce_none,
607  1, 77, :_reduce_none,
608  1, 77, :_reduce_none,
609  1, 66, :_reduce_none,
610  2, 66, :_reduce_none,
611  3, 60, :_reduce_85,
612  1, 40, :_reduce_86,
613  3, 40, :_reduce_87,
614  1, 79, :_reduce_none,
615  2, 79, :_reduce_89,
616  1, 41, :_reduce_90,
617  2, 41, :_reduce_91,
618  3, 42, :_reduce_92,
619  5, 43, :_reduce_93,
620  3, 43, :_reduce_94,
621  0, 80, :_reduce_95,
622  5, 80, :_reduce_96,
623  5, 80, :_reduce_97,
624  1, 44, :_reduce_98,
625  3, 45, :_reduce_99,
626  0, 81, :_reduce_none,
627  1, 81, :_reduce_none,
628  1, 78, :_reduce_none,
629  1, 78, :_reduce_none,
630  1, 78, :_reduce_none,
631  1, 78, :_reduce_none,
632  1, 78, :_reduce_none,
633  1, 78, :_reduce_none,
634  1, 78, :_reduce_none ]
636 racc_reduce_n = 109
638 racc_shift_n = 167
640 racc_action_table = [
641    -70,   -69,    23,    25,   145,   146,    29,    31,   105,   106,
642     16,    17,    20,    22,   136,    27,   -70,   -69,    32,   101,
643    -70,   -69,   153,   100,   113,   115,   -70,   -69,   -70,   109,
644     75,    23,    25,   101,   154,    29,    31,   142,   143,    16,
645     17,    20,    22,   107,    27,    23,    25,    32,    98,    29,
646     31,    96,    94,    16,    17,    20,    22,    78,    27,    23,
647     25,    32,   112,    29,    31,    74,    91,    16,    17,    20,
648     22,    88,   117,    92,    81,    32,    23,    25,    80,   123,
649     29,    31,   100,   125,    16,    17,    20,    22,   126,    23,
650     25,   109,    32,    29,    31,    91,   128,    16,    17,    20,
651     22,   129,    27,    23,    25,    32,   101,    29,    31,   101,
652    130,    16,    17,    20,    22,    79,    52,    23,    25,    32,
653     78,    29,    31,   133,    78,    16,    17,    20,    22,    77,
654     23,    25,    75,    32,    29,    31,    65,    62,    16,    17,
655     20,    22,   139,    23,    25,   101,    32,    29,    31,    60,
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,
661     17,    20,    22,   nil,    27,    23,    25,    32,   nil,    29,
662     31,    74,   nil,    16,    17,    20,    22,   nil,    23,    25,
663    nil,    32,    29,    31,   nil,   nil,    16,    17,    20,    22,
664    nil,    23,    25,   nil,    32,    29,    31,   nil,   nil,    16,
665     17,    20,    22,   nil,    23,    25,   nil,    32,    29,    31,
666    nil,   nil,    16,    17,    20,    22,   nil,    23,    25,   nil,
667     32,    29,    31,   nil,   nil,    16,    17,    20,    22,   nil,
668     27,    23,    25,    32,   nil,    29,    31,   nil,   nil,    16,
669     17,    20,    22,   nil,    23,    25,   nil,    32,    29,    31,
670    nil,   nil,    16,    17,    20,    22,   nil,    23,    25,   nil,
671     32,    29,    31,   nil,   nil,    16,    17,    20,    22,   nil,
672     84,    25,   nil,    32,    29,    31,   nil,    87,    16,    17,
673     20,    22,     4,     6,     7,     8,     9,    10,    11,    12,
674     13,     1,     2,     3,    84,    25,   nil,   nil,    29,    31,
675    nil,    87,    16,    17,    20,    22,    84,    25,   nil,   nil,
676     29,    31,   nil,    87,    16,    17,    20,    22,    84,    25,
677    nil,   nil,    29,    31,   nil,    87,    16,    17,    20,    22,
678     84,    25,   nil,   nil,    29,    31,   nil,    87,    16,    17,
679     20,    22,    84,    25,   nil,   nil,    29,    31,   nil,    87,
680     16,    17,    20,    22,    84,    25,   nil,   nil,    29,    31,
681    nil,    87,    16,    17,    20,    22 ]
683 racc_action_check = [
684     75,    28,    68,    68,   136,   136,    68,    68,    72,    72,
685     68,    68,    68,    68,   126,    68,    75,    28,    68,    67,
686     75,    28,   143,    66,    86,    86,    75,    28,    75,    75,
687     28,     3,     3,    86,   143,     3,     3,   134,   134,     3,
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,
691     52,    45,    89,    52,    42,    52,    71,    71,    41,    96,
692     71,    71,    97,    98,    71,    71,    71,    71,   100,     7,
693      7,   101,    71,     7,     7,   102,   104,     7,     7,     7,
694      7,   105,     7,     8,     8,     7,   108,     8,     8,   111,
695    112,     8,     8,     8,     8,    40,     8,     9,     9,     8,
696     36,     9,     9,   117,   121,     9,     9,     9,     9,    33,
697     10,    10,    70,     9,    10,    10,    13,    12,    10,    10,
698     10,    10,   130,     2,     2,   131,    10,     2,     2,    11,
699    135,     2,     2,     2,     2,     6,     2,   138,   139,     2,
700     90,    90,    90,   140,    90,    90,   141,   142,    90,    90,
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,
704     26,    26,    26,   nil,    26,    27,    27,    26,   nil,    27,
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,
708    122,   122,   122,   nil,    76,    76,   nil,   122,    76,    76,
709    nil,   nil,    76,    76,    76,    76,   nil,    38,    38,   nil,
710     76,    38,    38,   nil,   nil,    38,    38,    38,    38,   nil,
711     38,    55,    55,    38,   nil,    55,    55,   nil,   nil,    55,
712     55,    55,    55,   nil,    94,    94,   nil,    55,    94,    94,
713    nil,   nil,    94,    94,    94,    94,   nil,    59,    59,   nil,
714     94,    59,    59,   nil,   nil,    59,    59,    59,    59,   nil,
715    114,   114,   nil,    59,   114,   114,   nil,   114,   114,   114,
716    114,   114,     0,     0,     0,     0,     0,     0,     0,     0,
717      0,     0,     0,     0,    77,    77,   nil,   nil,    77,    77,
718    nil,    77,    77,    77,    77,    77,    44,    44,   nil,   nil,
719     44,    44,   nil,    44,    44,    44,    44,    44,   113,   113,
720    nil,   nil,   113,   113,   nil,   113,   113,   113,   113,   113,
721     88,    88,   nil,   nil,    88,    88,   nil,    88,    88,    88,
722     88,    88,    74,    74,   nil,   nil,    74,    74,   nil,    74,
723     74,    74,    74,    74,   129,   129,   nil,   nil,   129,   129,
724    nil,   129,   129,   129,   129,   129 ]
726 racc_action_pointer = [
727    320,   152,   129,    17,   165,   172,   137,    75,    89,   103,
728    116,   135,   106,   105,   nil,   nil,   nil,   nil,   nil,   nil,
729    nil,   nil,   nil,   nil,   nil,   nil,   177,   191,     1,   nil,
730    nil,   nil,   nil,   109,   nil,   nil,    94,   nil,   243,   nil,
731     99,    64,    74,   nil,   332,    52,   nil,   nil,   nil,   nil,
732     50,    31,    45,   nil,   nil,   257,    36,   nil,   nil,   283,
733     22,   nil,    16,   nil,   nil,   nil,    -3,   -10,   -12,   nil,
734    103,    62,    -8,    15,   368,     0,   230,   320,   nil,   nil,
735     47,   nil,   nil,   nil,   nil,   nil,     4,   nil,   356,    50,
736    146,   nil,   nil,   nil,   270,   nil,    65,    56,    52,   nil,
737     57,    62,    79,   nil,    68,    81,   nil,   nil,    77,   nil,
738    nil,    80,    96,   344,   296,   nil,   nil,   108,   nil,   nil,
739    nil,    98,   217,   nil,   nil,   nil,   -19,   163,   nil,   380,
740    128,   116,   nil,   nil,    14,   124,   -26,   nil,   128,   141,
741    148,   141,   152,     7,   nil,   nil,   nil,   160,   nil,   nil,
742    149,    31,   nil,   nil,   204,   nil,   167,   nil,   174,   nil,
743    nil,   nil,   169,   184,   nil,   nil,   nil ]
745 racc_action_default = [
746   -109,  -109,  -109,  -109,   -14,  -109,   -20,  -109,  -109,  -109,
747   -109,  -109,  -109,  -109,   -10,   -95,  -105,  -106,   -77,   -44,
748   -107,   -11,  -108,   -79,   -43,  -102,  -109,  -109,   -60,  -103,
749    -55,  -104,   -78,   -68,   -54,   -71,   -45,   -12,  -109,    -1,
750   -109,  -109,  -109,    -2,  -109,   -22,   -51,   -48,   -50,    -3,
751    -40,   -41,  -109,   -46,    -4,   -86,    -5,   -88,    -6,   -90,
752   -109,    -7,   -95,    -8,    -9,   -98,  -100,   -61,   -59,   -56,
753    -69,  -109,  -109,  -109,  -109,   -75,  -109,  -109,   -57,   -15,
754   -109,   167,   -73,   -80,   -82,   -21,   -24,   -81,  -109,   -27,
755   -109,   -83,   -47,   -89,  -109,   -91,  -109,  -100,  -109,   -99,
756   -101,   -75,   -58,   -52,  -109,  -109,   -64,   -63,   -65,   -76,
757    -72,   -67,  -109,  -109,  -109,   -26,   -23,  -109,   -29,   -49,
758    -84,   -42,   -87,   -92,   -94,   -95,  -109,  -109,   -62,  -109,
759   -109,   -25,   -74,   -28,   -31,  -100,  -109,   -53,   -66,  -109,
760   -109,   -34,  -109,  -109,   -93,   -96,   -97,  -109,   -18,   -13,
761    -38,  -109,   -30,   -33,  -109,   -32,   -16,   -19,   -14,   -35,
762    -36,   -37,  -109,  -109,   -39,   -85,   -17 ]
764 racc_goto_table = [
765     39,    67,    70,    73,    38,    66,    69,    24,    37,    57,
766     59,    36,    55,    67,    99,    90,    85,   157,    69,   108,
767     83,   134,   111,    76,    49,    53,   141,    70,    73,   150,
768    118,    89,    45,   155,   159,   149,   140,    21,    14,    19,
769    119,   102,    64,    63,    61,   124,    70,   104,    58,   132,
770     83,    56,    97,    83,    54,    93,    43,     5,   131,    95,
771    116,   nil,    76,   nil,    83,    76,   nil,   127,   nil,    38,
772    nil,   nil,   nil,   103,   138,   nil,   110,   nil,   nil,   nil,
773    nil,   nil,   nil,   144,   nil,   nil,   nil,   nil,   nil,    83,
774     83,   nil,   nil,   nil,    57,   nil,   nil,   122,   nil,   121,
775    nil,   nil,   nil,   nil,   nil,    83,   nil,   nil,   nil,   nil,
776    nil,   nil,   nil,   nil,   nil,   135,   nil,   nil,   nil,   nil,
777    nil,   nil,    93,   nil,   nil,   nil,    70,   161,    38,    70,
778    162,   160,   137,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
779    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
780    nil,   nil,   nil,   nil,   164 ]
782 racc_goto_check = [
783      2,    37,    37,    29,    36,    46,    28,    13,    13,    41,
784     41,    31,    45,    37,    47,    32,    24,    23,    28,    25,
785     44,    20,    25,    42,     4,     4,    21,    37,    29,    22,
786     19,    18,    17,    26,    27,    16,    15,    12,    11,    33,
787     34,    35,    10,     9,     8,    47,    37,    29,     7,    43,
788     44,     6,    46,    44,     5,    41,     3,     1,    25,    41,
789     24,   nil,    42,   nil,    44,    42,   nil,    32,   nil,    36,
790    nil,   nil,   nil,    13,    25,   nil,    41,   nil,   nil,   nil,
791    nil,   nil,   nil,    47,   nil,   nil,   nil,   nil,   nil,    44,
792     44,   nil,   nil,   nil,    41,   nil,   nil,    45,   nil,    31,
793    nil,   nil,   nil,   nil,   nil,    44,   nil,   nil,   nil,   nil,
794    nil,   nil,   nil,   nil,   nil,    46,   nil,   nil,   nil,   nil,
795    nil,   nil,    41,   nil,   nil,   nil,    37,    29,    36,    37,
796     29,    28,    13,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
797    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
798    nil,   nil,   nil,   nil,     2 ]
800 racc_goto_pointer = [
801    nil,    57,    -4,    50,    17,    46,    42,    38,    33,    31,
802     29,    37,    35,     5,   nil,   -94,  -105,    26,   -14,   -59,
803    -97,  -108,  -112,  -133,   -28,   -55,  -110,  -117,   -20,   -24,
804    nil,     9,   -35,    37,   -50,   -27,     1,   -25,   nil,   nil,
805    nil,     0,    -5,   -65,   -24,     3,   -10,   -52 ]
807 racc_goto_default = [
808    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
809    nil,   nil,   nil,    48,    41,   nil,   nil,   nil,   nil,   nil,
810    nil,   nil,   nil,   nil,   nil,    86,   nil,   nil,    30,    34,
811     50,    51,   nil,    46,    47,   nil,    26,    28,    71,    72,
812     33,    35,   114,    82,    18,   nil,   nil,   nil ]
814 racc_token_table = {
815  false => 0,
816  Object.new => 1,
817  :DATETIME => 2,
818  :RECEIVED => 3,
819  :MADDRESS => 4,
820  :RETPATH => 5,
821  :KEYWORDS => 6,
822  :ENCRYPTED => 7,
823  :MIMEVERSION => 8,
824  :CTYPE => 9,
825  :CENCODING => 10,
826  :CDISPOSITION => 11,
827  :ADDRESS => 12,
828  :MAILBOX => 13,
829  :DIGIT => 14,
830  :ATOM => 15,
831  "," => 16,
832  ":" => 17,
833  :FROM => 18,
834  :BY => 19,
835  "@" => 20,
836  :DOMLIT => 21,
837  :VIA => 22,
838  :WITH => 23,
839  :ID => 24,
840  :FOR => 25,
841  ";" => 26,
842  "<" => 27,
843  ">" => 28,
844  "." => 29,
845  :QUOTED => 30,
846  :TOKEN => 31,
847  "/" => 32,
848  "=" => 33 }
850 racc_use_result_var = false
852 racc_nt_base = 34
854 Racc_arg = [
855  racc_action_table,
856  racc_action_check,
857  racc_action_default,
858  racc_action_pointer,
859  racc_goto_table,
860  racc_goto_check,
861  racc_goto_default,
862  racc_goto_pointer,
863  racc_nt_base,
864  racc_reduce_table,
865  racc_token_table,
866  racc_shift_n,
867  racc_reduce_n,
868  racc_use_result_var ]
870 Racc_token_to_s_table = [
871 '$end',
872 'error',
873 'DATETIME',
874 'RECEIVED',
875 'MADDRESS',
876 'RETPATH',
877 'KEYWORDS',
878 'ENCRYPTED',
879 'MIMEVERSION',
880 'CTYPE',
881 'CENCODING',
882 'CDISPOSITION',
883 'ADDRESS',
884 'MAILBOX',
885 'DIGIT',
886 'ATOM',
887 '","',
888 '":"',
889 'FROM',
890 'BY',
891 '"@"',
892 'DOMLIT',
893 'VIA',
894 'WITH',
895 'ID',
896 'FOR',
897 '";"',
898 '"<"',
899 '">"',
900 '"."',
901 'QUOTED',
902 'TOKEN',
903 '"/"',
904 '"="',
905 '$start',
906 'content',
907 'datetime',
908 'received',
909 'addrs_TOP',
910 'retpath',
911 'keys',
912 'enc',
913 'version',
914 'ctype',
915 'cencode',
916 'cdisp',
917 'addr_TOP',
918 'mbox',
919 'day',
920 'hour',
921 'zone',
922 'from',
923 'by',
924 'via',
925 'with',
926 'id',
927 'for',
928 'received_datetime',
929 'received_domain',
930 'domain',
931 'msgid',
932 'received_addrspec',
933 'routeaddr',
934 'spec',
935 'addrs',
936 'group_bare',
937 'commas',
938 'group',
939 'addr',
940 'mboxes',
941 'addr_phrase',
942 'local_head',
943 'routes',
944 'at_domains',
945 'local',
946 'word',
947 'dots',
948 'domword',
949 'atom',
950 'phrase',
951 'params',
952 'opt_semicolon']
954 Racc_debug_parser = false
956 ##### racc system variables end #####
958  # reduce 0 omitted
960 module_eval <<'.,.,', 'parser.y', 16
961   def _reduce_1( val, _values)
962  val[1]
963   end
964 .,.,
966 module_eval <<'.,.,', 'parser.y', 17
967   def _reduce_2( val, _values)
968  val[1]
969   end
970 .,.,
972 module_eval <<'.,.,', 'parser.y', 18
973   def _reduce_3( val, _values)
974  val[1]
975   end
976 .,.,
978 module_eval <<'.,.,', 'parser.y', 19
979   def _reduce_4( val, _values)
980  val[1]
981   end
982 .,.,
984 module_eval <<'.,.,', 'parser.y', 20
985   def _reduce_5( val, _values)
986  val[1]
987   end
988 .,.,
990 module_eval <<'.,.,', 'parser.y', 21
991   def _reduce_6( val, _values)
992  val[1]
993   end
994 .,.,
996 module_eval <<'.,.,', 'parser.y', 22
997   def _reduce_7( val, _values)
998  val[1]
999   end
1000 .,.,
1002 module_eval <<'.,.,', 'parser.y', 23
1003   def _reduce_8( val, _values)
1004  val[1]
1005   end
1006 .,.,
1008 module_eval <<'.,.,', 'parser.y', 24
1009   def _reduce_9( val, _values)
1010  val[1]
1011   end
1012 .,.,
1014 module_eval <<'.,.,', 'parser.y', 25
1015   def _reduce_10( val, _values)
1016  val[1]
1017   end
1018 .,.,
1020 module_eval <<'.,.,', 'parser.y', 26
1021   def _reduce_11( val, _values)
1022  val[1]
1023   end
1024 .,.,
1026 module_eval <<'.,.,', 'parser.y', 27
1027   def _reduce_12( val, _values)
1028  val[1]
1029   end
1030 .,.,
1032 module_eval <<'.,.,', 'parser.y', 36
1033   def _reduce_13( val, _values)
1034                   t = Time.gm(val[3].to_i, val[2], val[1].to_i, 0, 0, 0)
1035                   (t + val[4] - val[5]).localtime
1036   end
1037 .,.,
1039  # reduce 14 omitted
1041  # reduce 15 omitted
1043 module_eval <<'.,.,', 'parser.y', 45
1044   def _reduce_16( val, _values)
1045                   (val[0].to_i * 60 * 60) +
1046                   (val[2].to_i * 60)
1047   end
1048 .,.,
1050 module_eval <<'.,.,', 'parser.y', 51
1051   def _reduce_17( val, _values)
1052                   (val[0].to_i * 60 * 60) +
1053                   (val[2].to_i * 60) +
1054                   (val[4].to_i)
1055   end
1056 .,.,
1058 module_eval <<'.,.,', 'parser.y', 56
1059   def _reduce_18( val, _values)
1060                   timezone_string_to_unixtime(val[0])
1061   end
1062 .,.,
1064 module_eval <<'.,.,', 'parser.y', 61
1065   def _reduce_19( val, _values)
1066                   val
1067   end
1068 .,.,
1070  # reduce 20 omitted
1072 module_eval <<'.,.,', 'parser.y', 67
1073   def _reduce_21( val, _values)
1074                   val[1]
1075   end
1076 .,.,
1078  # reduce 22 omitted
1080 module_eval <<'.,.,', 'parser.y', 73
1081   def _reduce_23( val, _values)
1082                   val[1]
1083   end
1084 .,.,
1086 module_eval <<'.,.,', 'parser.y', 79
1087   def _reduce_24( val, _values)
1088                   join_domain(val[0])
1089   end
1090 .,.,
1092 module_eval <<'.,.,', 'parser.y', 83
1093   def _reduce_25( val, _values)
1094                   join_domain(val[2])
1095   end
1096 .,.,
1098 module_eval <<'.,.,', 'parser.y', 87
1099   def _reduce_26( val, _values)
1100                   join_domain(val[0])
1101   end
1102 .,.,
1104  # reduce 27 omitted
1106 module_eval <<'.,.,', 'parser.y', 93
1107   def _reduce_28( val, _values)
1108                   val[1]
1109   end
1110 .,.,
1112 module_eval <<'.,.,', 'parser.y', 98
1113   def _reduce_29( val, _values)
1114                   []
1115   end
1116 .,.,
1118 module_eval <<'.,.,', 'parser.y', 103
1119   def _reduce_30( val, _values)
1120                   val[0].push val[2]
1121                   val[0]
1122   end
1123 .,.,
1125  # reduce 31 omitted
1127 module_eval <<'.,.,', 'parser.y', 109
1128   def _reduce_32( val, _values)
1129                   val[1]
1130   end
1131 .,.,
1133 module_eval <<'.,.,', 'parser.y', 113
1134   def _reduce_33( val, _values)
1135                   val[1]
1136   end
1137 .,.,
1139  # reduce 34 omitted
1141 module_eval <<'.,.,', 'parser.y', 119
1142   def _reduce_35( val, _values)
1143                   val[1]
1144   end
1145 .,.,
1147 module_eval <<'.,.,', 'parser.y', 125
1148   def _reduce_36( val, _values)
1149                   val[0].spec
1150   end
1151 .,.,
1153 module_eval <<'.,.,', 'parser.y', 129
1154   def _reduce_37( val, _values)
1155                   val[0].spec
1156   end
1157 .,.,
1159  # reduce 38 omitted
1161 module_eval <<'.,.,', 'parser.y', 136
1162   def _reduce_39( val, _values)
1163                   val[1]
1164   end
1165 .,.,
1167  # reduce 40 omitted
1169  # reduce 41 omitted
1171  # reduce 42 omitted
1173  # reduce 43 omitted
1175  # reduce 44 omitted
1177  # reduce 45 omitted
1179  # reduce 46 omitted
1181 module_eval <<'.,.,', 'parser.y', 146
1182   def _reduce_47( val, _values)
1183  [ Address.new(nil, nil) ]
1184   end
1185 .,.,
1187 module_eval <<'.,.,', 'parser.y', 152
1188   def _reduce_48( val, _values)
1189                   val
1190   end
1191 .,.,
1193 module_eval <<'.,.,', 'parser.y', 157
1194   def _reduce_49( val, _values)
1195                   val[0].push val[2]
1196                   val[0]
1197   end
1198 .,.,
1200  # reduce 50 omitted
1202  # reduce 51 omitted
1204 module_eval <<'.,.,', 'parser.y', 165
1205   def _reduce_52( val, _values)
1206                   val
1207   end
1208 .,.,
1210 module_eval <<'.,.,', 'parser.y', 170
1211   def _reduce_53( val, _values)
1212                   val[0].push val[2]
1213                   val[0]
1214   end
1215 .,.,
1217  # reduce 54 omitted
1219  # reduce 55 omitted
1221 module_eval <<'.,.,', 'parser.y', 178
1222   def _reduce_56( val, _values)
1223                   val[1].phrase = Decoder.decode(val[0])
1224                   val[1]
1225   end
1226 .,.,
1228  # reduce 57 omitted
1230 module_eval <<'.,.,', 'parser.y', 185
1231   def _reduce_58( val, _values)
1232                   AddressGroup.new(val[0], val[2])
1233   end
1234 .,.,
1236 module_eval <<'.,.,', 'parser.y', 185
1237   def _reduce_59( val, _values)
1238  AddressGroup.new(val[0], [])
1239   end
1240 .,.,
1242 module_eval <<'.,.,', 'parser.y', 188
1243   def _reduce_60( val, _values)
1244  val[0].join('.')
1245   end
1246 .,.,
1248 module_eval <<'.,.,', 'parser.y', 189
1249   def _reduce_61( val, _values)
1250  val[0] << ' ' << val[1].join('.')
1251   end
1252 .,.,
1254 module_eval <<'.,.,', 'parser.y', 196
1255   def _reduce_62( val, _values)
1256                   val[2].routes.replace val[1]
1257                   val[2]
1258   end
1259 .,.,
1261 module_eval <<'.,.,', 'parser.y', 200
1262   def _reduce_63( val, _values)
1263                   val[1]
1264   end
1265 .,.,
1267  # reduce 64 omitted
1269 module_eval <<'.,.,', 'parser.y', 203
1270   def _reduce_65( val, _values)
1271  [ val[1].join('.') ]
1272   end
1273 .,.,
1275 module_eval <<'.,.,', 'parser.y', 204
1276   def _reduce_66( val, _values)
1277  val[0].push val[3].join('.'); val[0]
1278   end
1279 .,.,
1281 module_eval <<'.,.,', 'parser.y', 206
1282   def _reduce_67( val, _values)
1283  Address.new( val[0], val[2] )
1284   end
1285 .,.,
1287 module_eval <<'.,.,', 'parser.y', 207
1288   def _reduce_68( val, _values)
1289  Address.new( val[0], nil )
1290   end
1291 .,.,
1293  # reduce 69 omitted
1295 module_eval <<'.,.,', 'parser.y', 210
1296   def _reduce_70( val, _values)
1297  val[0].push ''; val[0]
1298   end
1299 .,.,
1301 module_eval <<'.,.,', 'parser.y', 213
1302   def _reduce_71( val, _values)
1303  val
1304   end
1305 .,.,
1307 module_eval <<'.,.,', 'parser.y', 222
1308   def _reduce_72( val, _values)
1309                   val[1].times do
1310                     val[0].push ''
1311                   end
1312                   val[0].push val[2]
1313                   val[0]
1314   end
1315 .,.,
1317 module_eval <<'.,.,', 'parser.y', 224
1318   def _reduce_73( val, _values)
1319  val
1320   end
1321 .,.,
1323 module_eval <<'.,.,', 'parser.y', 233
1324   def _reduce_74( val, _values)
1325                   val[1].times do
1326                     val[0].push ''
1327                   end
1328                   val[0].push val[2]
1329                   val[0]
1330   end
1331 .,.,
1333 module_eval <<'.,.,', 'parser.y', 234
1334   def _reduce_75( val, _values)
1336   end
1337 .,.,
1339 module_eval <<'.,.,', 'parser.y', 235
1340   def _reduce_76( val, _values)
1342   end
1343 .,.,
1345  # reduce 77 omitted
1347  # reduce 78 omitted
1349  # reduce 79 omitted
1351  # reduce 80 omitted
1353  # reduce 81 omitted
1355  # reduce 82 omitted
1357  # reduce 83 omitted
1359  # reduce 84 omitted
1361 module_eval <<'.,.,', 'parser.y', 253
1362   def _reduce_85( val, _values)
1363                   val[1] = val[1].spec
1364                   val.join('')
1365   end
1366 .,.,
1368 module_eval <<'.,.,', 'parser.y', 254
1369   def _reduce_86( val, _values)
1370  val
1371   end
1372 .,.,
1374 module_eval <<'.,.,', 'parser.y', 255
1375   def _reduce_87( val, _values)
1376  val[0].push val[2]; val[0]
1377   end
1378 .,.,
1380  # reduce 88 omitted
1382 module_eval <<'.,.,', 'parser.y', 258
1383   def _reduce_89( val, _values)
1384  val[0] << ' ' << val[1]
1385   end
1386 .,.,
1388 module_eval <<'.,.,', 'parser.y', 265
1389   def _reduce_90( val, _values)
1390                   val.push nil
1391                   val
1392   end
1393 .,.,
1395 module_eval <<'.,.,', 'parser.y', 269
1396   def _reduce_91( val, _values)
1397                   val
1398   end
1399 .,.,
1401 module_eval <<'.,.,', 'parser.y', 274
1402   def _reduce_92( val, _values)
1403                   [ val[0].to_i, val[2].to_i ]
1404   end
1405 .,.,
1407 module_eval <<'.,.,', 'parser.y', 279
1408   def _reduce_93( val, _values)
1409                   [ val[0].downcase, val[2].downcase, decode_params(val[3]) ]
1410   end
1411 .,.,
1413 module_eval <<'.,.,', 'parser.y', 283
1414   def _reduce_94( val, _values)
1415                   [ val[0].downcase, nil, decode_params(val[1]) ]
1416   end
1417 .,.,
1419 module_eval <<'.,.,', 'parser.y', 288
1420   def _reduce_95( val, _values)
1421                   {}
1422   end
1423 .,.,
1425 module_eval <<'.,.,', 'parser.y', 293
1426   def _reduce_96( val, _values)
1427                   val[0][ val[2].downcase ] = ('"' + val[4].to_s + '"')
1428                   val[0]
1429   end
1430 .,.,
1432 module_eval <<'.,.,', 'parser.y', 298
1433   def _reduce_97( val, _values)
1434                   val[0][ val[2].downcase ] = val[4]
1435                   val[0]
1436   end
1437 .,.,
1439 module_eval <<'.,.,', 'parser.y', 303
1440   def _reduce_98( val, _values)
1441                   val[0].downcase
1442   end
1443 .,.,
1445 module_eval <<'.,.,', 'parser.y', 308
1446   def _reduce_99( val, _values)
1447                   [ val[0].downcase, decode_params(val[1]) ]
1448   end
1449 .,.,
1451  # reduce 100 omitted
1453  # reduce 101 omitted
1455  # reduce 102 omitted
1457  # reduce 103 omitted
1459  # reduce 104 omitted
1461  # reduce 105 omitted
1463  # reduce 106 omitted
1465  # reduce 107 omitted
1467  # reduce 108 omitted
1469  def _reduce_none( val, _values)
1470   val[0]
1471  end
1473   end   # class Parser
1475 end   # module TMail