Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tetsuo-cpp/mathy
A toy programming language that supports basic integer arithmetic.
https://github.com/tetsuo-cpp/mathy
Last synced: 3 days ago
JSON representation
A toy programming language that supports basic integer arithmetic.
- Host: GitHub
- URL: https://github.com/tetsuo-cpp/mathy
- Owner: tetsuo-cpp
- Created: 2019-12-23T11:23:28.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-18T03:28:49.000Z (almost 5 years ago)
- Last Synced: 2024-12-19T06:42:31.349Z (28 days ago)
- Language: C++
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mathy
A toy programming language that supports basic integer arithmetic.This project was mainly an excuse for me to learn about some testing libraries in the C++ ecosystem that I hadn't gotten the chance to try yet (Catch2 and Trompeloeil).
## Syntax
```
MATHY> var x = 1 + 3
NONE
MATHY> x
4
MATHY> 1 + 3
4
MATHY> (1 + 3) * 2
8
MATHY> (x + 8) * 2
24
MATHY> var y = 3 * 2; y
6
```
## Dependencies
* Catch2
* Trompeloeil
## Building
```
git submodule init
git submodule update
cmake . && make
```
## Usage
To run the REPL.
```
$ ./mathy/mathy
```
To run the unit test suite.
```
$ ./test/mathy_test
```