Skip to content

imbianchi/clox

Repository files navigation

C Bytecode Interpreter (clox)

C

This repository contains a C bytecode implementation of an interpreter based on the "Crafting Interpreters" ebook by Bob Nystrom. The goal of this project is to provide a clear and concise implementation of an interpreter using plain C, with a focus on simplicity and readability.

Table of Contents

Introduction

The "Crafting Interpreters" ebook serves as the foundation for this project, guiding the implementation of a fully functional interpreter. The focus is on understanding the principles of crafting interpreters and applying them using plain C.

Check: Crafting Interpreters.

Getting Started

Follow these steps to get the interpreter up and running:

  1. Clone the repository: git clone https://github.com/imbianchi/clox.git
  2. Navigate to lox project directory: cd clox/
  3. Build the solution: make all
  4. Run the interpreter: ./clox or ./clox testFile.clox

Usage

Once the interpreter is running, you can input your own programs or use the provided examples from the Crafting Interpreters ebook. Explore the source code to gain insights into the interpreter's implementation details.

License

This project is licensed under the MIT License, allowing for both personal and commercial use.