NEW
Font size
WorksheetsSDT1
Total questions: 10
Worksheet time: 5mins
Difference between SDD & SDT is
in Grammar
in semantic rules
in hiding implementation details
none
SDT /SDD is also called
Annotated parse tree
Concrete Syntax Tree
postfix SDT
Attribute grammar
The attribute at a node is evaluated with attributes of its siblings is called
Synthesized attribute
Inherited attribute
SDT
SDD
IN SDT, A--> PQR
where .i is inherited attribute, which of the following is correct
A.i=Q.i
P.i= Q.i * R.i
A.i = Q.i + P.i + R.i
none
An attribute can be
value,
string, value
type, address
all
Consider following language construct
main() { int i,n;
fro(i=0; i<n; i++) }
when this is compiled, compiler response is
No error
lexical error
syntax error
both lexical & syntax error
The start symbol in grammar can have
synthesized attribute
inherited attribute
both
none
Parse tree showing attribute values at each node is called
syntax tree
concrete syntax tree
annotated parse tree
Derived parse tree
compiler spends more time in
Lexical analysis
syntax analysis
semantic analysis
code optimizer
Most of the errors in compilation are captured by
lexical analyzer
syntax analyzer
semantic analyzer
all the above
