summaryrefslogtreecommitdiff
path: root/test/cases/rlhc.d/case/stateact1_java.java-J-F1--var-backend.exp
blob: 543ff70db5da8c749b49658eddd8923228141867 (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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
class stateact1_java
{







	private static char  _state_act_trans_keys [] = { 1, 0, 3, 3, 0, 0, 2, 2, 2, 2, 2, 2, 0,  };
	private static byte  _state_act_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, 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, 2, 3, 0 ,  };
	private static byte  _state_act_index_offsets [] = { 0, 0, 1, 2, 3, 4, 0 ,  };
	private static byte  _state_act_indicies [] = { 0, 2, 3, 3, 3, 0 ,  };
	private static byte  _state_act_index_defaults [] = { 0, 1, 1, 1, 1, 1, 0 ,  };
	private static byte  _state_act_trans_cond_spaces [] = { -1, -1, -1, -1, 0 ,  };
	private static byte  _state_act_cond_targs [] = { 2, 0, 5, 1, 0 ,  };
	private static byte  _state_act_cond_actions [] = { 0, 0, 3, 0, 0 ,  };
	private static byte  _state_act_to_state_actions [] = { 0, 0, 1, 4, 6, 4, 0 ,  };
	private static byte  _state_act_from_state_actions [] = { 0, 0, 2, 5, 7, 5, 0 ,  };
	private static byte  _state_act_nfa_targs [] = { 0, 0 ,  };
	private static byte  _state_act_nfa_offsets [] = { 0, 0, 0, 0, 0, 0, 0 ,  };
	private static byte  _state_act_nfa_push_actions [] = { 0, 0 ,  };
	private static byte  _state_act_nfa_pop_trans [] = { 0, 0 ,  };
	private static int  state_act_start  = 4;
	private static int  state_act_first_final  = 4;
	private static int  state_act_error  = 0;
	private static int  state_act_en_main  = 4;
	private static int  state_act_en_main_line_again  = 3;
	int cs;
	
	void init()
	{
		{
			cs = (int)state_act_start;
			
		}
	}
	
	void exec( char data[], int len )
	{
		char buffer [] = new char[1024];
		int blen = 0;
		int p = 0;
		int pe = len;
		
		String _s;
		{
			int _trans = 0;
			int _have = 0;
			int _cont = 1;
			int _keys;
			int _inds;
			while ( _cont == 1  )
			{
				if ( cs == 0  )
				_cont = 0;
				
				_have = 0;
				if ( p == pe  )
				{
					if ( _have == 0  )
					_cont = 0;
					
					
				}
				
				if ( _cont == 1  )
				{
					if ( _have == 0  )
					{
						switch ( _state_act_from_state_actions[cs]  ) {
							case 5 :
							{
								System.out.print( "b2\n" );
								
							}
							
							break;
							case 2 :
							{
								System.out.print( "c2\n" );
								
							}
							
							break;
							case 7 :
							{
								System.out.print( "a2\n" );
								
							}
							{
								System.out.print( "b2\n" );
								
							}
							
							break;
							
						}
						_keys = (cs<<1) ;
						_inds = _state_act_index_offsets[cs] ;
						if ( ( data[p ]) <= 105 && ( data[p ]) >= 10  )
						{
							int _ic = (int)_state_act_char_class[(int)( data[p ]) - 10];
							if ( _ic <= (int)_state_act_trans_keys[_keys+1 ]&& _ic >= (int)_state_act_trans_keys[_keys ] )
							_trans = (int )_state_act_indicies[_inds + (int)( _ic - (int)_state_act_trans_keys[_keys ])  ];
							
							else
							_trans = (int )_state_act_index_defaults[cs];
							
							
						}
						
						else
						{
							_trans = (int )_state_act_index_defaults[cs];
							
						}
						
						
					}
					
					if ( _cont == 1  )
					{
						cs = (int)_state_act_cond_targs[_trans];
						switch ( _state_act_cond_actions[_trans]  ) {
							case 3 :
							{
								{
									cs = 3;
									
								}
								
							}
							
							break;
							
						}
						switch ( _state_act_to_state_actions[cs]  ) {
							case 4 :
							{
								System.out.print( "b1\n" );
								
							}
							
							break;
							case 1 :
							{
								System.out.print( "c1\n" );
								
							}
							
							break;
							case 6 :
							{
								System.out.print( "a1\n" );
								
							}
							{
								System.out.print( "b1\n" );
								
							}
							
							break;
							
						}
						if ( cs == 0  )
						_cont = 0;
						
						if ( _cont == 1  )
						p += 1;
						
						
					}
					
					
				}
				
				
			}
			
			
		}
	}
	
	void finish( )
	{
		if ( cs >= state_act_first_final )
		System.out.println( "ACCEPT" );
		else
		System.out.println( "FAIL" );
	}
	
	static final String inp[] = {
		"hi\nhi\n",
	};
	
	static final int inplen = 1;
	
	public static void main (String[] args)
	{
		stateact1_java machine = new stateact1_java();
		for ( int i = 0; i < inplen; i++ ) {
			machine.init();
			machine.exec( inp[i].toCharArray(), inp[i].length() );
			machine.finish();
		}
	}
}