0% found this document useful (0 votes)
43 views

CD Lab

This document outlines the course outcomes, detailed syllabus, and evaluation scheme for the Compiler Design Lab course. The course aims to help students identify patterns and regular expressions for lexical analysis, design lexical analyzers and parsers, generate intermediate and machine code, and implement various compiler components like lexical analysis, parsing, code generation using tools like Lex and Yacc. The syllabus includes implementing a lexical analyzer in C and Lex, writing Yacc specifications, constructing parsers like LL, LR, recursive descent, generating intermediate code, and implementing code generation for an 8086 assembly language. Students will be evaluated based on their ability to complete the assigned programming assignments implementing these compiler concepts.

Uploaded by

Ayush Thakur
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)
43 views

CD Lab

This document outlines the course outcomes, detailed syllabus, and evaluation scheme for the Compiler Design Lab course. The course aims to help students identify patterns and regular expressions for lexical analysis, design lexical analyzers and parsers, generate intermediate and machine code, and implement various compiler components like lexical analysis, parsing, code generation using tools like Lex and Yacc. The syllabus includes implementing a lexical analyzer in C and Lex, writing Yacc specifications, constructing parsers like LL, LR, recursive descent, generating intermediate code, and implementing code generation for an 8086 assembly language. Students will be evaluated based on their ability to complete the assigned programming assignments implementing these compiler concepts.

Uploaded by

Ayush Thakur
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/ 1

COMPILER DESIGN LAB (KCS-552)

Course Outcome ( CO) Bloom’s Knowledge Level (KL)

At the end of course , the student will be able to:

Identify patterns, tokens & regular expressions for lexical analysis. K2, K4
CO 1
Design Lexical analyser for given language using C and LEX /YACC tools K3, K5
CO 2
Design and analyze top down and bottom up parsers. K4, K5
CO 3
Generate the intermediate code K4, K5
CO 4

CO 5 Generate machine code from the intermediate code forms K3, K4

DETAILED SYLLABUS
1. Design and implement a lexical analyzer for given language using C and the lexical analyzer should ignore redundant
spaces, tabs and new lines.
2. Implementation of Lexical Analyzer using Lex Tool
3. Generate YACC specification for a few syntactic categories.
a) Program to recognize a valid arithmetic expression that 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
d) Convert the BNF rules into YACC form and write code to generate abstract syntax tree
4. Write program to find ε – closure of all states of any given NFA with ε transition.
5. Write program to convert NFA with ε transition to NFA without ε transition.
6. Write program to convert NFA to DFA
7. Write program to minimize any given DFA.
8. Develop an operator precedence parser for a given language.
9. Write program to find Simulate First and Follow of any given grammar.
10. Construct a recursive descent parser for an expression.
11. Construct a Shift Reduce Parser for a given language.
12. Write a program to perform loop unrolling.
13. Write a program to perform constant propagation.
14. Implement Intermediate code generation for simple expressions.
15. 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 an 8086 assembler. The target assembly instructions can be simple move,
add, sub, jump etc.

Note: The Instructor may add/delete/modify/tune experiments, wherever he/she feels in a justified manner
It is also suggested that open source tools should be preferred to conduct the lab ( C, C++ , Lex or Flex and
YACC tools ( Unix/Linux utilities )etc)

Curriculum & Evaluation Scheme CS & CSE (V & VI semester) 19

You might also like