Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

nishatrhythm/Compiler-Design-and-Construction-Lab

Repository files navigation

Compiler Design and Construction Lab

Problems

  1. A Lex program to recognize and count the number of identifiers in a given input.
  2. A Lex program to count the characters, words, spaces, and lines in a given input file.
  3. A Lex program to count the number of comment lines in a given C/C++/Java program.
  4. A Lex program to identify an integer, floating point, exponential, or complex number.
  5. A Lex program to identify a Grameenphone/Airtel/Robi/Banglalink/Teletalk number.
  6. A Lex program to recognize whether a given sentence is simple, compound, or complex.
  7. A Lex program to identify "to be" verb.
  8. Find the FIRST and FOLLOW of a given grammar.

Assignment

Construct a complete 'Lexer' using Lex and a complete 'Parser' using C/C++ (either LL(0) or LL(1) parser).

Credits

Special thanks to:

Installation and Usage

Ensure you have the following tools installed:

Build and Run

Run Flex

flex filename.l

Compile using GCC

gcc lex.yy.c

Execute the Program

a.exe

About

This repo has code solutions for compiler tasks like reading words, counting lines, and understanding grammar using Lex and C/C++.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors