descriptionA small arithmetic REPL written in pure C++11.
homepage URLhttps://github.com/vrmiguel/minirepl/
repository URLhttps://github.com/vrmiguel/minirepl.git
ownerlemao.vrm07@gmail.com
last changeTue, 7 Jul 2020 19:12:19 +0000 (7 16:12 -0300)
last refreshWed, 17 Nov 2021 17:14:55 +0000 (17 18:14 +0100)
content tags
add:
README.md

miniREPL Codacy Badge License: MIT Semaphore Build

An early work-in-progress arithmetic REPL written in pure C++11.

Usage

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.

Building

With QMake

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

A lengthier way

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.

shortlog
2020-07-07 V. R. MiguelUpdate README.mdmaster
2020-07-07 V. R. MiguelAttempt to fix Semaphore builds
2020-07-07 Vinícius R... Cleanup 'debug' code
2020-07-07 Vinícius R... ?
2020-07-07 Vinícius R... Merge remote-tracking branch 'origin/master'
2020-07-07 Vinícius R... Save variables on an unordered_map
2020-06-04 V. R. MiguelTypo :(
2020-06-04 V. R. MiguelAdd build badge
2020-06-04 Vinícius R... Add Semaphore-CI
2020-06-04 V. R. MiguelMIT badge
2020-06-04 V. R. MiguelUpdate README.md
2020-06-04 V. R. MiguelDelete .travis.yml
2020-06-04 V. R. MiguelUpdate _os.h
2020-06-04 V. R. MiguelTravis CI (again)
2020-06-04 V. R. MiguelTravis CI
2020-06-04 V. R. MiguelUpdate README.md
...
heads
4 years ago master