Refactor parser header

Make separate lexer, stack and parser structs.