Separate parser-like functions from the lexer