An interpreted LISP-like language. Made in Rust.

Overview

RISP

Warning: The language is a work in progress. It's lacks many features and might not be stable.

RISP is an interpreted LISP-like language. It's written in Rust.

Features

Checked entries have been implemented.

  • Integers and Strings
  • Floats
  • Better error reporting
  • Operators
  • Variables
  • if-else expressions
  • while and for loops
  • Functions
  • Macros
  • Classes

Usage

Rust must be installed for compiling the code. The latest version is recommended. Installing cargo is also recommended.

  1. Clone the repo

    git clone https://github.com/shivrm/risp
    

    GitHub also lets you download the source code as a ZIP.

  2. Navigate to project folder

    cd risp
    
  3. Build and run with cargo

    • Run without any arguments to start the REPL. This lets you interactively run statements - one at a time.

      cargo run
      
    • To execute code from a file, give the file path as a command-line argument. Replace <file> with the path to the file:

      cargo run <file>
      
    • Giving bench as a command-line argument will benchmark the lexer. Note that this might be performance intensive.

      cargo run bench
      

Examples

See scripts/example.risp for an example RISP script. Run it with

cargo run scripts/example.risp

License

RISP is licensed under the MIT license. See LICENSE.md

You might also like...
A typed parser generator embedded in Rust code for Parsing Expression Grammars

Oak Compiled on the nightly channel of Rust. Use rustup for managing compiler channels. You can download and set up the exact same version of the comp

Rust query string parser with nesting support

What is Queryst? This is a fork of the original, with serde and serde_json updated to 0.9 A query string parsing library for Rust inspired by https://

JsonPath engine written in Rust. Webassembly and Javascript support too

jsonpath_lib Rust 버전 JsonPath 구현으로 Webassembly와 Javascript에서도 유사한 API 인터페이스를 제공 한다. It is JsonPath JsonPath engine written in Rust. it provide a simil

Rust badge maker

Badge-Maker Links are generated from cargo, view on docs page A fast and accurate badge maker for services like shields.io. Verified to match badge-ma

Soon to be AsciiDoc parser implemented in rust!

pagliascii "But ASCII Doc, I am Pagliascii" Soon to be AsciiDoc parser implemented in rust! This project is the current implementation of the requeste

Parsing and inspecting Rust literals (particularly useful for proc macros)

litrs: parsing and inspecting Rust literals litrs offers functionality to parse Rust literals, i.e. tokens in the Rust programming language that repre

Rust library for parsing configuration files

configster Rust library for parsing configuration files Config file format The 'option' can be any string with no whitespace. arbitrary_option = false

PEG parser for YAML written in Rust 🦀

yaml-peg PEG parser (pest) for YAML written in Rust 🦀 Quick Start ⚡️ # Run cargo run -- --file example_files/test.yaml # Output { "xmas": "true",

MRT/BGP data parser written in Rust.
MRT/BGP data parser written in Rust.

BGPKIT Parser BGPKIT Parser aims to provides the most ergonomic MRT/BGP message parsing Rust API. BGPKIT Parser has the following features: performant

Comments
  • Make lexer faster, Allocate to make borrow checker happy on parser

    Make lexer faster, Allocate to make borrow checker happy on parser

    I just had to do this.

    Change it up however you'd like The lexer now lexes at ~395 MBps with some processes running in the background on my PC Check if it contains any bugs I did not try to change the overall code, but changed everything enough to make the borrow checker happy Including the fact that I had to allocate a string in the parser :( (you could store values as spans in the parser to overcome this, probably) The changes could be enough to introduce bugs in other parts of your code, so change it however you wish

    opened by dquat 1
Owner
Shivram
Amateur computer programmer and full time student who codes in Rust, Python, and JavaScript.
Shivram
This project aims to implement a CSS(less like) parser in rust. Currently the code is targeting the PostCSS AST. Very early stage, do not use in production.

CSS(less like) parser written in rust (WIP) This project aims to implement a CSS(less like) parser in rust. Currently the code is targeting the PostCS

Huang Liuhaoran 21 Aug 23, 2022
xml-rs is an XML library for Rust programming language

xml-rs, an XML library for Rust Documentation xml-rs is an XML library for Rust programming language. It is heavily inspired by Java Streaming API for

Vladimir Matveev 417 Jan 3, 2023
A fault-tolerant, recursive-descent parser for Ara Programming Language 🌲

Ara Parser A fault-tolerant, recursive-descent parser for Ara Programming Language ?? Note: This project is a hard-fork of php-rust-tools/parser Speci

Ara Programming Language 18 Jan 23, 2023
A native Rust port of Google's robots.txt parser and matcher C++ library.

robotstxt A native Rust port of Google's robots.txt parser and matcher C++ library. Native Rust port, no third-part crate dependency Zero unsafe code

Folyd 72 Dec 11, 2022
Rust parser combinator framework

nom, eating data byte by byte nom is a parser combinators library written in Rust. Its goal is to provide tools to build safe parsers without compromi

Geoffroy Couprie 7.6k Jan 7, 2023
Parsing Expression Grammar (PEG) parser generator for Rust

Parsing Expression Grammars in Rust Documentation | Release Notes rust-peg is a simple yet flexible parser generator that makes it easy to write robus

Kevin Mehall 1.2k Dec 30, 2022
A fast monadic-style parser combinator designed to work on stable Rust.

Chomp Chomp is a fast monadic-style parser combinator library designed to work on stable Rust. It was written as the culmination of the experiments de

Martin Wernstål 228 Oct 31, 2022
A parser combinator library for Rust

combine An implementation of parser combinators for Rust, inspired by the Haskell library Parsec. As in Parsec the parsers are LL(1) by default but th

Markus Westerlind 1.1k Dec 28, 2022
LR(1) parser generator for Rust

LALRPOP LALRPOP is a Rust parser generator framework with usability as its primary goal. You should be able to write compact, DRY, readable grammars.

null 2.4k Jan 7, 2023
A Rust library for zero-allocation parsing of binary data.

Zero A Rust library for zero-allocation parsing of binary data. Requires Rust version 1.6 or later (requires stable libcore for no_std). See docs for

Nick Cameron 45 Nov 27, 2022