Module: Mail::Parsers::Ragel::EnvelopeFromMachine

Defined in:
lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.envelope_from_en_comment_tailObject

Returns the value of attribute envelope_from_en_comment_tail



1701
1702
1703
# File 'lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb', line 1701

def envelope_from_en_comment_tail
  @envelope_from_en_comment_tail
end

.envelope_from_en_mainObject

Returns the value of attribute envelope_from_en_main



1705
1706
1707
# File 'lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb', line 1705

def envelope_from_en_main
  @envelope_from_en_main
end

.envelope_from_errorObject

Returns the value of attribute envelope_from_error



1696
1697
1698
# File 'lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb', line 1696

def envelope_from_error
  @envelope_from_error
end

.envelope_from_first_finalObject

Returns the value of attribute envelope_from_first_final



1692
1693
1694
# File 'lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb', line 1692

def envelope_from_first_final
  @envelope_from_first_final
end

.envelope_from_startObject

Returns the value of attribute envelope_from_start



1688
1689
1690
# File 'lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb', line 1688

def envelope_from_start
  @envelope_from_start
end

Class Method Details

.parse(data) ⇒ Object

line 17 “/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl”



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
# File 'lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb', line 1712

def self.parse(data)
  p = 0
  eof = data.length
  stack = []

  actions = []
  data_unpacked = data.bytes.to_a
  
# line 1721 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
begin
	p ||= 0
	pe ||= data.length
	cs = envelope_from_start
	top = 0
end

# line 26 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"
  
# line 1731 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
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 = _envelope_from_index_offsets[cs]
	_slen = _envelope_from_key_spans[cs]
	_trans = if (   _slen > 0 && 
			_envelope_from_trans_keys[_keys] <= ( data_unpacked[p]) && 
			( data_unpacked[p]) <= _envelope_from_trans_keys[_keys + 1] 
		    ) then
			_envelope_from_indicies[ _inds + ( data_unpacked[p]) - _envelope_from_trans_keys[_keys] ] 
		 else 
			_envelope_from_indicies[ _inds + _slen ]
		 end
	cs = _envelope_from_trans_targs[_trans]
	if _envelope_from_trans_actions[_trans] != 0
	case _envelope_from_trans_actions[_trans]
	when 17 then
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 3 then
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(2, p) 		end
	when 13 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
	when 37 then
# line 8 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(5, p) 		end
	when 12 then
# line 10 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(7, p) 		end
	when 19 then
# line 16 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(13, p) 		end
	when 11 then
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
	when 6 then
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(19, p) 		end
	when 4 then
# line 23 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(20, p) 		end
	when 33 then
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
	when 25 then
# line 41 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(38, p) 		end
	when 23 then
# line 42 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(39, p) 		end
	when 5 then
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 209
		_goto_level = _again
		next
	end
 		end
	when 40 then
# line 6 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
		begin
 	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end
 		end
	when 1 then
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(2, p) 		end
# line 23 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(20, p) 		end
	when 18 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 16 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
	when 36 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 23 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(20, p) 		end
	when 35 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
	when 15 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 209
		_goto_level = _again
		next
	end
 		end
	when 38 then
# line 8 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(5, p) 		end
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 209
		_goto_level = _again
		next
	end
 		end
	when 39 then
# line 8 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(5, p) 		end
# line 6 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
		begin
 	begin
		top -= 1
		cs = stack[top]
		_goto_level = _again
		next
	end
 		end
	when 21 then
# line 15 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(12, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 20 then
# line 16 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(13, p) 		end
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 209
		_goto_level = _again
		next
	end
 		end
	when 10 then
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 29 then
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
	when 9 then
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(19, p) 		end
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
	when 8 then
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(19, p) 		end
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 209
		_goto_level = _again
		next
	end
 		end
	when 32 then
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 24 then
# line 42 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(39, p) 		end
# line 41 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(38, p) 		end
	when 2 then
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(2, p) 		end
# line 23 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(20, p) 		end
# line 5 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/../../common.rl"
		begin
 	begin
		stack[top] = cs
		top+= 1
		cs = 209
		_goto_level = _again
		next
	end
 		end
	when 22 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 15 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(12, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 14 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 31 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
	when 34 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 28 then
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 7 then
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(19, p) 		end
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 27 then
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(19, p) 		end
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
	when 30 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
	when 26 then
# line 22 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(19, p) 		end
# line 21 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(18, p) 		end
# line 24 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(21, p) 		end
# line 4 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(1, p) 		end
# line 2095 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
	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 _envelope_from_eof_actions[cs]
	when 41 then
# line 9 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(6, p) 		end
	when 42 then
# line 7 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(4, p) 		end
# line 9 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/rb_actions.rl"
		begin
 actions.push(6, p) 		end
# line 2124 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
	  end
	end

	end
	if _goto_level <= _out
		break
	end
end
	end

# line 27 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"

  if p == eof && cs >= 
# line 2138 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb"
214
# line 28 "/Users/raindrift/workspace/mail/lib/mail/parsers/ragel/ruby/machines/envelope_from_machine.rb.rl"

    return actions, nil
  else
    return [], "Only able to parse up to #{data[0..p]}"
  end
end