refactor Parser#id and Parser#num