https://github.com/koturn/Whitespace
An interpreter and C-translator of Whitespace
https://github.com/koturn/Whitespace
c interpreter translator transpiler whitespace
Last synced: 5 months ago
JSON representation
An interpreter and C-translator of Whitespace
- Host: GitHub
- URL: https://github.com/koturn/Whitespace
- Owner: koturn
- License: mit
- Created: 2014-11-08T13:30:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-20T08:15:40.000Z (about 8 years ago)
- Last Synced: 2024-08-03T18:14:48.368Z (9 months ago)
- Topics: c, interpreter, translator, transpiler, whitespace
- Language: C
- Size: 33.2 KB
- Stars: 16
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeInterpreter - Whitespace
README
Whitespace
==========[](https://travis-ci.org/koturn/Whitespace)
Whitespace interpreter and C-translator.
## Usage
### Run Whitespace program
```sh
$ ./whitespace [Whitespace source file]
```### Tanslate Whitespace to C
Specify ```-t``` flag and ```-o``` flag.
```sh
$ ./whitespace [Whitespace source file] -t -o out.c
```If you don't specify output file with ```-o```, C source code will output
stdout.### Options
Options | Function
-----------------------------------|------------------------------------
```-b```, ```--bytecode``` | Show code in hexadecimal
```-f```, ```--filter``` | Visualize whitespace source code
```-h```, ```--help``` | Show help and exit
```-m```, ```--mnemonic``` | Show byte code in mnemonic format
```-o FILE```, ```--output=FILE``` | Specify output filename
```-t```, ```--translate``` | Translate brainfuck to C source code## Build
Use [Makefile](Makefile).
```sh
$ make
```If you want to build with MSVC, use [msvc.mk](msvc.mk).
[msvc.mk](msvc.mk) is written for nmake.```sh
> nmake /f msvc.mk
```## Dependent libraries
#### MSVC only
- [getopt clone](https://github.com/koturn/getopt)
## References
- [http://compsoc.dur.ac.uk/whitespace/](http://compsoc.dur.ac.uk/whitespace/)
## LICENSE
This software is released under the MIT License, see [LICENSE](LICENSE).