Skip to content
Tools for assisting in building programming languages in Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
.travis.yml
Cargo.toml
LICENSE
README.md
build.rs

README.md

Sindra

Build Status Documentation

Sindra is a library for developing programming languages. It contains several useful structs, traits, methods and PEG rules for implementing new programming languages.

Usage

To use, add the following to your Cargo.toml:

[dependencies]
sindra = "0.1"

Example

See the piske programming language for an example of using sindra. Additionally, some of the more programming-language-generic functionality currently implemented in the piske codebase will eventually be moved into the sindra library for ease of reuse.

Features

Sindra currently contains the following features:

  • PEG rules (using the additional functionality in the forked version of the peg crate here) for Rust-like integer, floating-point and string literal lexing.
  • Scope-handling traits and structures for managing scoped symbol tables and memory stores.
  • Type inference, promotion, and coercion traits and structs
  • Binary and unary operator traits
  • Framework for creation of an annotated heterogeneous abstract syntax tree
  • Logging structs for compiler error reporting

Future work

There are several features that are planned for future implementation, including:

  • Span handling (keeping track of the original location in the source file for abstract syntax tree nodes)
  • Struct / class scoping
  • Framework and tools for creating the typical interpreter and compiler binaries for a given language
  • A more unified and easy-to-understand type inteference / coercion / promotion system
  • Reusable implementation of common language features like infix / prefix expression handling
You can’t perform that action at this time.