diff options
Diffstat (limited to 'test/rlhc.d/case/erract9.rb-R-F0--var-backend.exp')
-rw-r--r-- | test/rlhc.d/case/erract9.rb-R-F0--var-backend.exp | 347 |
1 files changed, 347 insertions, 0 deletions
diff --git a/test/rlhc.d/case/erract9.rb-R-F0--var-backend.exp b/test/rlhc.d/case/erract9.rb-R-F0--var-backend.exp new file mode 100644 index 00000000..1547d86f --- /dev/null +++ b/test/rlhc.d/case/erract9.rb-R-F0--var-backend.exp @@ -0,0 +1,347 @@ +# +# @LANG: ruby +# +# Test the host language scanning for ruby. +# + + + +class << self + attr_accessor :_erract9_actions + private :_erract9_actions, :_erract9_actions= +end +self._erract9_actions = [ +0, 1, 0, 1, 1, 1, 2, 0 , +] + +class << self + attr_accessor :_erract9_trans_keys + private :_erract9_trans_keys, :_erract9_trans_keys= +end +self._erract9_trans_keys = [ +1, 0, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0 , +] + +class << self + attr_accessor :_erract9_char_class + private :_erract9_char_class, :_erract9_char_class= +end +self._erract9_char_class = [ +0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 0 , +] + +class << self + attr_accessor :_erract9_index_offsets + private :_erract9_index_offsets, :_erract9_index_offsets= +end +self._erract9_index_offsets = [ +0, 0, 1, 2, 3, 4, 5, 0 , +] + +class << self + attr_accessor :_erract9_indicies + private :_erract9_indicies, :_erract9_indicies= +end +self._erract9_indicies = [ +1, 2, 3, 4, 5, 0 , +] + +class << self + attr_accessor :_erract9_index_defaults + private :_erract9_index_defaults, :_erract9_index_defaults= +end +self._erract9_index_defaults = [ +0, 0, 0, 0, 0, 0, 0, 0 , +] + +class << self + attr_accessor :_erract9_trans_cond_spaces + private :_erract9_trans_cond_spaces, :_erract9_trans_cond_spaces= +end +self._erract9_trans_cond_spaces = [ +-1, -1, -1, -1, -1, -1, 0 , +] + +class << self + attr_accessor :_erract9_cond_targs + private :_erract9_cond_targs, :_erract9_cond_targs= +end +self._erract9_cond_targs = [ +0, 2, 3, 4, 5, 6, 0 , +] + +class << self + attr_accessor :_erract9_cond_actions + private :_erract9_cond_actions, :_erract9_cond_actions= +end +self._erract9_cond_actions = [ +3, 1, 1, 1, 1, 1, 0 , +] + +class << self + attr_accessor :_erract9_to_state_actions + private :_erract9_to_state_actions, :_erract9_to_state_actions= +end +self._erract9_to_state_actions = [ +0, 5, 5, 5, 5, 5, 5, 0 , +] + +class << self + attr_accessor :_erract9_eof_actions + private :_erract9_eof_actions, :_erract9_eof_actions= +end +self._erract9_eof_actions = [ +0, 3, 3, 3, 3, 3, 0, 0 , +] + +class << self + attr_accessor :_erract9_nfa_targs + private :_erract9_nfa_targs, :_erract9_nfa_targs= +end +self._erract9_nfa_targs = [ +0, 0 , +] + +class << self + attr_accessor :_erract9_nfa_offsets + private :_erract9_nfa_offsets, :_erract9_nfa_offsets= +end +self._erract9_nfa_offsets = [ +0, 0, 0, 0, 0, 0, 0, 0 , +] + +class << self + attr_accessor :_erract9_nfa_push_actions + private :_erract9_nfa_push_actions, :_erract9_nfa_push_actions= +end +self._erract9_nfa_push_actions = [ +0, 0 , +] + +class << self + attr_accessor :_erract9_nfa_pop_trans + private :_erract9_nfa_pop_trans, :_erract9_nfa_pop_trans= +end +self._erract9_nfa_pop_trans = [ +0, 0 , +] + +class << self + attr_accessor :erract9_start +end +self.erract9_start = 1; + +class << self + attr_accessor :erract9_first_final +end +self.erract9_first_final = 6; + +class << self + attr_accessor :erract9_error +end +self.erract9_error = 0; + +class << self + attr_accessor :erract9_en_main +end +self.erract9_en_main = 1; + +def run_machine( data ) + p = 0; + pe = data.length + cs = 0 + + begin + cs = erract9_start; + + end + begin + _trans = 0; + _have = 0; + _cont = 1; + _acts = 0; + _nacts= 0 + ; + _keys = 0; + _inds = 0; + while ( _cont == 1 ) + begin + if ( cs == 0 ) + _cont = 0; + + end + _have = 0; + if ( p == pe ) + begin + if ( p == eof ) + begin + if ( _have == 0 ) + begin + __acts = 0; + __nacts= 0 + ; + __acts = _erract9_eof_actions[cs] ; + __nacts = _erract9_actions[__acts ]; + __acts += 1; + while ( __nacts > 0 ) + begin + case _erract9_actions[__acts ] + when -2 then + begin + end + when 1 then + begin + begin + print("err: ", data[p..p], "\n"); + end + + + end + end + __nacts -= 1; + __acts += 1; + + end + + end + + end + + end + + end + + end + if ( _have == 0 ) + _cont = 0; + + end + + end + + end + if ( _cont == 1 ) + begin + if ( _have == 0 ) + begin + _keys = (cs<<1) ; + _inds = _erract9_index_offsets[cs] ; + if ( ( data[p ].ord) <= 104 && ( data[p ].ord) >= 88 ) + begin + _ic = _erract9_char_class[( data[p ].ord) - 88]; + if ( _ic <= _erract9_trans_keys[_keys+1 ]&& _ic >= _erract9_trans_keys[_keys ] ) + _trans = _erract9_indicies[_inds + ( _ic - _erract9_trans_keys[_keys ]) ]; + + else + _trans = _erract9_index_defaults[cs]; + + end + + end + + else + begin + _trans = _erract9_index_defaults[cs]; + + end + + end + + end + + end + if ( _cont == 1 ) + begin + cs = _erract9_cond_targs[_trans]; + if ( _erract9_cond_actions[_trans] != 0 ) + begin + _acts = _erract9_cond_actions[_trans] ; + _nacts = _erract9_actions[_acts ]; + _acts += 1; + while ( _nacts > 0 ) + begin + case _erract9_actions[_acts ] + when -2 then + begin + end + when 0 then + begin + begin + print("char: ", data[p..p], "\n"); + end + + end + when 1 then + begin + begin + print("err: ", data[p..p], "\n"); + end + + + end + end + _nacts -= 1; + _acts += 1; + + end + + end + + end + + end + _acts = _erract9_to_state_actions[cs] ; + _nacts = _erract9_actions[_acts ]; + _acts += 1; + while ( _nacts > 0 ) + begin + case _erract9_actions[_acts ] + when -2 then + begin + end + when 2 then + begin + begin + print("to state: " , data[p..p], "\n"); + end + + + end + end + _nacts -= 1; + _acts += 1; + + end + + end + if ( cs == 0 ) + _cont = 0; + + end + if ( _cont == 1 ) + p += 1; + + end + + end + + end + + end + + end + +end + +end + +end +print("rest: " , data[p..p+2], "\n") +end + +inp = [ +"hello\n", +] + +inp.each { |str| run_machine(str) } + |