# 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
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
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
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.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature
- Commit your changes with clear and descriptive messages.
- Push your branch to your fork:
git push origin feature/your-feature
- 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.
For any questions or feedback, please open an issue in this repository or contact knull-reaper directly.