def main(): """Run the REPL.""" interp = SInterpreter() while True: try: line = input('>>> ') while line.count('(') > line.count(')'): line += ' ' + input('... ' + ' ' * 2 * (line.count('(') - line.count(')'))) if line.count('(') < line.count(')'): raise Exception("Too many closing parentheses.") sprint(interp.seval(line)) except EOFError: print('Bye') return except SException as e: print('Error:', e)
def do_fuzz(program, env): try: sprint(program) seval_tree(program, env) except SException: pass
def record_issue(program, e): print("Issue found with:") sprint(program) print("Error: ", e)
def _print(env, quote): sprint(quote) return SNode('none', None)