Skip to content

This repository includes programs related to compiler design, specifically focusing on utilizing Flex (lex) and yacc (bison) for implementation.

Notifications You must be signed in to change notification settings

disha2301/Compiler-Design

Repository files navigation

🖥️ Compiler Design Experiments

Welcome to the Compiler Design Experiments repository! 🚀 This repository contains a series of experiments and programs related to compiler design. Each experiment explores fundamental concepts and techniques used in building compilers.

📋 Experiments in Order

  1. Simple Calculator

    • This experiment involves creating a basic calculator using lex and yacc (or flex and bison), demonstrating lexical analysis and parsing.
  2. Flex Program

    • Implementation of a lexical analyzer using Flex (Fast Lexical Analyzer Generator), showcasing tokenization of input.
  3. Scanner Program

    • Development of a scanner (tokenizer) program, focusing on recognizing patterns in input strings.
  4. Bison Program

    • Creation of a parser using Bison (GNU Parser Generator), demonstrating syntax analysis and parsing techniques.
  5. First and Follow Program

    • Implementation of the First and Follow sets computation algorithm for a given grammar.
  6. Left Factoring

    • Experiment to eliminate left factoring from a grammar, addressing grammar ambiguity and efficiency.
  7. Left Recursion

    • Exploration of techniques to remove left recursion from a grammar, essential for avoiding infinite loops in parsing.
  8. SLR Parsing

    • Implementation of SLR (Simple LR) parsing for a grammar, demonstrating bottom-up parsing techniques.
  9. Java Program

    • Development of a Java-based compiler component, integrating concepts learned from previous experiments into a practical program.

Each experiment folder contains source code and possibly additional documentation or explanatory files to understand the concepts and implementations.

🚀 Getting Started

To explore these experiments:

  1. Clone this repository:
    git clone https://github.com/your-username/compiler-design-experiments.git
  2. Requirements:
  • For experiments involving Lex and Yacc (Flex and Bison), ensure you have these tools installed on your system.
  • Java experiments may require a JDK (Java Development Kit) installed.

🚀

About

This repository includes programs related to compiler design, specifically focusing on utilizing Flex (lex) and yacc (bison) for implementation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published