Table of ContentsProducts
Math Parser Components

Parse Expressions at Runtime
Bestcode Math Parser Components parse and evaluate mathematical expressions
given as strings at runtime (aka formula parser). The expression can contain predefined or user defined variables and functions. When evaluation is requested, the parser compiles the expression into a parse tree. Further evaluations are made using this tree that represents the expression. The parser can optimize the tree by simplifying branches that evaluate to a constant. Upgrades are free for registered users. The math parser components are available in various versions for different platforms/languages.

Bestcode Math Expression Parser Components

Math Parser for Borland Delphi, C++ Builder Developers:

TbcParser is a VCL math expression parser component that is verified to work with Delphi 4, 5, 6, 7,2006, 2007, 2009, Kylix 3 and C++ Builder 3, 4, 5, 6, 2006, 2009. Math Parser library comes as Delphi Pascal source code.

Math Parser for Visual Basic, Visual C++ Developers:

bcParserX is the COM version of the math expression parser component. It is an ideal choice for Visual Basic and Visual C++ programmers. Math parser library comes as a dll with optional C++ source code.

Math Parser for Java Developers:

JbcParser is the Java version of the math expression parser component. Mathematical expression parser library comes as a zip with Jar, Java source code.

View Sample Applet (Requires Sun’s Java Plugin).

Math Parser for .NET Developers:

bcParser.NET is the .NET (C#) version of the math expression parser component. Excellent match for Visual Studio .NET and Delphi.NET users. VB.NET and C# examples included. (C# Source code included.) Math parser library comes as a DLL with C# source code.

Math Parser for C++ Developers:

bcParserCPP is the Math Parser for C++. It comes as a CMathParser template class which you can include in any C++ project just like any other header file. CMathParser source code is portable across different compilers such as Visual C++, C++ Builder, GNU C++ and also across operating systems such as Windows, Linux, Mac OS. For advanced users, it can also provide numeric type flexibility due to C++ template capabilities and operator overloading by which you can define your own numeric types and plug them into the parser.

Math Parser for Python Developers:

PyMathParser is a Python class to evaluate mathematical expressions at runtime. Unlike compiled languages, Python’s eval() function makes life easy for us by doing the real parsing work. But there is still some work to make it secure. You can download PyMathParser for free.

Partner Product - uCalc Fast Math Parser

uCalc Fast Math Parser is a Windows DLL that provides capability to define syntax for expressions that can be evaluated at runtime. It can be used in C++ Builder, Delphi, PowerBASIC (PB/DLL and PB/CC), Visual Basic (classic), .NET (C#, VB.NET etc), and Visual C++.

Math Parser FAQ

Question: How can I use different number formats such as Hex, Binary etc besides decimal?

For example: 0xFE01 + 99 + #10011

Answer:

You can write a regular expression based pre-processor that will find these different formats and replace them with decimal value equivalents before feeding the expression to the math parser.


 

.

webmaster@bestcode.com