A custom programming language and its interpreter, written from scratch in C#, with a WPF desktop GUI where a Wall-E robot draws pixel art on a canvas by executing your code.
You write a program in the Wall-E language (.pw files) — moving the robot, drawing lines and figures, using variables, arithmetic/boolean expressions, functions, and GoTo/Label control flow — and the interpreter runs it, painting the result on an interactive canvas.
The solution is split into three projects:
Core/— the language engine, with a classic interpreter pipeline:- Lexer (
Model/Lexer.cs) → tokenizes source intoTokens (Enum/TokenType.cs). - Parser (
Model/Parser.cs) → builds the AST. - AST — expressions (
Literal,Variable,FunctionExp), binary expressions (int, bool, int→bool), and instructions (Assign,Block,GoTo,Label, function calls). - Semantic / runtime —
Contextfor scopes and variables,Functiondefinitions, and structured error reporting (LexerError,ParserError,SemanticErrors).
- Lexer (
ViewModel/— WPF GUI: canvas rendering (CanvasControler,IPaintable),CoreManagerbridging the engine and UI, directions, and portals.Test/— a console harness; sample programs live incontents/(TestAritmetica.pw,TestGoTo.pw,TestLabel.pw, …).
- Hand-written lexer and recursive parser — no parser generators.
- Jump-based control flow (
GoTo+Label) on top of an expression language. - Clean separation between language core and presentation (engine is UI-agnostic).
- Typed binary-expression hierarchy (integer, boolean, and int-to-bool comparisons).
Open Wall-E JM.sln in Visual Studio (Windows / .NET, WPF), set ViewModel as the startup project, and run. Load a .pw file from contents/ or write your own.
University of Havana — Computer Science. Built as a programming / language-design project.