This repository contains all programs for Compiler Lab of 7th semester CSE in KTU 2019 Scheme.
The syllabus is provided in this repo.
All of the programs are run on linux ; for windows the process may differ
- To Implement a lexical analyzer in C.
- To write a program for implementing a Lexical analyser using LEX tool
- LEX Program to count the number of lines and number of characters in an input.
- LEX Program to remove space, tab or newline
- Generate a YACC specification to recognize a valid identifier which starts with a letter followed by any number of letters or digits.
- LEX Program to count the number of vowels and consonants
- Generate a YACC specification to recognize a valid arithmetic expression that uses operators +, – , *,/ and parenthesis.
- Implementation of Calculator using LEX and YACC
- Write a LEX Program to convert the substring abc to ABC from the given input string
- Implementation of DFA
- Implementation of Top down Parser (Recursive descent parser)
- Simulation of code optimization techniques
- Implement intermediate code generation for simple expressions
- Implement backend of the compiler
Additional Lab Questions:
- Program to find the Epsilon closure of all states of NFA
The algorithms will be added to separate md file.
Leave a Reply