SYNTAX ANALYSIS
ROLE OF THE PARSER
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Syntax analyzer
|
|
Intermediate code generation
|
|
Lexical analyzer
|
|
Semantic analyzer
|
Detailed explanation-1: -The groups are token together into semantic structures is the Lexical analyzer. Lexical analyzer: Lexical analysis is the first phase of the compiler, sometimes known as a scanner. It takes a set of Tokens from a high-level input application and converts them.
Detailed explanation-2: -The SA groups the tokens together into syntactic structure called as expression. Expression may further be combined to form statements. The syntactic structure can be regarded as a tree whose leaves are the token called as parse trees.
Detailed explanation-3: -The Lexical Analyzer The lexer reads the stream of characters making up the source program and groups the characters into logically meaningful sequences called lexemes.
Detailed explanation-4: -Explanation: Scanner is used for grouping characters into tokens.
Detailed explanation-5: -In programming language, keywords, constants, identifiers, strings, numbers, operators and punctuations symbols can be considered as tokens.