vedant1811 / arithmetic-parser

Evaluates simple arithmethic expressions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arithmetic Parser

Evaluates simple arithmethic expressions. Reads only single digit numbers, 4 binary operators (+ - * -) and brackets (). Additionally, the space char is ignored.

See the ValidInputsTest file for examples

Dependencies

  1. Boost Unit Test Framework

Installation

Install as a standard cmake project:

mkdir build
cd build
cmake ..
make

Usage

From the build dir:

$ ../bin/parse "3 + 1"

Testing

After Installing, run the tests by

make test

OR

ctest --verbose

About

Evaluates simple arithmethic expressions

License:MIT License


Languages

Language:C++ 88.0%Language:CMake 12.0%