summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/java1.java-J-T1--var-backend.exp
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2019-09-09 10:19:58 -0600
committerAdrian Thurston <thurston@colm.net>2019-09-09 10:19:58 -0600
commitfff52cd5a567ec541cd487b9fee2d89bf9b6f6eb (patch)
tree046a3f0f457343f7c99bf096863daf023a085051 /test/rlhc.d/case/java1.java-J-T1--var-backend.exp
parent2d8e9c3f5c0417d6237c945c50f92bf8d28b32d5 (diff)
downloadcolm-fff52cd5a567ec541cd487b9fee2d89bf9b6f6eb.tar.gz
base (aapl, colm, ragel) test cases building
Diffstat (limited to 'test/rlhc.d/case/java1.java-J-T1--var-backend.exp')
-rw-r--r--test/rlhc.d/case/java1.java-J-T1--var-backend.exp229
1 files changed, 229 insertions, 0 deletions
diff --git a/test/rlhc.d/case/java1.java-J-T1--var-backend.exp b/test/rlhc.d/case/java1.java-J-T1--var-backend.exp
new file mode 100644
index 00000000..6ac94ec9
--- /dev/null
+++ b/test/rlhc.d/case/java1.java-J-T1--var-backend.exp
@@ -0,0 +1,229 @@
+class java1
+{
+
+
+ private static byte _java1_key_offsets [] = { 0, 0, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 41, 41, 0 , };
+ private static char _java1_trans_keys [] = { 102, 104, 116, 114, 105, 101, 110, 100, 10, 102, 111, 116, 111, 117, 114, 10, 110, 101, 119, 111, 101, 108, 108, 111, 104, 101, 114, 101, 111, 110, 101, 10, 116, 119, 111, 10, 102, 111, 117, 114, 10, 0, };
+ private static byte _java1_single_lengths [] = { 0, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 , };
+ private static byte _java1_range_lengths [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , };
+ private static byte _java1_index_offsets [] = { 0, 0, 4, 6, 8, 10, 12, 14, 16, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 79, 80, 81, 0 , };
+ private static byte _java1_trans_cond_spaces [] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 , };
+ private static byte _java1_trans_offsets [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 0 , };
+ private static byte _java1_trans_lengths [] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 , };
+ private static byte _java1_cond_keys [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , };
+ private static byte _java1_cond_targs [] = { 2, 17, 21, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 13, 15, 0, 10, 0, 11, 0, 12, 0, 38, 0, 14, 0, 12, 0, 16, 0, 12, 0, 18, 0, 19, 0, 20, 0, 7, 0, 22, 0, 23, 0, 24, 0, 7, 0, 26, 0, 27, 0, 28, 0, 39, 0, 30, 0, 31, 0, 32, 0, 40, 0, 34, 0, 35, 0, 36, 0, 37, 0, 41, 0, 0, 0, 0, 0, 0 , };
+ private static byte _java1_cond_actions [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , };
+ private static byte _java1_nfa_targs [] = { 0, 0 , };
+ private static byte _java1_nfa_offsets [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , };
+ private static byte _java1_nfa_push_actions [] = { 0, 0 , };
+ private static byte _java1_nfa_pop_trans [] = { 0, 0 , };
+ private static int java1_start = 1;
+ private static int java1_first_final = 38;
+ private static int java1_error = 0;
+ private static int java1_en_one = 25;
+ private static int java1_en_two = 29;
+ private static int java1_en_four = 33;
+ private static int java1_en_main = 1;
+ static void test( char data[] )
+ {
+ int cs, p = 0, pe = data.length;
+ int top;
+
+ {
+ cs = (int)java1_start;
+
+ }
+ {
+ int _klen;
+ int _keys;
+ int _ckeys;
+ int _cpc;
+ int _trans;
+ int _cond = 0;
+ int _have = 0;
+ int _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 = _java1_key_offsets[cs] ;
+ _trans = (int )_java1_index_offsets[cs];
+ _have = 0;
+ _klen = (int)_java1_single_lengths[cs];
+ if ( _klen > 0 )
+ {
+ int _lower;
+ int _mid;
+ int _upper;
+ _lower = _keys;
+ _upper = _keys + _klen - 1;
+ while ( _upper >= _lower && _have == 0 )
+ {
+ _mid = _lower + ((_upper-_lower) >> 1);
+ if ( ( data[p ]) < _java1_trans_keys[_mid ] )
+ _upper = _mid - 1;
+
+ else if ( ( data[p ]) > _java1_trans_keys[_mid ] )
+ _lower = _mid + 1;
+
+ else
+ {
+ _trans += (int )(_mid - _keys);
+ _have = 1;
+
+ }
+
+
+ }
+
+ if ( _have == 0 )
+ {
+ _keys += _klen;
+ _trans += (int )_klen;
+
+ }
+
+
+ }
+
+ if ( _have == 0 )
+ {
+ _klen = (int)_java1_range_lengths[cs];
+ if ( _klen > 0 )
+ {
+ int _lower;
+ int _mid;
+ int _upper;
+ _lower = _keys;
+ _upper = _keys + (_klen<<1) - 2;
+ while ( _have == 0 && _lower <= _upper )
+ {
+ _mid = _lower + (((_upper-_lower) >> 1) & ~1);
+ if ( ( data[p ]) < _java1_trans_keys[_mid ] )
+ _upper = _mid - 2;
+
+ else if ( ( data[p ]) > _java1_trans_keys[_mid + 1 ] )
+ _lower = _mid + 2;
+
+ else
+ {
+ _trans += (int )((_mid - _keys)>>1);
+ _have = 1;
+
+ }
+
+
+ }
+
+ if ( _have == 0 )
+ _trans += (int )_klen;
+
+
+ }
+
+
+ }
+
+ _ckeys = _java1_trans_offsets[_trans] ;
+ _klen = (int)_java1_trans_lengths[_trans];
+ _cond = (int )_java1_trans_offsets[_trans];
+ _have = 0;
+ _cpc = 0;
+ {
+ int _lower;
+ int _mid;
+ int _upper;
+ _lower = _ckeys;
+ _upper = _ckeys + _klen - 1;
+ while ( _have == 0 && _lower <= _upper )
+ {
+ _mid = _lower + ((_upper-_lower) >> 1);
+ if ( _cpc < (int)_java1_cond_keys[_mid ] )
+ _upper = _mid - 1;
+
+ else if ( _cpc > (int)_java1_cond_keys[_mid ] )
+ _lower = _mid + 1;
+
+ else
+ {
+ _cond += (int )(_mid - _ckeys);
+ _have = 1;
+
+ }
+
+
+ }
+
+ if ( _have == 0 )
+ {
+ cs = 0;
+ _cont = 0;
+
+ }
+
+
+ }
+
+ }
+
+ if ( _cont == 1 )
+ {
+ cs = (int)_java1_cond_targs[_cond];
+ switch ( _java1_cond_actions[_cond] ) {
+ case 1 :
+ {
+ int s = 25; {
+ cs = (s);
+
+ }
+ char c = (( data[p ]));
+ }
+
+ break;
+
+ }
+ if ( cs == 0 )
+ _cont = 0;
+
+ if ( _cont == 1 )
+ p += 1;
+
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+ if ( cs >= java1_first_final )
+ System.out.println( "ACCEPT" );
+ else
+ System.out.println( "FAIL" );
+ }
+
+ public static void main( String args[] )
+ {
+ test( "hello\none\n".toCharArray() );
+ test( "there\ntwo\n".toCharArray() );
+ test( "friend\nfour\n".toCharArray() );
+ }
+}
+