Skip to content

knull-reaper/ajs_interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

# AJS Interpreter

A custom fork of JavaScript implemented for a university project. This interpreter is written in Racket and provides a lightweight engine for executing JavaScript-inspired code. It is designed to help explore the fundamentals of language design and interpreter construction.

## Table of Contents

- [Overview](#overview)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Project Structure](#project-structure)
- [Contributing](#contributing)
- [Contact](#contact)

## Overview

The AJS Interpreter is a custom fork of JavaScript, built as part of a university project to gain deeper insights into programming language implementation. By re-creating key aspects of JavaScript in Racket, the project serves as both a learning tool and a foundation for experimenting with interpreter design.

## Features

- **Custom JavaScript Fork:** Implements a subset of JavaScript functionalities tailored for educational purposes.
- **Lightweight Interpreter:** Efficiently executes scripts written in the custom JavaScript dialect.
- **Educational Resource:** Offers insights into the core components of interpreters such as lexing, parsing, and evaluation.

## Installation

### Prerequisites

- [Racket](https://racket-lang.org/) – Ensure you have the latest version installed.

### Cloning the Repository

Clone the repository using Git:

```bash
git clone https://github.com/knull-reaper/ajs_interpreter.git

Then, navigate into the project directory:

cd ajs_interpreter

Usage

Run the interpreter by executing the main script with Racket. Assuming the main entry point is located in the src folder, you can start the interpreter with:

racket src/main.rkt

If your interpreter supports running a script file as an argument, you might use:

racket src/main.rkt path/to/your_script.ajs

Example

Create a simple script file, for instance example.ajs, with the following content:

// example.ajs
print("Hello, AJS Interpreter!");

Then run the interpreter to execute the script:

racket src/main.rkt example.ajs

Project Structure

A suggested layout for the project is:

ajs_interpreter/
├── src/
│   ├── main.rkt         # Main entry point for the interpreter
│   ├── lexer.rkt        # Module for lexical analysis
│   ├── parser.rkt       # Module for parsing tokens into an AST
│   ├── interpreter.rkt  # Module for executing the AST
│   └── ...              # Additional modules and utilities
├── .gitignore           # Files and directories to ignore
└── README.md            # Project documentation

Adjust the structure as needed based on your actual file layout.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix:
    git checkout -b feature/your-feature
  3. Commit your changes with clear and descriptive messages.
  4. Push your branch to your fork:
    git push origin feature/your-feature
  5. Open a pull request explaining your changes.

Please open an issue if you have any questions or suggestions before starting work on a new feature.

Contact

For any questions or feedback, please open an issue in this repository or contact knull-reaper directly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages