GATE Exam  >  GATE Questions  >  Consider the productions A → PQ and A &r... Start Learning for Free
Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.
Consider the following rules.
Rule 1: P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.s
Rule 2: X.i = A.i + Y.s and Y.i = X.s + A.i
Which one of the following is TRUE?
  • a)
    Neither Rule 1 nor Rule 2 is L-attributed.
  • b)
    Both Rule 1 and Rule 2 are L-attributed.
  • c)
    Only Rule 1 is L-attributed.
  • d)
    Only Rule 2 is L-attributed.
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
Consider the productions A → PQ and A → XY. Each of the five...
Rule 1: It is L-attributed by definition.
Rule 2: It is not L-attributed because this expression (X.i = A.i + Y.s) fails to satisfy the definition of L-attributed.
View all questions of this test
Explore Courses for GATE exam
Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer?
Question Description
Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer?.
Solutions for Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer?, a detailed solution for Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the productions A → PQ and A → XY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute.Consider the following rules.Rule 1:P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.sRule 2:X.i = A.i + Y.s and Y.i = X.s + A.iWhich one of the following is TRUE?a)Neither Rule 1 nor Rule 2 is L-attributed.b)Both Rule 1 and Rule 2 are L-attributed.c)Only Rule 1 is L-attributed.d)Only Rule 2 is L-attributed.Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev