2 votes 2 votes Consider the following statements related to compiler construction: Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. Syntax Analysis is specified by regular expressions and implemented by finite-state machine. Which of the above statement(s) is/are correct? Only I Only II Both I and II Neither I nor II Compiler Design ugcnetjan2017ii compiler-design lexical-analysis + – go_editor asked Mar 24, 2020 recategorized May 24, 2020 go_editor 3.9k views answer comment Share Follow See 1 comment See all 1 1 comment reply Yashvir commented Jan 16, 2023 reply Follow Share Whats Wrong in this approach ? As every regular is Context free Grammer and every automata can be implemented by PDA . So Lexical Analysis uses Context Free Grammer? So Option A should be correct 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes statement 1 is false because lexical analysis phase is specified by regular expression and implement by FA statement 2 is false because syntax analysis is specified by context free grammar and implement by PDA option D Mohit Kumar 6 answered May 7, 2020 Mohit Kumar 6 comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes answer:- (d) lexical analysis is specified by regular expression and implemented on finite state automata. syntax analysis is specified by context free grammar and implemented on push down automata. manoj kanwar answered Jun 2, 2020 manoj kanwar comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes answer:- (d) both the statements are wrong. reason:- lexical analysis uses reguler expression and it is based on finite state automata. whereas syntax analysis uses context free grammar and it is based on push down automata. manoj kanwar answered Jun 2, 2020 manoj kanwar comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Option D) is correct , as Lexical analysis is implemented by Finite automata whereas Syntax analysis is implemented by Pushdown automata. Sanandan answered Oct 3, 2020 Sanandan comment Share Follow See all 0 reply Please log in or register to add a comment.