Skip to content

A Rust implementation of a Turing compiler + interpreter

License

Notifications You must be signed in to change notification settings

DropDemBits/turse-rs

Repository files navigation

Turse - Turing in Rust

Turse is a new Rust interpreter and compiler for the (forsaken) Turing language, and is intended to be a drop in replacement for TProlog, the older interpreter.

This project uses information from these repositories:

Currently, only the compiler (toc) is being worked on, but a new interpreter will eventually be focused on.

Why

  • Curiosity. Just pure curiosity
  • Learning about compilers and bytecode virtual machines
  • Learning about concurrency and parallelism
  • Learning about JIT and interpreters
  • Big projects like this are "fun" to play with

Do not expect this project to be maintained for a long time.

Features

Lint mode & the LSP server supports:

  • Arrays
  • Functions & Procedures
  • Pointers
  • Sets
  • Control flow statements
  • Put & get statements

Compilation mode also supports some of thing things linting mode does, with the exception of:

  • Arrays
  • Set types
  • Referencing items not declared in a function or procedure
  • Pointers
  • String concatenation
  • char(*) and string(*)

Attempting to compile code that does these things will result in a compiler crash.

Running the Compiler

To run the compiler executable:

git clone https://github.com/DropDemBits/turse-rs.git
cargo run --bin toc_driver

License

Turse is licensed under the MIT license (see LICENSE or http://opensource.org/licenses/MIT).

Portions of the VSCode extension incorporate code from other repositories, see NOTICE for details.

About

A Rust implementation of a Turing compiler + interpreter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages