Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/luapp-org/luapp

The Lua++ programming language. A simple type based programming language that inherited its syntax from Lua.
https://github.com/luapp-org/luapp

c compiler language lua programming-language

Last synced: 2 months ago
JSON representation

The Lua++ programming language. A simple type based programming language that inherited its syntax from Lua.

Awesome Lists containing this project

README

        

# Lua++ programming language
This is the Lua++ C lang build, currently in development but is soon to be completed. If you are interested in learning more about this project, please visit our website: [luaplusplus.org](https://www.luaplusplus.org). This codebase is not specifically tweaked to a certain compiler, so any C/C++ compiler should be able to build this project easily. Personally, I recommend building it with ```gcc``` although ```clang``` or ```MSVSC``` would also work fine.

Disclamer
> Lua++ is still under heavy development so when you are testing the programming language keep that in mind. There are a LOT of minor bugs spread around in the codebase so don't expect a production ready application. Otherwise, thank you for showing interest in Lua++.

### How to use
1. Make sure that you have ``make``, ``flex``, and ``bison`` installed. To install them on a Linux machine run the following commands:
```
sudo apt update
sudo apt install flex
sudo apt install bison
sudo apt install make
```
2. Enter the main source folder and build the desired project (e.g. ```make interpreter```)
3. Then run the binary that was produced by this command
```
./bin/luapp
...
```

### Compiler
> Note: compiler development moved to [lorraine](https://github.com/luapp-org/lorraine).

The current complier is very user friendly. It consists of four stages: ``lexer``, ``parser``, ``ir``, and ``codegen``. These are all toggable via the ``-s`` command line argument. This gives you the ability to inspect each stage of the compiler in detail. The usage for the compiler binary is provided below:
```
luappc -s [lexer|parser|type|symbol|ir|codgen] -o [outputfile] [inputfile]

-s : indicates the name of the stage to stop after.
Defaults to the last stage.
-o : name of the output file. Defaults to "output.s"

You should pass the name of the file to compile.
```