This is the ‘grown-up’ cousin to the JLox interpreter. It works on the same toy language (Lox)
but this time implements a JIT compiler and execution environment (much like that of Java) to gain
more performance.
Whilst the language constructs are similar, this builds on the back-end constructs by introducing
a rudimentary TAC (three-address code) layer to simplify the eventual executable bytecode, much in
the way that a more full-featured compiler would do so before converting to assembly language.
The Lox language is a toy language designed by Robert Nystrom, and his book Crafting Interpreters
gives a guide to developing it. This interpreter is the first pass at it. The language is Turing
complete so is a fully-capable instrument, but lacks robust system libraries, thus limiting its
effectiveness, but as a learning tool it’s ideal.
See the panel elsewhere on JLox for a link to the Lox interpreter.