Arithmetic evaluation: Difference between revisions
Content added Content deleted
(Formed bullet list of task requirements.) |
Underscore (talk | contribs) m ("binary relations" -> "binary operators" (You can call addition, etc. "operators", "operations", or "functions", but certainly not "relations".)) |
||
Line 6: | Line 6: | ||
* The AST must be used in evaluation, also, so the input may not be directly evaluated (e.g. by calling eval or a similar language feature.) |
* The AST must be used in evaluation, also, so the input may not be directly evaluated (e.g. by calling eval or a similar language feature.) |
||
* The expression will be a string or list of symbols like "(1+3)*7". |
* The expression will be a string or list of symbols like "(1+3)*7". |
||
* The four symbols + - * / must be supported as |
* The four symbols + - * / must be supported as binary operators with conventional precedence rules. |
||
* Precedence-control parentheses must also be supported. |
* Precedence-control parentheses must also be supported. |
||