https://github.com/ammarlodhi255/mini-compiler-with-gui

Mini Compiler Built Using Java (Compiler Construction Project)

https://github.com/ammarlodhi255/mini-compiler-with-gui

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
Last synced: 10 months ago · JSON representation

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
Created almost 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme

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.form and IntermediateCodeGenerator.java: Handles the generation of intermediate code in the compilation process.
  • LexemeGenerator.java: Manages the generation of lexemes during lexical analysis.
  • MainPanel.form and MainPanel.java: The main interface panel for the compiler’s GUI.
  • PBar.java and ScanProgressBar.form: Handles the progress bar functionality in the GUI.
  • SymbolTable.form and SymbolTable.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.form and TokenTable.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

  1. Clone the repository to your local machine using: bash git clone https://github.com/ammarlodhi255/mini-compiler-with-gui.git

  2. Navigate to the project directory: bash cd mini-compiler-with-gui

  3. Open the project in your preferred Java IDE.

Usage

  1. Compile the project: Ensure all .java files are compiled. Most IDEs handle this automatically.
  2. Run the GUI:
    • Execute MainPanel.java to launch the user interface.
    • Use the provided interface to input code and observe the stages of compilation.

Contributing

If you'd like to contribute to this project, please fork the repository and use a feature branch. Pull requests are warmly welcome.

  1. Fork the repository.
  2. Create a new feature branch.
  3. Commit your changes.
  4. Push to the branch.
  5. 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

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)
Top Labels
Issue Labels
Pull Request Labels