https://github.com/oamkotb/cpplox
A C++ implementation of the JLox Tree-Walker Interpreter.
https://github.com/oamkotb/cpplox
compiler cpp lox-interpreter
Last synced: over 1 year ago
JSON representation
A C++ implementation of the JLox Tree-Walker Interpreter.
- Host: GitHub
- URL: https://github.com/oamkotb/cpplox
- Owner: oamkotb
- Created: 2024-06-05T14:36:59.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-11T00:16:56.000Z (almost 2 years ago)
- Last Synced: 2025-02-04T16:14:21.119Z (over 1 year ago)
- Topics: compiler, cpp, lox-interpreter
- Language: C++
- Homepage:
- Size: 6.59 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CppLox
CppLox is a C++ implementation of the JLox compiler, offering full functional parity with the original. It serves as a Tree-Walk Interpreter for Lox, a dynamically typed, interpreted scripting language designed by Robert Nystrom for his book [Crafting Interpreters](https://craftinginterpreters.com/).
## Getting Started
### Prerequisites
* C++17 or later
* GCC compiler
## Building the Project
1. Clone the repository:
```bash
git clone https://github.com/oamkotb/cpplox
```
2. Navigate to the project directory:
```bash
cd cpplox
```
3. Run the Makefile:
```bash
make
```
## Running the Project
Run interactive prompt:
```bash
./build/cpplox
```
Run a Lox file:
```bash
./build/cpplox [lox file]
```