1 /*
2 * %CopyrightBegin%
3 *
4 * Copyright Ericsson AB and Kjell Winblad 2019. All Rights Reserved.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * %CopyrightEnd%
19 */
20
21 /*
22 * Author: Kjell Winblad
23 */
24
25
26 #include <stdio.h>
27 #include <stdlib.h>
28
29 #include "ycf_yield_fun.h"
30 #include "ycf_node.h"
31
32 void print_node_code_expression(ycf_node_expression e, ycf_string_printable_buffer* b);
33
print_symbol_code(ycf_symbol * s,ycf_string_printable_buffer * b)34 void print_symbol_code(ycf_symbol* s, ycf_string_printable_buffer* b){
35 if(s == NULL){
36 return;
37 }
38 print_symbol_code(s->whitespace_or_comment_before, b);
39 ycf_string_printable_buffer_printf(b, "%s", ycf_symbol_get_text(s));
40 }
41
print_symbol_list(ycf_symbol_list * l,ycf_string_printable_buffer * b)42 void print_symbol_list(ycf_symbol_list* l, ycf_string_printable_buffer* b){
43 ycf_symbol* s = l->head;
44 while(s != NULL){
45 print_symbol_code(s, b);
46 s = s->next;
47 }
48 }
49
print_node_code_array_bracket(ycf_node_array_bracket n,ycf_string_printable_buffer * b)50 void print_node_code_array_bracket(ycf_node_array_bracket n, ycf_string_printable_buffer* b){
51 print_symbol_code(n.start, b);
52 if(!n.empty){
53 print_node_code_expression(n.content, b);
54 }
55 print_symbol_code(n.end, b);
56 }
57
print_node_code_definition_custom_end(ycf_node_definition d,bool dyn_array_to_ptr,ycf_symbol * end,ycf_string_printable_buffer * b)58 void print_node_code_definition_custom_end(ycf_node_definition d, bool dyn_array_to_ptr, ycf_symbol* end, ycf_string_printable_buffer* b){
59 int nr_of_empty_brackets = 0;
60 {
61 ycf_node* current = d.array_brackets.head;
62 while(current != NULL){
63 if(current->u.array_bracket.empty){
64 nr_of_empty_brackets++;
65 }
66 current = current->next;
67 }
68 }
69 print_symbol_list(&d.type_specifiers, b);
70 if(dyn_array_to_ptr){
71 for(int i = 0; i < nr_of_empty_brackets; i++){
72 ycf_string_printable_buffer_printf(b, "*");
73 }
74 }
75 print_symbol_code(d.identifier, b);
76 if (!dyn_array_to_ptr || nr_of_empty_brackets == 0){
77 print_node_list_code(d.array_brackets.head, b);
78 }
79 print_symbol_code(end, b);
80 }
81
print_node_code_definition(ycf_node_definition d,ycf_string_printable_buffer * b)82 void print_node_code_definition(ycf_node_definition d, ycf_string_printable_buffer* b){
83 print_node_code_definition_custom_end(d, false, d.end, b);
84 }
85
print_node_code_definition_init(ycf_node_definition_init d,ycf_string_printable_buffer * b)86 void print_node_code_definition_init(ycf_node_definition_init d, ycf_string_printable_buffer* b){
87 print_node_code_definition(d.definition, b);
88 print_symbol_list(&d.initializer_expression, b);
89 print_symbol_code(d.end, b);
90 }
91
print_node_list_code(ycf_node * n,ycf_string_printable_buffer * b)92 void print_node_list_code(ycf_node* n, ycf_string_printable_buffer* b){
93 while(n != NULL){
94 ycf_node_print(n, b);
95 n = n->next;
96 }
97 }
98
print_node_code_function_def_parameters(ycf_node_function_definition f_def,ycf_string_printable_buffer * b)99 void print_node_code_function_def_parameters(ycf_node_function_definition f_def, ycf_string_printable_buffer* b){
100 if(f_def.ignore_param_ending){
101 ycf_node* n = f_def.parameters.head;
102 while(n != NULL){
103 if(n->next == NULL){
104 print_node_code_definition_custom_end(n->u.definition, false, ycf_symbol_new_parenthesis(), b);
105 }else{
106 print_node_code_definition_custom_end(n->u.definition, false, ycf_symbol_new_comma(), b);
107 }
108 n = n->next;
109 }
110 if(f_def.end.head != NULL && f_def.end.head->type == ycf_symbol_type_end_parenthesis){
111 ycf_symbol_list end = f_def.end;
112 end.head = end.head->next;
113 print_symbol_list(&end, b);
114 }else if(f_def.end.head != NULL && f_def.end.head->type != ycf_symbol_type_void){
115 print_symbol_list(&f_def.end, b);
116 }
117 }else {
118 print_node_list_code(f_def.parameters.head, b);
119 print_symbol_list(&f_def.end, b);
120 }
121 }
print_node_code_function_def(ycf_node_function_definition f_def,ycf_string_printable_buffer * b)122 void print_node_code_function_def(ycf_node_function_definition f_def, ycf_string_printable_buffer* b){
123 print_node_code_definition(f_def.definition, b);
124 print_node_code_function_def_parameters(f_def, b);
125 }
126
print_node_code_scope(ycf_node_code_scope s,ycf_string_printable_buffer * b)127 void print_node_code_scope(ycf_node_code_scope s, ycf_string_printable_buffer* b){
128 print_symbol_code(s.start, b);
129 print_node_list_code(s.definition_nodes.head, b);
130 print_node_list_code(s.other_nodes.head, b);
131 print_symbol_code(s.end, b);
132 }
133
print_node_code_function(ycf_node_function f,ycf_string_printable_buffer * b)134 void print_node_code_function(ycf_node_function f, ycf_string_printable_buffer* b){
135 print_node_code_function_def(f.definition, b);
136 print_node_code_scope(f.body, b);
137 }
138
print_node_code_assignment(ycf_node_assignment a,ycf_string_printable_buffer * b)139 void print_node_code_assignment(ycf_node_assignment a, ycf_string_printable_buffer* b){
140 print_node_code_expression(a.left_side, b);
141 print_symbol_code(a.assignment_symbol, b);
142 print_node_code_expression(a.right_side, b);
143 print_symbol_code(a.end, b);
144 }
145
print_node_code_gen_struct(ycf_node_gen_typedef_struct n,ycf_string_printable_buffer * b)146 void print_node_code_gen_struct(ycf_node_gen_typedef_struct n, ycf_string_printable_buffer* b){
147 ycf_string_printable_buffer_printf(b, "\n\n\nstruct %s {", n.name);
148 ycf_node* current = n.definition_nodes.head;
149 while(current != NULL){
150 print_node_code_definition_custom_end(current->u.definition, true, ycf_symbol_new_semicolon(), b);
151 current = current->next;
152 }
153 ycf_string_printable_buffer_printf(b, "\n};\n");
154 }
155
print_node_code_yield(ycf_node_yield n,ycf_string_printable_buffer * b)156 void print_node_code_yield(ycf_node_yield n, ycf_string_printable_buffer* b){
157 print_symbol_code(n.yield_symbol,b);
158 print_symbol_code(n.end_symbol,b);
159
160 }
161
print_node_code_function_call(ycf_node_function_call n,ycf_string_printable_buffer * b)162 void print_node_code_function_call(ycf_node_function_call n, ycf_string_printable_buffer* b){
163 print_symbol_list(&n.neg_symbols, b);
164 print_symbol_code(n.identifier, b);
165 print_symbol_code(n.start_symbol, b);
166 print_node_list_code(n.parameter_expressions.head, b);
167 print_symbol_code(n.end_symbol, b);
168 }
169
print_node_code_expression(ycf_node_expression e,ycf_string_printable_buffer * b)170 void print_node_code_expression(ycf_node_expression e, ycf_string_printable_buffer* b){
171 print_node_list_code(e.content.head, b);
172 }
173
174
print_node_code_paran_expression(ycf_node_parentheses_expression e,ycf_string_printable_buffer * b)175 void print_node_code_paran_expression(ycf_node_parentheses_expression e, ycf_string_printable_buffer* b){
176 print_symbol_code(e.start_symbol, b);
177 print_node_code_expression(e.content, b);
178 print_symbol_code(e.end_symbol, b);
179 }
180
print_node_code_consume_reds(ycf_node_consume_reds e,ycf_string_printable_buffer * b)181 void print_node_code_consume_reds(ycf_node_consume_reds e, ycf_string_printable_buffer* b){
182 print_symbol_code(e.consume_reds_symbol, b);
183 print_node_code_paran_expression(e.nr_of_reds_expression, b);
184 print_symbol_code(e.end_symbol, b);
185 }
186
print_node_code_if_statement(ycf_node_if e,ycf_string_printable_buffer * b)187 void print_node_code_if_statement(ycf_node_if e, ycf_string_printable_buffer* b){
188 print_symbol_code(e.if_word, b);
189 print_node_code_paran_expression(e.expression, b);
190 ycf_node_print(e.if_statement, b);
191 }
192
print_node_code_while_statement(ycf_node_while e,ycf_string_printable_buffer * b)193 void print_node_code_while_statement(ycf_node_while e, ycf_string_printable_buffer* b){
194 print_symbol_code(e.while_word, b);
195 print_node_code_paran_expression(e.expression, b);
196 ycf_node_print(e.statement, b);
197 }
198
print_node_code_do_while_statement(ycf_node_do_while e,ycf_string_printable_buffer * b)199 void print_node_code_do_while_statement(ycf_node_do_while e, ycf_string_printable_buffer* b){
200 print_symbol_code(e.do_word, b);
201 ycf_node_print(e.statement, b);
202 print_symbol_code(e.while_word, b);
203 print_node_code_paran_expression(e.expression, b);
204 print_symbol_code(e.end, b);
205 }
206
print_node_code_switch_statement(ycf_node_switch e,ycf_string_printable_buffer * b)207 void print_node_code_switch_statement(ycf_node_switch e, ycf_string_printable_buffer* b){
208 print_symbol_code(e.switch_word, b);
209 print_node_code_paran_expression(e.expression, b);
210 print_node_code_scope(e.scope, b);
211 }
212
print_node_code_for_statement(ycf_node_for e,ycf_string_printable_buffer * b)213 void print_node_code_for_statement(ycf_node_for e, ycf_string_printable_buffer* b){
214 print_symbol_code(e.for_word, b);
215 print_symbol_code(e.start_parentheses, b);
216 ycf_node_print(e.init, b);
217 ycf_node_print(e.stop_cond, b);
218 print_symbol_code(e.stop_cond_end, b);
219 ycf_node_print(e.end_exp, b);
220 print_symbol_code(e.end_parentheses, b);
221 ycf_node_print(e.statement, b);
222 }
223
print_node_code_if_else_statement(ycf_node_if_else e,ycf_string_printable_buffer * b)224 void print_node_code_if_else_statement(ycf_node_if_else e, ycf_string_printable_buffer* b){
225 print_node_code_if_statement(e.if_part, b);
226 print_symbol_code(e.else_word, b);
227 ycf_node_print(e.else_statement, b);
228 }
229
print_node_code_for_assignment_fun_call(ycf_node_function_call_assignment e,ycf_string_printable_buffer * b)230 void print_node_code_for_assignment_fun_call(ycf_node_function_call_assignment e, ycf_string_printable_buffer* b){
231 print_node_code_expression(e.left_side, b);
232 print_symbol_code(e.assignment_symbol, b);
233 print_node_code_function_call(e.fun_call, b);
234 }
235
print_node_code_special_code_block(ycf_node_special_code_block block,ycf_string_printable_buffer * b)236 void print_node_code_special_code_block(ycf_node_special_code_block block, ycf_string_printable_buffer* b){
237 print_symbol_code(block.start, b);
238 print_node_code_if_statement(block.code, b);
239 print_symbol_code(block.end, b);
240
241 }
242
print_node_code_goto(ycf_node_goto n,ycf_string_printable_buffer * b)243 void print_node_code_goto(ycf_node_goto n, ycf_string_printable_buffer* b){
244 print_symbol_code(n.goto_symbol, b);
245 print_symbol_code(n.label_symbol, b);
246 print_symbol_code(n.end_symbol, b);
247 }
248
print_node_code_period_field_access(ycf_node_period_field_access n,ycf_string_printable_buffer * b)249 void print_node_code_period_field_access(ycf_node_period_field_access n, ycf_string_printable_buffer* b){
250 print_symbol_code(n.period, b);
251 print_symbol_code(n.field_name, b);
252 }
253
print_node_code_pointer_field_access(ycf_pointer_field_access n,ycf_string_printable_buffer * b)254 void print_node_code_pointer_field_access(ycf_pointer_field_access n, ycf_string_printable_buffer* b){
255 print_symbol_code(n.pointer, b);
256 print_symbol_code(n.field_name, b);
257 }
258
print_node_code_return(ycf_node_return n,ycf_string_printable_buffer * b)259 void print_node_code_return(ycf_node_return n, ycf_string_printable_buffer* b){
260 print_symbol_code(n.return_symbol, b);
261 if (n.return_expression != NULL) {
262 ycf_node_print(n.return_expression, b);
263 }
264 print_symbol_code(n.end_symbol, b);
265 }
266
ycf_node_print(ycf_node * node,ycf_string_printable_buffer * b)267 void ycf_node_print(ycf_node* node, ycf_string_printable_buffer* b){
268 if(node == NULL){
269 return;
270 } else if(node->type == ycf_node_type_c_file){
271 print_node_list_code(node->u.c_file.content.head, b);
272 } else if(node->type == ycf_node_type_variable_definition){
273 print_node_code_definition(node->u.definition, b);
274 } else if(node->type == ycf_node_type_variable_definition_init){
275 print_node_code_definition_init(node->u.definition_init, b);
276 } else if(node->type == ycf_node_type_function_declaration){
277 print_node_code_function_def(node->u.function_definition, b);
278 } else if(node->type == ycf_node_type_other){
279 print_symbol_code(node->u.other.what, b);
280 } else if(node->type == ycf_node_type_code_scope){
281 print_node_code_scope(node->u.code_scope, b);
282 }else if(node->type == ycf_node_type_function_definition){
283 print_node_code_function(node->u.function, b);
284 }else if(node->type == ycf_node_type_assignment){
285 print_node_code_assignment(node->u.a, b);
286 }else if(node->type == ycf_node_type_gen_typedef_struct){
287 print_node_code_gen_struct(node->u.gen_typedef_struct, b);
288 }else if(node->type == ycf_node_type_yield){
289 print_node_code_yield(node->u.yield, b);
290 } else if(node->type == ycf_node_type_statement){
291 ycf_node_print(node->u.statement.expression, b);
292 print_symbol_code(node->u.statement.end_symbol, b);
293 } else if(node->type == ycf_node_type_function_call){
294 print_node_code_function_call(node->u.function_call, b);
295 } else if(node->type == ycf_node_type_expression){
296 print_node_code_expression(node->u.expression, b);
297 } else if(node->type == ycf_node_type_parentheses_expression){
298 print_node_code_paran_expression(node->u.parentheses_expression, b);
299 } else if(node->type == ycf_node_type_if){
300 print_node_code_if_statement(node->u.if_n, b);
301 }else if(node->type == ycf_node_type_if_else){
302 print_node_code_if_else_statement(node->u.if_else, b);
303 }else if(node->type == ycf_node_type_while){
304 print_node_code_while_statement(node->u.while_n, b);
305 }else if(node->type == ycf_node_type_do_while){
306 print_node_code_do_while_statement(node->u.do_while, b);
307 }else if(node->type == ycf_node_type_switch){
308 print_node_code_switch_statement(node->u.switch_n, b);
309 }else if(node->type == ycf_node_type_for){
310 print_node_code_for_statement(node->u.for_n, b);
311 }else if(node->type == ycf_node_type_assignment_function_call){
312 print_node_code_for_assignment_fun_call(node->u.function_call_assignment, b);
313 } else if(node->type == ycf_node_type_comma){
314 print_symbol_code(node->u.comma.comma_symbol, b);
315 } else if(node->type == ycf_node_type_array_bracket){
316 print_node_code_array_bracket(node->u.array_bracket, b);
317 } else if(node->type == ycf_node_type_macro_cmd){
318 print_symbol_code(node->u.macro_cmd.symbol, b);
319 } else if(node->type == ycf_node_type_on_save_yield_state_code ||
320 node->type == ycf_node_type_on_restore_yield_state_code ||
321 node->type == ycf_node_type_on_destroy_state_code ||
322 node->type == ycf_node_type_on_return_code ||
323 node->type == ycf_node_type_on_destroy_state_or_return_code){
324 print_node_code_special_code_block(node->u.special_code_block, b);
325 } else if(node->type == ycf_node_type_goto){
326 print_node_code_goto(node->u.goto_n, b);
327 } else if(node->type == ycf_node_type_return_statement){
328 print_node_code_return(node->u.return_n, b);
329 } else if(node->type == ycf_node_type_period_field_access){
330 print_node_code_period_field_access(node->u.period_field_access, b);
331 } else if(node->type == ycf_node_type_pointer_field_access){
332 print_node_code_pointer_field_access(node->u.pointer_field_access, b);
333 } else {
334 fprintf(stderr, "Unknown node type %d\n", node->type);
335 exit(1);
336 }
337 }
338
339
print_definition(ycf_node_definition d)340 void print_definition(ycf_node_definition d){
341 printf("NODE: definition (type=%s,%s=%s)\n",
342 ycf_symbol_text_between(d.type_specifiers.head,
343 d.type_specifiers.last),
344 get_symbol_type_text(d.identifier->type),
345 ycf_symbol_get_text(d.identifier) );
346 }
347
print_scope(ycf_node_code_scope node)348 void print_scope(ycf_node_code_scope node){
349 printf("NODE: scope\n");
350 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
351 printf("Defenition Nodes:\n");
352 struct ycf_node* n = node.definition_nodes.head;
353 while(n != NULL){
354 print_abstract_syntax_tree(n);
355 n = n->next;
356 }
357 printf("Other Nodes:\n");
358 n = node.other_nodes.head;
359 while(n != NULL){
360 print_abstract_syntax_tree(n);
361 n = n->next;
362 }
363 printf("END SCOPE\n");
364 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
365 }
366
print_function_def(ycf_node_function_definition node)367 void print_function_def(ycf_node_function_definition node){
368 printf("NODE: function def:\n");
369 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
370 printf("definition:\n");
371 print_definition(node.definition);
372 printf("parameters:\n");
373 struct ycf_node* n = node.parameters.head;
374 while(n != NULL){
375 print_abstract_syntax_tree(n);
376 n = n->next;
377 }
378 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
379 }
380
print_fun_call(ycf_node_function_call f_call)381 void print_fun_call(ycf_node_function_call f_call){
382 printf("NODE: fun_call %s parameters:\n", ycf_symbol_get_text(f_call.identifier));
383 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
384 struct ycf_node* current = f_call.parameter_expressions.head;
385 int i = 1;
386 while(current != NULL){
387 printf("param %d: \n", i);
388 ycf_node_print(current, NULL);
389 current = current->next;
390 i++;
391 }
392 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
393 }
394
print_abstract_syntax_tree(ycf_node * node)395 void print_abstract_syntax_tree(ycf_node* node){
396 printf("%p\n",(void*)node);
397 if(node == NULL){
398 return;
399 } else if(node->type == ycf_node_type_c_file){
400 printf("NODE: c_file\n");
401 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
402 struct ycf_node* n = node->u.c_file.content.head;
403 while(n != NULL){
404 print_abstract_syntax_tree(n);
405 n = n->next;
406 }
407 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
408 } else if(node->type == ycf_node_type_variable_definition){
409 print_definition(node->u.definition);
410 } else if(node->type == ycf_node_type_variable_definition_init){
411 printf("NODE: definition_init (type=%s,%s=%s,init=%s)\n",
412 ycf_symbol_text_between(node->u.definition_init.definition.type_specifiers.head,
413 node->u.definition_init.definition.type_specifiers.last),
414 get_symbol_type_text(node->u.definition_init.definition.identifier->type),
415 ycf_symbol_get_text(node->u.definition_init.definition.identifier),
416 ycf_symbol_text_between(node->u.definition_init.initializer_expression.head,
417 node->u.definition_init.initializer_expression.last));
418 } else if(node->type == ycf_node_type_function_declaration){
419 print_function_def(node->u.function_definition);
420 } else if(node->type == ycf_node_type_other){
421 printf("NODE: other (%s)\n", get_symbol_type_text(node->u.other.what->type));
422 } else if(node->type == ycf_node_type_code_scope){
423 print_scope(node->u.code_scope);
424 }else if(node->type == ycf_node_type_function_definition){
425 printf("NODE: function\n");
426 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
427 print_function_def(node->u.function.definition);
428 print_scope(node->u.function.body);
429 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
430 }else if(node->type == ycf_node_type_assignment){
431 printf("NODE: assignment\n");
432 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
433 print_node_code_assignment(node->u.a, NULL);
434 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
435 }else if(node->type == ycf_node_type_yield){
436 printf("NODE: yield\n");
437 }else if(node->type == ycf_node_type_statement){
438 printf("NODE: statement\n");
439 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
440 print_abstract_syntax_tree(node->u.statement.expression);
441 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
442 }else if(node->type == ycf_node_type_if){
443 printf("NODE: if_statement\n");
444 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
445 ycf_node_print(node, NULL);
446 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
447 }else if(node->type == ycf_node_type_if_else){
448 printf("NODE: if_else_statement\n");
449 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
450 ycf_node_print(node, NULL);
451 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
452 }else if(node->type == ycf_node_type_while){
453 printf("NODE: while_statement\n");
454 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
455 ycf_node_print(node, NULL);
456 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
457 }else if(node->type == ycf_node_type_do_while){
458 printf("NODE: do_while_statement\n");
459 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
460 ycf_node_print(node, NULL);
461 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
462 }else if(node->type == ycf_node_type_for){
463 printf("NODE: for_statement\n");
464 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
465 ycf_node_print(node, NULL);
466 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
467 }else if(node->type == ycf_node_type_switch){
468 printf("NODE: switch_statement\n");
469 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
470 ycf_node_print(node, NULL);
471 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
472 } else if(node->type == ycf_node_type_function_call) {
473 print_fun_call(node->u.function_call);
474 } else if(node->type == ycf_node_type_assignment_function_call) {
475 printf("NODE: assignment fun call\n");
476 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
477 printf("Assignment expression:\n");
478 print_node_code_expression(node->u.function_call_assignment.left_side, NULL);
479 print_fun_call(node->u.function_call_assignment.fun_call);
480 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
481
482
483 } else {
484 printf("NODE: OTHER???\n");
485 printf(">>>>>>>>>>>>>>>>>>>>>>>\n");
486 ycf_node_print(node, NULL);
487 printf("<<<<<<<<<<<<<<<<<<<<<<<\n");
488 }
489
490 }
491
492