https://github.com/mtardy/sandbox
A prototype-based programming language, reflexive, flexible, and simple by design
https://github.com/mtardy/sandbox
programing-language
Last synced: 12 months ago
JSON representation
A prototype-based programming language, reflexive, flexible, and simple by design
- Host: GitHub
- URL: https://github.com/mtardy/sandbox
- Owner: mtardy
- License: mit
- Created: 2020-06-17T11:10:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T09:27:31.000Z (over 5 years ago)
- Last Synced: 2025-02-10T12:35:49.722Z (about 1 year ago)
- Topics: programing-language
- Language: C
- Homepage:
- Size: 206 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sandbox
## Build the project
### Requirements
Please install [peg/leg](https://www.piumarta.com/software/peg/) manually or with a package manager, for example with Homebrew:
```bash
$ brew install peg
```
Please install [the Boehm-Demers-Weiser conservative garbage collector](https://www.hboehm.info/gc/) manually or with a package manager, for example with Homebrew:
```bash
$ brew install bdw-gc
```
### Build
```bash
$ make
```
## Build with Docker
The Docker image provides a ready to go environment to experiment with the project. Just build the image locally and run an interactive shell inside the container:
```bash
$ docker build . --tag mtardy/sandbox
$ docker run -it mtardy/sandbox
```
---
## Usage
### Single input
You can pass your program:
* via the standard input
```bash
$ echo "a=2+3 a*2" | ./parse
```
```bash
$ ./parse < file
```
* via a file
```bash
$ ./parse file
```
### Multiple inputs
You can also pass multiple files and use `-` in any order as the standard input when mixing files and standard input, for example:
```bash
$ ./parse file1 - file2 < file3
```
```bash
$ echo "a=2+3 a*2" | ./parse file1 file2 -
```