add exit in parser & userinput

add exit in parser and userinput