Title came from Basic Arithmetic Expression Evaluator based on Stacks
This project consists on the implementation of a simple expression calculator using concepts of stack and array in a real context application. The program needs to be able to recieve simple arithmetic expressions made of:
- Numeric constants (-32.768 to 32.767).
- Operators (
+
,-
,/
,*
,^
,%
), with their correspondant priority. - Delimiters (
()
,[]
,{}
).
You need git
to clone the repository, make
and g++
to compile the program. To install these dependencies, you just have to use your package manager, such as a debian based distro:
sudo apt-get install g++ git make
To compile the project, first you need to clone the repository, enter in directory with
git clone https://github.com/felipecramos/bares.git; cd bares
And then, type make
on project root.
You can execute bares by using std::cin
or reading and writing expressions with shell streams.
Example on unix based systems:
./bares < input_file > [output_file]
And even execute and type successively expressions ended by <CR>
and then press ctrl-d
to stop reading and show the results.
This program was made by Felipe Ramos for Programming Language I discipline, on Computer Science Course on Universidade Federal do Rio Grande do Norte.