Taking a dependancy on powershell may not work for you, but would allow you
to invoke any expression you can do on the command line and also can use any
..net lib (i.e. system.math) or external lib. And you can script your host
with it too if needed.
--
William Stacey [C# MVP]
PCR concurrency library:
www.codeplex.com/pcr
PSH Scripts Project
www.codeplex.com/psobject
<trashman.horlicks@btinternet.comwrote in message
news:1171533823.531106.146570@k78g2000cwa.googlegr oups.com...
| Hi,
| A few months ago, I saw an equation parser, written in c#, and using
| regular expressions (I think!), but now I cannot recall where I saw
| it- if anyone saw anything like this, could they please post the url?
| >From memory,
| the parser not only dealt with operator precedence, but also the use
| of brackets, so that any complicated expession could be re-written as
| an equation that could be read from left-to-right, as a simple
| sequence of sub-equations using basic operators, +,-,/,*
|
| The reason why I ask is that I am anticipating user input into a form
| as a string, and I need to convert it into
| an equation. The user inputted expression could be something like (a+
| (b-d)*(e-c))/f so I need to find a way to parse it.
|
| TIA
|
| Paul
|