GithubHelp home page GithubHelp logo

pylox's Introduction

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).

pylox's People

Contributors

marcjourneux avatar

Stargazers

 avatar Connor Sughrue avatar Ty avatar Roel Adriaans avatar  avatar  avatar Faisal Alatawi avatar Alex Bender avatar

Watchers

Alex Bender avatar  avatar

Forkers

tonyallan

pylox's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.