Skip to content

linalek/mini-python-compiler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

120 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chouette Compiler

How to Use the Template:

1. Replace Mini Python with your compiler's name.
1. Fill in placeholders like [language], [tool version], and other details specific to your project.
1. You can expand on the sections, such as providing detailed usage instructions or more examples.

Feel free to modify this based on your project's requirements!

Table of Contents

  1. Introduction
  2. Team
  3. Features
  4. Installation
  5. Usage
  6. Examples
  7. Testing
  8. Acknowledgements

Introduction

The Mini Python Compiler is a Java compiler designed to write the lexical and syntactic analyzers, and implement the construction of the abstract tree. It translates Python fragement source code into abstract tree and includes optimizations for [specific features or targets].

Team

  • Lucine GIRAUD
  • Lina LEKBOURI
  • Julien MARLAND
  • Hugo WERCK

Why use Mini Python?

  • Fast and efficient compilation
  • Support for [languages or standards]
  • [Any unique features or goals]

Features

  • Cross-platform: Runs on Linux, MacOs, Windows
  • Optimization: Implements advanced optimizations like [list of optimizations: e.g., constant folding, dead code elimination]
  • Error Reporting: Detailed syntax and semantic error messages
  • [Other features]

Installation

Prerequisites

  • [Language/Tool Version(s)]: Ensure you have [required language/tools] installed.

pip install graphviz

Example:

$ sudo apt-get install [required-dependencies]

Installing the Compiler

Clone the repository and install any required dependencies:

$ git clone https://gibson.telecomnancy.univ-lorraine.fr/projets/2425/compil/pcl-grp28.git
$ cd [project-name]
$ ./configure
$ make
$ sudo make install

Usage

Basic Command

To compile a Mini Python source file:

$ [project-name] [options] [source-file]

Command-line Options

  • -o [file]: Specify output file name
  • -O: Enable optimizations
  • --debug: Enable debug mode
  • --help: Show help message

Examples

Compiling a simple program:

$ [project-name] -o output.exe example.lang

Running in debug mode:

$ [project-name] --debug example.lang

Examples

Here are some sample programs you can compile using Mini Python:

  1. Hello World:
// Example code for Hello World in [language]
  1. Fibonacci Sequence:
// Example code for Fibonacci in [language]

For more examples, refer to the examples/ directory.

Testing

To run tests, make sure you have [testing framework] installed:

$ make test

You can also add specific test cases in the tests/ folder and run them with:

$ ./run_tests.sh

Reporting Issues

If you encounter any issues or have feature requests, please open an issue on the GitHub repository.

Acknowledgements

  • [Tool/Libraries] used in this project
  • Special thanks to [contributors, advisors, etc.]

About

Chouette Compiler est un compilateur pour le langage Mini Python, implémenté en Java. Il effectue l'analyse lexicale et syntaxique pour générer un arbre syntaxique abstrait (AST). L'interface utilise un serveur Java HttpServer pour visualiser le code source et l'AST, ce dernier étant généré graphiquement avec Graphviz.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors