Skip to content

A full-featured high-level scripting language interpreter written in C# and Java.

License

Notifications You must be signed in to change notification settings

jasperdrescher/Scripting-language-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scripting-language-interpreter

A full-featured scripting language interpreter based on Crafting Interpreters. This interpreter handles scripts written in the Lox language, a high-level scripting language based on the ECMA specifications of JavaScript.

About this project

This project is at the forefront of an open-source serious game (currently in pre-production). The goal is to write a scripting language interpreter that can perform runtime behaviour in game engines like Unity.

The interpreter

This interpreter performs a few steps when receiving input:

  1. Lexical analysis
  2. Parsing
  3. Static analysis
  4. Intermediate representation
  5. Optimization
  6. Code generation
  7. Runtime representation

The Lox language

Lox is similair to high-level scripting languages like JavaScript and Lua. Two of the main aspects are:

  • Dynamic typing
  • Automatic memory management

Besides those aspects Lox can handle:

  • Data types
  • Expressions
  • Statements
  • Variables
  • Control flows
  • Functions
  • Classes

An example of Lox code:

// This is a test
var test = 5;
for (var i = 0; i < test; i = i + 1)
{
    print i;
}

About

A full-featured high-level scripting language interpreter written in C# and Java.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published