Separate code from parser.h into lexer and stack files