RMM is an intuitive, safe, functional programming language.
RMM is a rust-like language but has much fewer restrictions.
- Reference validator ensure references are always valid.
- No borrow concept. No check for data race. (Easy linked list)
- Move of ownership must be explicit.
- Allow implicit type cast. (Can be disabled by compiler option)
- Allow raw pointer operation but it is not necessary and not safe.
- Functional programming: All function is treated as a variable.
- No more implicit return
- Auto memory management without Garbage collection.
Full documentation is available here.
Short form | Long from | Require argument | Description |
---|---|---|---|
-o | --output | Yes | Specific output file name |
--genAST | optional | Output AST in xml format. Default filename is AST.xml. |
|
--stdpath | Yes | Standard library path (Enable stdlib) | |
-I | --import | Yes | Specify modules search path |
- Architecture: RMMC standard library only supports RISC-V. However, it should compile on other architecture (Darwin or Linux). We recommend using a docker. See Docker setup.
- Flex/Bison: Recommended Bison > 3.8 and flex > 2.6. If you are using a old version of bison, you may need to remove -Wcex flex for debug build.
- Google Test: Google test is used for unit test only. Install only if you need to run tests. See Google Test installation.
apt install libgtest-dev -y
apt-get install cmake
cd /usr/src/gtest
cmake CMakeLists.txt
Clone this Repo into your local filesystem :
git clone https://github.com/TerenceNg03/RMMC.git
Run this line in terminal :
docker pull riscv64/ubuntu:20.04
Execute this command in your cloned directory!
Create a container named Yacc
and mount current directory as /home/RMMC
:
docker create -it -v `pwd`:/home/RMMC --name Yacc -w /home riscv64/ubuntu:20.04
It is required to start the container before executing it :
docker start Yacc
docker exec -it Yacc /bin/bash
Note: Please execute these commands inside docker.
apt update
apt-get install bison flex make g++ vim clang llvm
Note: Please execute these commands inside docker.
yacc --version
lex --version
docker stop Yacc