Welcome to the Compiler Design Lab repository! This repository contains the source code and documentation for a comprehensive exploration of compiler design concepts. From Lexical Analysis to Three Address Code we've got you covered.
- Lexical Analysis: Implementation of lexical analysis to tokenize source code.
- Syntax Analysis: Building parsers to validate the syntax of programming languages.
- Three-Address Code: Generation of intermediate code for efficient code representation.
- ANTLR4: Utilization of ANTLR4 parser generator for parsing tasks.
- BISON: Integration of BISON parser generator for syntax analysis.
Before you begin, make sure you have the following tools installed on your system:
-
ANTLR4: ANTLR (ANother Tool for Language Recognition) is a powerful parser generator. To install it, follow these steps:
-
Linux/Unix:
sudo apt-get install antlr4
-
macOS:
brew install antlr
-
Windows:
You can download the ANTLR4 JAR files from the official ANTLR website (https://www.antlr.org/download.html).
-
-
BISON: Bison is a parser generator that is essential for syntax analysis. To install it, follow these steps:
-
Linux/Unix:
sudo apt-get install bison
-
macOS:
brew install bison
-
Windows:
You can download Bison for Windows from the GNU website (https://www.gnu.org/software/bison/).
-
-
Clone the Repository:
git clone https://github.com/your-username/Compiler-Design-Lab.git
-
Explore the Code: Dive into the source code to understand the implementations and algorithms used for each compiler component.
-
Build and Run: Follow the provided instructions in each subdirectory to build and run different parts of the compiler.
If you'd like to contribute to this project, feel free to submit issues, open pull requests, or suggest improvements. Your contributions are highly appreciated!
For in-depth explanations, examples, and usage instructions, please refer to the documentation within each subdirectory of this repository.
This project is licensed under the MIT License. See the LICENSE file for details.
We would like to acknowledge the valuable contributions of the open-source community and the creators of ANTLR4 and BISON, which have been instrumental in the development of this project.