Skip to content

College-Projects-2019-2024/Tiny-language-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Language Compiler with Scanner and Parser

Overview

This is a tiny language compiler that includes a scanner and a parser, equipped with a graphical user interface (GUI). The compiler processes source code written in a simple language, providing functionality to tokenize input code and generate parse trees.

image

Features

  1. Scanner: The scanner reads the source code and tokenizes it, identifying individual tokens and their types.

  2. Parser: The parser takes the tokens generated by the scanner and constructs a parse tree, representing the syntactic structure of the input code.

  3. GUI Interface: The graphical user interface allows users to interact with the compiler visually. Users can input source code, view generated tokens, and visualize the parse tree.

Usage

  1. Installation:

    • Clone the repository: git clone https://github.com/yourusername/tiny-language-compiler.git
    • Navigate to the project directory: cd tiny-language-compiler
  2. Dependencies:

    • Ensure you have the required dependencies installed. This may include GUI libraries such as Tkinter, GraphViz or any other specified in the project documentation.
  3. Run the Compiler:

    • Execute the main application file: python main.py
    • The GUI interface will be displayed, allowing you to input source code.
  4. Tokenization:

    • Click on the "Scan" or "Tokenize" button to initiate the scanning process.
    • View the generated tokens and their types in the designated area of the GUI.
  5. Parsing:

    • Click on the "Parse" button to initiate the parsing process.
    • Visualize the parse tree in the GUI.

The GUI can display the tokens and parse tree, helping users understand the structure of the code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages