Skip to content

eikopf/jabber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

473 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jabber

'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe.

Context

This repository contains the sources for my Bachelor's thesis project, titled Designing and Implementing a Functional Programming Language. This project will not be actively maintained.

Requirements

To use this project, you will need:

  1. A recent Rust toolchain, at least 1.85.1.
  2. The tree-sitter-cli tool (available via cargo).
  3. A local C compiler.
  4. A Racket installation with the R6RS language package.

Usage

For any of the following commands, jabber can be exchanged with cargo run -- if you're in the project directory.

  • jabber, jabber help, and jabber --help will display some usage instructions in the terminal.
  • jabber -l <LIBS_ROOT> compile -i <INPUT_ROOT> -o <OUTPUT_ROOT> will compile the package at <INPUT_ROOT> against the libraries in <LIBS_ROOT> and place the files in <OUTPUT_ROOT>.
  • jabber -l <LIBS_ROOT> run -s <SUPPORT_ROOT> -i <INPUT_ROOT> -o <OUTPUT_ROOT> will compile as above, but then will also run the package using racket with the given <SUPPORT_ROOT>.

Index

  • compiler is the root of the Rust crate that implements the Jabber compiler.
  • libs contains Jabber's standard libraries, of which the most important is core.
  • report contains the source files for the report itself, and can be compiled with Typst.
  • spec contains normative (binding) documents describing Jabber, and is intended to be the source of truth for the language;
  • support contains the runtime support library used by the compiled Racket artifacts.
  • tests contains several Jabber packages to test the compiler against.
  • tree-sitter-jabber is a Tree-sitter parser for Jabber, defined in grammar.js—it also serves as the front-end CST parser for the Jabber compiler.

Notes

  • The artifacts in tree-sitter-jabber/src will change slightly based on the system that runs tree-sitter generate. Systems can run git update-index --assume-unchanged <FILENAME> to locally ignore changes to these files.
  • Tree-sitter appears to currently have a bug that causes tree-sitter test to ignore test tags on Windows.

About

A small functional language implemented in Rust

Resources

Stars

Watchers

Forks

Contributors