Skip to content
/ mrs Public

Compiler for the mrs language -- MARIE Really Sux

License

Notifications You must be signed in to change notification settings

sysdevs/mrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mrs

Compiler for the mrs language -- MARIE Really Sux

What is mrs?

This project compiles the mrs language to MARIE assembly see MARIE-js wiki for more info.

You can also find an online (in-browser) MARIE compiler, virtual machine, and various debugging tools at https://marie.js.org/

Installation and usage

Ensure that you have NodeJS and npm installed on your system.

git clone https://github.com/sysdevs/mrs && cd mrs
npm install
node index.js --help # shows help
node index.js --input programs/main.mrs --output main.mas

Example program

An example program is in the directory programs/main.mrs, and its compiled assembly is located at program.mas.

Below is a contrived program.

func add a b {
    return a + b
}

func main {
    int x = add(5 10)
    int value = input()

    str text = 'hello world'

    if (value > x) {
        print(text)
    } else {
        if (value = 0) {
            print('goodbye world')
        } else {
            print('goodnight world')
        }
    }
}

License

Copyright (C) 2019 SysDevs

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

About

Compiler for the mrs language -- MARIE Really Sux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published