description | A small arithmetic REPL written in pure C++11. |
homepage URL | https://github.com/vrmiguel/minirepl/ |
repository URL | https://github.com/vrmiguel/minirepl.git |
owner | lemao.vrm07@gmail.com |
last change | Tue, 7 Jul 2020 19:12:19 +0000 (7 16:12 -0300) |
last refresh | Wed, 17 Nov 2021 17:14:55 +0000 (17 18:14 +0100) |
mirror URL | git://repo.or.cz/miniREPL.git |
https://repo.or.cz/miniREPL.git | |
ssh://git@repo.or.cz/miniREPL.git | |
bundle info | miniREPL.git downloadable bundles |
content tags |
An early work-in-progress arithmetic REPL written in pure C++11.
An example follows:
miniREPL -- github.com/vrmiguel/minirepl
>>> myVar = -2^3 - 4*5
-28
>>> myVar
-28
>>> 4*7^2
196
>>> 6*8 - 2*3
42
>>> a = 2
2
>>> b=a^a
4
>>> b^a + a^b
32
>>> a = 2*b
8
The REPL currently only deals in integers and has no parenthesis support yet. Variables can be created with any combination of upper and lower-case characters.
On the root folder, run qmake && make
.
Start the REPL with ./minirepl
.
The QMake version used here is 3.1. A compiler supporting at least C++11 is needed, with no extra dependencies
On the root folder, run g++ -c -pipe -std=gnu++11 -Wall -W -fPIC -I. Sources/main.cpp Sources/interp.cpp Sources/_os.cpp Sources/token.cpp
, followed by g++ -Wl,-O1 -o minirepl main.o interp.o _os.o token.o
.
The -std=gnu++11
flag can be freely switched to -std=c++11
if so wished.
4 years ago | master | logtree |