adding cs235
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user