GithubHelp home page GithubHelp logo

gota7 / straitjacket-sharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asylum-lang-foundation/straitjacket-sharp

1.0 0.0 0.0 1.14 MB

Bootstrapper compiler for the Asylum Programming Language made in C#. THIS WILL BE DEPRECATED AS SOON AS ASYLUM IS STABLE ENOUGH TO CREATE A COMPILER FOR ITSELF!

Home Page: https://discord.gg/cn5wmz6SqA

License: MIT License

C# 77.19% Asymptote 0.78% ANTLR 2.04% Batchfile 0.01% Shell 0.03% Java 19.94%

straitjacket-sharp's Introduction

StraitJacket-Sharp

Bootstrapper compiler for the Asylum Programming Language made in C#. THIS WILL BE DEPRECATED AS SOON AS ASYLUM IS STABLE ENOUGH TO CREATE A COMPILER FOR ITSELF! Asylum Programming Language discord server: https://discord.gg/cn5wmz6SqA

About

StraitJacket-Sharp is currently the main compiler for Asylum, until Asylum is stable enough to build a compiler for it. The job of this is to take Asylum source files and convert them to LLVM-IR bitcode or a machine executable. It currently is in a very unstable state where only simple test programs can run. There currently are no compilation flags, the only thing that can be controlled is the test name. The compiler will not even give you errors at the moment, and will even try to compile incorrect code!

Folders

Root - Holds main project code, and entry point source files. .vscode - Visual Studio Code launch settings. AST - Code for converting ANTLR4's Abstract Syntax Tree (AST) into an object-oriented representation. Constructs - Definitions of object-oriented representations of the AST, checking code, and compilation code. EASL - The Embedded Asylum Standard Library (EASL), which define the language itself. This is compiled before any thing else is every time. Grammar - ANTLR4 built files along with the grammar file used to generate them. Tests - Test Asylum programs to compile.

Necessary Installs

It is required to have Microsoft's .NET installed and executable through path with dotnet. You may need to run dotnet restore first in this directory to resolve all the needed packages. It is also required to have clang installed and executable on the path as well. In order to produce the .ll file, LLVM tools need to be installed, but this is not mandatory and you can remove the llvm-dis line from the scripts and have your code compile just fine. If you want to install LLVM's tools, you can look here.

Usage

As the compiler is unstable at the moment, it can only really be used for test cases in the Tests folder. To make a program, make a .asy file with valid Asylum code that can be compiled. Then execute either TEST.bat ProgramName or test.sh ProgramName depending on your platform. Notice that ProgramName does not include the .asy extension at the end. This will compile your program then run it, along with spitting out an LLVM-IR bitcode (.bc) file and an LLVM-IR text (.ll) file. The intermediate (.bc and .ll) code are in the obj folder in Tests, and the executable will be in the bin folder in Tests.

straitjacket-sharp's People

Contributors

gota7 avatar

Stargazers

Davin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.