Skip to content

gabryon99/mucomp-lang

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

μcomp-lang

μcomp-lang is a didactic language implemented for Language, Compilers and Iterpreters course at UniPi.

Report

Read the report mucomp-report.pdf inside asset folder if you are interested to how mucomp-lang is implemented

Example

The snippet below shows a simple program written in μcomp.


component EntryPoint provides App {

    def fib(n: int): int {
        if (n == 0) {
            return 0;
        }

        if (n == 1) {
            return 1;
        }

        return fib(n - 1) + fib(n - 2);
    }

    def main() : int {
        print(fib(10)); // prints 10
        return 0;
    }
}

Trivia

The mascotte's name is "Comu" = "🐄" + "μ" (like: "muuuh") (I know, it's a bad pun).

About

μcomp-lang is a didactic language implemented for Language, Compilers and Interpreters course at UniPi.

Topics

Resources

License

Stars

Watchers

Forks