good chemistry is complicated,
and a little bit messy -LW
Seeking Advice: Writing a parserby Flame (Deacon)
|on Feb 08, 2002 at 04:27 UTC||Need Help??|
Flame has asked for the
wisdom of the Perl Monks concerning the following question:
Well, bored out of my mind earlier today, I decided that I wanted to reach into the realm of math for a while. Thus was born the concept behind Math::ParseEquasion (Temp-name until I can come up with something better)
Now that I have the idea though, I'm stuck with a few serious problems. Most significant is that I have no clue how to write a parser. So to start with, can anyone suggest any particularly good parsing modules I should examine?
Now, basically this is the way I'm aiming to have it work:
That little bit should have parsed it into a tree resembling this:
Hopefully that explained my goals well enough.
To wrap up, I ask that if anyone has any advice or suggestions, please post them. Although I did a search for something similar to this, and didn't find it, that doesn't mean it's not there, so if someone has already written something to do this, please say so.
"Weird things happen, get used to it."
Flame ~ Lead Programmer: GMS