COMPILER DESIGN

SYNTAX ANALYSIS

ERROR RECOVERY IN SYNTAX ANALYSIS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The Output From second phase of compiler is
A
Parse tree
B
Intermediate Code
C
Tokens<br />
D
None
Explanation: 

Detailed explanation-1: -Syntax analysis, the second phase in the compiler, receives as input the stream of tokens, corresponding to which it produces a parse tree as output. Syntax analysis is also referred to as parsing. The parse tree is generated with the help of pre-determined grammar rules of the language that the compiler targets.

Detailed explanation-2: -Lexical Analysis is the first phase when compiler scans the source code. This process can be left to right, character by character, and group these characters into tokens. Here, the character stream from the source program is grouped in meaningful sequences by identifying the tokens.

Detailed explanation-3: -What is the output of lexical analyzer? Explanation: A lexical analyzer coverts character sequences to set of tokens.

There is 1 question to complete.