Skip to content

skribster/Pylox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pylox

A Python implementation of Bob Nystrom's toy language, Lox. It is a tree-walk interpreter following part I of Crafting Interpreters.

This project was mainly to teach myself more about Python and also how interpreters work under the hood.

How to Use

First, clone the repository. You can either use Pylox with the REPL:

.../Pylox> python pylox

Or by passing a .lox file as the third command line argument.

.../Pylox> python pylox main.lox

Completed Challenges

  • Break and continue statements
  • Anonymous functions
  • Multi-line comments
  • Passing a lone expression in the REPL
  • String + other type concatenation

Potential Next Steps

  • Go over the second part of the book and implement a bytecode interpreter
  • Complete all of the challenges in the book
  • Add support for lists and hashmaps :)
  • A VSCode extension for Lox

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages