Skip to content
Ruby code to parse and evaluate arithmetic expressions.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.md
arithmetic.rb

README.md

Parse infix arithmetic expression to a binary tree, which can print and evaluate itself.

Assumes expression is well-formed (matched parens, all operators have 2 operands).

Implements Michael B. Feldman's algorithm.

Submitted to Rosetta Code.

Something went wrong with that request. Please try again.