0% found this document useful (0 votes)
36 views2 pages

CS3501 Set1

compiled

Uploaded by

sivapriyamms
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

CS3501 Set1

compiled

Uploaded by

sivapriyamms
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

B.E / B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS, NOVEMBER/DECEMBER 2023


Fifth Semester

CS3501 - COMPILER DESIGN

(Regulations 2021)

Time : 3 Hours Answer any one Question Max. Marks 100

Aim/Principle/Apparatus Tabulation/Circuit/ Calculation Viva-Voce Record Total


required/Procedure Program/Drawing & Results
20 30 30 10 10 100

1. Develop a program in C to design a lexical analyzer that recognizes identifiers and constants

2. Implement a symbol table that involves insertion, deletion, search and modify operations using
C language.

3. Design a program that implements a lexical analyzer that separates token using a LEX tool

4. Use YACC tool to recognize a valid arithmetic expression that uses basic arithmetic
operators[+,-,*,/].

5. Design a program to recognize a valid variable which starts with an alphabet followed by any
number of digits or alphabets using YACC tool.

6. Use LEX and YACC tools to implement a native calculator

7. Design a program to generate a three-address code from a given arithmetic expression.

8. Implement a simple type checker that checks the scope of the variables and semantic errors
from the given statement

9. Develop a program that optimizes the given input block using Code Optimization Techniques.

10. Given an intermediate code as an input. Develop a program that generates the machine code
from the given input

11. Generate a valid pattern that recognizes all statements that begins with an Upper-Case Letter
followed by five digits or alphabets. Use a YACC tool to do the same.

Page 1 of 2
12. Design a lexical analyzer that identifies comments, operators and keywords from a given
expression

13. Develop a Program to recognize a valid control structures syntax of C language (For loop, while
loop, if else, if-else-if, switch-case, etc.).

14. Develop a Lex program to find out the total number of vowels and consonants from the given
input string.

15. Develop a program to generate machine code from a given postfix notation.

16. Write a LEX program to scan reserved words, variables and operators of C language

17. Develop a program in C that converts the given three address code into assembly language
statements.

18. Develop a C program to eliminate left recursion from a grammar.

19. Develop a program in C that generates an abstract syntax tree from a given arithmetic
expression.

20. Design a top-down parser which generates a parsing table with no backtracking

Page 2 of 2

You might also like