7 votes 7 votes Compiler Design made-easy-test-series lexical-analysis + – abhishekmehta4u asked Sep 11, 2018 abhishekmehta4u 2.6k views answer comment Share Follow See all 39 Comments See all 39 39 Comments reply Show 36 previous comments reboot commented Aug 21, 2020 reply Follow Share duplicate of https://gateoverflow.in/242058/compiler 0 votes 0 votes Vineet Pandey commented Oct 19, 2020 reply Follow Share actually You answered ur own question int a=09 is octal but 9 cant be a octal (0-8) that’s why its lex error because due to limit of octal range it will not be a token in most of the languages. 0 votes 0 votes sanketgate2021 commented May 20, 2021 reply Follow Share option 3 will generate lexical error 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes P1, P3 and P4 adeemajain answered Jan 25, 2019 adeemajain comment Share Follow See all 2 Comments See all 2 2 Comments reply Satyam1729 commented Jan 25, 2019 reply Follow Share why n't p2?...and why p4? 0 votes 0 votes adeemajain commented Jan 25, 2019 reply Follow Share There is a syntax error in P2 but there is nothing in P2 which can not be identified by lexical analyser. And in P4 09 in out of the range of octal code but lex can identify only octal numbers hence error 0 votes 0 votes Please log in or register to add a comment.