Click here to Skip to main content
15,897,148 members
Articles / Programming Languages / C#

An extensible math expression parser with plug-ins

Rate me:
Please Sign up or sign in to vote.
4.92/5 (147 votes)
13 Mar 2008CPOL51 min read 1.5M   29K   364  
Design and code for an extensible, maintainable, robust, and easy to use math parser.
#ifndef _MTEXCEPHELPER_INCLUDED
#define _MTEXCEPHELPER_INCLUDED

#include "../MTParserLib/MTParserException.h"

class MTExcepHelper
{
public:

	MTExcepHelper();

	// Set an exception
	void setLastExcep(const MTParserException &e);

	// Get one exception
	void getLastExcep(struct IMTExcepData *pExcep);

	// clears the exception structure
	void clearLastExcep();

	static MTSTRING getAllExceptionString(const MTParserException &e);

private:

	struct SLastException
	{
		MTExcepData data;
		MTSTRING desc;
	};
	
	std::vector<SLastException> m_lastExcep;			// last exception informations
	

};

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Canada Canada
Software Engineer working at a fun and smart startup company

Comments and Discussions