Test refactor of Parser and Scanner