deleted dead code from imperative version
refactored lexer to be tail-recursive
fix bug in Parser.show, print actual number in Num