https://github.com/ammarlodhi255/mini-compiler-with-gui
Mini Compiler Built Using Java (Compiler Construction Project)
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Repository
Mini Compiler Built Using Java (Compiler Construction Project)
Basic Info
- Host: GitHub
- Owner: ammarlodhi255
- Language: Java
- Default Branch: master
- Size: 906 KB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
Mini Compiler with GUI
Table of Contents
Overview
This project implements a mini compiler with a graphical user interface (GUI) in Java. The compiler is designed to demonstrate the key stages of compilation, such as lexical analysis, syntax analysis, and intermediate code generation. It is a simplified version aimed at educational purposes, providing an interactive way to understand how compilers work.
Features
- Lexical Analysis: Identifies the tokens in the source code.
- Syntax Analysis: Parses the tokens according to the grammar rules.
- Intermediate Code Generation: Produces intermediate code as a step before generating machine code.
- Graphical User Interface: The compiler features a GUI for easy interaction, making it user-friendly for educational demonstrations.
Files and Directories
IntermediateCodeGenerator.formandIntermediateCodeGenerator.java: Handles the generation of intermediate code in the compilation process.LexemeGenerator.java: Manages the generation of lexemes during lexical analysis.MainPanel.formandMainPanel.java: The main interface panel for the compiler’s GUI.PBar.javaandScanProgressBar.form: Handles the progress bar functionality in the GUI.SymbolTable.formandSymbolTable.java: Manages the symbol table, which is used to store identifiers and their attributes.ThreeAddressCode.java: Manages the generation of three-address code, a type of intermediate code.TokenTable.formandTokenTable.java: Handles the display and management of tokens identified during lexical analysis.
Getting Started
Prerequisites
- Java Development Kit (JDK) 8 or higher.
- A Java IDE (e.g., IntelliJ IDEA, Eclipse) or any text editor with Java support.
Installation
Clone the repository to your local machine using:
bash git clone https://github.com/ammarlodhi255/mini-compiler-with-gui.gitNavigate to the project directory:
bash cd mini-compiler-with-guiOpen the project in your preferred Java IDE.
Usage
- Compile the project: Ensure all
.javafiles are compiled. Most IDEs handle this automatically. - Run the GUI:
- Execute
MainPanel.javato launch the user interface. - Use the provided interface to input code and observe the stages of compilation.
- Execute
Contributing
If you'd like to contribute to this project, please fork the repository and use a feature branch. Pull requests are warmly welcome.
- Fork the repository.
- Create a new feature branch.
- Commit your changes.
- Push to the branch.
- Submit a pull request.
License
This project is open-source and available under the MIT License.
Owner
- Name: Ammar Ahmed
- Login: ammarlodhi255
- Kind: user
- Location: Sukkur, Pakistan
- Website: https://www.youtube.com/channel/UCAh8QVO85NLQGj_RhYoTU1w/videos
- Repositories: 9
- Profile: https://github.com/ammarlodhi255
A computer scientist at heart, interested in AI, software development, and space.
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- AbdulManaf12 (1)