Skip to content

A simple JavaScript compiler that compiles DBN like language (by MIT) and generates the corresponding shapes in the form of SVGs

Notifications You must be signed in to change notification settings

RRS-Project/svg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVG Compiler

The compiler takes in simple code describing different shapes, and generates corresponding SVG code and image. The SVG Code can then be downloaded for further use.


How does the compiler work?

The SVG compiler has 4 phases

1. Lexer - This function is used to generate tokens from the input file

2. Parser - Parser parses the generated tokens and creates an Abstract Syntax Tree (AST)

3. Transformer - This function transforms the AST to get it into SVG format

4. Generator - This function is used to generate the SVG code from the SVG tree created by Transformer function


Different SVG Shapes Supported

Line, Rectangle, Circle and Ellipse


Getting Started

Clone this repository: git clone https://github.com/RRS-Project/svg.git

Install all dependencies: yarn

Run the application: yarn start


Project Created by

About

A simple JavaScript compiler that compiles DBN like language (by MIT) and generates the corresponding shapes in the form of SVGs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published