Wednesday, January 19, 2022

Dr.A.P.J.Abdul Kalam University BE VII SEM ALL BRANCH Compiler Design [CS-701] Dec - 2020 Question Paper

Dr.A.P.J.Abdul Kalam University 

Bachelor of Engineering

Seventh Semester Main Examination, Dec-2020

Compiler Design [CS-701]

Branch: CSE

Time: 3:00 Hrs Max Marks 70

Note : 1. Attempt any five questions out of eight.

           2. All question carry equal marks.

Q.1 (a) Write the production rules to eliminate the left recursion and left factoring problems.

(b) Consider the grammar: E → 2E2 | 3E3 | 4

 Perform Shift Reduce Parsing for input string “32423”.

Q.2 (a) Write Three Address Code for the following expression-

- (a x b) + (c + d) – (a + b + c + d)

 (b) Write Rules to construct FIRST Function and FOLLOW Function.

Q.3 (a) Differentiate LR, SLR, CLR and LALR. Which one is more powerfull?

 (b) Construct syntax tree and postfix notation for the following expression:

(a+(b*c)^d-e/(f+g)

Q.4 (a) Consider the grammar S→ aAd | bBd | aBe | bA A→ C B→ C

Find out that the given grammar is LALR (1) parser or not?

(b) Write quadruples, triples and indirect triples for the expression: -

 (a*b)+(c+d)-

Q.5 (a) Consider the given grammar- S → ( L ) | a

 L → L , S | S

 Construct the operator precedence parser and parse the string ( a , ( a , a ) ).

 (b) Write the short note on:

i) Abstract syntax tree ii) Polish notation

iii) Three address code iv) backpatching

Q.6 (a) What is parse tree? Construct parse tree for s → SS* I ss+ I a

(b) What are the properties of code generation phase? Also explain the Design Issues of this

Phase.

Q.7 (a) What is code optimization? Explain machine dependent and independent code optimization.

(b) Show the following Grammar: S→ AaAb|BbBa A→ € B→ € Is LL(1) and parse the input

string “ba”.

Q.8 (a) What is common sub-expression and how to eliminate it? Explain with example.

 (b) Draw the syntax tree and DAG for the following expression: (a*b)+(c-d)*(a*b)+b


Attachment & Scanned Copies:



Share This
Previous Post
Next Post

B.E Civil Engineer Graduated from Government College of Engineering Tirunelveli in the year 2016. She has developed this website for the welfare of students community not only for students under Anna University Chennai, but for all universities located in India. That's why her website is named as www.IndianUniversityQuestionPapers.com . If you don't find any study materials that you are looking for, you may intimate her through contact page of this website to know her so that it will be useful for providing them as early as possible. You can also share your own study materials and it can be published in this website after verification and reviewing. Thank you!

0 comments:

Pen down your valuable important comments below

Search Everything Here