Skip to content

aishwaryats/Compiler_lab_ktu

Repository files navigation

Compiler Design Lab Programs


Cycle I

  1. Write a program to find ε-closure of all states of any given NFA with ε transition.
  2. Write a program to convert NFA with ε transition to NFA without ε transition.
  3. Write a program to convert NFA to DFA.
  4. Write a program to minimize any given DFA.

Cycle II

  1. Design and implement a lexical analyzer for a given language using C. The lexical analyzer should ignore redundant spaces, tabs, and newlines.
  2. Write a Lex program to recognize all strings which do not contain the first four characters of your name as a substring.
  3. Write a YACC program to recognize a valid variable that starts with a letter followed by any number of letters or digits.
  4. Implementation of a calculator using Lex and YACC.
  5. Convert the BNF rules into YACC form and write code to generate an abstract syntax tree.
  6. Write a YACC program to check the syntax of a for statement in C.

Cycle III

  1. Develop an operator precedence parser for a given language.
  2. Write a program to simulate First and Follow of any given grammar.
  3. Construct a recursive descent parser for an expression.
  4. Construct a Shift-Reduce parser for a given language.

Cycle IV

  1. Implement Intermediate code generation for simple expressions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published