Module: Mail::Parsers::AddressListsParser

Defined in:
lib/mail/parsers/address_lists_parser.rb

Defined Under Namespace

Classes: AddressListStruct, AddressStruct

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

._eof_actionsObject

Returns the value of attribute _eof_actions



13845
13846
13847
# File 'lib/mail/parsers/address_lists_parser.rb', line 13845

def _eof_actions
  @_eof_actions
end

._index_offsetsObject

Returns the value of attribute _index_offsets



735
736
737
# File 'lib/mail/parsers/address_lists_parser.rb', line 735

def _index_offsets
  @_index_offsets
end

._indiciesObject

Returns the value of attribute _indicies



918
919
920
# File 'lib/mail/parsers/address_lists_parser.rb', line 918

def _indicies
  @_indicies
end

._key_spansObject

Returns the value of attribute _key_spans



552
553
554
# File 'lib/mail/parsers/address_lists_parser.rb', line 552

def _key_spans
  @_key_spans
end

._trans_actionsObject

Returns the value of attribute _trans_actions



13470
13471
13472
# File 'lib/mail/parsers/address_lists_parser.rb', line 13470

def _trans_actions
  @_trans_actions
end

._trans_keysObject

Returns the value of attribute _trans_keys



16
17
18
# File 'lib/mail/parsers/address_lists_parser.rb', line 16

def _trans_keys
  @_trans_keys
end

._trans_targsObject

Returns the value of attribute _trans_targs



13095
13096
13097
# File 'lib/mail/parsers/address_lists_parser.rb', line 13095

def _trans_targs
  @_trans_targs
end

.en_comment_tailObject

Returns the value of attribute en_comment_tail



14041
14042
14043
# File 'lib/mail/parsers/address_lists_parser.rb', line 14041

def en_comment_tail
  @en_comment_tail
end

.en_mainObject

Returns the value of attribute en_main



14045
14046
14047
# File 'lib/mail/parsers/address_lists_parser.rb', line 14045

def en_main
  @en_main
end

.errorObject

Returns the value of attribute error



14036
14037
14038
# File 'lib/mail/parsers/address_lists_parser.rb', line 14036

def error
  @error
end

.first_finalObject

Returns the value of attribute first_final



14032
14033
14034
# File 'lib/mail/parsers/address_lists_parser.rb', line 14032

def first_final
  @first_final
end

.startObject

Returns the value of attribute start



14028
14029
14030
# File 'lib/mail/parsers/address_lists_parser.rb', line 14028

def start
  @start
end

Class Method Details

.parse(data) ⇒ Object



14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
# File 'lib/mail/parsers/address_lists_parser.rb', line 14051

def self.parse(data)
  address_list = AddressListStruct.new([], [])
  return address_list if Mail::Utilities.blank?(data)

  phrase_s = phrase_e = qstr_s = qstr = comment_s = nil
  group_name_s = domain_s = group_name = nil
  local_dot_atom_s = local_dot_atom_e = nil
  local_dot_atom_pre_comment_e = nil
  obs_domain_list_s = nil

  address_s = 0
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)

  # 5.1 Variables Used by Ragel
  p = 0
  eof = pe = data.length
  stack = []

  
begin
	p ||= 0
	pe ||= data.length
	cs = start
	top = 0
end

  
begin
	testEof = false
	_slen, _trans, _keys, _inds, _acts, _nacts = nil
	_goto_level = 0
	_resume = 10
	_eof_trans = 15
	_again = 20
	_test_eof = 30
	_out = 40
	while true
	if _goto_level <= 0
	if p == pe
		_goto_level = _test_eof
		next
	end
	if cs == 0
		_goto_level = _out
		next
	end
	end
	if _goto_level <= _resume
	_keys = cs << 1
	_inds = _index_offsets[cs]
	_slen = _key_spans[cs]
	_wide = data[p].ord
	_trans = if (   _slen > 0 && 
			_trans_keys[_keys] <= _wide && 
			_wide <= _trans_keys[_keys + 1] 
  ) then
			_indicies[ _inds + _wide - _trans_keys[_keys] ] 
		 else 
			_indicies[ _inds + _slen ]
		 end
	cs = _trans_targs[_trans]
	if _trans_actions[_trans] != 0
	case _trans_actions[_trans]
	when 4 then
		begin
 phrase_e = p-1 		end
	when 8 then
		begin
 qstr_s = p 		end
	when 10 then
		begin
 qstr = data[qstr_s..(p-1)] 		end
	when 59 then
		begin
 comment_s = p unless comment_s 		end
	when 12 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
	when 34 then
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 3 then
		begin

if qstr
  address.display_name = qstr
  qstr = nil
elsif phrase_e
  address.display_name = data[phrase_s..phrase_e].strip
  phrase_e = phrase_s = nil
end
end
	when 43 then
		begin
 domain_s = p 		end
	when 54 then
		begin

address.domain = data[domain_s..(p-1)].rstrip if address
end
	when 1 then
		begin
 local_dot_atom_s = p 		end
	when 24 then
		begin
 local_dot_atom_e = p-1 		end
	when 21 then
		begin
 local_dot_atom_pre_comment_e = p-1 		end
	when 50 then
		begin
 address.local = '"' + qstr + '"' if address 		end
	when 20 then
		begin
 obs_domain_list_s = p 		end
	when 2 then
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
	when 62 then
		begin
 	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end
 		end
	when 6 then
		begin
 phrase_e = p-1 		end
		begin

if qstr
  group = qstr
  qstr = nil
else
  group = data[group_name_s..(p-1)]
  group_name_s = nil
end
address_list.group_names << group
group_name = group

# Start next address
address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
address_s = p
address.group = group_name
end
	when 7 then
		begin
 phrase_e = p-1 		end
		begin

if qstr
  address.display_name = qstr
  qstr = nil
elsif phrase_e
  address.display_name = data[phrase_s..phrase_e].strip
  phrase_e = phrase_s = nil
end
end
	when 42 then
		begin
 phrase_e = p-1 		end
		begin
 domain_s = p 		end
	when 30 then
		begin
 phrase_e = p-1 		end
		begin
 local_dot_atom_pre_comment_e = p-1 		end
	when 9 then
		begin
 qstr_s = p 		end
		begin
 qstr = data[qstr_s..(p-1)] 		end
	when 60 then
		begin
 comment_s = p unless comment_s 		end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
	when 61 then
		begin
 comment_s = p unless comment_s 		end
		begin
 	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end
 		end
	when 11 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 phrase_e = p-1 		end
	when 35 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 17 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin

if qstr
  address.display_name = qstr
  qstr = nil
elsif phrase_e
  address.display_name = data[phrase_s..phrase_e].strip
  phrase_e = phrase_s = nil
end
end
	when 55 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin

address.domain = data[domain_s..(p-1)].rstrip if address
end
	when 53 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 local_dot_atom_s = p 		end
	when 25 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 local_dot_atom_e = p-1 		end
	when 52 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 address.local = '"' + qstr + '"' if address 		end
	when 16 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
	when 29 then
		begin
 address_s = p 		end
		begin
 phrase_s = p 		end
	when 28 then
		begin
 address_s = p 		end
		begin

if qstr
  address.display_name = qstr
  qstr = nil
elsif phrase_e
  address.display_name = data[phrase_s..phrase_e].strip
  phrase_e = phrase_s = nil
end
end
	when 48 then
		begin
 domain_s = p 		end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
	when 45 then
		begin

address.domain = data[domain_s..(p-1)].rstrip if address
end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 18 then
		begin
 local_dot_atom_s = p 		end
		begin
 obs_domain_list_s = p 		end
	when 33 then
		begin
 local_dot_atom_e = p-1 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 39 then
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
	when 23 then
		begin
 local_dot_atom_pre_comment_e = p-1 		end
		begin
 local_dot_atom_e = p-1 		end
	when 22 then
		begin
 local_dot_atom_pre_comment_e = p-1 		end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
	when 49 then
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 56 then
		begin
 address.obs_domain_list = data[obs_domain_list_s..(p-1)] 		end
		begin
 local_dot_atom_s = p 		end
	when 5 then
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
		begin
 phrase_e = p-1 		end
	when 14 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 phrase_e = p-1 		end
		begin

if qstr
  group = qstr
  qstr = nil
else
  group = data[group_name_s..(p-1)]
  group_name_s = nil
end
address_list.group_names << group
group_name = group

# Start next address
address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
address_s = p
address.group = group_name
end
	when 15 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 phrase_e = p-1 		end
		begin

if qstr
  address.display_name = qstr
  qstr = nil
elsif phrase_e
  address.display_name = data[phrase_s..phrase_e].strip
  phrase_e = phrase_s = nil
end
end
	when 46 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin

address.domain = data[domain_s..(p-1)].rstrip if address
end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 47 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 local_dot_atom_e = p-1 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 41 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
	when 51 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 13 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
		begin
 phrase_e = p-1 		end
	when 65 then
		begin
 group_name_s = p 		end
		begin
 phrase_s = p 		end
		begin
 address_s = p 		end
	when 26 then
		begin
 address_s = p 		end
		begin
 phrase_s = p 		end
		begin
 local_dot_atom_s = p 		end
	when 19 then
		begin
 local_dot_atom_s = p 		end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
		begin
 obs_domain_list_s = p 		end
	when 38 then
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 32 then
		begin
 local_dot_atom_pre_comment_e = p-1 		end
		begin
 local_dot_atom_e = p-1 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 37 then
		begin
 local_dot_atom_pre_comment_e = p-1 		end
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
	when 57 then
		begin
 address.obs_domain_list = data[obs_domain_list_s..(p-1)] 		end
		begin
 local_dot_atom_s = p 		end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
	when 44 then
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
		begin
 phrase_e = p-1 		end
		begin
 domain_s = p 		end
	when 31 then
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
		begin
 phrase_e = p-1 		end
		begin
 local_dot_atom_pre_comment_e = p-1 		end
	when 40 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 63 then
		begin
 group_name_s = p 		end
		begin
 phrase_s = p 		end
		begin
 address_s = p 		end
		begin
 local_dot_atom_s = p 		end
	when 27 then
		begin
 address_s = p 		end
		begin
 phrase_s = p 		end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
		begin
 local_dot_atom_s = p 		end
	when 36 then
		begin
 local_dot_atom_pre_comment_e = p-1 		end
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 58 then
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
		begin
 address_s = p 		end
		begin
 phrase_s = p 		end
		begin
 local_dot_atom_s = p 		end
	when 64 then
		begin
 group_name_s = p 		end
		begin
 phrase_s = p 		end
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 1329
		_goto_level = _again
		next
	end
 		end
		begin
 address_s = p 		end
		begin
 local_dot_atom_s = p 		end
	end
	end
	end
	if _goto_level <= _again
	if cs == 0
		_goto_level = _out
		next
	end
	p += 1
	if p != pe
		_goto_level = _resume
		next
	end
	end
	if _goto_level <= _test_eof
	if p == eof
	  case _eof_actions[cs]
	when 12 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
	when 34 then
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 35 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 45 then
		begin

address.domain = data[domain_s..(p-1)].rstrip if address
end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 33 then
		begin
 local_dot_atom_e = p-1 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 49 then
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 46 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin

address.domain = data[domain_s..(p-1)].rstrip if address
end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 47 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 local_dot_atom_e = p-1 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 51 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 38 then
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 32 then
		begin
 local_dot_atom_pre_comment_e = p-1 		end
		begin
 local_dot_atom_e = p-1 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 40 then
		begin

if address
  address.comments << data[comment_s..(p-2)]
end
comment_s = nil
end
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	when 36 then
		begin
 local_dot_atom_pre_comment_e = p-1 		end
		begin
 local_dot_atom_e = p-1 		end
		begin
 address.local = '"' + qstr + '"' if address 		end
		begin

# Ignore address end events if they don't have
# a matching address start event.
if address_s
  if address.local.nil? && local_dot_atom_pre_comment_e && local_dot_atom_s && local_dot_atom_e
    if address.domain
      address.local = data[local_dot_atom_s..local_dot_atom_e] if address
    else
      address.local = data[local_dot_atom_s..local_dot_atom_pre_comment_e] if address
    end
  end
  address.raw = data[address_s..(p-1)]
  address_list.addresses << address if address

  # Start next address
  address = AddressStruct.new(nil, nil, [], nil, nil, nil, nil)
  address.group = group_name
  address_s = nil
end
end
	  end
	end

	end
	if _goto_level <= _out
		break
	end
end
	end


  if p != eof || cs < 1334
    raise Mail::Field::ParseError.new(Mail::AddressList, data, "Only able to parse up to #{data[0..p]}")
  end

  address_list
end