https://github.com/jweinst1/lobster
A super-fast, binary expression language
https://github.com/jweinst1/lobster
binary-data compiler execution programming-language
Last synced: 12 months ago
JSON representation
A super-fast, binary expression language
- Host: GitHub
- URL: https://github.com/jweinst1/lobster
- Owner: jweinst1
- License: mit
- Created: 2017-12-08T21:35:44.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-10T03:28:21.000Z (about 8 years ago)
- Last Synced: 2025-01-01T15:43:41.296Z (about 1 year ago)
- Topics: binary-data, compiler, execution, programming-language
- Language: C
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lobster

*An expression-based, binary nesting language*
`Lobster` is a prototype of a nested programming language (Lisp-like), that can be evaluated as pure expressions.
The advantage of `Lobster` is the speed and small size at which it can be embedded or used in other applications.
## Usage
`Lobster` is a single header embeddable language. However you can build it into an executable by running this command
```
$ make all
```
Then, you can compile snippets of code like so
```
$ ./bin/Lobster "+(8 5 -(9 9))"
13
```
To Use Lobster in your application or program, just use the `Lobster.h` file.
## Goals
The goals of the Lobster Language, despite being quite small, is to prove a different method of evaluation for nested structures in programs, and to greatly decrease the complexity associated with runtimes, virtual machines, and such.
Specifically, `Lobster` aims to tackle the following issues:
> 1. Eliminate the use of AST's, Parsers, Tokens and runtimes.
> 2. Direct translation from source code to bytecode.
> 3. Evaluation of instructions in linear O(n) time.
Lobster accomplishes this via *direct translation* instead of traditional tokenization, parsing, code generation etc.
Example:
```
+ ( 5 4 )
| || ||
[Add, Start, int, {binary}, int, {binary}, End]
```
## License
`Lobster` is MIT licensed and open source.