Arithmetic evaluation: Difference between revisions

m
Spelling/grammar/aesthetics.
m (Spelling/grammar/aesthetics.)
Line 1:
{{task}}
A program which parsersparses and evaluates arithmetic expressions. Requirements: an AST for the expression must be created from parsing the input, the AST must be used in evaluation also, so no calling eval or similar if the language has such a thing. The expression will be a string or list of symbols like "(1+3)*7". + - * / as binary operators must be supported including precedence levels, as well as parentheses.
 
For those who don't remember, mathematical precedence is as follows:
* Parentheses
* Exponents (not in this program)
* Multiplication/Division (left to right)
* Addition/Subtraction (left to right)
 
=={{header|Haskell}}==
Anonymous user