Completed the scanner and the parser