You are on page 1of 8

COIMBATORE - 641032

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Subject Code : CS6612


Subject Name : COMPILER LABORATORY
Name Of Faculty : B.Reena
Designation : Assistant Professor
Class / Semester : III-CSE-B / VI
NO OF
S.No. Name ofthe Experiment HOURS

Implementation of Symbol Table 3


1
Develop a lexical analyzer to recognize a few patterns in C 3
2
Implementation of Lexical Analyzer using Lex Tool 3
3

Generate YACC specification for a few syntactic categories


a) Program to recognize a valid arithmetic expression that 9

4 uses operator +, - , * and /.


b) Program to recognize a valid variable which starts with a letter
followed by any number of letters or digits.
c) Implementation of Calculator using LEX and YACC

Convert the BNF rules into Yacc form and write code to generate 6
5 Abstract Syntax Tree.
3
6 Implement type checking

Implement control flow analysis and Data flow Analysis 3


7
Implement any one storage allocation strategies(Heap,Stack,Static) 3
8
Construction of DAG 3
9
Back end of the Compiler- Simple Addressing Modes 3
10
Implementation of Simple Code Optimization Techniques 3
11
CONTENT BEYOND SYLLABUS

12 IMPLEMENTATION OF NFA CONSTRUCTION 3

STAFF INCHARGE HOD/CSE


HINDUSTHAN COLLEGE OF ENGINEERING AND TECHNOLOGY
COIMBATORE - 641032
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

MODEL QUESTION PAPER

1. Write a c program to implementation of Symbol Table

2. Develop a lexical analyzer to recognize a few patterns in C

3. Generate YACC specification for a few syntactic categories


Program to recognize a valid arithmetic expression that uses operator +, - , * and /.

4. Generate YACC specification for a few syntactic categories


Program to recognize a valid variable which starts with a letter followed by any number of letters
or digits.

5. Generate YACC specification for a few syntactic categories


Implementation of Calculator using LEX and YACC

6. Convert the BNF rules into Yacc form and write code to generate Abstract Syntax Tree.

7. Write a c program to implement type checking

8. Write a c program to implement control flow analysis and Data flow Analysis

9. Write a c program to implement any one storage allocation strategies(Heap,Stack,Static)

10. Write a c program to Construction of a DAG.

11. Write a c program to implement of Simple Code Optimization Techniques


HINDUSTHAN COLLEGE OF ENGINEERING AND TECHNOLOGY
COIMBATORE - 641032
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

POSSIBLE VIVA QUESTION

1. What is Lexical Analysis?


2. What is a lexeme? Define a regular set.
3. Define parser.
4. What is a sentinel? What is its usage?
5. What is a regular expression? State the rules, which define regular expression?
6. What are the Error-recovery actions in a lexical analyzer?
7. Construct Regular expression for the language
8. What is recognizer?
9. Differentiate compiler and interpreter.
10. Write short notes on buffer pair.
11. Differentiate tokens, patterns, lexeme.
12. List the operations on languages.
13. Write a regular expression for an identifier.
14. What are the functions
15. Mention the basic issues in parsing
16. Why lexical and syntax analyzers are separated out?
17. Mention the basic issues in parsing
18. Why lexical and syntax analyzers are separated out?
19. List the different storage allocation strategies.
20. What are the contents of activation record?
21. What is dynamic scoping?
22. Define symbol table.
23. What is code motion?
24. What are the properties of optimizing compiler?
25. What are the various ways to pass a parameter in a function?
26. What are the functions for constructing syntax trees for expressions?
27. Give short note about call-by-name?
28. How parameters are passed to procedures in call-by-value method?
29. Define static allocations and stack allocations
30. Define LR(0) items.
31. What is phrase level error recovery?
32. What are the functions
33. Mention the basic issues in parsing
34. Why lexical and syntax analyzers are separated out?
35. Define a context free grammar.
36. briefly explain the concept of derivation.
37. Define ambiguous grammar.
38. What is a operator precedence parser?
39. List the properties of LR parser.
40. Mention the types of LR parser.
41. What are the problems with top down parsing?
42. Write the algorithm for FIRST and FOLLOW.
43. List the advantages and disadvantages of operator precedence parsing. Advantages
44. What is dangling else problem?
45. Write short notes on YACC.
46. List the different storage allocation strategies.
47. What are the contents of activation record?
48. What is dynamic scoping?
49. Define symbol table.
50. What is code motion?
51. What are the properties of optimizing compiler?
52. What are the various ways to pass a parameter in a function?
53. What are the functions for constructing syntax trees for expressions?
54. Give short note about call-by-name?
55. How parameters are passed to procedures in call-by-value method?
56. Define static allocations and stack allocations
57. Define LR(0) items.
58. What is phrase level error recovery?
59. Define code generations with ex?
60. What are the issues in the design of code generator?
61. Give the variety of forms in target program
62. Give the factors of instruction selections.
63. What are the sub problems in register allocation strategies?
64. Give the standard storage allocation strategies.
65. Define static allocations and stack allocations
66. Define basic block and flow graph
67. Give the important classes of local transformations on basic blocks
68. What are the actions to perform the code generation algorithms?
69. Write the labels on nodes in DAG.
70. Give the applications of DAG.
71. Define Peephole optimization.
72. Write the characteristics of peephole optimization?
HINDUSTHAN COLLEGE OF ENGINEERING AND TECHNOLOGY

COIMBATORE - 641032

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


STUDENT NAME LIST

S.No Register No. Name S.No Register No. Name


1 720713104001 Aarthi R 32 720713104036 Divya Lakshmi S
2 720713104002 Abinaya R 33 720713104037 Even Samuel Raj L
3 720713104003 Aishwaryaa K 34 720713104038 Farhanabegam S
4 720713104004 Akila E 35 720713104039 Ganesh J
5 720713104005 Akshaya E 36 720713104040 Gayathri R
6 720713104006 Albin Baby 37 720713104041 Godlin Beula M
7 720713104007 Amala Su 38 720713104042 Gokilavani G
8 720713104008 Amritha J 39 720713104043 Gokul C
9 720713104009 Ananthi B 40 720713104044 Gokula Kannan D
10 720713104010 Anbuselvi P 41 720713104045 Gopika R
11 720713104011 Anitha D 42 720713104046 Gowsika R
12 720713104012 Anitha S 43 720713104047 Gowtham R I
13 720713104013 Anoor Santhiya S 44 720713104048 Gowthami R
14 720713104014 Anupriya S R 45 720713104049 Hariharan R
15 720713104015 Anupriya R 46 720713104050 Janani S
16 720713104017 Aravind R 47 720713104051 Jeevitha K
17 720713104019 Archana M 48 720713104052 Jennifer Preetha Y
18 720713104020 Aruna Devi T 49 720713104053 Jeyadurga R
19 720713104021 Arunkumar S 50 720713104054 Jeya Lakshmi S
20 720713104022 Arun Raj 51 720713104055 Jithya V J
21 720713104023 Asha Nihara A 52 720713104056 Kalai Raja K
22 720713104024 Ashwin Kumar O K 53 720713104057 Kalayarasan S
23 720713104025 Avineesh Kumar K T 54 720713104058 Kaleeswari R
24 720713104027 Bashkar S 55 720713104059 Karthickraja K
25 720713104028 Basker S 56 720713104060 Karthik M
26 720713104029 Bensi G 57 720713104301 Akshay.A
27 720713104030 Bharathidasan A 58 720713104302 Anusuya.P
28 720713104031 Brindha K 59 720713104303 Boopathi.S
29 720713104032 Damayanthi S 60 720713104304 Govindaraj.B
30 720713104033 Dhanapal V 61 720713104305 Harini.R.U
31 720713104035 Divya.T 62 720713104701 Jegan Sakthivel

You might also like