Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm looking for a module recommendation to parse an expression like:
(((A + B) x C) % D)where the operators are not necessarily mathematical, I can handle the operators. I need to work from the inner-most parenthesis towards the outer-most. Working from inner to outer is the crucial aspect.
I couldn't come up with an RE to handle the problem. Text-Balanced didn't quite fit the bill here. Is Parse::RecDescent the way to go? It seems like overkill, is it even applicable to this type of problem? What's recommended?
thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Parsing a Formula
by merlyn (Sage) on May 29, 2003 at 16:27 UTC | |
|
Re: Parsing a Formula
by pzbagel (Chaplain) on May 29, 2003 at 16:31 UTC | |
|
Re: Parsing a Formula
by benn (Vicar) on May 29, 2003 at 16:30 UTC |