(VU Files Free Help) Assignment/GDB Updates
(VU Files Free Help) Assignment/GDB Updates
February 3, 2025 at 01:28 PM
*CS606* *2:15* *03-02-2025* _Mcqs_ 1. Unconditional jump ka batana tha 2. Left-recursive grammars CAN be handled by ____________ parser. 3. Three-address codes an operators are _____ operands (or sources) and one destination. 4. If [X → α • β, a] is an LR(1) item, the (.) dot shows that 5. Boolean expersion se related tha 6. Patching se related 3 mcqs the 7. Flow of control se related 2 mcqs ae the 8. Coloring algorithm se related 3 mcqs the 9. LR parser can handle left recursive 10. DFA represent as a 2-dimensional table _Short_ 1. Complete the following code ;a:=b+c LOAD b, R1 ADD ________, R1 ;t1:=a*a MOV R1,R2 MUL R2, _______ ;b:=t1+a ADD R2, _______ 2. Grammar S ? T+T T ? a|b And an input "a+b" Describe the following a) Number of shifts b) Number of reduce c) Number of accept 3. Describe the action(shift, reduce, accept, error) of every input. Input (Ye handle wala sign ha) 1: ∆u+v++$ 2: u+v++∆$ 3: T∆$ Is ka action batane the 3. Describe the following Production S ? AB A ? aA A ? a B ? bB B ? b Is production kr semantic rule batane the Input ab abb aaabb Is ka output batana tha 5. List down at least three ways which are used to evaluate the attributes in attribute grammar. 6. Ik DFD de hove the us ke goto producre deye hove the or action batane the us goto producre ke _Long_ 1. You are required to write pseudocode for the LR table construction algorithm. 2. input: +a*ab Reduction +S*ab +S*Sb +S*SS +SS S Is reduction ka handle batana tha hr ik statement ka 3. t1=2 t2=y t3=t1*t2 t4=x t5=t4-t3 Is me target, operator, argument 1, argument 2 batana tha 4. Grammar rule for a logical OR operator E ? E1 OR E2 Construct SDT 1) Attributes "true", "false" and "code" for symbol E 2) Routine "newlabel" for creating temporary variable and "gen" for creating three-address code.

Comments