Added a new token method and print out the line number when a syntax error occurs