Skip to content

Kaik0405/Pixel-Walle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pixel Wall-E: Interactive Scripting Engine 🚀🎨

.NET 8 C# WPF

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.

🛠️ Tech Stack & Architecture

Core Technologies

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

Design Patterns & Principles

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.

🧠 The Interpreter Pipeline

  1. Lexer: Tokenizes source code using a predefined KeyWords dictionary and Regex.
  2. Parser: Validates syntax and builds the Abstract Syntax Tree (AST).
  3. Semantic Analysis: Uses the IScope interface to ensure variables and functions are valid before execution.
  4. Execution: The IVisitor evaluates the AST, triggering robot actions like DrawLine or Fill.

🚀 Scripting Example: Painting a Heart

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

Result: Screenshot


🛠️ How to Run

  1. Download: Get the latest release here.
  2. Extract: Unzip the .rar package.
  3. Execute: Run Pixel-Walle.exe.

✒️ Author

  • Alejandro López Castro - Computer Science Student, University of Havana.

Developed as a technical project focusing on Software Engineering patterns and Compiler Construction.

About

🤖 A custom programming language interpreter and IDE built with .NET 8 & WPF. Featuring a full Lexer/Parser pipeline and AST evaluation to control a robotic drawer using recursive logic and design patterns.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages