208 |
printf("%d", (*stack_head)->content.val); |
printf("%d", (*stack_head)->content.val); |
209 |
break; |
break; |
210 |
case string: |
case string: |
211 |
printf("%s", (char*)(*stack_head)->content.ptr); |
printf("\"%s\"", (char*)(*stack_head)->content.ptr); |
212 |
break; |
break; |
213 |
case ref: |
case ref: |
214 |
printf("%s", ((stackitem*)(*stack_head)->content.ptr)->id); |
printf("%s", ((stackitem*)(*stack_head)->content.ptr)->id); |
243 |
{ |
{ |
244 |
if(*stack_head != NULL) { |
if(*stack_head != NULL) { |
245 |
print_st(*stack_head, 1); |
print_st(*stack_head, 1); |
246 |
printf("\n"); |
nl(); |
247 |
} else { |
} else { |
248 |
printerr("Stack empty"); |
printerr("Stack empty"); |
249 |
} |
} |
335 |
break; |
break; |
336 |
} |
} |
337 |
/* If symbol */ |
/* If symbol */ |
338 |
if((convert= sscanf(in_line, "%[^] ;\n\r]%[^\n\r]", temp, rest))) { |
if((convert= sscanf(in_line, "%[^][ ;\n\r]%[^\n\r]", temp, rest))) { |
339 |
push_ref(stack_head, in_hash, temp); |
push_ref(stack_head, in_hash, temp); |
340 |
break; |
break; |
341 |
} |
} |
342 |
/* If single char */ |
/* If single char */ |
343 |
if((convert= sscanf(in_line, "%c%[^\n\r]", temp, rest))) { |
if((convert= sscanf(in_line, "%c%[^\n\r]", temp, rest))) { |
344 |
if(*temp==';') { |
if(*temp==';') { |
345 |
if(non_eval_flag) { |
if(!non_eval_flag) { |
346 |
eval(stack_head); /* Evaluate top element */ |
eval(stack_head); /* Evaluate top element */ |
347 |
break; |
break; |
348 |
} |
} |
354 |
if(*temp==']') { |
if(*temp==']') { |
355 |
push_ref(stack_head, in_hash, "["); |
push_ref(stack_head, in_hash, "["); |
356 |
pack(stack_head); |
pack(stack_head); |
357 |
non_eval_flag--; |
if(non_eval_flag!=0) |
358 |
|
non_eval_flag--; |
359 |
break; |
break; |
360 |
} |
} |
361 |
|
|