adding cs235

This commit is contained in:
dm
2016-04-06 20:46:10 -07:00
parent 8e52ce1982
commit cf99ec6565
178 changed files with 13079 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef __EXPMAN_H__
#define __EXPMAN_H__
#include <iostream>
#include <stack>
#include <vector>
#include <cstdlib>
#include <sstream>
#include <string>
#include "ExpressionManagerInterface.h"
using namespace std;
class expman : public ExpressionManagerInterface {
public:
bool isBalanced(string expression);
string postfixToInfix(string postfixExpression);
string infixToPostfix(string infixExpression);
string postfixEvaluate(string postfixExpression);
};
int precedence(string ch);
bool is_paren(string token);
bool is_int(string token);
bool is_valid_expression(string token);
bool is_valid_token(string token);
stack<string> reverse_stack(stack<string>);
stack<string> parse_expression(string);
#endif