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

CS3501 Set4

compiler design

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)
23 views2 pages

CS3501 Set4

compiler design

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/DECEMBER2023


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. Design a Lexical analyzer to recognize a few pattern in C.The lexical analyzer should ignore
redundant spaces, tabs and new lines, comments etc.

2. Implement the lexical analyzer using JLex, flex or other lexical analyzer generating tools.

3. Write a program to implement to recognize a valid arithmetic expression that uses operator +, – ,
* and /.

4. Write a program to implement a Calculator using LEX and YACC.

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

6. Write a LEX Program to convert the substring abc to ABC from the given input string..

7. Write a C Program to implement NFAs that recognize identifiers, constants, and operators of the
mini language.

8. Write a C Program to implement DFAs that recognize identifiers, constants, and operators of the
mini language.

9. Write a program to Implement Simple Code Optimization Techniques using Constant Folding

10. Write a program to Implement the back end of the compiler which takes the three address code
and produces the 8086 assembly language instructions that can be assembled and run using a
8086 assembler. The target assembly instructions can be simple move, add, sub, jump. Also
simple addressing modes are used.

Page 1 of 2
11. Write a lex program to find out total number of vowels, and consonants from the given input
sting.

12. Write a program to implement to recognize a valid control structures syntax of C language using
For loop and while loop.

13. Write a program to Convert the BNF rules into Yacc form and write code to generate abstract
syntax tree.

14. Write a program to implement to recognize a valid control structures syntax of C language using
ifelse, if-else-if and switch-case.

15. Write a program to Implement any one storage allocation strategies

16. Write a program to Implement type checking.

17. Write a program to Implement Simple Code Optimization Techniques using Strength reduction

18. Write a program to implement to implement the symbol table

19. Write a program to Implement Simple Code Optimization Techniques using Algebraic

transformation

20. Write a program to generate three address code using LEX and YACC.

Page 2 of 2

You might also like