summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/clang4_julia.jl-Y-F0--var-backend.exp
blob: a044b1245458474c0a9bf114998c098ed8a632a1 (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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
const _clang_actions = Int8[0, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 2, 0, 2, 2, 1, 0, 2, 3, 1, 2, 3, 2, 2, 4, 1, 2, 4, 2, 2, 5, 1, 2, 5, 2, 2, 6, 1, 2, 6, 2, 2, 7, 1, 2, 7, 2, 2, 8, 1, 2, 8, 2, 3, 3, 1, 0, 3, 4, 1, 0, 3, 5, 1, 0, 3, 6, 1, 0, 3, 7, 1, 0, 3, 8, 1, 0, 0 , ]
const _clang_trans_keys = UInt8[1, 0, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 8, 9, 8, 10, 0, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 0 , ]
const _clang_char_class = Int8[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, 2, 3, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 4, 4, 4, 4, 4, 4, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 4, 12, 4, 4, 11, 4, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 11, 11, 4, 4, 4, 4, 0, 0 , ]
const _clang_index_offsets = Int16[0, 0, 14, 28, 42, 56, 70, 84, 86, 89, 103, 116, 129, 142, 155, 168, 181, 194, 207, 0 , ]
const _clang_indices = Int8[0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 5, 6, 5, 5, 5, 2, 5, 5, 5, 5, 5, 5, 7, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 9, 10, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 8, 8, 8, 8, 11, 8, 8, 8, 8, 8, 8, 12, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 15, 15, 15, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 16, 17, 16, 18, 16, 19, 20, 21, 22, 22, 16, 22, 24, 25, 26, 25, 27, 25, 28, 29, 30, 31, 31, 25, 31, 33, 34, 35, 34, 36, 34, 37, 38, 39, 40, 40, 34, 40, 24, 8, 26, 25, 27, 25, 12, 29, 30, 31, 31, 25, 31, 42, 43, 44, 43, 45, 46, 47, 48, 48, 49, 49, 43, 50, 52, 53, 54, 53, 55, 53, 56, 14, 14, 57, 57, 53, 57, 59, 60, 61, 60, 62, 60, 63, 64, 64, 64, 64, 60, 64, 42, 43, 44, 43, 45, 46, 47, 48, 48, 49, 49, 43, 49, 66, 67, 68, 67, 69, 67, 70, 71, 71, 71, 72, 67, 72, 0 , ]
const _clang_index_defaults = Int8[0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 11, 23, 32, 23, 41, 51, 58, 41, 65, 0 , ]
const _clang_trans_cond_spaces = Int8[-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 , ]
const _clang_cond_targs = Int8[1, 1, 12, 9, 0, 2, 2, 3, 4, 4, 5, 10, 6, 10, 15, 18, 11, 1, 2, 13, 14, 17, 16, 10, 10, 11, 1, 2, 13, 14, 17, 16, 10, 10, 11, 1, 2, 13, 14, 17, 16, 10, 10, 11, 1, 2, 7, 13, 17, 16, 8, 10, 10, 11, 1, 2, 13, 16, 10, 10, 11, 1, 2, 13, 16, 10, 10, 11, 1, 2, 13, 18, 16, 0 , ]
const _clang_cond_actions = Int8[1, 19, 0, 0, 0, 1, 19, 0, 0, 5, 0, 0, 0, 5, 1, 22, 22, 3, 3, 22, 22, 22, 22, 17, 58, 81, 55, 55, 81, 81, 81, 81, 9, 34, 65, 31, 31, 65, 65, 65, 65, 13, 46, 73, 43, 43, 1, 73, 1, 73, 0, 11, 40, 69, 37, 37, 69, 69, 7, 28, 61, 25, 25, 61, 1, 15, 52, 77, 49, 49, 77, 1, 77, 0 , ]
const _clang_eof_actions = Int8[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 9, 17, 13, 11, 7, 13, 15, 0 , ]
const _clang_nfa_targs = Int8[0, 0 , ]
const _clang_nfa_offsets = Int8[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , ]
const _clang_nfa_push_actions = Int8[0, 0 , ]
const _clang_nfa_pop_trans = Int8[0, 0 , ]
const clang_start  = 10
const clang_first_final  = 10
const clang_error  = 0
const clang_en_main  = 10
function m( data::AbstractString )
	p = 0
	pe = length(data)
	eof = length(data)
	cs = 0
	buffer = ""
	pos = 0;
	line = 0;
	pos = 0;
	line = 1;
	
	cs = convert(Int, clang_start )
	_trans = 0;
	_have = 0;
	_cont = 1;
	_acts = 0;
	_nacts= 0
	;
	_keys = 0;
	_inds = 0;
	while _cont == 1 
		if cs == 0 
			_cont = 0
			
		end
		_have = 0
		if p == pe 
			if p == eof 
				if _have == 0 
					__acts = 0;
					__nacts= 0
					;
					__acts = _clang_eof_actions[1+(cs)]
					__nacts = convert(UInt, _clang_actions[1+(__acts )] )
					__acts += 1
					while __nacts > 0 
						if _clang_actions[1+(__acts )] == 3 
							print( "ident(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(__acts )] == 4 
							print( "literal(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(__acts )] == 5 
							print( "float(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(__acts )] == 6 
							print( "int(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(__acts )] == 7 
							print( "hex(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(__acts )] == 8 
							print( "symbol(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						end
						__nacts -= 1
						__acts += 1
						
					end
					
				end
				
			end
			if _have == 0 
				_cont = 0
				
			end
			
		end
		if _cont == 1 
			if _have == 0 
				_keys = (cs<<1)
				_inds = _clang_index_offsets[1+(cs)]
				if (data[1+(p )])<= 127 
					_ic = convert(Int, _clang_char_class[1+(convert(Int, (data[1+(p )]) )- 0)] );
					if _ic <= convert(Int, _clang_trans_keys[1+(_keys+1 )] )&& _ic >= convert(Int, _clang_trans_keys[1+(_keys )] )
						_trans = convert(UInt, _clang_indices[1+(_inds + convert(Int, (_ic - convert(Int, _clang_trans_keys[1+(_keys )] )) ))] )
						
					else
						_trans = convert(UInt, _clang_index_defaults[1+(cs)] )
						
					end
					
				else
					_trans = convert(UInt, _clang_index_defaults[1+(cs)] )
					
				end
				
			end
			if _cont == 1 
				cs = convert(Int, _clang_cond_targs[1+(_trans)] )
				if _clang_cond_actions[1+(_trans)]!= 0 
					_acts = _clang_cond_actions[1+(_trans)]
					_nacts = convert(UInt, _clang_actions[1+(_acts )] )
					_acts += 1
					while _nacts > 0 
						if _clang_actions[1+(_acts )] == 0 
							buffer = buffer * AbstractString(Char[((data[1+(p )]))]);
							
						elseif _clang_actions[1+(_acts )] == 1 
							buffer = "";
							
						elseif _clang_actions[1+(_acts )] == 2 
							line = line + 1;
							
						elseif _clang_actions[1+(_acts )] == 3 
							print( "ident(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(_acts )] == 4 
							print( "literal(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(_acts )] == 5 
							print( "float(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(_acts )] == 6 
							print( "int(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(_acts )] == 7 
							print( "hex(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						elseif _clang_actions[1+(_acts )] == 8 
							print( "symbol(" );
							print( line );
							print( "," );
							print( length(buffer) );
							print( "): " );
							print( buffer );
							print( "\n" );
							
						end
						_nacts -= 1
						_acts += 1
						
					end
					
				end
				if cs == 0 
					_cont = 0
					
				end
				if _cont == 1 
					p += 1
					
				end
				
			end
			
		end
		
	end
	if ( cs >= clang_first_final )
		println( "ACCEPT" );
	else
		println( "FAIL" );
	end
end

m( "999 0xaAFF99 99.99 /!\n!/ 'lksdj' //\n\"\n\nliteral\n\n\n\"0x00aba foobardd.ddsf 0x0.9\n" );
m( "wordwithnum00asdf\n000wordfollowsnum,makes new symbol\n\nfinishing early /! unfinished ...\n" );