Find Jobs
Hire Freelancers

Mathematical Expression Parser and Evaluator

$30-250 USD

Completed
Posted over 10 years ago

$30-250 USD

Paid on delivery
We need to parse and evaluate generic mathematical expressions like below: std::string input = "(XT2 > XT1*XT3 + 21 || XT3 > 31) && (XT4 > 41 || (XT5 < 51 && XT6 > 61))"; XTs are the name of variables we have. They are _not_ primitive int, double etc. They are from a mathematical library that support the following functions: add (XT x1, XT x2) {//this will do x1+x2} multiply (XT x1, XT x2) {//this will do x1*x2} boolean_and (XT x1, XT x2) {//this will do x1 && x2} ... Here is an example: [login to view URL] = 10; [login to view URL] = 20; std::string input = "(X1 * X2 > 35) && ( X2 < 100 ) "; XT_boolean XT_result = xt_parse_evaluate (input); std::cout 35 will return false) You can use standard C++ and boost library for the implementation.
Project ID: 5030348

About the project

17 proposals
Remote project
Active 11 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, a similar expression parser was a small part of my last project. I used Bison as a parser . If you prefer , I can implement it with boost::spirit, but I think it is a little bit too much for this task. If you are not planning to extend this with additional "language" features, then the best way is a custom parser to be made.
$110 USD in 5 days
4.8 (5 reviews)
4.6
4.6
User Avatar
Hello! I have a very good experience in C++ programming, and I believe I am the best candidate for your project. I see the solution of your problem right away, so I am sure I succeed in a couple of days. The evaluation of expression can be implemented through the usage of stack, and the substitution of the variable values is not that hard, especially if the names have a known format XN where N is some integer. I am looking forward to hearing from you so that we could discuss the details. Thank you for your consideration! Sincerely, Alexander Chernoukhov
$60 USD in 2 days
5.0 (1 review)
1.6
1.6
17 freelancers are bidding on average $132 USD for this job
User Avatar
Hello. I have already large part of such "parser and evaluator". there is just needed to tune it for little for your requirements
$103 USD in 2 days
5.0 (105 reviews)
5.6
5.6
User Avatar
I am very proficient in c, c++. I have 15 years c++ developing experience now, and I have worked for 5 years. My work is online game developing, and mainly focus on server side, the lauguage is c++ under linux os. So, programming in c++ is never a problem. I used c++ to make many great projects, for example, I made the tools which can convert java files to c++ with the same meaning, ofcourse garbage collection included. I made our own mobile game using c++, I even can show you the demo of client. Trust me, please let expert help you.
$184 USD in 3 days
4.7 (20 reviews)
5.1
5.1
User Avatar
Hello there. I have lots experience in algorithms and C++. I can easily implement the parser and evaluator which satisfies your needs. Please share more details with me, and I can finish your project within 24 hours. I need more information about what operations will be used, their precedence, and also whether the final result will always be a XT_boolean or something else. Thank you. :)
$99 USD in 1 day
5.0 (25 reviews)
4.9
4.9
User Avatar
Hello navidm, I have read your description and am convinced I can finish this task for you quickly. I have extensive experience with C++, and have written equation parsers and solvers before. My proposal would be to use Boost::Spirit for parsing the expressions, then structure the equation in reverse Polish notation using the Shunting-yard algorithm, which makes it solvable directly. To make this work a mapping from string to variables has to be made. Does the math library supply this, or will you be happy to have a std::map holding this mapping, which needs to be populated before parsing? Looking forward to hear from you and start on this quickly. Kind regards, Sander
$55 USD in 3 days
5.0 (4 reviews)
4.9
4.9
User Avatar
Dear Sir, I am C++ Professional Software Developer, I am Linux Advanced Developer, I am Database Developer and designer. I can Handle your job and do everything extremely Grate. Regards,
$210 USD in 7 days
5.0 (3 reviews)
3.3
3.3
User Avatar
hi, I am experienced c/c++ developer . I am ready to code this for you. please assign me the project. Thanks
$77 USD in 1 day
4.5 (3 reviews)
2.5
2.5
User Avatar
Hi, I already finished few such projects. It was laboratory's task. I can create it again. I am expert in algorithms.
$150 USD in 3 days
5.0 (2 reviews)
2.4
2.4
User Avatar
Dear Sir/Madam I am proficient in C++ and I would be glad to complete this project for you. I have a couple questions: 1. Will you provide the XT class library? 2. Is usage of C++11 libraries allowed? Thank you in advance.
$166 USD in 7 days
5.0 (2 reviews)
2.2
2.2
User Avatar
Hi, I am an experienced C,C++,C# programmer and can provide you the mathematical library as per your requirements with good quality and performance. Please message me for further discussion. Thanks Karthik
$155 USD in 7 days
5.0 (2 reviews)
1.6
1.6
User Avatar
Hello, I'm interested in your project. I have a lot of experience with parsers. I even developed my own query language once. I can get it done quickly according to the specification. I look forward to hearing from you. Regards, Tom
$277 USD in 5 days
4.8 (1 review)
1.6
1.6
User Avatar
Hi I am electrical engineer and I have sound experience with C++. I can easily solve this task for you. I am gonna work on this to show you some demo. Please send me a message so I can show my work. Plus I have question regarding your example. You say that output is False. But I think its True. here it is (X1 * X2 > 35) && ( X2 < 100 ) (20*10 > 35) && (10<100) (200 > 35 ) && (10 < 100) .............. In C++ * has higher precedence than > (true) && (true) True Thats how I calculated it. Correct me if I am wrong. Looking forward to your reply..
$100 USD in 5 days
5.0 (1 review)
0.4
0.4
User Avatar
We are a Group of Engr from the best university of Pakistan. We are interested in your project. Allow us to do the Project.
$188 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello! I've done a project like this some time before(parsing math expressions with all opearions and functions), so it will be not a problem for me.
$100 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I just am finishing up learning C++ on my own. I am looking for real world experience. The example you provided is something I can do. I will be able to complete your project.
$60 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
The code will be easy to understand. The code will cover the requirements you indicated. You will get what you are requiring.
$200 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
ready to complete the project............................................................................................
$222 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CANADA
Toronto, Canada
5.0
5
Member since Mar 10, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.