Add left recursive checks to scanning and parsing
Fix scanning