COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Lexical Analyzer
|
|
Syntax Analyzer
|
|
Semantic Analyzer
|
|
Scanner
|
Detailed explanation-1: -It is also known as the Parse Tree or Syntax Tree. The Parse Tree is developed with the help of pre-defined grammar of the language. The syntax analyser also checks whether a given program fulfills the rules implied by a context-free grammar.
Detailed explanation-2: -The parser (syntax analyzer) receives the source code in the form of tokens from the lexical analyzer and performs syntax analysis, which create a tree-like intermediate representation that depicts the grammatical structure of the token stream. Syntax analysis is also called parsing.
Detailed explanation-3: -The parser is that phase of the compiler which takes a token string as input and with the help of existing grammar, converts it into the corresponding Intermediate Representation(IR). The parser is also known as Syntax Analyzer.
Detailed explanation-4: -Parsing, syntax analysis, or syntactic analysis is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar. The term parsing comes from Latin pars (orationis), meaning part (of speech).
Detailed explanation-5: -What is another name for Lexical Analyser? Explanation: Lexical Analyzer is also called “Linear Phase” or “Linear Analysis” or “Scanning“. Explanation: Individual Token is also Called Lexeme.