Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

clementd64/plox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plox

Lox interpreter written in PHP

From Bob Nystrom's book crafting interpreters

It doesn't really follow the book because it's funny to rewrite some parts

⚠️ Work in progress

Progress

  • Scanning
  • Representing Code
  • Parsing Expressions
  • Evaluating Expressions
  • Statements and State
  • Control Flow
  • Functions
  • Resolving and Binding
  • Classes
  • Inheritance

Change with the book

  • Nested multi-line comments
  • Scan Token on the fly
  • Pratt parser

Use It

clone this repository and run

php src/main.php [script]

You can also use

make

to create the phar