Skip to content

About

Interpreter + WPF GUI for a custom pixel-art programming language, written from scratch in C# (lexer, parser, AST).

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wall-E — Pixel-Art Programming Language

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.

What it does

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.

Architecture

The solution is split into three projects:

  • Core/ — the language engine, with a classic interpreter pipeline:
    • Lexer (Model/Lexer.cs) → tokenizes source into Tokens (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 — Context for scopes and variables, Function definitions, and structured error reporting (LexerError, ParserError, SemanticErrors).
  • ViewModel/ — WPF GUI: canvas rendering (CanvasControler, IPaintable), CoreManager bridging the engine and UI, directions, and portals.
  • Test/ — a console harness; sample programs live in contents/ (TestAritmetica.pw, TestGoTo.pw, TestLabel.pw, …).

Highlights

  • 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).

Run it

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.

About

Interpreter + WPF GUI for a custom pixel-art programming language, written from scratch in C# (lexer, parser, AST).

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages