Printed Pages: 02
Paper Id: 110603
Roll No.
--- Content provided by FirstRanker.com ---
Sub Code: ECS603
B. Tech.
(SEM VI) CARRY OVER THEORY EXAMINATION 2017-18
Time: 3 Hours
Compiler Design
--- Content provided by FirstRanker.com ---
Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
2. Any special paper specific instruction.
SECTION A
1. Attempt all questions in brief. 2 x 10 = 20
--- Content provided by FirstRanker.com ---
- What is a translator?
- Differentiate between a compiler and an assembler.
- Discuss conversion of NFA into a DFA. Also give the algorithm used in this conversion.
- Write down the short note on symbol table.
- Describe Data structure for symbol table.
- What is mean by Activation record
- What is postfix notations?
- Define Three address Code
- What are Quadruples?
- What do you mean by regular expression?
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
SECTION B
2. Attempt any three of the following: 10 x 3 = 30
- Write down the regular expression for
- The set of all strings over {a,b} such that the fifth symbol from the right is a.
- The set of all strings over {a,b} such that every block of four consecutive symbols contain at least two zero.
- Construct the NFA for the regular expression a/abb/a*b* by using Thompson's construction methodology.
- Eliminate left recursion from the following grammar
S?AB, A?BS | b, B?SA|a - Discuss conversion of NFA into a DFA. Also give the algorithm used in this conversion.
- Explain non-recursive predictive parsing. Consider the following grammar and construct the predictive parsing table
--- Content provided by FirstRanker.com ---
E?TE'
E'?+TE' | €
T?FT'
T'?*FT' | €
F?F*|a|b
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
SECTION C
3. Attempt any one part of the following: 10 x 1 = 10
- Give Operator-precedence parsing algorithm. Consider the following grammar and build up operator precedence table. Also parse the input string (id+(id*id))
E?E+T|T
T?T*F--- Content provided by FirstRanker.com ---
F?(E) | id - For the grammar
S?aAd | bBd | aBe | bAe
A?f
B?f--- Content provided by FirstRanker.com ---
Construct LR(1) Parsing table. Also draw the LALR table from the derived LR(1) parsing table.
4. Attempt any one part of the following: 10 x 1 = 10
- What is postfix notations? translate (C+D)*(E+Y) into postfix using syntax directed translation scheme (STDS)
- Consider the following grammar E?E+E | E*E | (E) | id. construct the SLR parsing table and suggest your final parsing table.
5. Attempt any one part of the following: 10 x 1 = 10
--- Content provided by FirstRanker.com ---
- Explain logical phase error and syntactic phase error. Also suggest methods for recovery of error.
- Generate three address code for C[A[I, j] ] = B[I ,j]+C[A[ I, j ] ]+D[ I + j) (You can assume any data for solving the question, if needed) Assuming that all array elements are integer. Let A and B a 10 X 20 array with low1 = low2 = 1.
6. Attempt any one part of the following: 10 x 1 = 10
- Give the algorithm for the elimination of local and global common Sub expression. discuss the algorithm with the help of example also.
- Consider the following three address code segments
--- Content provided by FirstRanker.com ---
PROD := 0
I := 1
T1 := 4*1
T2 := addr(A)-4
T3 := T2[T1]--- Content provided by FirstRanker.com ---
T4 := addr(B)-4
T5 := T4[T1]
T6 := T3*T5
PROD := PROD +T6
If i<=20 goto (3)- Find the basic blocks and flow graph of above sequence.
- Optimize the code sequence by applying function preserving transformation and loop optimization technique.
--- Content provided by FirstRanker.com ---
7. Attempt any one part of the following: 10 x 1 = 10
- Write short note on
- Loop optimization
- Global data analysis
--- Content provided by FirstRanker.com ---
- Write short note on
- Direct acyclic graph
- YACC parser generator
--- Content provided by FirstRanker.com ---
This download link is referred from the post: AKTU B-Tech Last 10 Years 2010-2020 Previous Question Papers || Dr. A.P.J. Abdul Kalam Technical University
--- Content provided by FirstRanker.com ---