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 4.5k 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.
Best answer 2 votes 2 votes both statement are wrong becoz lexical analyser uses finite autometa so it uses regular grammer ,whose expression will be for example letter(letter + digit )* , where as syntax tree uses context free grammer which uses pda saket nandan answered Feb 11, 2017 • selected Feb 12, 2017 by Debasmita Bhoumik saket nandan comment Share Follow See all 0 reply Please log in or register to add a comment.
5 votes 5 votes option D is ryt bcoz 1) Lexical Analysis is specified by regular expressions and implemented by finite-automata. http://user.it.uu.se/~kostis/Teaching/KT1-11/Slides/handout03.pdf for more info go above link 2) Syntax Analysis is specified by context-free grammars and implemented by pushdown automata. https://www.tutorialspoint.com/compiler_design/compiler_design_syntax_analysis.htm go for it. Sunidhi chauhan answered Oct 9, 2017 Sunidhi chauhan comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes And undoubtedly answer is option d) Mam. :).. Opposite takes place. Lexical Analysis is implemented by Regular Expressions and implemented by Finite State Machine. Syntax Analysis is specified by Context Free Grammar and implemented by Push Down Automata. Refer d link below for more information Mam. :) https://www.tutorialspoint.com/compiler_design/compiler_design_quick_guide.htm Mam read full length explanation and I hope the descp which is perfeclty given helps you. :) Devshree Dubey answered Feb 11, 2017 Devshree Dubey comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Both statement are wrong because lexical analyser uses finite automata so it uses regular grammer. Syntax Analysis is specified by context-free grammars and implemented by pushdown automata. Option is D Prasanjeet Ghosh answered Apr 25, 2018 Prasanjeet Ghosh comment Share Follow See all 0 reply Please log in or register to add a comment.