#ifndef MATH_STRING_PARSER_H
#define MATH_STRING_PARSER_H

#include <iostream>
#include <string>
#include <vector>
#include <assert.h>
using namespace std;

namespace mathParser
{

	enum TokenType
	{
		OPERATOR,
		BRACE,
		IDENTIFIER,
		NUMBER
	};

	///Math parser token
	struct Token
	{
		TokenType type;
		string value;
	};


	bool isOpenBrace( char char_ );
	bool isClosedBrace( char char_ );
	bool isOperator( char char_ );
	int getOperatorPriority( char operator1 );
	bool isWhitespace( char char_ );
	bool isLowerOrEqualPriority( char operator1, char operator2 );
	bool parseStringToTokens( const std::string & inputStr, vector<Token>& outputTokenArray );
	bool convertToPrefix( const vector<Token>& inputTokenArray, vector<Token>& outputPrefixTokenArray  );

}
#endif