Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shivrm/risp
Interpreted LISP-like language.
https://github.com/shivrm/risp
interpreter lexer-parser lisp rust wip
Last synced: 9 days ago
JSON representation
Interpreted LISP-like language.
- Host: GitHub
- URL: https://github.com/shivrm/risp
- Owner: shivrm
- License: mit
- Created: 2022-04-30T05:50:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-16T06:58:55.000Z (about 2 years ago)
- Last Synced: 2024-08-02T14:10:08.749Z (3 months ago)
- Topics: interpreter, lexer-parser, lisp, rust, wip
- Language: Rust
- Homepage:
- Size: 127 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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.
- [x] Integers and Strings
- [x] Floats
- [ ] Better error reporting
- [x] 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](https://github.com/shivrm/risp/archive/refs/heads/main.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 `` with the path to the file:
```
cargo run
```- 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](LICENSE.md)