summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/cond1_java.java-J-T1--var-backend.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/cond1_java.java-J-T1--var-backend.in')
-rw-r--r--test/rlhc.d/case/cond1_java.java-J-T1--var-backend.in326
1 files changed, 326 insertions, 0 deletions
diff --git a/test/rlhc.d/case/cond1_java.java-J-T1--var-backend.in b/test/rlhc.d/case/cond1_java.java-J-T1--var-backend.in
new file mode 100644
index 00000000..1c735904
--- /dev/null
+++ b/test/rlhc.d/case/cond1_java.java-J-T1--var-backend.in
@@ -0,0 +1,326 @@
+host( "working/cond1_java.rl", 1 ) @{/*
+ * @@LANG: java
+ * @@GENERATED: true
+ */
+
+
+ class cond1_java
+ {
+ int i ;
+ int j ;
+ int k ;
+
+
+
+
+
+ }@
+ array s8 _foo_key_offsets( 0, 20 ) = { 0, 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0 };
+
+ array char _foo_trans_keys( 0, 99 ) = { u(48), u(49), u(48), u(49), u(48), u(49), u(97), u(98), u(97), u(98), u(97), u(98), u(99), u(10), u(99), u(99), u(99), u(99), u(99), u(99), u(0) };
+
+ array s8 _foo_single_lengths( 0, 2 ) = { 0, 0, 0, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 };
+
+ array s8 _foo_range_lengths( 0, 1 ) = { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ array s8 _foo_index_offsets( 0, 31 ) = { 0, 0, 2, 4, 6, 9, 12, 15, 17, 19, 21, 23, 25, 27, 29, 31, 0 };
+
+ array s8 _foo_trans_cond_spaces( -1, 5 ) = { -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 5, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 };
+
+ array s8 _foo_trans_offsets( 0, 39 ) = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0 };
+
+ array s8 _foo_trans_lengths( 0, 7 ) = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 };
+
+ array s8 _foo_cond_keys( 0, 7 ) = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ array s8 _foo_cond_targs( 0, 15 ) = { 2, 0, 3, 0, 4, 0, 5, 7, 0, 6, 11, 7, 12, 9, 13, 10, 14, 0, 6, 7, 9, 10, 0, 8, 0, 15, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 0, 0 };
+
+ array s8 _foo_cond_actions( 0, 11 ) = { 1, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 0, 0 };
+
+ array s8 _foo_nfa_targs( 0, 0 ) = { 0, 0 };
+
+ array s8 _foo_nfa_offsets( 0, 0 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ array s8 _foo_nfa_push_actions( 0, 0 ) = { 0, 0 };
+
+ array s8 _foo_nfa_pop_trans( 0, 0 ) = { 0, 0 };
+
+ value int foo_start = 1;
+ value int foo_first_final = 15;
+ value int foo_error = 0;
+
+ value int foo_en_main = 1;
+
+ host( "working/cond1_java.rl", 74 ) @{
+ int cs;
+
+ void init()
+ {
+ }@
+ {
+ cs = cast(int)foo_start;
+ }
+ host( "working/cond1_java.rl", 79 ) @{
+ }
+
+ void exec( char data[], int len )
+ {
+ char buffer [] = new char[1024];
+ int blen = 0;
+ int p = 0;
+ int pe = len;
+
+ String _s;
+ }@
+ {
+ int _klen;
+ index char _keys;
+ index s8 _ckeys;
+ int _cpc;
+ uint _trans;
+ uint _cond = 0;
+ uint _have = 0;
+ uint _cont = 1;
+ while ( _cont == 1 ) {
+
+ if ( cs == 0 )
+ _cont = 0;
+ _have = 0;
+ if ( p == pe ) {
+ if ( _have == 0 )
+ _cont = 0;
+ }
+ if ( _cont == 1 ) {
+ if ( _have == 0 ) {
+ _keys = offset( _foo_trans_keys, _foo_key_offsets[cs] );
+ _trans = cast(uint)_foo_index_offsets[cs];
+ _have = 0;
+
+ _klen = cast(int)_foo_single_lengths[cs];
+ if ( _klen > 0 ) {
+ index char _lower;
+ index char _mid;
+ index char _upper;
+ _lower = _keys;
+ _upper = _keys + _klen - 1;
+ while ( _upper >= _lower && _have == 0 ) {
+ _mid = _lower + ((_upper-_lower) >> 1);
+ if ( ( deref( data, p )) < deref( _foo_trans_keys, _mid ) )
+ _upper = _mid - 1;
+ else if ( ( deref( data, p )) > deref( _foo_trans_keys, _mid ) )
+ _lower = _mid + 1;
+ else {
+ _trans += cast(uint)(_mid - _keys);
+ _have = 1;
+ }
+ }
+ if ( _have == 0 ) {
+ _keys += _klen;
+ _trans += cast(uint)_klen;
+ }
+ }
+
+ if ( _have == 0 ) {
+ _klen = cast(int)_foo_range_lengths[cs];
+ if ( _klen > 0 ) {
+ index char _lower;
+ index char _mid;
+ index char _upper;
+ _lower = _keys;
+ _upper = _keys + (_klen<<1) - 2;
+ while ( _have == 0 && _lower <= _upper ) {
+ _mid = _lower + (((_upper-_lower) >> 1) & ~1);
+ if ( ( deref( data, p )) < deref( _foo_trans_keys, _mid ) )
+ _upper = _mid - 2;
+ else if ( ( deref( data, p )) > deref( _foo_trans_keys, _mid + 1 ) )
+ _lower = _mid + 2;
+ else {
+ _trans += cast(uint)((_mid - _keys)>>1);
+ _have = 1;
+ }
+ }
+ if ( _have == 0 )
+ _trans += cast(uint)_klen;
+ }
+ }
+
+ _ckeys = offset( _foo_cond_keys, _foo_trans_offsets[_trans] );
+ _klen = cast(int)_foo_trans_lengths[_trans];
+ _cond = cast(uint)_foo_trans_offsets[_trans];
+ _have = 0;
+
+ _cpc = 0;
+ switch ( _foo_trans_cond_spaces[_trans] ) {
+
+ case 0 {
+ if ( host( "working/cond1_java.rl", 16 ) ={i != 0}= ) _cpc += 1;
+ }
+ case 1 {
+ if ( host( "working/cond1_java.rl", 17 ) ={j != 0}= ) _cpc += 1;
+ }
+ case 2 {
+ if ( host( "working/cond1_java.rl", 18 ) ={k != 0}= ) _cpc += 1;
+ }
+ case 3 {
+ if ( host( "working/cond1_java.rl", 16 ) ={i != 0}= ) _cpc += 1;
+ if ( host( "working/cond1_java.rl", 17 ) ={j != 0}= ) _cpc += 2;
+ }
+ case 4 {
+ if ( host( "working/cond1_java.rl", 17 ) ={j != 0}= ) _cpc += 1;
+ if ( host( "working/cond1_java.rl", 18 ) ={k != 0}= ) _cpc += 2;
+ }
+ case 5 {
+ if ( host( "working/cond1_java.rl", 16 ) ={i != 0}= ) _cpc += 1;
+ if ( host( "working/cond1_java.rl", 17 ) ={j != 0}= ) _cpc += 2;
+ if ( host( "working/cond1_java.rl", 18 ) ={k != 0}= ) _cpc += 4;
+ }
+ }
+ {
+ index s8 _lower;
+ index s8 _mid;
+ index s8 _upper;
+ _lower = _ckeys;
+ _upper = _ckeys + _klen - 1;
+ while ( _have == 0 && _lower <= _upper ) {
+ _mid = _lower + ((_upper-_lower) >> 1);
+ if ( _cpc < cast(int)deref( _foo_cond_keys, _mid ) )
+ _upper = _mid - 1;
+ else if ( _cpc > cast(int)deref( _foo_cond_keys, _mid ) )
+ _lower = _mid + 1;
+ else {
+ _cond += cast(uint)(_mid - _ckeys);
+ _have = 1;
+ }
+ }
+ if ( _have == 0 ) {
+ cs = 0;
+ _cont = 0;
+ }
+ }
+ }
+ if ( _cont == 1 ) {
+ cs = cast(int)_foo_cond_targs[_cond];
+
+ switch ( _foo_cond_actions[_cond] ) {
+ case 8 {
+ host( "working/cond1_java.rl", 19 ) ${System.out.print( " one\n" );
+ }$
+ }
+ case 4 {
+ host( "working/cond1_java.rl", 21 ) ${System.out.print( " two\n" );
+ }$
+ }
+ case 6 {
+ host( "working/cond1_java.rl", 23 ) ${System.out.print( " three\n" );
+ }$
+ }
+ case 1 {
+ host( "working/cond1_java.rl", 26 ) ${if ( ={( deref( data, p ))}= == 48 )
+ {
+ i = 0;
+
+ }
+ else {
+ i = 1;
+
+ }
+ }$
+ }
+ case 2 {
+ host( "working/cond1_java.rl", 36 ) ${if ( ={( deref( data, p ))}= == 48 )
+ {
+ j = 0;
+
+ }
+ else {
+ j = 1;
+
+ }
+ }$
+ }
+ case 3 {
+ host( "working/cond1_java.rl", 46 ) ${if ( ={( deref( data, p ))}= == 48 )
+ {
+ k = 0;
+
+ }
+ else {
+ k = 1;
+
+ }
+ }$
+ }
+ case 5 {
+ host( "working/cond1_java.rl", 57 ) ${${p+= 1; _cont = 0; }$}$
+ }
+ case 9 {
+ host( "working/cond1_java.rl", 19 ) ${System.out.print( " one\n" );
+ }$
+ host( "working/cond1_java.rl", 21 ) ${System.out.print( " two\n" );
+ }$
+ }
+ case 10 {
+ host( "working/cond1_java.rl", 19 ) ${System.out.print( " one\n" );
+ }$
+ host( "working/cond1_java.rl", 23 ) ${System.out.print( " three\n" );
+ }$
+ }
+ case 7 {
+ host( "working/cond1_java.rl", 21 ) ${System.out.print( " two\n" );
+ }$
+ host( "working/cond1_java.rl", 23 ) ${System.out.print( " three\n" );
+ }$
+ }
+ case 11 {
+ host( "working/cond1_java.rl", 19 ) ${System.out.print( " one\n" );
+ }$
+ host( "working/cond1_java.rl", 21 ) ${System.out.print( " two\n" );
+ }$
+ host( "working/cond1_java.rl", 23 ) ${System.out.print( " three\n" );
+ }$
+ }
+ }
+
+ if ( cs == 0 )
+ _cont = 0;
+ if ( _cont == 1 )
+ p += 1;
+
+ }}
+ }
+ }
+ host( "working/cond1_java.rl", 90 ) @{
+ }
+
+ void finish( )
+ {
+ if ( cs >= foo_first_final )
+ System.out.println( "ACCEPT" );
+ else
+ System.out.println( "FAIL" );
+ }
+
+ static final String inp[] = {
+ "000abc\n",
+ "100abc\n",
+ "010abc\n",
+ "110abc\n",
+ "001abc\n",
+ "101abc\n",
+ "011abc\n",
+ "111abc\n",
+ };
+
+ static final int inplen = 8;
+
+ public static void main (String[] args)
+ {
+ cond1_java machine = new cond1_java();
+ for ( int i = 0; i < inplen; i++ ) {
+ machine.init();
+ machine.exec( inp[i].toCharArray(), inp[i].length() );
+ machine.finish();
+ }
+ }
+ }
+}@ \ No newline at end of file