Skip to content

A toy statically typed programming language with type inference.

License

Notifications You must be signed in to change notification settings

cntkillme/matty-lang

Repository files navigation

MattyLang

ci codecov

Capstone Presentation

Video: https://www.youtube.com/watch?v=UI8qgSn6Xs0

Introduction

MattyLang is a statically typed programming language designed to explore compiler construction and type systems.

Usage

See $ ./matty.py help, quick start: $ ./matty.py examples/v1.0.mtl. To enter REPL mode, do not specify a file.

usage: matty.py [-h] [-o OUTPUT] [-V] [-v] [--tokens] [--syntax] [--symbols] [--code] [file]

MattyLang frontend, compiles and executes MattyLang files.

positional arguments:
  file                  the input file (none for REPL)

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        the output file
  -V, --version         show program's version number and exit
  -v, --verbose         verbose output
  --tokens              print the tokens
  --syntax              print the syntax tree
  --symbols             print the symbol table
  --code                print the generated code

Note: if a file is unspecified, standard input will be used. The shortcut CTRL + D (Universal) or CTRL + Z (Windows) can be used to terminate standard input.

Testing

In the project's root directory, invoke $ python -m unittest discover tests. To generate a coverage report, invoke $ python -m coverage run -m unittest discover tests and then $ coverage report.

Syntax Highlighting

The tmLanguage can be found here.

Development Plan

See: TODO.md and grammar.ebnf

About

A toy statically typed programming language with type inference.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages