refactored pluto parser to remove mutations, local state in parser object