Arithmetic evaluation: Difference between revisions
Content added Content deleted
m (→{{header|Prolog}}: removed silly cut I left in by mistake) |
(clarification) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
A program which parsers and evaluates |
A program which parsers 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 of list of symbols like "(1+3)*7". |
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. |
+ - * / as binary operators must be supported including precedence levels, as well as paranthesis. |