> HI guys.
> 
> I need to calculate a string as a math piece. E.i. "100*500/2.5" Is
> there a build in parser in the Math class to do this?

Hi, I have just written a few blog posts about building a math parser. 
There is an introduction, some basic knowledge about grammars, sample 
implementation written in Ruby and a test suite. You can find these 
posts here:

* http://lukaszwrobel.pl/blog/math-parser-part-1-introduction
* http://lukaszwrobel.pl/blog/math-parser-part-2-grammar
* http://lukaszwrobel.pl/blog/math-parser-part-3-implementation
* http://lukaszwrobel.pl/blog/math-parser-part-4-tests

If you find the code useful, feel free to use it in your own program.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to