top of page
Unity Interpreter
Engine: Unity
Project Type: Masters
To create a code teaching game, I created a domain specific language that gets interpreted into C# which is then ran inside of unity all during runtime. This project is intended to be a pedagogical tool, using gameification to teach the logic of very basic programming.
How This is Done
-
Lexical Analysis - Converting the users text into a list of tokens while getting rid of whitespace.
-
Recursive Descent Parser - A top-down parser that transforms tokens into an AST, while validating syntax.
-
Abstract Syntax Tree (AST) - A representation of the users code which allows for correct execution.
-
Tree-walk Interpreter - Traverses the AST line-by-line, executing the code inside of unity, in C#.

Abstracted Functions

Line-by-line Execution

Loops
bottom of page