Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

artmortal93/PLox

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PLox Interpreter for Lox Language in Book 'Crafting Interpreters',written in python.

This Repo contain two complete full parts, a tree walk interepreter for first part of the book and a bytecode VM stack compiler for the second part of the book, both are runnable and complete!

The purpose is Code to learn,JLox is good,but CLox are somehow trouble some, expesically CLox has many macro and pointer tricks in C,it make you feel bad because basically you have no choice but just copy and paste when you are reading the second part of the book when try to follow. I try to simplify in py get rid of those flying global/macro s**t and here's the outcome.

Both two language interpreter/compiler have a bootstrap file call code.plox so you could try to run in python
Usage example:
For execute a file in interpreter:
cd /interpreter
python3 PLoxMain.py code.plox
For execute a file in compiler:
cd /compiler
python3 main.py code.plox

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.