COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
intermediate
|
|
source
|
|
object
|
|
error
|
Detailed explanation-1: -The intermediate code computes the value of the expression and stores it into a variable. If E is an expression then attribute E. addr is the name of the variable in which the value of E has been stored.
Detailed explanation-2: -Intermediate code generator receives input from its predecessor phase, semantic analyzer, in the form of an annotated syntax tree. That syntax tree then can be converted into a linear representation, e.g., postfix notation. Intermediate code tends to be machine independent code.
Detailed explanation-3: -Syntax Directed Definition (SDD) is a kind of abstract specification. It is generalization of context free grammar in which each grammar production X –> a is associated with it a set of production rules of the form s = f(b1, b2, …… bk) where s is the attribute obtained from function f.
Detailed explanation-4: -A technique of compiler execution, where the source code translation is totally conducted by the parser, is known as syntax-directed translation. The parser primarily uses a Context-free-Grammar to check the input sequence and deliver output for the compiler’s next stage.