Arithmetic evaluation: Difference between revisions

m
Line 961:
* string invocation is used to evaluate binary operators hence other Icon binary operators (including handle multiple character ones) can be easily added
* uses Icon style type coercion on operands
* represents the AST as a nested list eliminating unneeded parenthesis.
 
* Notice that the code looks remarkably like a typical grammar, rather than being an opaque cryptic solution
* Does not rely on any library to silently solve 1/2 the problem; in fact, this code would probably suit being put into a library almost verbatim
==={{header|Icon}}===
<lang Icon>procedure main() #: simple arithmetical parser / evaluator