Skip to content

๐Ÿ–Œ๏ธ A .NET WinForms application that takes in a custom DSL to draw geometric designs.

License

Notifications You must be signed in to change notification settings

aryanprince/Lexical-Interpreter-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

image

๐Ÿ–Œ๏ธ Lexical Interpreter Engine

.Net C# Visual Studio GitHub Actions

A .NET C# WinForms application that takes lexical tokens from a specially-tailored domain-specific language and visually translates them into geometric designs drawn on a canvas

CI Build and Test GitHub issues

โœจ Introduction

The Lexical Interpreter Engine is a powerful C# WinForms-based interpreter designed to transform a custom domain-specific language into graphical geometric designs. The interpreter parses and visualizes the commands in real-time, drawing shapes on a canvas based on the lexical tokens provided.

Built to demonstrate concepts of lexical analysis and geometric rendering, it serves as both a functional interpreter and a learning tool for understanding how visualizations can be driven by code.

๐ŸŒŸ Features

  • Lexical Token Parsing: Translates tokens from a DSL (Domain-Specific Language) into corresponding visual elements.
  • Geometric Rendering: Draws shapes like triangles, rectangles, squares, and circles on a canvas based on token values.
  • Control Structures: Supports basic programming constructs such as if, while, and pen for creating dynamic designs.
  • Dynamic Canvas: Real-time rendering of geometric designs.
  • C# and WinForms: Built using the powerful .NET framework and WinForms for the UI.
  • GitHub Actions CI Workflows: Automated CI workflows using GitHub Actions for building and testing.

๐Ÿš€ Tech Stack

  • Language: C# (.NET Framework)
  • Framework: WinForms
  • IDE: Visual Studio
  • Version Control: Git & GitHub
  • CI/CD: GitHub Actions

๐ŸŒ CI/CD Workflows

This project features robust CI/CD processes implemented using GitHub Actions:

CI Build and Test - Automatically builds and tests code for quality assurance.

PR Validator - Checks PR names for consistency and style.

PR Labeler - Assigns labels to PRs based on file changes.

Add Issue To Project - Automatically adds issues to the active project.

Assign Author to Issue/PR - Tags issues and PRs with the authorโ€™s name.

๐Ÿ› ๏ธ Getting Started

Follow these steps to get up and running with the Lexical Interpreter Engine:

Prerequisites

  • Visual Studio 2019 or later
  • .NET Framework 5.0+
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/aryanprince/Lexical-Interpreter-Engine.git
cd Lexical-Interpreter-Engine
  1. Open in Visual Studio:

Open the LexicalEngine.sln solution file in Visual Studio.

  1. Build the solution:

Build the project using Visual Studio.

  1. Run the program:

Execute the project and try out the below test code in the program.

๐ŸŽจ Test Code for Program

var x = 50
triangle x
var y = 125
var x = x + 20
rectangle x y
pen 3
if x > 25
  var x = x + 25
  square x
endif
pen 2
while 3
  var y = y + x
  circle y
endwhile
fill 1
pen 1
move x y
triangle y
var x = 250
move x x
rectangle x x

๐ŸŽฏ Roadmap

  • Extended Geometric Shapes: Add support for additional shapes (polygons, ellipses, etc.).
  • Advanced Error Handling: Improve lexical error reporting and debugging features.
  • Save/Export Designs: Allow users to save the rendered designs as image files.

๐Ÿ”‘ License