Skip to content

Tree-walk interpreter for a made up programming language

Notifications You must be signed in to change notification settings

gernot-ohner/jlox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jlox

A tree-walk interpreter for the programming language lox written in Java. After Robert Nystrom's excellent book "Crafting Interpreters"

Requirements:

Just Java.

Usage

java out.production.jlox.dev.ohner.jlox.Lox [file.lox]

With a [file] argument, expects file to be a lox source file and executes it.
Without a [file] argument, opens a lox prompt

Example

fun fib(n) {
   if (n <= 1) return n;
   return fib(n - 2) + fib(n - 1);
}

for (var i = 0; i < 40; i = i + 1) {
  print fib(i);
}

About

Tree-walk interpreter for a made up programming language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages