Giter Site home page Giter Site logo

slang4cpp's Introduction

SLANG (Simple LANGuage) was initially developed as a tool to teach compiler construction. At first , SLANG compiler (SLANG4.NET) was written in C# and used .NET reflection for backend code generation. SLANG has improved over the past few years and is now being used at production environments for evaluating business rules with the help of JavaScript backend. 
 
This project rewrites SLANG Compiler in C++ and uses LLVM for backend code generation. SLANG4CPP enables SLANG programs to run native code on Linux , MAC OS X and Windows.

SLANG4CPP has a JavaScript backend which generates javascript equivalent of SLANG source.   
 
SLANG4.NET  - http://slangfordotnet.codeplex.com/ 
 
Java port of SLANG (SLANG4JAVA) can be found at , 

https://github.com/aashiks/Slang4Java


BUILD
-----
Make sure gcc and llvm are installed . Check commands 'gcc' and 'llc'.

Type 'make'

This will generate 'slangcc' executable.

RUN 
---

slangcc has three modes . 

1. JIT mode

slangcc -i <filename>

2. Compilation mode

slangcc -c <filename>

This will generate native executable from slang source.

To run ,  type ./<filename>

eg : 

	slangcc test.sl
	./test

3. JavaScript mode

slangcc -j <filename>

This will generate JavaScript equivalent of SLANG code.



slang4cpp's People

Contributors

pradeep-subrahmanion avatar

Watchers

Sarath Soman 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.