Skip to content
Takes regular infix math expressions and tokenizes, converts to reverse polish notation and evaluates them.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
include
src
.gitignore
Makefile
README.md

README.md

C++ Math Parser

Simple math expression parser with support for basic operators and grouping.

Flow

The parser consists of three parts, the lexer which takes in a string and tokenizes it, the shunting yard algorithm which converts the infix math expression into a postfix expression and then the math expression computer which will use the reverse polish notation expression to evaluate the expression.

Operators

Supports ^ * / + - and integer numbers. Support for decimals and functions can be added in the future with small additions to the shunting yard algorithm and a partial rewrite of the math lexer to allow it to identify more complex tokens.

You can’t perform that action at this time.