Arithmetic evaluation

From Rosetta Code
Revision as of 20:42, 11 December 2007 by Epsilon (talk | contribs) (Created the task)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Arithmetic evaluation
You are encouraged to solve this task according to the task description, using any language you may know.

A program which parsers and evaluates an arithmetic expression. Requirements an AST for the expression must be created from parsing, and that is what must be used in evaluation also, so no calling eval. The expression will be a string of list of symbols like "(1 + 3)*7". + - * / as binary operators must be supported including precedence levels, as well as paranthesis.