GithubHelp home page GithubHelp logo

gabryon99 / mucomp-lang Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.03 MB

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

License: ISC License

Makefile 1.08% OCaml 94.95% Standard ML 0.09% Python 1.49% C 0.97% Shell 1.42%
languages programming compilers lexer parser ocaml menhir ocamllex llvm

mucomp-lang's Introduction

μ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).

mucomp-lang's People

Contributors

gabryon99 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

mucomp-lang's Issues

Failing tests

The repository doesn't have a CI/CD pipeline, so this issue will contain all the files that
don't surpass the test phases.

The points in bold are important files.

Parser

  • fail-func12.mc (due to the ending comment) (see: 1923f97)

Semantic Analysis

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.