summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/export2.java-J-F1--goto-backend.exp
blob: 5c80c961da4dbc69f5f16605bd192907789c755b (plain)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
class export2
{


	static final char test_ex_c1  = 99;
	static final char test_ex_c2  = 122;
	static final char test_ex_c3  = 116;
	private static char  _test_trans_keys [] = { 1, 0, 0, 3, 0, 2, 0, 7, 1, 0, 5, 7, 0,  };
	private static byte  _test_char_class [] = { 0, 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, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 7, 0 ,  };
	private static byte  _test_index_offsets [] = { 0, 0, 4, 7, 15, 15, 0 ,  };
	private static byte  _test_indicies [] = { 0, 1, 1, 2, 3, 1, 4, 5, 1, 1, 1, 6, 6, 6, 6, 2, 4, 6, 0 ,  };
	private static byte  _test_index_defaults [] = { 0, 1, 1, 1, 7, 1, 0 ,  };
	private static byte  _test_trans_cond_spaces [] = { -1, -1, -1, -1, -1, -1, -1, -1, 0 ,  };
	private static byte  _test_cond_targs [] = { 5, 0, 1, 5, 2, 5, 3, 4, 0 ,  };
	private static byte  _test_cond_actions [] = { 1, 0, 0, 2, 0, 3, 0, 0, 0 ,  };
	private static byte  _test_nfa_targs [] = { 0, 0 ,  };
	private static byte  _test_nfa_offsets [] = { 0, 0, 0, 0, 0, 0, 0 ,  };
	private static byte  _test_nfa_push_actions [] = { 0, 0 ,  };
	private static byte  _test_nfa_pop_trans [] = { 0, 0 ,  };
	private static int  test_start  = 4;
	private static int  test_first_final  = 4;
	private static int  test_error  = 0;
	private static int  test_en_commands  = 5;
	private static int  test_en_other  = 4;
	static void test( char data[] )
	{
		int cs = test_en_commands, p = 0, pe = data.length;
		int top;
		
		{
		
		}
		{
			int _trans = 0;
			int _keys;
			int _inds;
			int _goto_targ = 0;
			_goto: while ( true ) {
				switch ( _goto_targ ) {
					case 0:
					if ( p == pe  )
					{
						_goto_targ = 4;
						if (true)
						continue _goto;
					}
					
					if ( cs == 0  )
					{
						_goto_targ = 5;
						if (true)
						continue _goto;
					}
					
					case 1:
					_keys = (cs<<1) ;
					_inds = _test_index_offsets[cs] ;
					if ( ( data[p ]) <= 122 && ( data[p ]) >= 10  )
					{
						int _ic = (int)_test_char_class[(int)( data[p ]) - 10];
						if ( _ic <= (int)_test_trans_keys[_keys+1 ]&& _ic >= (int)_test_trans_keys[_keys ] )
						_trans = (int)_test_indicies[_inds + (int)( _ic - (int)_test_trans_keys[_keys ])  ];
						
						else
						_trans = (int)_test_index_defaults[cs];
						
						
					}
					
					else
					{
						_trans = (int)_test_index_defaults[cs];
						
					}
					
					{
						_goto_targ = 2;
						if (true)
						continue _goto;
					}
					
					case 2:
					cs = (int)_test_cond_targs[_trans];
					if ( _test_cond_actions[_trans] == 0  )
					{
						_goto_targ = 3;
						if (true)
						continue _goto;
					}
					
					switch ( _test_cond_actions[_trans]  ) {
						case 1 :
						{
							System.out.println( "c1" );
						}
						
						break;
						case 3 :
						{
							System.out.println( "c2" );
						}
						
						break;
						case 2 :
						{
							System.out.println( "c3" );
						}
						
						break;
						
					}
					
					case 3:
					if ( cs == 0  )
					{
						_goto_targ = 5;
						if (true)
						continue _goto;
					}
					
					p+= 1;
					if ( p != pe  )
					{
						_goto_targ = 1;
						if (true)
						continue _goto;
					}
					
					
					case 4:
					{
					
					}
					
					case 5:
					{
					
					}
					
					
				}
				break;
			}
			
		}
		if ( cs >= test_first_final )
		System.out.println( "ACCEPT" );
		else
		System.out.println( "FAIL" );
	}
	
	public static void main( String args[] )
	{
		char data[] = { 
			test_ex_c1, '1', '2', '\n', 
			test_ex_c2, 'a', 'b', '\n', 
			test_ex_c3, '.', '.', '\n',
		};
		test( data );
	}
}