Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/viown/seascript
A VM Based Programming Language
https://github.com/viown/seascript
compiler interpreter language programming-language vm
Last synced: 23 days ago
JSON representation
A VM Based Programming Language
- Host: GitHub
- URL: https://github.com/viown/seascript
- Owner: viown
- License: mit
- Created: 2021-05-09T07:46:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-05T18:17:43.000Z (over 2 years ago)
- Last Synced: 2024-01-17T23:42:16.351Z (10 months ago)
- Topics: compiler, interpreter, language, programming-language, vm
- Language: C
- Homepage:
- Size: 894 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SeaScript
SeaScript is a simple, typeless programming language made in C.
SeaScript is designed to be fast and reliable while maintaining the capabilities of a high-level language.
# Example Program
example.ssc:
function wait(seconds) {
decl start = time(); // UNIX timewhile ((time() - start) < seconds) {}
}wait(10);
print("Waited 10 seconds");To run this code:
./SeaScript.exe example.ssc
You can also generate a bytecode file like this:
./SeaScript.exe example.ssc --preserve
This will create a file `example.ssb` storing the bytecode which can be executed directly:
./SeaScript.exe example.ssb
Which is faster as it doesn't have to recompile the source code each time you wish to run it.# Flags
- `--version` - Shows the current SeaScript version
- `--visualize-tokens` - Visualizes the token stream generated by SeaScript
- `--parser-print` - Pretty prints the output generated by the parser
- `--view` - Used to view the instructions from a bytecode file
- `--preserve` - Preserves the bytecode generated by SeaScript onto a file which can be executed
- `--benchmark` - Benchmark Seascript code# Build
To build this project make sure you have GCC installed, afterwards just run:
```
make
```