The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
68 views

Please suggest me the approach to solve this kind of questions

Options are-

  1. Max(B1.val , value(n) ) , Min(C1.val , Value(n) )
  2. Min(B1.val , value(n )) , Min(C1.val , value(n) )
  3. Max(B1.val , value(n)) , Max(C1.val, value(n) )
  4. Min(B1.val , value(n) ) , Max(C1.val , value(n)
in Compiler Design by Active (1.6k points)
edited by | 68 views
0
D ?
0

should be D only.

But in the original SDT,

if it is not L-attributed, then S -> A sign // A.sign = Sign.sign, S.value = A.value

if it is L-attributed, then S -> sign A  // A.sign = Sign.sign, S.value = A.value

0

@Shaik Masthan if it is not L-attributed then S-attributed then how does A got the value of sign 

0
it doesn't mean, we are evaluating using only bottom-up parsers...

for using in bottom up parsers we redefine it
0

@Shaik Masthan @Shobhit Joshi

what is difference between C) and D) option?

0

@srestha The description of SDT says if the sign is $1\,i.e\,'+'$ we will take minimum of the two values, in $(C)$ we are taking maximum in $'+'$ and in $(D)$ we take minimum at position $B1$ as $B1$ came when the sign was $'+'$

0

@Sreshta

in synthesis attributes definition

s -> C-  is with negative sign

so for

c-> c1,n we have to take minimum of (c1.value and value(n)) as given in L-attribute definition

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,288 questions
55,719 answers
192,113 comments
90,125 users