0 votes 0 votes Which of the statements related to Compilers is wrong ? Lexical analysis is breaking the input into tokens Syntax analysis is for parsing the phrase Syntax analysis is for analyzing the semantic None of these Compiler Design ugcnetcse-june2005-paper2 compiler-design compilation-phases + – go_editor asked Mar 26, 2020 • recategorized Nov 22, 2023 by Hira Thakur go_editor 1.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Statement 1 is correct. The main objective of lexical analysis is breaking the program into a group of logical meaning words (Token). Statement 2 is also correct here. The syntax analysis phase checks whether the token is syntactically correct or not. if yes then it produces the parse tree otherwise generates a syntax error. Statement 3 is wrong here. Semantic means the meaning of language. syntax analysis phase only cares about the correct syntax of the program. programs are logically valid or not, this part is done by the semantic analysis phase. $\textrm{Option (C) is correct.}$ Please refer here: Gate 1998 Gate 2018 Phases of a compiler Hira Thakur answered Feb 15, 2021 • edited Nov 22, 2023 by Hira Thakur Hira Thakur comment Share Follow See all 0 reply Please log in or register to add a comment.