COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the name of the process that determining whether a string of tokens can be generated by a grammar?
A
Analysing
B
Recognizing
C
Translating
D
Parsing
Explanation: 

Detailed explanation-1: -Parsing is the process of determining if a string of tokens can be generated by a grammar. It is helpful to think of a parse tree being constructed (even though a compiler may not actually construct such tree).

Detailed explanation-2: -Explanation: Parsing is used to determine whether tokens can be generated by a given grammar.

Detailed explanation-3: -Explanation: Parsing is a process of finding a parse tree for a string of tokens.

Detailed explanation-4: -Lexical analysis : process of taking an input string of characters (such as the source code of a computer program) and producing a sequence of symbols called lexical tokens, or just tokens, which may be handled more easily by a parser.

Detailed explanation-5: -Explanation: The process of forming tokens from an input stream of characters is called tokenization.

There is 1 question to complete.