# -*- coding: utf-8 -*-
from joelang import *

##########################
#THIS IS THE ENTRY PLACE#
##########################

while True:
	text = input('Joelang > ')
	if text.strip() == "": continue
	result, error = joelang.run('<stdin>', text)

	if error:
		print(error.as_string())
	elif result:
		if len(result.elements) == 1:
			print(repr(result.elements[0]))
		else:
			print(repr(result))
