Pixel Wall-E is an educational development environment and custom language interpreter designed to teach the fundamentals of Compiler Theory. Users write code to control a virtual robot that paints on a dynamic grid-based canvas.
- Language: C# 12 / .NET 8.0.
- UI Framework: WPF (Windows Presentation Foundation) for interactive graphical interfaces.
- Analysis: Regular Expressions (
System.Text.RegularExpressions) for dynamic token separation.
The project implements robust software engineering patterns to manage the interpreter's complexity:
- Visitor Pattern: For decoupled AST traversal and node evaluation.
- Scope Pattern: Manages hierarchical symbol tables for variable shadowing and semantic validation.
- Singleton Pattern: Ensures a single instance of the robot and canvas state.
- Lexer: Tokenizes source code using a predefined
KeyWordsdictionary and Regex. - Parser: Validates syntax and builds the Abstract Syntax Tree (AST).
- Semantic Analysis: Uses the
IScopeinterface to ensure variables and functions are valid before execution. - Execution: The
IVisitorevaluates the AST, triggering robot actions likeDrawLineorFill.
By leveraging the custom language's coordinate system and color functions, you can create complex pixel art:
Spawn(20, 20)
Color("Red")
Size(3)
DrawCircle(-1, 0, 5)
Fill()
// ... additional drawing logic- Download: Get the latest release here.
- Extract: Unzip the
.rarpackage. - Execute: Run
Pixel-Walle.exe.
- Alejandro López Castro - Computer Science Student, University of Havana.
Developed as a technical project focusing on Software Engineering patterns and Compiler Construction.