https://github.com/aryanprince/lexical-interpreter-engine
ποΈ A .NET WinForms application that takes in a custom DSL to draw geometric designs.
https://github.com/aryanprince/lexical-interpreter-engine
c-sharp cicd domain-specific-language dotnet dotnet-framework drawing-library github-actions lexical-analyzer windows-forms
Last synced: 4 months ago
JSON representation
ποΈ A .NET WinForms application that takes in a custom DSL to draw geometric designs.
- Host: GitHub
- URL: https://github.com/aryanprince/lexical-interpreter-engine
- Owner: aryanprince
- License: mit
- Created: 2022-10-11T09:37:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-24T04:19:00.000Z (10 months ago)
- Last Synced: 2025-01-23T10:23:19.995Z (6 months ago)
- Topics: c-sharp, cicd, domain-specific-language, dotnet, dotnet-framework, drawing-library, github-actions, lexical-analyzer, windows-forms
- Language: C#
- Homepage:
- Size: 934 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# ποΈ Lexical Interpreter Engine



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
[](https://github.com/aryanprince/ASE-Assignment/actions/workflows/ci-build-and-test.yml)
[](https://github.com/aryanprince/ASE-Assignment/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:
[](https://github.com/aryanprince/ASE-Assignment/actions/workflows/ci-build-and-test.yml) - Automatically builds and tests code for quality assurance.
[](https://github.com/aryanprince/ASE-Assignment/actions/workflows/pr-validator.yml) - Checks PR names for consistency and style.
[](https://github.com/aryanprince/ASE-Assignment/actions/workflows/pr-labeler.yml) - Assigns labels to PRs based on file changes.
[](https://github.com/aryanprince/ASE-Assignment/actions/workflows/add-issue-to-project.yml) - Automatically adds issues to the active project.
[](https://github.com/aryanprince/ASE-Assignment/actions/workflows/assign-author-to-issue-pr.yml) - 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:
```bash
git clone https://github.com/aryanprince/Lexical-Interpreter-Engine.git
cd Lexical-Interpreter-Engine
```2. Open in Visual Studio:
Open the `LexicalEngine.sln` solution file in Visual Studio.
3. Build the solution:
Build the project using Visual Studio.
4. Run the program:
Execute the project and try out the below test code in the program.
## π¨ Test Code for Program
```txt
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
- [MIT License](https://github.com/dev3-extensions/toolkit/blob/main/LICENSE).