Question Bank LP

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

.D.K.

College of Engineering
Department of Computer Science & Engg.
Question Bank LP
1. Explain different phases of compiler
2. Explain & write LEX program that recognizes:
i) Keyword if, while, for ii) Identifier iii) Operator

3. Design LL(1) parser for the given grammar

4. What is difference between Compiler & Interpreter

5. Consider the following grammar and construct the LALR parsing table
6. Compare SLR, CLR and LALR parser.
7. Construct LR (0) parsing table for the grammar

8. Construct LR(1) parsing table for the following grammer.

9. Translate following code into intermediate code

Draw annotated parse tree for the same.


10. Write SDTS & obtain three address code for the following statement.

Draw annotated parse tree.


11. Define : i) Inherited attribute ii) Synthesized attribute
12. Explain phrase level error recovery in LR parsing.
13. Discuss different symbol table organization in compilers.
14. Explain various data structures required for implementation of symbol Table.
15. Explain the error recovery in LL parsing.

16. Compute IN and OUT equations for following graph.

You might also like