+else if interactive then
+ if only_lexer then
+ print "Error: -l and -i are incompatible"
+ exit 1
+ else if no_file then
+ print "Error: -e and -i are incompatible"
+ exit 1
+ else if not args.is_empty then
+ print "Error: -i works without arguments"
+ exit 1
+ end
+
+ var tc = new ToolContext
+
+ loop
+ var n = tc.interactive_parse("-->")
+ if n isa TString then
+ var s = n.text
+ if s == ":q" then
+ break
+ else
+ print "`:q` to quit"
+ end
+ continue
+ end
+
+ if n isa AError then
+ print "{n.location.colored_line("0;31")}: {n.message}"
+ continue
+ end
+
+ if not no_print then
+ n.dump_tree
+ end
+ end