Skip to content

marcjourneux/pylox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lox compiler in Python

This Lox compiler is an implementation of the book “Crafting Interpreters” from Bob Nystrom. It is not delivered as a complete package to let you play with it as you like.

Requirements

The code uses Python 3.6 and was developed on OS X. It should work quite easily on Windows.

How to run the lox compiler

  1. You can run the REPL with “python3 -m lox.lox” once you are in the pylox folder (top folder). You can exit the REPL with ‘exit’.
  2. You can run any test file (extension does not matter) as “python3 -m test.test_lox testfiles/$file”, placing the file in “test/testfiles” folder.

What is implemented on top of the book (in the Challenges section)

  1. ‘break’ statement is implemented.
  2. Closures are implemented.
  3. Lambdas are implemented (lambdas are supposed to be anonymous function here).

About

Python implementation of JLox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages