Institute of Science and Technology
Bachelor Level / sixth-semester / Science
Computer Science and Information Technology( CSC365 )
Compiler Design and Construction
Full Marks: 60 + 20 + 20
Pass Marks: 24 + 8 + 8
Time: 3 Hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Attempt all questions.
What are the task performed in lexical analysis. Define DFA. Given regular expression:
Difference between LR(0) and LR(1) algorithm. Construct LR(1) parse table for s->AA ,A->aA/b
Type checking is the process of verifying that the types of expressions and variables used in a program are consistent and adhere to languages type system rules. The primary goal of type checking is to identify and prevent type-related errors before the program is executed.
Difference between compiler and interpreter.
What are the typical entries made in symbol table? Explain.
Define Left recursive grammar. Remove left recursion from the following grammar.
S→SB | Ca
B→Bb | c
C→aB | a
What are the disadvantages of shift reduce parsin perform shift reduce parsing of string
w=(x-x)-(x/x) for grammar
E=E-E/ E/E / (E) / x
Define attribute grammar with example of inherited and synthesized attributes
Define three address code. Write down Quadruples for a=-b*(c+d)/e
List out the different types of runtime storage management techniques.
What are the advantages of code optimization. Define Dead-code elimination.
Factors affecting (target code generator) code generator/code generator design issues