Connecting Tech Pros Worldwide Forums | Help | Site Map

parser for math expressions

Newbie
 
Join Date: Jul 2009
Posts: 3
#1: Jul 1 '09
I am approaching parsing for the first time and I can't find which solution is best for me.
I need to process command line strings implementing mathematical operations (defined by me) on objects (defined by me), i.e.

Prompt:> ((A*B)->C)+2

A,B,C could be matrixes or more complex objects
*, -> ,+ could be operations which I want to implement

Is there a parser approach most suitable for this?

I have looked at Yapps2, Pyparsing but I can’t figure out what kind of complexity I will have to face and therefore which parser I should go for.

Any hint would be appreciated.

Jacopo

Reply